Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add SWIFT_COMPILATION_MODE = wholemodule #81

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

amcalgates
Copy link

@amcalgates amcalgates commented Jan 12, 2024

This fixes a bug where TestFlight/App Store apps were crashing on iOS 12 when compiled with Xcode 15+.

To reproduce:

  • have a Cordova project that has any Swift file in it (and make sure the Swift file properly belongs to project target)
  • Deployment Target = iOS 12.0
  • Xcode version >= 15 (I was using 15.1)

Then to reproduce:

  • in Xcode go to Product -> Archive and then Distribute to TestFlight + App Store. Witness crash on launch once app reaches your device

OR, to skip waiting on TestFlight/App Store:

  • In Xcode go to Product -> Profile
  • Once "Profile" is done and has installed the app on your device, either launch the app from your iPad/iPhone, or choose "Activity Monitor" when Instruments launches after the "Profile" step finishes, and hit the little red record button top left
  • App should crash on launch

For the aid of future users Googling, this was the only error I could glean, which I saw in the system console. There are no stack traces because the app does not successfully launch on iOS 12:

Attempt to add an app with insufficient id, info {
    BKSApplicationStateAppIsFrontmost = 1;
    BKSApplicationStateExtensionKey = 0;
    SBApplicationStateDisplayIDKey = "com.dinnerwire.SmartKDS";
    SBApplicationStateKey = 8;
    SBApplicationStateProcessIDKey = 472;
    SBApplicationStateRunningReasonsKey =     (
                {
            SBApplicationStateRunningReasonAssertionIdentifierKey = UIApplicationLaunch;
            SBApplicationStateRunningReasonAssertionReasonKey = 10000;
        }
    );
    SBMostElevatedStateForProcessID = 8;
}

And:

SyscallError: setpriority(PRIO_DARWIN_ROLE, 787, 3): No such process

https://forum.ionicframework.com/t/ios-12-app-crashes-on-opening-and-closes-quickly-libswift-concurrency-dylib/230206

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant