I'm totally stumped. I have a new Swift project that embeds my own Swift framework, which has a bunch of base classes for view controllers, etc.
I can build and run my local builds just fine. But when I Archive and upload to TestFlight, any build that gets installed fails to run as expected.
A few overridden methods for key pieces of my app suddenly fail to get called, as if the normal inheritance chain is broken.
For example, in a BaseViewController class, a viewDidLoad() method calls a localize() method.
Then I subclass that view controller and override its viewDidLoad() and localize() methods, and make them call super before doing some custom work.
In local builds, the subclass's viewDidLoad() and localize() methods get called as expected.
But in archived builds, the subclass's localize() method never gets called.
Even if I call localize() or self.localize() explicitly from the subclass, only the base class's version of localize() gets called.
This is rather embarrassing because when I deploy a build to TestFlight for execs, the build doesn't match my local builds.
To start you should determine whether this is an optimisation issue or a archiving issue. In the Run section of the scheme you use for day-to-day debugging, switch the Build Configuration to Release and see if it has the same problem.
Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware
let myEmail = "eskimo" + "1" + "@apple.com"