Swift Chat Example
Chat implemented in Swift! Now works in Xcode 6.0.1.
What's here
- You can log in with Twitter.
- You can post / receive messages
- Powered by Firebase
If you have issues with XCTest, check out this issue.
Setup
This example still has some rough edges around authentication. Push through them, though. It's worth the effort.'
Configure Firebase
- Create a new Firebase.
- Clone this repo.
- Open
FireChat-Swift.xcodeproj
in Xcode. - Edit
MessagesViewController.swift
and changeswift-chat.firebaseio.com
to point to your Firebase.
Configure Login
- Create a new Twitter app to use for login.
- Go to your Firebase Dashbaord and navigate to your Firebase.
- Click 'Login & Auth' in the left side menu. Select 'Twitter' and check the box to 'Enable Twitter Login'
- Paste your Twitter API Key and API Secret into the form.
- Edit
LoginViewController.swift
and changeswift-chat.firebaseio.com
to point to your Firebase. UpdatetwitterAppId
on the next line to match your Twitter API Key. - Run the app on a device or simulator
- On your iOS device or simulator, go to Settings, scroll down to the accounts section (which contains Twitter, Facebook, Flickr and Vimeo), select Twitter -> Add Account.