HiPlace – iOS
HiPlace is a Twitter like social media app that users can share their moments, follow other users and can send direct messages privately.
- User can easily log in to the app from the registration screen or quickly log in to the app with Huawei Id.
- You can access posts of users on the Home Tab.
- On the Search Tab, you can find new users based on name or username.
- When user presses the profile photo of the post’s owner on the Home Tab or Search Tab, profile page of the user opens and you can follow/unfollow the person or send a direct message to the user.
- On the Messages Tab, you can see and reply your conversations. With direct messaging, you can send messages to other users to have a private conversation.
This project is developed by using SwiftUI 2.0.
Auth Service is used for creating a new account, loggin in and resetting password.
All posts, messages and user profile information are stored in CloudDB.
CloudDB is the main and the only database of HiPlace app.
Instead of requesting multiple queries (on CloudDB) and collecting different query results consecutively on the client, Cloud Functions is used to collect necessary data and return it to client with single request.
This was possible by integrating CloudDB on Cloud Functions.
When a user sends direct message, push kit is used to notify the other user.
Notification Title: Full name of the user
Notification Body: Message
You need to import agconnect-services.plist file to run the project correctly.
If you don’t have a Huawei Developer account, check this document to create a new one.
Login to Huawei Developer Console.
If you don’t have a project and app, check this document to learn how to create.
Go to My Projects and select your project that you were created. And click Project Settings then go to Manage APIs page to nable necessary SDKs.
For this project you need to set enable Auth Service, Push Kit and HUAWEI Analytics.
Now your app can use the enabled services APIs but also, you need to enable following services for your project as well:
— Auth Service
— Cloud Functions
For CloudDB Object Types, you can have a look at the following path: HiPlace/Utils/CloudDbHelpers/ObjectTypes
Then return to Project Settings page and download agconnect-services.plist file.
Move the configuration file into your project, below Info.plist file.
- You need a Mac with Xcode 11 or later installed.
- You need Cocoapods to install libraries.
To integrate HMS Services, you must complete the following preparations:
- Create a SwiftUI project.
- Create the Podfile, and add necessary framework(s).
Edit the Podfile.
Add the following pods to your pod file:
<b> pod 'AGConnectCore' pod 'HiAnalytics' pod 'AGConnectCrash' pod 'AGConnectAuth' pod 'AGConnectDatabase' pod 'AGConnectFunction' pod 'HmsPushSDK' </b>
// third party pod
// for downloading photos asynchronously
pod install command.
HiPlace is licensed under the Apache License, version 2.0.