distriqt / ANE-Core

ANE providing a centralised library for native extension common utilities and a notification / delegation system
https://airnativeextensions.com
21 stars 12 forks source link

Possible issue signing iOS (debug) with last ANE #22

Closed cgascons closed 3 years ago

cgascons commented 3 years ago

After updating all our ANEs to their latest version we believe there's an issue now signing on iOS.

Looking at this commit made 2 days ago makes me believe something may have broke? https://github.com/distriqt/ANE-Core/commit/34d3af75b98d9fd81592cddec9585a0d636d748a

When I debug-package the app to test on device the app launches and instantly crashes, these are the traces we get:

default 16:17:54.345565+0100    assertiond  Submitting new job for "air.com.xxx" on behalf of <BKProcess: 0x10061dc10; SpringBoard; com.apple.springboard; pid: 52; agency: SystemShell; visibility: foreground; task: running>
default 16:17:54.345933+0100    SpringBoard Bootstrapping air.com.xxx with intent foreground-interactive
default 16:17:54.346584+0100    assertiond  Submitted job with label: UIKitApplication:air.com.xxx[0xfb67][62]
default 16:17:54.349762+0100    assertiond  Unable to get pid for 'UIKitApplication:air.com.xxx[0xfb67][62]': No such process (3)
error   16:17:54.349833+0100    assertiond  Failed to start job with error <NSError: 0x10070bda0; domain: NSPOSIXErrorDomain; code: 3; reason: "No such process"> {
    description = "Unable to get pid for label UIKitApplication:air.com.xxx[0xfb67][62]";
    failureReason = "No such process";
    userInfo = {
        BKLaunchdJobLabel = UIKitApplication:air.com.xxx[0xfb67][62];
        BKLaunchdOperation = launch_get_running_pid_4SB;
    }
}
default 16:17:54.349929+0100    assertiond  Deleted job with label: UIKitApplication:air.com.xxx[0xfb67][62]
error   16:17:54.350377+0100    SpringBoard [air.com.xxx] Bootstrap failed with error: <NSError: 0x280d0a5e0; domain: BKSProcessErrorDomain; code: 1 (bootstrap-failed); reason: "Failed to start job">
**error 16:17:54.350471+0100    SpringBoard Bootstrapping failed for <FBApplicationProcess: 0x109400ac0; air.com.xxx; pid: -1> with error: Error Domain=BKSProcessErrorDomain Code=1 "Unable to bootstrap process with bundleID air.com.xxx"** UserInfo={NSLocalizedDescription=Unable to bootstrap process with bundleID air.com.xxx, BKSProcessExitReason=0, NSLocalizedFailureReason=Failed to start job, NSUnderlyingError=0x280d09350 {Error Domain=NSPOSIXErrorDomain Code=3 "No such process" UserInfo={BKLaunchdOperation=launch_get_running_pid_4SB, NSLocalizedDescription=Unable to get pid for label UIKitApplication:air.com.xxx[0xfb67][62], BKLaunchdJobLabel=UIKitApplication:air.com.xxx[0xfb67][62], NSLocalizedFailureReason=No such process}}, BKSProcessJobLabel=UIKitApplication:air.com.xxx[0xfb67][62], BSErrorCodeDescription=bootstrap-failed}
default 16:17:54.350574+0100    SpringBoard Adding: <FBApplicationProcess: 0x109400ac0; air.com.xxx; pid: -1>
default 16:17:54.350699+0100    SpringBoard <FBApplicationProcess: 0x109400ac0; air.com.xxx; pid: -1> exited.
default 16:17:54.350781+0100    SpringBoard Removing: <FBApplicationProcess: 0x109400ac0; air.com.xxx; pid: -1>
default 16:17:54.383097+0100    SpringBoard Application process state changed for air.com.xxx: <SBApplicationProcessState: 0x28022a1c0; pid: -1; taskState: Not Running; visibility: Unknown>
default 16:17:54.383625+0100    SpringBoard Process exited: <FBApplicationProcess: 0x109400ac0; air.com.xxx; pid: -1> -> <FBApplicationProcessExitContext: 0x280d0b000; exitReason: (none); terminationReason: (none)> {
    stateAtExit = <FBProcessState: 0x28024ed60; pid: -1; taskState: Unknown; visibility: Unknown>;
}
default 16:17:54.384531+0100    SpringBoard Application process state changed for air.com.xxx: (null)
default 16:17:54.791518+0100    SpringBoard Front display did change: <SBApplication: 0x283c732a0; air.com.xxx>

After a little investigation I read it might have something to do with the signing of the app.

marchbold commented 3 years ago

Can you elaborate some more on this issue? We aren't seeing any such issues in our builds.

cgascons commented 3 years ago

Hi @marchbold, sorry I'm not sure what else to add to this issue. We started experiencing it yesterday after updating all the ANEs. I've tried to follow all the steps of all ANEs to make extra sure we are not missing anything in particular. Yesterday, when goggling for this issue I found this link and thought it might be related, hence I created this post. I'm also on Catalina and using vsCode to develop. This is my current app-descriptor:

<?xml version="1.0" encoding="utf-8" standalone="no"?>
<application xmlns="http://ns.adobe.com/air/application/33.1">

    <id>air.com.xxx</id>
    <filename>Game</filename>
    <name>Game</name>
    <versionNumber>3.0.0</versionNumber>
    <versionLabel>3.0.0</versionLabel>

    <initialWindow>
        <content>[This value will be overwritten by Flash Builder in the output app.xml]</content>
        <title>Game</title>
        <renderMode>direct</renderMode>
        <depthAndStencil>true</depthAndStencil>
        <autoOrients>true</autoOrients>
        <aspectRatio>landscape</aspectRatio>
        <fullScreen>true</fullScreen>
        <visible>true</visible>
    </initialWindow>
    <supportedLanguages>en de es fr ru</supportedLanguages>

    <icon>
        <image16x16>icons/icon_16.png</image16x16>
        <image29x29>icons/icon_29.png</image29x29>
        <image32x32>icons/icon_32.png</image32x32>
        <image36x36>icons/icon_36.png</image36x36>
        <image40x40>icons/icon_40.png</image40x40>
        <image44x44>icons/icon_44.png</image44x44>
        <image48x48>icons/icon_48.png</image48x48>
        <image50x50>icons/icon_50.png</image50x50>
        <image57x57>icons/icon_57.png</image57x57>
        <image58x58>icons/icon_58.png</image58x58>
        <image60x60>icons/icon_60.png</image60x60>
        <image66x66>icons/icon_66.png</image66x66>
        <image72x72>icons/icon_72.png</image72x72>
        <image75x75>icons/icon_75.png</image75x75>
        <image76x76>icons/icon_76.png</image76x76>
        <image80x80>icons/icon_80.png</image80x80>
        <image87x87>icons/icon_87.png</image87x87>
        <image96x96>icons/icon_96.png</image96x96>
        <image100x100>icons/icon_100.png</image100x100>
        <image114x114>icons/icon_114.png</image114x114>
        <image120x120>icons/icon_120.png</image120x120>
        <image128x128>icons/icon_128.png</image128x128>
        <image144x144>icons/icon_144.png</image144x144>
        <image152x152>icons/icon_152.png</image152x152>
        <image167x167>icons/icon_167.png</image167x167>
        <image180x180>icons/icon_180.png</image180x180>
        <image192x192>icons/icon_192.png</image192x192>
        <image512x512>icons/icon_512.png</image512x512>
        <image1024x1024>icons/icon_1024.png</image1024x1024>
    </icon>

    <iPhone>
        <InfoAdditions><![CDATA[
            <key>UIDeviceFamily</key>
                <array>
                    <string>1</string>
                    <string>2</string>
                </array>

            <key>FirebaseAppDelegateProxyEnabled</key>
                <false/>
            <key>FirebaseAutomaticScreenReportingEnabled</key>
                <false/>

            <key>UIBackgroundModes</key>
            <array>
                <string>remote-notification</string>
            </array>

            <key>MinimumOSVersion</key>
                   <string>9.0</string>
            <key>UIRequiredDeviceCapabilities</key>
                <string>front-facing-camera</string>
            <key>CFBundleURLTypes</key>
            <array>
                <dict>
                    <key>CFBundleURLSchemes</key>
                        <array>
                            <!-- <string>fb01234567890</string> --> <!--PROD-->
                            <string>fb776586469153854</string>  <!--DEV-->
                        </array>
                </dict>
            </array>
            <key>FacebookAppID</key>
            <!-- <string>01234567890</string> --> <!-- PROD -->
            <string>09876543210</string> <!-- DEV -->

            <key>FacebookDisplayName</key>
            <string>Game</string>
            <key>NSAppTransportSecurity</key>
            <dict>
                <key>NSExceptionDomains</key>
                <dict>
                    <key>facebook.com</key>
                    <dict>
                        <key>NSIncludesSubdomains</key>
                        <true/>                
                        <key>NSThirdPartyExceptionRequiresForwardSecrecy</key>
                        <false/>
                    </dict>
                    <key>fbcdn.net</key>
                    <dict>
                        <key>NSIncludesSubdomains</key>
                        <true/>
                        <key>NSThirdPartyExceptionRequiresForwardSecrecy</key>
                        <false/>
                    </dict>
                    <key>akamaihd.net</key>
                    <dict>
                        <key>NSIncludesSubdomains</key>
                        <true/>
                        <key>NSThirdPartyExceptionRequiresForwardSecrecy</key>
                        <false/>
                    </dict>
                </dict>
            </dict>
            <key>LSApplicationQueriesSchemes</key>
            <array>
                <string>fbapi</string>
                <string>fb-messenger-api</string>
                <string>fb-messenger-share-api</string>
                <string>fbauth2</string>
                <string>fbshareextension</string>
                <string>fb</string>
                <string>whatsapp</string>
                <string>instagram</string>
                <string>fbapi20130214</string>
                <string>fbapi20130410</string>
                <string>fbapi20130702</string>
                <string>fbapi20131010</string>
                <string>fbapi20131219</string>
                <string>fbapi20140410</string>
                <string>fbapi20140116</string>
                <string>fbapi20150313</string>
                <string>fbapi20150629</string>
                <string>fbapi20160328</string>
            </array>

            <key>NSPhotoLibraryUsageDescription</key>
            <string>Access to photo library is required to save images.</string>

            <key>NSPhotoLibraryAddUsageDescription</key>
            <string>Access to photo library is required to save images.</string>

            <key>NSLocationAlwaysUsageDescription</key>
            <string>Your location is required for Statistics</string>

            <key>NSLocationWhenInUseUsageDescription</key>
            <string>Your location is required for Statistics</string>

        ]]></InfoAdditions>
        <requestedDisplayResolution>high</requestedDisplayResolution>
        <Entitlements><![CDATA[

            <!-- Apple sign in -->
            <key>com.apple.developer.applesignin</key>
            <array>
                <string>Default</string>
            </array>

            <!-- DEVELOPMENT -->
            <key>get-task-allow</key>
            <true/>
            <key>aps-environment</key>
            <string>development</string>

            <!-- PRODUCTION -->
            <!-- <key>get-task-allow</key>
            <false/>
            <key>aps-environment</key>
            <string>production</string>
            -->

            <key>application-identifier</key>
            <string>XXXXXXXXXX.air.com.xxx</string>
            <key>keychain-access-groups</key>
            <array>
                <string>XXXXXXXXXX.*</string>
            </array>
        ]]></Entitlements>
    </iPhone>
    <extensions>
    <extensionID>com.distriqt.AppleSignIn</extensionID>
        <extensionID>com.distriqt.Vibration</extensionID>
    <extensionID>com.distriqt.Core</extensionID>
        <extensionID>com.distriqt.Notifications</extensionID>
        <extensionID>com.distriqt.Application</extensionID>
        <extensionID>com.distriqt.Share</extensionID>
        <extensionID>com.distriqt.InAppBilling</extensionID>
        <extensionID>com.distriqt.Bolts</extensionID>
        <extensionID>com.distriqt.facebook.Core</extensionID>
    <extensionID>com.distriqt.facebook.Login</extensionID>
        <extensionID>com.distriqt.PushNotifications</extensionID>
    <extensionID>com.distriqt.Firebase</extensionID>
    <extensionID>com.distriqt.firebase.Auth</extensionID>
        <extensionID>com.distriqt.firebase.Database</extensionID>
        <extensionID>com.google.firebase.core</extensionID>
    </extensions>
</application>
cgascons commented 3 years ago

Hi again, finally solved it! Went one ANE by one again and found that I needed to add the folder "Frameworks" to the root of the project (needed by Facebook ANE), which led me to the well known signing issue on iOS but I solved it with your resign_ipa script as well. Thank you anyways!