WatchKit apps must have a deployment target equal to iOS 8.2 (was 8.3)?

后端 未结 7 580
野性不改
野性不改 2020-12-05 06:17

I just downloaded Xcode 6.3 beta 4, and my WatchKit app now fails to build with an error:

Embedded Binary Validation Utility Error
error: WatchKit apps must          


        
7条回答
  •  攒了一身酷
    2020-12-05 06:34

    Ran into this myself. Seems like a bug in Xcode 6.3 beta 4.

    I analyzed the project.pbxproj file (in text view) of a freshly created project with a WatchKit extension. It looks like there is a setting:

    IPHONEOS_DEPLOYMENT_TARGET = 8.2;
    

    ...which is missing from our projects created with earlier Xcode versions.

    So I manually copied this setting into the Debug and Release configurations of my project. This error went away.

    I then got another error about a version mismatch between my app and the WatchKit app target. Fixing this version mismatch allowed the build to compile clean and run fine.

    I know this is a bit hacky, but I'm guessing it's relatively safe.

    When searching through the project.pbxproj file, you will want to match against this search term: "_WatchKit_Extension". This should identify the area near where the new instruction should be added.

    Discussion thread in Apple forums:

    https://devforums.apple.com/thread/266033?tstart=0

    Excerpt from a fresh project:

    4F9F32751AC2024F00673D86 /* Debug */ = {
                isa = XCBuildConfiguration;
                buildSettings = {
                    ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
                    GCC_PREPROCESSOR_DEFINITIONS = (
                        "DEBUG=1",
                        "$(inherited)",
                    );
                    IBSC_MODULE = Bogus_WatchKit_Extension;
                    INFOPLIST_FILE = "Bogus WatchKit App/Info.plist";
                    IPHONEOS_DEPLOYMENT_TARGET = 8.2;
                    PRODUCT_NAME = "$(TARGET_NAME)";
                    SKIP_INSTALL = YES;
                    TARGETED_DEVICE_FAMILY = 4;
                    "TARGETED_DEVICE_FAMILY[sdk=iphonesimulator*]" = "1,4";
                };
                name = Debug;
            };
            4F9F32761AC2024F00673D86 /* Release */ = {
                isa = XCBuildConfiguration;
                buildSettings = {
                    ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
                    IBSC_MODULE = Bogus_WatchKit_Extension;
                    INFOPLIST_FILE = "Bogus WatchKit App/Info.plist";
                    IPHONEOS_DEPLOYMENT_TARGET = 8.2;
                    PRODUCT_NAME = "$(TARGET_NAME)";
                    SKIP_INSTALL = YES;
                    TARGETED_DEVICE_FAMILY = 4;
                    "TARGETED_DEVICE_FAMILY[sdk=iphonesimulator*]" = "1,4";
                };
                name = Release;
            };
    

提交回复
热议问题