From 7b945c11f01925c37547edecd3c51d01ac6a7bc1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81mile=20Be=CC=81lair?= Date: Sat, 25 Mar 2017 13:43:44 -0400 Subject: [PATCH] Update native READMEs --- android/README.md | 36 ++++++++++++++++++++++---------- ios/README.md | 52 ++--------------------------------------------- 2 files changed, 27 insertions(+), 61 deletions(-) diff --git a/android/README.md b/android/README.md index 8e2ea2d..54d006c 100644 --- a/android/README.md +++ b/android/README.md @@ -1,6 +1,8 @@ -# CS Games - Sample Android App +# CS Games 2017 - Mobile - Android App -This project will guide you setting up your environment to build and run a sample Android application on your local machine. +This project serves as a starting base for the CS Games 2017 Mobile Competition. + +You may edit it as much as you like (or start completely from scratch if you prefer) – as long as you make something awesome! ## Prerequisites @@ -11,42 +13,54 @@ Make sure you have the following software installed before beginning: You can download these from the [Android Developer website](http://developer.android.com/sdk/index.html). -> **NOTE:** If you have a Mac computer running macOS 10.11.5 or later, you may also be interested in our [Sample iOS app](https://github.com/mirego/csgames-sample-ios/), which uses Xcode and the latest iOS SDK. +> **NOTE:** If you have a Mac computer running macOS 10.11.5 or later, you may also be interested in our [iOS app](https://github.com/mirego/csgames17-competition/tree/master/ios), which uses Xcode and the latest iOS SDK. ## Getting started -First, clone the project from Github: +First, make sure you have cloned the project from Github: ``` -git clone git@github.com:mirego/csgames-sample-android.git +git clone http://github.com/mirego/csgames17-competition.git ``` Then, in Android Studio: -- Select **Import project (Eclipse, ADT, Gradle, etc.)** in the Welcome Screen, go find the repository you just cloned, and click **OK**. +- Select **Import project (Eclipse, ADT, Gradle, etc.)** in the Welcome Screen, go find the `android` folder in the repository you just cloned, and click **OK**. - Once the project is open, click on **Sync Project with Gradle Files** in the main toolbar (or navigate to `Tools -> Android` in the application menu and select the same option).

Once you see a `BUILD SUCCESSFUL` notice in the Gradle Console, your environment should be ready to build and run the project. +### Web server + +For the app to communicate with the local web server, you must set your local IP address in the project configuration file. + +In `app/src/main/java/com/mirego/cschat/AndroidModule.java`: + +- Change the value of the server URL in `provideRetrofit.baseUrl()` to the IP address of your computer on the local network (you cannot set `localhost` or `127.0.0.1` because it will use the loopback of the Android device). + ## Building the project The project should have already been configured as an Android project in Android Studio, therefore you should see a target named `app` in the main toolbar, with **Play** and **Debug** buttons on its right. -Press on the **Debug** icon, and if you don't already have one, [create a new Android Virtual Device](https://developer.android.com/studio/run/managing-avds.html), then select it to run the project. +Press on the **Debug** icon, and if you don't already have one, [create a new Android Virtual Device](http://developer.android.com/tools/devices/managing-avds.html), then select it to run the project. Once the app appears running in your Virtual Device, your environment is ready for the competition. -## Support +## How it works + +**CSChat** is a small application inspired by [Facebook Messenger](https://www.messenger.com/) and [Slack](https://www.slack.com/). It is very basic however, as it can only send basic messages to single conversations. + +It should be fairly straightforward to use and customize, but if you want to know more about it, you can read on. -If you have questions about the project or encounter any problem while configuring your environment, please don't hesistate to contact the [project author](https://github.com/ebelair) or submit an [issue](https://github.com/mirego/csgames-sample-android/issues). +> **NOTE:** Before you begin, make sure the web server is up and running (see the [server page](https://github.com/mirego/csgames17-competition/tree/master/server)). ## License -This sample app is © 2016 [Mirego](http://www.mirego.com) and may be freely +This competition is © 2017 [Mirego](http://www.mirego.com) and may be freely distributed under the [New BSD license](http://opensource.org/licenses/BSD-3-Clause). -See the [`LICENSE.md`](https://github.com/mirego/csgames-sample-android/blob/master/LICENSE.md) file. +See the [`LICENSE.md`](https://github.com/mirego/csgames17-competition/blob/master/LICENSE.md) file. ## About Mirego diff --git a/ios/README.md b/ios/README.md index ae61367..1e159a6 100644 --- a/ios/README.md +++ b/ios/README.md @@ -13,7 +13,7 @@ Make sure you have the following software installed before beginning: You can download these from the [Apple Developer website](https://developer.apple.com/downloads/). -> **NOTE:** You need a Mac computer running macOS 10.11.5 or later. If you don't have one, you may check our [Sample Android app](https://github.com/mirego/csgames-sample-android/), which can be run on Windows, Linux and older versions of macOS. +> **NOTE:** You need a Mac computer running macOS 10.11.5 or later. If you don't have one, go to our [Android app](https://github.com/mirego/csgames17-competition/tree/master/android), which can be run on Windows, Linux and older versions of macOS. ## Getting started @@ -51,7 +51,7 @@ open CSChat.xcworkspace In Xcode, run the project by simply pressing the "Play" button on the top left, or by hitting `⌘R`. -

+

Once the app opens up in the iOS Simulator, you are ready to start coding. @@ -63,54 +63,6 @@ It should be fairly straightforward to use and customize, but if you want to kno > **NOTE:** Before you begin, make sure the web server is up and running (see the [server page](https://github.com/mirego/csgames17-competition/tree/master/server)). -### Views - -The app contains two main view controllers: - -- `MainViewController`: The **home screen**, with *login* and *registration* -- `MessagesViewController`: The **messaging screen**, with random text strings and a fixed image - -You will customize mostly the latter, where you can add real messaging functionalities. You are free to change the project structure and add as many views as you want, but keep in mind that 3 hours go very fast. - -### Libraries - -As you will see from the `Podfile`, this project uses a couple of libraries: - -#### Public libraries -- **[Alamofire](https://github.com/Alamofire/Alamofire)**: Simple HTTP networking, to easily send requests to the web server -- **[SVProgressHUD](https://github.com/SVProgressHUD/SVProgressHUD)**: Simple HUD controller, to display loading indicators and operation results -- **[SwiftyJSON](https://github.com/SwiftyJSON/SwiftyJSON)**: Simple JSON-handler, to easily handle server responses - -#### Mirego libraries -- **[MCUIColorUtils](https://github.com/mirego/MCUIColorUtils)**: Extension to UIColor, adding convenient methods for color management -- **[MCUIViewLayout](https://github.com/mirego/MCUIViewLayout)**: Extension to UIView, making manual view layouting easier -- **[MRGArchitect](https://github.com/mirego/MRGArchitect)**: Device-agnostic tool to load different values depending on the current screen size - -These make up the project as it is, but you may add or remove pod dependencies as much as you like. - -### Data Sources - -The app contains two data sources: - -- `UserApi`: For user login and registration -- `MessageApi`: For messages sent through the app - -They offer very basic support for two routes available in the [server](https://github.com/mirego/csgames17-competition/tree/master/server). The data is not validated, except for the user login, where only existing users are authorized. - -### Next steps - -So, what's the room for improvement? - -Here are some features you could add to this app: - -- Rich text messages -- Real-time socketed messaging -- Group conversations -- Conversation messages paging -- Push notifications - -The list is non-exhaustive, feel free to do anything you can think of! - ## License This competition is © 2017 [Mirego](http://www.mirego.com) and may be freely