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

7

65

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 have a deployment target equal to iOS 8.2 (was 8.3)

The iOS app and the project actually have a deployment target of 7.1 and always have, but we've been working with the iOS 8.3 SDK for our WatchKit component (using Swift 1.2) without issue using Xcode 6.3 beta 1, 2 and 3. This error only arose with Xcode 6.3 beta 4.

Anyone else have this error, and know how to fix it?

Separatrix answered 24/3, 2015 at 20:17 Comment(1)
I'm hitting the same thing. Rolling back to Beta 3 for now.Maneating
K
100

Select your project settings and go to "TARGETS". Click on your Watch Kit App, select Build Settings. For the key "iOS Deployment Target" you should find "iOS 8.3". For some reason Xcode 6.3 Beta 4 wants to have this on "iOS 8.2" for "Debug" and "Release". Now your project should build as expected.

This is still true for XCODE 6.3 release!

Kirman answered 13/4, 2015 at 7:46 Comment(5)
I did this and it worked, but couldn't find if it was Debug or Release. I only found this in one place, where I changed it. How can I select Debug or Release?Kennykeno
You need to select the arrow next to the row to expand it to show Debug and Release.Greenhaw
stupid question... how can i install the 8.2 SDK? I only have 8.3 here... and can't find where to install 8.2 :(Grisaille
@Grisaille Click Xcode in the top toolbar, then preferences, then the downloads tab you should see it under componentsMonkshood
See the #1 solution at #29595485 . I selected "Project Settings..." and didn't have enough options in the lean UI to go further.Clasp
B
38

Target -> "appName" Watch Kit App -> search Deployment -> change iOS Deployment Target on iOS 8.2 -> run enter image description here

Baedeker answered 25/4, 2015 at 13:41 Comment(0)
S
16

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;
        };
Sahara answered 25/3, 2015 at 7:36 Comment(1)
Glad to know it's not just me, and that sounds like it would work. I think I'll just roll back to beta 3 for now and see if a fix comes in, though.Separatrix
C
2

Amazingly still true in 6.4 ;-)

All targets must be set to 8.2

Checkrein answered 10/7, 2015 at 2:46 Comment(0)
P
1

I was facing same problem "iOS Deployment Target '8.3' is newer thatn SDK 'iOS 8.2' in target YUOR_PROJECT WatchKit Extension"

Here is simple solution for this issue. You can change target from .xcodeproj, just follow below steps:

  1. Do any change in your project or plist file (change Build/version),
  2. Select your modified project file
  3. Find '8.3' (Command+F) and replace it with 8.2.
  4. I have attached file for reference.

That's it.

It will help you if you have same problem like mine.

enter image description here

Pythagorean answered 6/4, 2015 at 8:59 Comment(0)
V
0

Go to Target -> Select Watch Kit App, Under deployment change value from 8.3 to

//:configuration = Debug IPHONEOS_DEPLOYMENT_TARGET = 8.2

//:configuration = Release IPHONEOS_DEPLOYMENT_TARGET = 8.2

Clean and build. Problem Solved!

Variant answered 13/4, 2015 at 15:44 Comment(0)
R
0

Experienced same problem in simulator with Xcode 7.3.1 and could solve it by going to watch App , then go to Watch OS deployment target , there you can chose lower version based on your watch .Hope if this helps.

Ride answered 26/6, 2016 at 8:10 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.