An iOS app which is based on Hangman game.
Hangman game:
User has to find the missing words presented as blanks. The words are from the themes such as Famous People, Countries, Movies, TV shows, Dictionary and by Mixing all themes. User has 7 tries to find a word if not it is a HANGMAN :P.
Motivation: To replicate this Webapp into iOS app - https://thewordsearch.com/hangman/
This will start the Themes server at specified localhost and gets request from ios frontend client app and returns a json of key value pairs such as wordOfTheDay and clue.
FYI: Backend uses Vapor framework, so if you don't have vapor please install by following instructions from here: https://docs.vapor.codes/4.0/install/macos/
After installing vapor or if you have vapor already, follow the instructions below to setup:
- Goto The Theme server directory -
cd Backend/ThemesServer
- Open the Theme sever project using xcode -
vapor xcode
- After the xcode project opens successfully, first build the project by doing
CMD+B
and run the project usingCMD+R
. - When it runs successfuly, it should start the localhost server at the specified port on the console.
- Once the server is successfully running, you can test by typing this endpoint on the browser for example:-
http://127.0.0.1:8080/themes/0
and this should return JSON
IMPORTANT NOTE: If you want to try setting up the above server in a real device, then Goto your target in the vapor > Edit Scheme > Run > In the Arguments passed on launch > Type the following like in the in the screenshot below.
MAKE SURE YOUR IPHONE WIFI IS CONNECTED TO SAME AS YOUR MAC'S WIFI, SO THAT IP ADDRESS SUPPLIED WILL BE THE SAME.
serve --hostname YOUR_IP_ADDRESS --port 8080
This is the iOS client app which utilizes above started backend vapo server to get data and supply it for the Hangman game, namely clue and word of the day.
- Make sure you start backend server, if you haven't done already - please follow above Backend part for instructions
- Open Frontend ios client app project in xcode -
open Frontend/Hangman/Hangman.xcodeproj
(This will open in xcode if you have it installed) - After the xcode project opens successfully, first build the project by doing
CMD+B
and run the project usingCMD+R
. - Depending upon what device you connect (physical or simulator), it should open in that and start the Hangman game.