An iOS Application for messaging with Push Notification
Not Available in App Store Available in App Store
Report Bug
·
Request Feature
·
Video
Table of Contents
This app was create for me to learn about Model–view–viewmodel(MVVC), build UIKit's user interface programmatically without storyboard and also, push notification from a user's device to another user's device. Also, sending mess notification for marketing purposes. Account is registered using Firebase Authentication and account information are store in Cloud Firestore. User profile image is stored in Cloud Storage and Firebase Cloud message is used to push notification.
- Registering new Account.
- Logging in.
- Live update messaging.
- Push notification when a user send a message.
- Push notification from admin to all the user.
- Viewing account information.
This application uses Cocoapods and ensure that you have Cocoapods installed in your machine. Moreover, this project uses Firebase for Firestore, Storage and Cloud Messaging. Thus, you have to include your GoogleService-Info.plist for Firestore and Storage and Server key for Cloud Messaging.
Ensure that you have installed all the dependecies for this project. After Cocoapods is installed, open up your terminal and cd to the folder directory of this project and type:
pod install
Once install, you can open up the FireChat project. White Color Icon (Not the Blue color icon project).
Ensure that you have change the bundle identifier and team of this project. Click FireChat > Signing and Capabilities > Bundle Identifier and then Team.
This is to allow push notification for the app.
- Head over to Apple and click on Account.
- Click on Certificates, IDs & Profiles
- Go to Identifiers
- Click on the add button add new identifier Select App IDs > App > Add the Bundle ID you have created in this project and Enabled Push Notifications
2.3 Establish connectivity between Cloud Messaging and the Apple Push Notification service (APNs authentication key)
- At the Apple's Certificates, IDs & Profiles.
- Go to Keys and click on the add button.
- Enable Apple Push Notifications Service APNs. You can give any Key Name.
- Remember the Key ID and download .p8 file this will be used for firebase setup.
Before you start here, ensure that you have the Key ID in step 2.3.
- Go to Firebase and start new Project.
- Follow the steps. Disable Google Analytics as this project will not be using it.
- Click on iOS icon to get started. Follow the step
- Download GoogleService-Info.plist and continue. You do not need to add the Firebase SDK or initialization code as I had already did it.
- On the left panel of Firebase console, click on Authentication
- Click on get started
- Go to Sign-in method and enable Email/Password
- On the left panel of Firebase console, click on Firestore
- Click on Create database
- Go to Sign-in method and enable Email/Password
- Select start in production mode and choose the location you want.
- On the left panel of Firebase console, click on Setting icon > Project Setting
- Click on Cloud Messaging
- Go to APNs Authentication Key. Click on Upload . Drag the .p8 file you have download in step 2.3 and add the Key ID you and created at step 2.3. Also add your Apple Team ID.
- Scroll up and go find the Server key. Copy the server key and go to PushNotificationSender.swift at the API folder and change the server constant to the server key you have coplied.
Now, you are good to go.
This project is part of a course from Stephan Dowless. However, some modifications were made:
- Added Account Information ViewController.
- Added push notification.
- Changed colors.
- Added App Icons.
- Removed Setting Table Cell.
As some of the stuff was not taught in the course to made a full functional messaging app, also setting tableview cell was not doing anything and serve no purposes.
MIT License
Copyright (c) [2021] [CHUA SWEE KWANG]
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Copyright (c) [2021] [CHUA SWEE KWANG]

