0

I'm trying to run detox tests, on Android they run correctly.

When using Xcode 11 build tools, the app installs correctly and all tests run.

When using Xcode 12 the app fails to install. The app attempts to be installed 3 times, and eventually the simulator complains that it's unable to install and the app icon is darkened on the simulator.

I've tried debug and release configurations, and I am cleaning/building each time. Running the scheme directly in Xcode on v12, the application installs and works normally.

The build command:

xcodebuild -workspace ios/myapp.xcworkspace -configuration Debug -scheme myscheme -sdk iphonesimulator -derivedDataPath ios/build/datapath

What am I missing to get this working on Xcode 12?

Elliot Rodriguez
  • 608
  • 6
  • 25

2 Answers2

1

It's hard to tell why this happens. Personally I didn't run into such issues with Xcode 12.

You can try the following:

  1. Make sure to use the latest Detox version, sometimes specific Xcode versions require some adjustments (there's Xcode 12.4, 12.5, etc.)
  2. Make sure your applesimutils is up to date (see instructions here).
  3. RN apps sometimes have issues with the new build system, try adding -UseModernBuildSystem=NO to your xcodebuild command.
Artal
  • 8,933
  • 2
  • 27
  • 30
  • While I have upgraded, the latest release (18.13) includes some additional debugging information that allowed me to determine that the initilization code needed to include an explicit call to "device.launchApp({args})". – Elliot Rodriguez May 12 '21 at 15:04
0

As per my knowledge, few previous versions of detox don't support Xcode 12. Upgrading detox might solve the issue.

ABM
  • 565
  • 7
  • 18
  • 1
    While I have upgraded, the latest release (18.13) includes some additional debugging information that allowed me to determine that the initilization code needed to include an explicit call to "device.launchApp({args})". Awarding you the bounty based on partial answer. @artal also answered something similar, but yours was the first response. – Elliot Rodriguez May 12 '21 at 15:03
  • Thankyou. It means a lot – ABM May 13 '21 at 16:18