0

I'm trying to create an iOS-App with a watch extension. I'm running Xcode on a Macbook with M1 chip.

Both, the iOS-App as well as the watchOS-app can be tested in the Xcode simulators without any problems.

But as soon as I try to test it on my iPhone, the installation on the iPhone (iPhone 7, iOS-version 15.5) is stopped and I get the following error message:

Unable to install "xxxxxxx"
Domain: com.apple.dt.MobileDeviceErrorDomain
Code: -402653049
User Info: {
    DVTErrorCreationDateKey = "2022-06-19 04:58:03 +0000";
    IDERunOperationFailingWorker = IDEInstalliPhoneLauncher;
}
--
This application does not support this device’s CPU type.
Domain: com.apple.dt.MobileDeviceErrorDomain
Code: -402653049
User Info: {
    DVTRadarComponentKey = 261622;
    MobileDeviceErrorCode = "(0xE8000087)";
    "com.apple.dtdevicekit.stacktrace" = (
    0   DTDeviceKitBase                     0x0000000123ce79d1 DTDKCreateNSErrorFromAMDErrorCode + 220
    1   DTDeviceKitBase                     0x0000000123d23ce7 __90-[DTDKMobileDeviceToken installApplicationBundleAtPath:withOptions:andError:withCallback:]_block_invoke + 155
    2   DVTFoundation                       0x000000010e06f7d6 DVTInvokeWithStrongOwnership + 71
    3   DTDeviceKitBase                     0x0000000123d23a1d -[DTDKMobileDeviceToken installApplicationBundleAtPath:withOptions:andError:withCallback:] + 1422
    4   IDEiOSSupportCore                   0x0000000123a72668 __118-[DVTiOSDevice(DVTiPhoneApplicationInstallation) processAppInstallSet:appUninstallSet:installOptions:completionBlock:]_block_invoke.301 + 3414
    5   DVTFoundation                       0x000000010e1a13d4 __DVT_CALLING_CLIENT_BLOCK__ + 7
    6   DVTFoundation                       0x000000010e1a24bc __DVTDispatchAsync_block_invoke + 372
    7   libdispatch.dylib                   0x00007ff80a8b10cc _dispatch_call_block_and_release + 12
    8   libdispatch.dylib                   0x00007ff80a8b2317 _dispatch_client_callout + 8
    9   libdispatch.dylib                   0x00007ff80a8b8317 _dispatch_lane_serial_drain + 672
    10  libdispatch.dylib                   0x00007ff80a8b8dfd _dispatch_lane_invoke + 366
    11  libdispatch.dylib                   0x00007ff80a8c2eee _dispatch_workloop_worker_thread + 753
    12  libsystem_pthread.dylib             0x00007ff80aa65fd0 _pthread_wqthread + 326
    13  libsystem_pthread.dylib             0x00007ff80aa64f57 start_wqthread + 15
);
}
--

Analytics Event: com.apple.dt.IDERunOperationWorkerFinished : {
    "device_model" = "iPhone9,3";
    "device_osBuild" = "15.5 (19F77)";
    "device_platform" = "com.apple.platform.iphoneos";
    "launchSession_schemeCommand" = Run;
    "launchSession_state" = 1;
    "launchSession_targetArch" = arm64;
    "operation_duration_ms" = 2575;
    "operation_errorCode" = "-402653049";
    "operation_errorDomain" = "com.apple.dt.MobileDeviceErrorDomain";
    "operation_errorWorker" = IDEInstalliPhoneLauncher;
    "operation_name" = IDEiPhoneRunOperationWorkerGroup;
    "param_consoleMode" = 0;
    "param_debugger_attachToExtensions" = 0;
    "param_debugger_attachToXPC" = 1;
    "param_debugger_type" = 5;
    "param_destination_isProxy" = 0;
    "param_destination_platform" = "com.apple.platform.iphoneos";
    "param_diag_MainThreadChecker_stopOnIssue" = 0;
    "param_diag_MallocStackLogging_enableDuringAttach" = 0;
    "param_diag_MallocStackLogging_enableForXPC" = 1;
    "param_diag_allowLocationSimulation" = 1;
    "param_diag_gpu_frameCapture_enable" = 0;
    "param_diag_gpu_shaderValidation_enable" = 0;
    "param_diag_gpu_validation_enable" = 0;
    "param_diag_memoryGraphOnResourceException" = 0;
    "param_diag_queueDebugging_enable" = 1;
    "param_diag_runtimeProfile_generate" = 0;
    "param_diag_sanitizer_asan_enable" = 0;
    "param_diag_sanitizer_tsan_enable" = 0;
    "param_diag_sanitizer_tsan_stopOnIssue" = 0;
    "param_diag_sanitizer_ubsan_stopOnIssue" = 0;
    "param_diag_showNonLocalizedStrings" = 0;
    "param_diag_viewDebugging_enabled" = 1;
    "param_diag_viewDebugging_insertDylibOnLaunch" = 1;
    "param_install_style" = 0;
    "param_launcher_UID" = 2;
    "param_launcher_allowDeviceSensorReplayData" = 0;
    "param_launcher_kind" = 0;
    "param_launcher_style" = 0;
    "param_launcher_substyle" = 0;
    "param_runnable_appExtensionHostRunMode" = 0;
    "param_runnable_productType" = "com.apple.product-type.application";
    "param_runnable_swiftVersion" = "5.6.1";
    "param_runnable_type" = 2;
    "param_testing_launchedForTesting" = 0;
    "param_testing_suppressSimulatorApp" = 0;
    "param_testing_usingCLI" = 0;
    "sdk_canonicalName" = "iphoneos15.5";
    "sdk_osVersion" = "15.5";
    "sdk_variant" = iphoneos;
}
--


System Information

macOS Version 12.4 (Build 21F79)
Xcode 13.4.1 (20504) (Build 13F100)

I tried for hours all the hints I found in this forum and in the internet without any success.

The info.plist for the iOS-app is as follows:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>CFBundleURLTypes</key>
    <array>
        <dict>
            <key>CFBundleIdentifier</key>
            <string></string>
            <key>CFBundleTypeRole</key>
            <string>Editor</string>
            <key>CFBundleURLSchemes</key>
            <array>
                <string>db-*************</string>
            </array>
        </dict>
    </array>
    <key>ITSAppUsesNonExemptEncryption</key>
    <false/>
    <key>LSApplicationQueriesSchemes</key>
    <array>
        <string>dbapi-8-emm</string>
        <string>dbapi-2</string>
    </array>
    <key>NSUbiquitousContainers</key>
    <dict>
        <key>iCloud.*******</key>
        <dict>
            <key>NSUbiquitousContainerIsDocumentScopePublic</key>
            <true/>
            <key>NSUbiquitousContainerName</key>
            <string>myEinkauf</string>
            <key>NSUbiquitousContainerSupportedFolderLevels</key>
            <string>Any</string>
        </dict>
    </dict>
    <key>UIApplicationSceneManifest</key>
    <dict>
        <key>UIApplicationSupportsMultipleScenes</key>
        <false/>
        <key>UISceneConfigurations</key>
        <dict>
            <key>UIWindowSceneSessionRoleApplication</key>
            <array>
                <dict>
                    <key>UISceneConfigurationName</key>
                    <string>Default Configuration</string>
                    <key>UISceneDelegateClassName</key>
                    <string>$(PRODUCT_MODULE_NAME).SceneDelegate</string>
                    <key>UISceneStoryboardFile</key>
                    <string>Main</string>
                </dict>
            </array>
        </dict>
    </dict>
</dict>
</plist>

And for the watchExtension as follows:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>NSExtension</key>
    <dict>
        <key>NSExtensionAttributes</key>
        <dict>
            <key>WKAppBundleIdentifier</key>
            <string>**.******.*******.watchkitapp</string>
        </dict>
        <key>NSExtensionPointIdentifier</key>
        <string>com.apple.watchkit</string>
    </dict>
</dict>
</plist>

Within 'Build settings' for the iOS-app target I have the following settings:

Base SDK: iOS
Build active architecture only
- Debug: yes
- Release: no

And under 'General' the settings for 'Frameworks, Libraries, and Embedded Content' is:

WatchKitExtension: embed without signing
iOS app: embed without signing
pods.framwork: do not embed

Thank you very much for your support.

carlson
  • 89
  • 11

1 Answers1

1

Delete the project on your pc and clone it again.

Install the pods and build the project.

After run the project and normally it's ok !

Cédric
  • 26
  • 2
  • Thanks very much Cédric. I could finally fix it based on your hints. In addition to it, I removed the two targets for the watchApp and the watchApp extension including all files completely and restarted Xcode. After this I newly added the targets for the watchApp and rebuilt the interface again. This finally led to the result, that the app can be installed on the iPhone and watch without any problems. Astonishingly the info.plist and the build settings are exactly the same as before. – carlson Jun 20 '22 at 16:28
  • 1
    You're welcome, during the first construction there must have been something that didn't build well I think. That's what I concluded – Cédric Jun 21 '22 at 20:14