Skip to content
Tomomir edited this page Dec 11, 2018 · 5 revisions

Installation guide This guide describes how to download the project and setup all needed services to start using the app.

1 Prerequisites To be able to build the application, you need to have Xcode 10.1 or newer installed. Furthermore, in case you need to update some of the used pods, install CocoaPods 1.5.0. You can do it by running the command $ sudo gem install cocoapods in your terminal. Installing additional pods can be done by command pod install, which should be run at project’s directory. Updating the pods to newer versions can be done by the command pod update.

2 Downloading the app Dowload the app from the repository.

3 Running the project After downloading the project, it can be compiled immediately. You can try it out with our default database, but you will not be able to add new articles, buy additional credits or change any of the content saved in the database. To make your own server and web application for managing the content, download server side from https://github.com/ptrslr/rufus-admin and set it up according to the guide found at Peter Solař’s bachelor thesis.

4 Firebase By now, you should have created your Firebase project at Firebase Console. Now we will set up the iOS app inside the console. Change the bundle ID inside the Xcode in your bundle settings under General tab to something different (ususal format is com.companyname.productname).Go to your project inside Firebase Console and add an iOS app. As iOS bundle ID choose the bundle you have chosen the step before. Download and replace GoogleService-Info.plist file. Skip adding Firebase SDK and adding initialisation code, it is already added. Run your app to verify installation.

5 Google login Inside Firebase Console go to the Authentication page. Under Sign-in method, enable Google. Copy your REVERSED_CLIENT_ID, which can be found inside GoogleService-Info.plist. Open your project configuration: double-click the project name in the left tree view. Select your app from the TARGETS section, then select the Info tab, and expand the URL Types section. Replace present Google client ID with your copied REVERSED_CLIENT_ID. Now you should be able to sign in to the app via any Google account.

6 Facebook login Go to Facebook Developers Documentation and follow the steps to create a new app. Your developer environment should be “SDK: Cocoapods”. You do not need to install any SDK nor add any code inside the app. The only thing you are suppose to replace is in Info.plist file. Change “FacebookAppID”, “FacebookDisplayName” and under “CFBundleURLSchemes” replace the string “fb1548249458654672” with the one found in the guide inside XML snippet code. Go to the Authentication page inside Firebase Console. Enable Facebook and fill in App ID and App secret. They can be found under basic settings of your app inside Facebook Developer Console. Now you should be able to use Facebook to sign in to the app.

7 In-app purchases To be able to use or test In-App purchases, you need to purchase Apple Developer Membership. It costs 99 dollars and lasts 1 year. If you own the membership, you can continue to following steps. To setup In-App purchase go to App Store Connect site. Create a new iOS app. Under Features tab, add new Consumable In-App Purchase. Fill in required informations and choose the pricing according to your preferences. Inside the Xcode project, go to “InAppPurchasesHandler.swift” and replace the CONSUMABLE_PURCHASE_PRODUCT_ID with the Product ID you have chosen in your newly added In-App Purchase. Create Sandbox user inside App Store Connect to test out your purchase.

8 Customisation All basic customisation can be done inside Config.xconfig file. To customise the article detail screen, change the Style.css file. Note that before your first login, you can change the STARTING_CREDITS attribute inside Config file to any number you wish. The number will represent credits you get after your first login. This should be your primary way to test buying articles if you do not own Apple Developer Membership.

Clone this wiki locally