-
Notifications
You must be signed in to change notification settings - Fork 12
Building source code with Xcode
Before building the source code, please check the requirements: Requirements to use RIA DigiDoc
This project needs Homebrew to be installed on user computer. If you don't have Homebrew installed in your machine, or are using older version of Homebrew, you can find the installation instructions on Homebrew website: https://brew.sh
This project also uses CocoaPods for dependencies management. If you don't have CocoaPods installed in your machine, or are using older version of CocoaPods, you can install it in terminal by running command "sudo gem install cocoapods". For more information go to https://cocoapods.org/
Project also includes Firebase Crashlytics integration. To setup Firebase Crashlytics, please follow Steps 1-3 on Firebase Documentation webpage. GoogleServices-Info.plist file must be placed in XcodeRootProject/MoppApp folder.
Once you have Homebrew and CocoaPods installed, you need to install swift-sh and podfiles, that this project requires.
- In terminal navigate to MoppApp folder in project.
- Run command "brew install mxcl/made/swift-sh" to install Swift-sh
- Run command "pod install".
- Open MoppApp.xcworkspace, select MoppApp project from the Project navigator, click on MoppApp target, choose Build Settings tab from the top. Fill the fields with the following values:
4.1. DEFAULT_CENTRAL_CONFIGURATION_URL = https://id.eesti.ee
4.2. DEFAULT_CENTRAL_CONFIGURATION_UPDATE_INTERVAL = 4
4.3. DEFAULT_CENTRAL_CONFIGURATION_TSL_URL = https://ec.europa.eu/tools/lotl/eu-lotl.xml
- To validate signatures in offline mode, eu-lotl.xml and EE.xml files are bundled in "MoppApp/MoppApp/tslFiles.bundle" file. You can manually update TSL files by downloading the latest TSL files:
1. https://ec.europa.eu/tools/lotl/eu-lotl.xml -> Rename file to "eu-lotl.xml"
2. https://sr.riik.ee/tsl/estonian-tsl.xml -> Rename file to "EE.xml"
3. Move these files to "MoppApp/MoppApp/tslFiles.bundle"
In the future, when you pull updates from repo, you may need to repeat "pod install". This is necessary when there are changes to pod dependencies. When only pod version has changed, you may use "pod update" instead.
Make sure you open project with MoppApp.xcworkspace after installing pod files. Use MoppApp target for building.
Lastly in order for the build to succeed your Apple developer account should be added Riigi Infosüsteemi Amet development team and the same account should be added to Xcode.
NOTE: A workaround to build without being in the Riigi Infosüsteemi Amet development team is to give MoppApp targets (MoppApp, MoppAppTestEnv, shareExtension) a unique bundle identifier