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

Cannot compile with Xcode 13b3: 'shared' is unavailable #338

Open
joshuapoq opened this issue Jul 29, 2021 · 1 comment
Open

Cannot compile with Xcode 13b3: 'shared' is unavailable #338

joshuapoq opened this issue Jul 29, 2021 · 1 comment

Comments

@joshuapoq
Copy link

joshuapoq commented Jul 29, 2021

Raising this whilst I'm not sure I'd recommend fixing yet. Follow this thread for a better explanation of the issue.

The following common code is unavailable in iOS app extensions. Code using this code no longer compiles via SPM.

UIApplication.shared

Xcode 13b3 is requiring that frameworks use the following annotation for code using unavailable code.

@available(iOSApplicationExtension, unavailable)

Affected lines of code:
https://github.com/ninjaprox/NVActivityIndicatorView/blob/master/Sources/Extended/NVActivityIndicatorPresenter.swift#L309
https://github.com/ninjaprox/NVActivityIndicatorView/blob/master/Sources/Extended/NVActivityIndicatorPresenter.swift#L325

@rlziii
Copy link

rlziii commented Aug 11, 2021

It seems like this is no longer an issue as of Xcode 13 Beta 5. I can confirm that NVActivityIndicatorView is building correctly for me again. The relevant change in the Xcode 13 release notes:

Swift Packages

Resolved in Xcode 13 Beta 5

You don’t need to annotate code as unavailable for use in application extensions if it references APIs annotated as unavailable for use in application extensions. This reverts a requirement that Xcode 13 Beta 3 introduced. (80615922) (FB9332020)

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