https://github.com/fromkk/realmchat
https://github.com/fromkk/realmchat
realm realmmobileplatform swift swift-3 swift3
Last synced: 5 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/fromkk/realmchat
- Owner: fromkk
- Created: 2016-10-06T11:51:13.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2016-12-04T00:28:06.000Z (almost 9 years ago)
- Last Synced: 2025-04-23T22:53:51.582Z (5 months ago)
- Topics: realm, realmmobileplatform, swift, swift-3, swift3
- Language: Swift
- Size: 1.23 MB
- Stars: 14
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# RealmChat sample
Sample of iOS chat application with Realm and Realm Object Server.

## Usage
### Carthage
Run `carthage update --platform iOS` with your terminal.
### Realm Object Server setting
Modify **RealmChat/Supports/RealmConstants.swift**
```swift
enum RealmConstants {
private static let host: String = "127.0.0.1" //YOUR Realm Object Server host name here
private static let databaseName: String = "realmchat" //database name
private static let port: Int = 9080 //Realm Object Server Port here
static let authURL: URL = URL(string: "http://\(host):\(port)")!
static let realmURL: URL = URL(string: "realm://\(host):\(port)/\(databaseName)")!
static let adminToken: String = "YOUR ADMIN TOKEN HERE" //admin token here ex: /etc/realm/admin_token.base64
static let identity: String = "USER IDENTITY HERE" // RLMSyncUser.identitystatic func setDefaultUser(user: RLMSyncUser) {
let configuration: Realm.Configuration = Realm.Configuration(syncConfiguration: (user, realmURL))
Realm.Configuration.defaultConfiguration = configuration
}
}
```