Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mikaelm1/blind-chat-ios
https://github.com/mikaelm1/blind-chat-ios
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/mikaelm1/blind-chat-ios
- Owner: mikaelm1
- License: mit
- Created: 2016-09-20T03:15:49.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-04-15T19:01:21.000Z (almost 8 years ago)
- Last Synced: 2024-11-11T17:48:40.844Z (3 months ago)
- Language: Swift
- Size: 411 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Blind Chat
A chat application built in Swift using Swift socketio [library](https://github.com/socketio/socket.io-client-swift) for client
side chat functionality. Communicates with a Flask [backend](https://github.com/mikaelm1/blind-chat-api).
## Getting Started
### Setup Client Side
1. Either clone the repo or download the zip project.
2. `cd` into the directory where you downloaded the project and run`pod install`
3. Open the .xworkspace project
4. If you see a file called `APIKeys.swift` under Util directory, delete it
5. Find the IP address of youre computer ([instructions](http://www.wikihow.com/Find-Your-IP-Address-on-a-Mac)). Open `APIManager.swift` and change line 15 to:`private let localhost = "your ip address"`. Then open `ChatAPIManager.swift` and change line 16 to: `var socket = SocketIOClient(socketURL: URL(string: "http://yourIPAddress:5000")!)`### Setup Backend
1. Go to the backend [repo](https://github.com/mikaelm1/blind-chat-api) and either clone or download it.
2. `cd` into the directory where you downloaded the project and run `virtualenv venv`
3. Then run `source venv/bin/activate`. This will activate the virtual environment created above.
4. While in the virtual environment, run `pip install -r requirements.txt`. This will install all the necessary dependencies
5. Create a file called settings.py. Add the following to the file:```
import osSECRET_KEY = 'supersecretpassword'
DEBUG = True
DB_USERNAME = 'root'
DB_PASSWORD = ''
CHAT_DATABASE_NAME = 'chatdb'
DB_HOST = 'localhost'
DB_URI = "mysql+pymysql://%s:%s@%s/%s" % (DB_USERNAME, DB_PASSWORD, DB_HOST, CHAT_DATABASE_NAME)
SQLALCHEMY_DATABASE_URI = DB_URI
SQLALCHEMY_TRACK_MODIFICATIONS = TrueSERVER_HOST = "your ip address"
```
6. Run `python manage.py run`. If you don't get any errors, then the server is running. You can now run the iOS app and start chatting!### Note
Running the app on the simulator can sometimes fail to connect to the server. If it doesn't connect, rerun the app.