react-native-track-player: Enum cases with associated values cannot be marked potentially unavailable
Dear,
With the introduction with iOS 15 and Xcode 13, I have discovered a bug. I can no longer compile an app for iOS 15. The problem is in react-native-track-player/Vendor/SwiftAudio/Classes/NowPlayingInfoController/NowPlayingInfoProperty/NowPlayingInfoProperty
The problem is with the following code:
`public enum NowPlayingInfoProperty: NowPlayingInfoKeyValue {
/**
The identifier of the collection the now playing item belongs to.
The identifier can be an album, artist, playlist, etc.
*/
case collectionIdentifier(String?)
/**
The available language option groups for the now playing item.
Value is an array of MPNowPlayingInfoLanguageOptionGroup items. Only one language option in a given group can be played at a time.
*/
case availableLanguageOptions([MPNowPlayingInfoLanguageOptionGroup]?)
/**
The URL pointing to the now playing item's underlying asset.
This constant is used by the system UI when video thumbnails or audio waveform visualizations are applicable.
*/
@available(iOS 10.3, *)
case assetUrl(URL?)`
Resulting in: Enum cases with associated values cannot be marked potentially unavailable (@available(iOS 10.3, *))
I use react-native-track-player 1.2.7. Any solutions?
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 8
- Comments: 18 (3 by maintainers)
@DennisdeWitNL thank you 🙏 Switching to IOS 10 in
NowPlayingInfoProperty.swiftfile at 34 and 119 lines helped me.P.S I also think that issue is only with Xcode 13^
@dcvz can we also have this in v1 ? We are still using v1 and got build errors using XCode 13. Thank you.
Hey folks thanks for pinging this and flagging it as an incorrectly closed issue! I know iOS 15 is coming really soon.
I’ve reopened the issue and will do my best to take a look tomorrow with the latest Xcode.