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

Xcode 13 - Package Target Integrity Error #137

Open
ctmanley opened this issue Sep 15, 2021 · 3 comments
Open

Xcode 13 - Package Target Integrity Error #137

ctmanley opened this issue Sep 15, 2021 · 3 comments

Comments

@ctmanley
Copy link

I am attempting to compile a project I've been working on with Xcode 13 release candidate. It complied and ran just fine on the simulator under Xcode 12.

There were updates to some of the package dependences so I uninstalled/reinstalled HAP which also updated all of its dependences. The result is that I'm getting the following Target Integrity error:

  • HAP
    -- Target Integrity
    ---- The package product 'SRP' requires minimum platform version 13.0 for the iOS platform, but this target supports 9.0
    ---- The package product 'Crypto' requires minimum platform version 13.0 for the iOS platform, but this target supports 9.0

So it seems to me that HAP (this target) is set to support a minimum version 9.0 but that SRP and Crypto require a minimum of version 13.0.

I don't think it is relevant to this error but the Deployment Target for my project is iOS 15.

Where should I look to resolve this? Could it be an Xcode 13 issue?

Thanks.

@Bouke
Copy link
Owner

Bouke commented Sep 15, 2021 via email

@ctmanley
Copy link
Author

I added HAP from its GitHub URL ( https://github.com/Bouke/HAP which is the URL shown under Project package dependences in Xcode ) and the dependences were automatically added by Xcode as well. Here is a screen grab of the Package Dependencies shown in Xcode.

image

These versions match the latest ones on their GitHub repositories.

Thanks,

Tommy

@ctmanley
Copy link
Author

I think this is an issue with Xcode 13. I copied the master branch of HAP and made changes to supported platforms in the Package.swift file. Lines 5-9 in the original file looks like this

let package = Package(
name: "HAP",
platforms: [
.macOS(.v11),
],

I changed Package.swift to required iOS 13 or above as follows:

let package = Package(
name: "HAP",
platforms: [
.macOS(.v11),
.iOS(.v13),
],

The result was that I got several compiler errors like this.

'HKDF' is only available in iOS 14.0 or newer

I then updated Package.swift to require iOS 14 or above as follows:

let package = Package(
name: "HAP",
platforms: [
.macOS(.v11),
.iOS(.v14),
],

After this change my app compiled just fine with no errors in HAP or any of its dependent packages.

From this I'm guessing that when the minimum iOS version is not specified in Package.swift, Xcode 13.0 defaults to version 9.0 as if ".iOS(.v9)," was specified. I changed the minimum iOS version to 9 in Package.swift to test this and got my original errors.

Would you update Package.swift to require iOS v14 and above?

Thanks.

Tommy

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

No branches or pull requests

2 participants