You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Integrating SkyFloatingLabelTextField version 4.0.0 with Swift Package Manager and Xcode 13 beta 3 (13A5192i).
What did you expect to happen?
Library compiles without errors.
What happened instead?
Compiler emits error 'shared' is unavailable in application extensions for iOS: Use view controller based solutions where appropriate instead. SkyFloatingLabelTextField.swift line 33
This error appears due to the changes in the linker mentioned in the Xcode release notes
Resolved in Xcode 13 Beta 3
Linking Swift packages from application extension targets or watchOS applications no longer emits unresolvable warnings about linking to libraries not safe for use in application extensions. This means that code referencing APIs annotated as unavailable for use in app extensions must now themselves be annotated as unavailable for use in application extensions, in order to allow that code to be used in both apps and app extensions. (66928265)
All libraries that use API marked as unavailable in iOS app extensions, such as UIApplication.shared, have to mark their code themself with @available(iOSApplicationExtension, unavailable) in Swift and NS_EXTENSION_UNAVAILABLE in Objective-C.
Environment
Xcode Version: 13 beta 3 (13A5192i)
SkyFloatingLabelTextField Version: 4.0.0
Deployment Target: iOS 11.4
Base SDK: 15.0
Method of Integration: Swift Package Manager
The text was updated successfully, but these errors were encountered:
sofili
pushed a commit
to sofili/SkyFloatingLabelTextField
that referenced
this issue
Jul 20, 2021
Not sure what the future plan is in SwiftPM, but this was reverted for now in Xcode 13 beta 5.
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)
Report
What did you do?
Integrating SkyFloatingLabelTextField version 4.0.0 with Swift Package Manager and Xcode 13 beta 3 (13A5192i).
What did you expect to happen?
Library compiles without errors.
What happened instead?
Compiler emits error
'shared' is unavailable in application extensions for iOS: Use view controller based solutions where appropriate instead.
SkyFloatingLabelTextField.swift line 33This error appears due to the changes in the linker mentioned in the Xcode release notes
All libraries that use API marked as unavailable in iOS app extensions, such as
UIApplication.shared
, have to mark their code themself with@available(iOSApplicationExtension, unavailable)
in Swift andNS_EXTENSION_UNAVAILABLE
in Objective-C.Environment
Xcode Version: 13 beta 3 (13A5192i)
SkyFloatingLabelTextField Version: 4.0.0
Deployment Target: iOS 11.4
Base SDK: 15.0
Method of Integration: Swift Package Manager
The text was updated successfully, but these errors were encountered: