1

I am having a crash ONLY on TestFlight, not while debugging on the device locally, that seems to be stemming from the Augmented Reality Camera ShutterButton (of type UIButton) of a library while opening the scan view. The crash seems to say that it’s happening in the init function of the ShutterButton as you can see in the image.

Any idea what I should look at which might be causing different behavior in the two environments for the SAME device?

The top most line Error says “unexpectedly found nil while unwrapping an optional”, and this code is inside the pod libraries that are imported Crash description

I did take a look at this popular question to understand what's happening, but I'm not sure how I can apply it to my scenario

Saamer
  • 4,687
  • 1
  • 13
  • 55

1 Answers1

2

This issue bummed me for so long. This is how I debugged and resolved the issue and figured that it was because "Enable Bitcode" was turned on.

Was I able to replicate the bug:

  1. In Production through TestFlight: Bug visible
  2. In local with default config: No
  3. In local with Release config: No
  4. If I create an AdHoc build with Release config and install it on my phone from Devices & Simulators: No
  5. In production through TestFlight with Debug Config: Bug visible

I took a break and many hours later it just struck me that the only difference should be the "Enable Bitcode". So I tried another option:

  1. In production through TestFlight with Debug Config but with "Enable Bitcode" turned off: No

Then I went back to the first attempt and just toggled the Bitcode value and it worked:

  1. In production through TestFlight with "Enable Bitcode" turned off: No
Saamer
  • 4,687
  • 1
  • 13
  • 55