CometChat ionic Demo app (built using CometChat Pro) is a fully functional messaging app capable of one-on-one (private) and group messaging. The app enables users to send text messages.
-
Before proceeding, make sure the latest version of Node.js and npm are installed.
-
Install the Ionic CLI
npm install -g ionic
For further and detailed steps, please visit the ionic documentation
Signup for CometChat and then:
- Create a new app - select version as v2 and region as Europe or USA.
-
Head over to the API Keys section and click on the Create API Key button
-
Enter a name and select the scope as Auth Only
-
Now note the API Key and App ID
-
Replace
appID
,apiKey
andappRegion
in src/app/login/login.page.ts with your APP ID, API KEY and APP Region respectively.
Signup for CometChat and then:
- Create a new app - select version as v1
-
Head over to the API Keys section and click on the Create API Key button
-
Enter a name and select the scope as Auth Only
-
Now note the API Key and App ID
-
Replace
appID
,apiKey
in src/app/login/login.page.ts with your APP ID, and API KEY respectively.
Once you have changed the app key values you can install the dependencies and run the project:
npm install
$ ionic serve -l
The above command will run the App in your browser.
To run the App in device simulator you can run the below command :
$ ionic cordova emulate ios --target=iPhone-6s
Note : You can change the platform (ios/android) and target(device on which you want) in the above command.
Feel free to make a suggestion by creating a pull request.