Building fresh standalone app fails on iOS

#1

Hello,

I am trying to build a fresh app (just ran exp init).

Build looks fine, but I failed running the bundle on device (ios 11.2.6) and simulator (ios 11.2). I can see the splash screen for ~300ms. After that the app just crashes (Program specified by service does not contain any valid architectures for this system).

Step by step:

$ exp --version
49.2.2

$ npm --version
5.7.1

$ yarn --version
1.5.1

$ exp init fresh-standalone
? Choose a template type: (Use arrow keys)
? Choose a template type: blank
[exp] Downloading project files...
[exp] Extracting project files...
[exp] Customizing project...
[exp] Starting project...
[exp] Your project is ready at C:\Users\PC1\projects\fresh-standalone. Use "exp start C:\Users\PC1\projects\fresh-standalone" to get started.

Then I had to add a few bundle attributes into my app.json:

{
  "expo": {
    "name": "fresh-standalone",
    "description": "This project is really great.",
    "slug": "fresh-standalone",
    "privacy": "public",
    "sdkVersion": "25.0.0",
    "platforms": ["ios", "android"],
    "version": "1.0.0",
    "orientation": "portrait",
    "icon": "./assets/icon.png",
    "splash": {
      "image": "./assets/splash.png",
      "resizeMode": "contain",
      "backgroundColor": "#ffffff"
    },
    "ios": {
      "supportsTablet": true,
      "bundleIdentifier": "io.ger.freshstandalone",
      "buildNumber": "1.0.0"
    },
    "android": {
      "package": "io.ger.freshstandalone",
      "versionCode": 1
    }
  }
}

And then:

$ expo build:ios -c

Authentication was fine. Expo handled credentials and certificates.

Build: https://expo.io/builds/4661abac-fdb2-43fc-b460-4b23e092cfca

creating keychain
Executing command: security create-keychain -p 48f4853c-2732-11e8-966b-0050568e0259 /tmp/turtle-agent/48f48521-2732-11e8-966b-0050568e0259.keychain
Executing command: security default-keychain -s /tmp/turtle-agent/48f48521-2732-11e8-966b-0050568e0259.keychain
Executing command: security set-keychain-settings -t 360000s /tmp/turtle-agent/48f48521-2732-11e8-966b-0050568e0259.keychain
Executing command: security list-keychains -d user
Old Keychain list
New Keychain list
Executing command: security list-keychains -s /tmp/turtle-agent/48f48521-2732-11e8-966b-0050568e0259.keychain
Unlocking keychain...
Executing command: security unlock-keychain -p 48f4853c-2732-11e8-966b-0050568e0259 /tmp/turtle-agent/48f48521-2732-11e8-966b-0050568e0259.keychain
Unlocked keychain
Executing command: security show-keychain-info /tmp/turtle-agent/48f48521-2732-11e8-966b-0050568e0259.keychain
deferring keychain deletion
done creating keychain
getting credentials
Importing certificate into keychain...
Certificate has password.
Executing command: security import /tmp/turtle/6d09d595-23b8-497b-ac09-7f524cc0d3d9/cert-4661abac-fdb2-43fc-b460-4b23e092cfca.p12 -A -k /tmp/turtle-agent/48f48521-2732-11e8-966b-0050568e0259.keychain -f pkcs12 -P XXXXXXXXXXXXXXXXXXXXXXXX
Imported certificate into keychain
done getting credentials
running shell app builder
extracting build configuration from app.json
[19:49:31] Using gulpfile /usr/local/turtle-agent/tools-public/gulpfile.js
[19:49:31] Starting 'ios-shell-app'...
IosIcons: setting image functions to alternative sharp implementations
Using manifest: {"android":{"package":"io.ger.freshstandalone","versionCode":1},"description":"This project is really great.","icon":"./assets/icon.png","iconUrl":"https://d1wp6m56sqw74a.cloudfront.net/~assets/fa6577fecc0a7838f15a254577639984","ios":{"buildNumber":"1.0.0","bundleIdentifier":"io.ger.freshstandalone","supportsTablet":true},"name":"fresh-standalone","orientation":"portrait","platforms":["ios","android"],"privacy":"public","sdkVersion":"25.0.0","slug":"fresh-standalone","splash":{"backgroundColor":"#ffffff","image":"./assets/splash.png","imageUrl":"https://d1wp6m56sqw74a.cloudfront.net/~assets/43ec0dcbe5a156bf9e650bb8c15e7af6","resizeMode":"contain"},"version":"1.0.0","id":"@yokomizor/fresh-standalone","revisionId":"1.0.0-r.QEzZAw5aRW","publishedTime":"2018-03-14T02:55:47.129Z","bundleUrl":"https://d1wp6m56sqw74a.cloudfront.net/%40yokomizor%2Ffresh-standalone%2F1.0.0%2Fb17d47cf46a8dd486a43a843852cbb26-25.0.0-ios.js","releaseChannel":"default"}
Modifying NSBundle configuration at /tmp/turtle/6d09d595-23b8-497b-ac09-7f524cc0d3d9/archive/Release/ExpoKitApp.xcarchive/Products/Applications/ExpoKitApp.app...
Using shell config: { isShell: true,
manifestUrl: 'https://exp.host:443/@yokomizor/fresh-standalone',
releaseChannel: 'default' }
Configuring iOS Launch Screen...
2018-03-13 19:49:37.283 ibtoold[96911:17946056] WARNING: Unhandled destination metrics: (null)
2018-03-13 19:49:37.314 ibtoold[96911:17946056] WARNING: Unhandled destination metrics: (null)
2018-03-13 19:49:37.555 ibtoold[96911:17946056] WARNING: Unhandled destination metrics: (null)
2018-03-13 19:49:37.556 ibtoold[96911:17946056] WARNING: Unhandled destination metrics: (null)
2018-03-13 19:49:37.556 ibtoold[96911:17946056] WARNING: Unhandled destination metrics: (null)
2018-03-13 19:49:37.557 ibtoold[96911:17946056] WARNING: Unhandled destination metrics: (null)
2018-03-13 19:49:37.557 ibtoold[96911:17946056] WARNING: Unhandled destination metrics: (null)
2018-03-13 19:49:37.559 ibtoold[96911:17946056] WARNING: Unhandled destination metrics: (null)
2018-03-13 19:49:37.563 ibtoold[96911:17946056] WARNING: Unhandled destination metrics: (null)
2018-03-13 19:49:37.563 ibtoold[96911:17946056] WARNING: Unhandled destination metrics: (null)
2018-03-13 19:49:37.563 ibtoold[96911:17946056] WARNING: Unhandled destination metrics: (null)
2018-03-13 19:49:37.564 ibtoold[96911:17946056] WARNING: Unhandled destination metrics: (null)
2018-03-13 19:49:37.564 ibtoold[96911:17946056] WARNING: Unhandled destination metrics: (null)
2018-03-13 19:49:37.564 ibtoold[96911:17946056] WARNING: Unhandled destination metrics: (null)
Compiling resources...
Using manifest: {"android":{"package":"host.exp.exponent","publishBundlePath":"../android/app/src/main/assets/kernel.android.bundle"},"description":"","extra":{"amplitudeApiKey":"081e5ec53f869b440b225d5e40ec73f9"},"icon":"https://s3.amazonaws.com/exp-brand-assets/ExponentEmptyManifest_192.png","iconUrl":"https://s3.amazonaws.com/exp-brand-assets/ExponentEmptyManifest_192.png","ios":{"bundleIdentifier":"host.exp.exponent","publishBundlePath":"../ios/Exponent/Supporting/kernel.ios.bundle","supportsTablet":true},"isKernel":true,"kernel":{"androidManifestPath":"../android/app/src/main/assets/kernel-manifest.json","iosManifestPath":"../ios/Exponent/Supporting/kernel-manifest.json"},"loading":{"hideExponentText":false,"icon":"https://s3.amazonaws.com/exp-brand-assets/ExponentEmptyManifest_192.png","iconUrl":"https://s3.amazonaws.com/exp-brand-assets/ExponentEmptyManifest_192.png"},"locales":{},"name":"exponent-home","notification":{"color":"#000000","icon":"https://s3.amazonaws.com/exp-us-standard/placeholder-push-icon-blue-circle.png","iconUrl":"https://s3.amazonaws.com/exp-us-standard/placeholder-push-icon-blue-circle.png"},"orientation":"portrait","packagerOpts":{"config":"./_universe/rn-cli.config.js"},"primaryColor":"#cccccc","privacy":"unlisted","scheme":"exp","sdkVersion":"26.0.0","slug":"home","version":"26.0.0","id":"@exponent/home","revisionId":"26.0.0-r.M69GPaJxbd","publishedTime":"2018-02-16T22:52:29.105Z","bundleUrl":"https://d1wp6m56sqw74a.cloudfront.net/%40exponent%2Fhome%2F26.0.0%2Fa12f9be10981f39458f1095f7c5878e3-26.0.0-ios.js","releaseChannel":"default"}
Cleaning up iOS...
[19:49:44] Finished 'ios-shell-app' after 13 s
done running shell app builder
Assuming that client will run creating app on dev center ruby code
done creating app on dev center
building and signing IPA
Executing command: security cms -D -i /tmp/turtle/6d09d595-23b8-497b-ac09-7f524cc0d3d9/provisioning-6d09d595-23b8-497b-ac09-7f524cc0d3d9/6d09d595-23b8-497b-ac09-7f524cc0d3d9.mobileprovision
done retrieving provisioning profile
Checking if teamID is present in keychain and that certificate is valid...
decoding p12 certificate
verifying certificate is installed
Executing command: security find-identity -v -s (XXXXXXXXXX)
confirmed team ID is present in keychain
Chose export method: app-store
writing export-options.plist file...
building IPA
Executing command: fastlane gym -n 6d09d595-23b8-497b-ac09-7f524cc0d3d9-unsigned.ipa --workspace /usr/local/turtle-agent/shellAppWorkspaces/ios/default/ExpoKitApp.xcworkspace --scheme ExpoKitApp --archive_path /tmp/turtle/6d09d595-23b8-497b-ac09-7f524cc0d3d9/6d09d595-23b8-497b-ac09-7f524cc0d3d9.xcarchive --skip_build_archive true -i 73EEB72C74EC5B12DB849F984876E8F26DEE3BA9 --export_options /tmp/turtle/6d09d595-23b8-497b-ac09-7f524cc0d3d9/provisioning-6d09d595-23b8-497b-ac09-7f524cc0d3d9/export-options.plist --export_method app-store --export_xcargs OTHER_CODE_SIGN_FLAGS="--keychain /tmp/turtle-agent/48f48521-2732-11e8-966b-0050568e0259.keychain" -o /tmp/turtle/6d09d595-23b8-497b-ac09-7f524cc0d3d9/6d09d595-23b8-497b-ac09-7f524cc0d3d9-build --verbose
Generating entitlements
Executing command: /usr/libexec/PlistBuddy -x -c Print /tmp/turtle/6d09d595-23b8-497b-ac09-7f524cc0d3d9/generatedEntitlements.entitlements
Executing command: cp -rf /tmp/turtle/6d09d595-23b8-497b-ac09-7f524cc0d3d9/6d09d595-23b8-497b-ac09-7f524cc0d3d9-build/6d09d595-23b8-497b-ac09-7f524cc0d3d9-unsigned.ipa /tmp/turtle/6d09d595-23b8-497b-ac09-7f524cc0d3d9/6d09d595-23b8-497b-ac09-7f524cc0d3d9-build/6d09d595-23b8-497b-ac09-7f524cc0d3d9.ipa
resigning IPA
Executing command: fastlane sigh resign --verbose --entitlements /tmp/turtle/6d09d595-23b8-497b-ac09-7f524cc0d3d9/generatedEntitlements.entitlements --signing_identity 73EEB72C74EC5B12DB849F984876E8F26DEE3BA9 --keychain_path /tmp/turtle-agent/48f48521-2732-11e8-966b-0050568e0259.keychain --provisioning_profile /tmp/turtle/6d09d595-23b8-497b-ac09-7f524cc0d3d9/provisioning-6d09d595-23b8-497b-ac09-7f524cc0d3d9/6d09d595-23b8-497b-ac09-7f524cc0d3d9.mobileprovision /tmp/turtle/6d09d595-23b8-497b-ac09-7f524cc0d3d9/6d09d595-23b8-497b-ac09-7f524cc0d3d9-build/6d09d595-23b8-497b-ac09-7f524cc0d3d9.ipa
deferring cleanup of provisioning profiles
done building and signing IPA
uploading IPA to S3
done uploading IPA to S3
pipeline ran successfully
Executing command: fastlane sigh manage --force -p io.ger.freshstandalone
Executing command: security delete-keychain /tmp/turtle-agent/48f48521-2732-11e8-966b-0050568e0259.keychain
Restoring keychain list...
Executing command: security list-keychains -s /private/tmp/turtle-agent/38fc509a-07a2-11e8-b5e3-0050568e0259.keychain
Restored keychain list.

Until this point, everything looks fine.

Then I downloaded the .ipa, and ran:

$ tar -xvzf ios%2F@yokomizor%2Ffresh-standalone-6d09d595-23b8-497b-ac09-7f524cc0d3d9-archive.ipa
$ xcrun simctl install booted ./Payload/ExpoKitApp.app/

App is now installed on my simulator (iPhone 8).

When I tried to start the app I got the following:

Mar 14 04:04:36 Rogerios-Air com.apple.CoreSimulator.SimDevice.2EF74177-724B-40D3-A52D-443283B854DE[29353] (UIKitApplication:io.ger.freshstandalone[0x8bd][29380][29837]): Program specified by service does not contain any valid architectures for this system.
Mar 14 04:04:37 Rogerios-Air com.apple.CoreSimulator.SimDevice.2EF74177-724B-40D3-A52D-443283B854DE[29353] (UIKitApplication:io.ger.freshstandalone[0x2de2][29380][29838]): Program specified by service does not contain any valid architectures for this system.

And after that the app crashes. I can see the splash screen for ~300ms.

I am looking for a different way to debug since I couldn’t get anything from these logs.

Ideas?

Cheers!

#2

Well… writing this made me realize that I was creating a production build :smile: and the reason it was not working on device might be the fact I am uploading it using hockeyapp. I will build again using -t simulator and let you know.

Cheers!

closed #3

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.