Quick Start
Clone the Turms repository (currently none of the client code is released to any public dependency repository). Reference command:
git clone --depth 1 https://github.com/turms-im/turms.git
In your project, import the corresponding client as follows:
For projects using turms-client-js:
First go to the directory of the turms-client-js subproject, and execute the command
npm run quickbuild
, which will install the dependencies and compile the release package of the turms-client-js. Then:- For projects using modules:
- Installation: Add under
dependencies
ofpackage.json
:"turms-client-js": "file:<YOUR_OWN_PATH>/turms-client-js"
- Use: import Turms client through
import TurmsClient from 'turms-client-js'
- Installation: Add under
- For projects that do not use modules: add on HTML:
<script type="text/javascript" src="<YOUR_OWN_PATH>/turms-client-js/dist/turms-client.iife.js"></script >
, and use the global objectTurmsClient
directly.
- For projects using modules:
For projects using turms-client-kotlin:
Installation: In the directory of the turms-client-kotlin subproject, execute the command
mvn clean install
, which will compile turms-client-kotlin and install its JAR file to the local Maven repository.Usage:
For Maven projects, add:
xml<dependency> <groupId>im.turms</groupId> <artifactId>turms-client-kotlin</artifactId> <version>0.10.0-SNAPSHOT</version> </dependency>
For Gradle projects, add:
groovyrepositories { mavenLocal() } dependencies { implementation 'im.turms:turms-client-kotlin:0.10.0-SNAPSHOT' }
For projects using turms-client-swift: In Xcode, specify the local turms-client-swift folder path through the
Frameworks, Libraries, and Embedded Content
under theGeneral
tab and add it.For projects using turms-client-dart: add the following dependencies to your project's
pubspec.yaml
:yamldependencies: turms_client_dart: path: <YOUR_OWN_DIR>/turms_client_dart
Write business logic code