@@ -102,10 +102,63 @@ ob deploy push
102102```
103103
104104## Building for mobile
105+Until Obelisk will be able to automate this workflow via single command you are recommended to build mobile apps manually as follows.
105106
106−### Android
107+### iOS
107108
108−Until Obelisk will be able to automate this workflow via single command you are recommended to build android apps manually as follows.
109+#### First time setup
110+Development on iOS requires a computer running macOS and an iOS developer account.
111+
112+##### iPhone
113+1. Connect the iPhone on which you'd like to run builds - this will open up iTunes.
114+1. Click accept to authorize on both the computer and the iPhone.
115+
116+##### Xcode
117+1. Install XCode 8.2 (contains iOS SDK 11.2)
118+1. Open XCode once so that it runs its post install tool setup.
119+
120+You can verify that you have the correct version by running
121+```
122+xcodebuild -showsdks
123+```
124+
125+##### Certificates
126+Now you need to inform Apple of your development devices and permissions by
127+adding credentials to the correct provisioning profile via the Apple Developer
128+portal.
129+
130+1. Open up XCode and go to Preferences - Accounts. Select the organization
131+Member role, click Manage Certificates, and add an iOS Development
132+certificate.
133+1. Go to [developer portal - devices](https://developer.apple.com/account/ios/device/) and add your device.
134+To find your device's UDID, select it in iTunes and click the serial number.
135+1. Go to [developer portal - development profiles](https://developer.apple.com/account/ios/profile/limited).
136+Create a development profile and add your certificate and device.
137+Click "Generate" and then download and open the profile.
138+
139+#### Building
140+1. In your project's `default.nix` set values for `ios.bundleIdentifier` and `ios.bundleName`.
141+Ensure that `bundleIdentifier` matches the App ID of the development profile, or that you are using a wildcard profile.
142+1. Run `nix-build -A ios.frontend -o result-ios` to build the app. Find it at `result-ios/frontend.app`
143+
144+#### Deploying
145+1. Connect the registered iPhone.
146+1. Find your Apple Team ID in the [developer portal](https://developer.apple.com/account/#/membership).
147+1. Run the deploy command with the Team ID as argument, e.g.
148+```
149+ios-result/bin/deploy XXXXXXXXXX
150+# or in debug mode:
151+ios-result/bin/deploy -d XXXXXXXXXX
152+```
153+
154+#### Debugging
155+It's also possible to inspect iOS WkWebView apps once they are installed in the iPhone:
156+1. On the desktop, go to Safari > Preferences > Advanced and enable Develop menu.
157+1. On the iPhone go to Settings > Safari > Advanced and enable Web Inspector.
158+1. Open the app on the iPhone while it is connected to the desktop.
159+1. In the desktop's Safari Develop menu, you should see your iPhone. Select the screen under the name of the app.
160+
161+### Android
109162
1101631. In your project's `default.nix` set a suitable value for `android.applicationId` and `android.displayName`.
1111641. Run `nix-build -A android.frontend -o result-android` to build the Android app.
@@ -153,6 +206,3 @@ Now edit your project's `default.nix` and tell Obelisk of your app's keystore fi
153206##### Build a release version
154207
155208After having configured signing for your app, you may proceed to build a release version of the app. This is no different to how you build the non-release version, so consult the section [Android](#android) further above for exact instructions on building and deploying to your device.
156−
157−
158−