-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add agora chat uikit ios guide #434
base: agora-chat
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nearly there. Looking forward to testing the working app.
|
||
## Understand the tech | ||
|
||
The workflow of peer-to-peer messaging is as follows: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
workflow for peer-to-peer
|
||
![](images/chat-uikit-architecture.png) | ||
|
||
- The clients retrieve a token from your app server. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
from your <authentication|token> server
|
||
1. Download the [souce code for Agora Chat UIKit](https://github.com/AgoraIO-Usecase/AgoraChat-UIKit-ios.git). | ||
|
||
2. Go to the root directory of your Xcode project and run the following command to create a `Podfile`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Create a Podfile for your project.
In the terminal, navigate to the rood directory of the EaseChatKitExample
you just created and run the following command:
@end | ||
``` | ||
|
||
In `ViewController.m`, replace the `viewDidLoad` function with the following code: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- <what the code does>, <how to add it to the app>.
``` | ||
|
||
|
||
Add the following code in `ViewController.m` to create the input box and **Chat** button: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- <what the code does>, <how to add it to the app>.
|
||
## Test your app | ||
|
||
In **Xcode**, select an iPhone simulator and click **Start**, and you will see the following user interface. Input a Chat ID, and you can now send a peer-to-peer message. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<why you have to do it> <how to do it>
You need to have another Agora Chat interface open so you can test chatting. Is there a web interface or something the useer can connect to?
|
||
![](images/try_uikit_ios.png) | ||
|
||
> If the project build fails, and **Xcode** reports **Library not found for -IMasonry**, close the project and open **EaseChatKitExample.xcworkspace** (instead of **EaseChatKitExample.xcodeproj**) in Xcode, selector an iPhone simulator and click **Start**. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is in the wrong place. You should have build as the last step in the implementation.
No description provided.