Skip to content
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

Open
wants to merge 4 commits into
base: agora-chat
Choose a base branch
from
Open

Conversation

lemon-chen
Copy link
Collaborator

No description provided.

Copy link
Contributor

@billy-the-fish billy-the-fish left a 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:
Copy link
Contributor

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.
Copy link
Contributor

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`.
Copy link
Contributor

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:

en-US/markdown/agora-chat/agora_chat_uikit_ios.md Outdated Show resolved Hide resolved
@end
```

In `ViewController.m`, replace the `viewDidLoad` function with the following code:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. <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:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. <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.
Copy link
Contributor

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**.
Copy link
Contributor

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.

en-US/markdown/agora-chat/agora_chat_uikit_ios.md Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants