Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/mikaelm1/blind-chat-ios


https://github.com/mikaelm1/blind-chat-ios

Last synced: about 1 month ago
JSON representation

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 os

SECRET_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 = True

SERVER_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.