segmentio / analytics-ios

The hassle-free way to integrate analytics into any iOS application.
https://segment.com/libraries/ios
MIT License
399 stars 334 forks source link

Xcode 13b4: 'shared' is unavailable in application extensions for iOS: Use view controller based solutions where appropriate instead. #1010

Closed JetForMe closed 3 years ago

JetForMe commented 3 years ago
…/SourcePackages/checkouts/analytics-swift/Sources/Segment/Plugins/Platforms/iOS/iOSLifecycleMonitor.swift:58:37: 'shared' is unavailable in application extensions for iOS: Use view controller based solutions where appropriate instead.

Xcode 13b4 introduced (erroneously, I think) a bug in which restrictions on APIs like being unavailable in extensions trigger errors, even when building applications. The usual fix for this is to declare the same restriction on the library's published methods.

You get this error by trying to build an iOS app in Xcode 13b4 with Segment as an SPM dependency.

bsneed commented 3 years ago

Thanks! Will have a look at this and see what's up.

JetForMe commented 3 years ago

I should say, segment-swift.

bsneed commented 3 years ago

Ok, lets move it to that repo then and close this one.