Skip to main content

iOS Platform

Overview

  • Latest swift based Xcode project
  • Cocoapods Workspace ready
  • Swift 4.1 Support

File Extension Support

Extenstions are defined via engines. Engines with ios support:

Requirements

Project Configuration

FeatureVersion
Swift4.1
Deployment Target11.4

Run on Simulator

rnv start
rnv run -p ios

Run on Device

IMPORTANT: before you run ReNative app on the actual iOS device you MUST:

renative.json scheme snippet for ad-hoc build (capable to run on device) with Automatic Signing

{
"platforms": {
"ios": {
"buildSchemes": {
"ad-hoc": {
"teamID": "YOUR_APPLE_TEAM_ID",
"provisioningStyle": "Automatic",
"runScheme": "Release",
"bundleAssets": true,
"bundleIsDev": false
}
}
}
}
}

renative.json scheme snippet for ad-hoc build (capable to run on device) with Manual Signing

{
"platforms": {
"ios": {
"buildSchemes": {
"ad-hoc": {
"teamID": "YOUR_APPLE_TEAM_ID",
"provisioningStyle": "Manual",
"codeSignIdentity": "iPhone Developer",
"provisionProfileSpecifier": "YOUR_PROVISIONING_PROFILE_NAME"
}
}
}
}
}
rnv start
rnv run -p ios -s ad-hoc -d

Deploy on Device

This will run production version on your device (not connected to metro bundler) Same prerequisite as above applies here

rnv start
rnv run -p ios -s release -d

Advanced

Clean and Re-build platform project

rnv run -p ios -r

Launch app with specific iOS simulator

rnv run -p ios -t "iPhone 6 Plus"

Launch app with specific iOS simulator (let ReNative to give you the list of available options):

rnv run -p ios -t ?

Launch specific emulator :

rnv target launch -p ios -t "iPhone 8"

Launch specific emulator (let ReNative to give you the list of available options):

rnv target launch -p ios -t ?

Get list of all available devices

rnv target list -p ios

Get device/simulator logs

rnv log -p ios

Get device/simulator logs with filter

rnv log -p ios -f com.myapp

App Store Releases

renative.json scheme snippet for automatic signing releases

{
"platforms": {
"ios": {
"buildSchemes": {
"appstore": {
"teamID": "YOUR_APPLE_TEAM_ID",
"runScheme": "Release",
"bundleAssets": true,
"bundleIsDev": false,
"exportOptions": {
"method": "app-store",
"uploadBitcode": true,
"compileBitcode": false,
"uploadSymbols": true,
"signingStyle": "automatic",
"signingCertificate": "iPhone Distribution"
}
}
}
}
}
}

renative.json scheme snippet for manual signing releases

{
"platforms": {
"ios": {
"buildSchemes": {
"appstore": {
"teamID": "YOUR_APPLE_TEAM_ID",
"runScheme": "Release",
"bundleAssets": true,
"provisioningStyle": "Manual",
"codeSignIdentity": "iPhone Distribution",
"provisionProfileSpecifier": "YOUR_PROVISIONING_PROFILE_NAME",
"exportOptions": {
"method": "app-store",
"uploadBitcode": true,
"compileBitcode": false,
"uploadSymbols": true,
"signingStyle": "manual",
"signingCertificate": "iPhone Distribution",
"provisioningProfiles": {
"YOUR_BUNDLE_ID": "YOUR_PROVISIONING_PROFILE_NAME"
}
}
}
}
}
}
}

Create IPA:

rnv export -p ios -s appstore

Advanced configuration examples

Adding new props to plist:

{
"platforms": {
"ios": {
"plist": {
"UIBackgroundModes": ["audio", "remote-notification"],
"ITSAppUsesNonExemptEncryption": false
}
}
}
}

App Config

see: iOS based config