[GH-ISSUE #591] tvOS project & @available attributes errors #383

Closed
opened 2026-03-03 16:48:14 +03:00 by kerem · 4 comments
Owner

Originally created by @max1mvs on GitHub (Apr 30, 2020).
Original GitHub issue: https://github.com/OAuthSwift/OAuthSwift/issues/591

Description:

Building a blank tvOS project renders several issues regarding @available attributes referring to code that is only supported in tvOS 13.0 or newer:

OAuthSwiftOpenURLExternally.swift, line 28:

'open(_:options:completionHandler:)' is only available in tvOS 10.0 or newer

String+OAuthSwift.swift, line 58-62:

'scanUpToString' is only available in tvOS 13.0 or newer
'scanString' is only available in tvOS 13.0 or newer

UIApplication+OAuthSwift.swift
Line 22 + 27:

'UIWindowScene' is only available in tvOS 13.0 or newer

Line 23:

'connectedScenes' is only available in tvOS 13.0 or newer
'UIWindowScene' is only available in tvOS 13.0 or newer

Also, I get three warnings on

  • Collection+OAuthSwift.dia
  • OAuthSwiftURLHandlerType.dia
  • SHA1.dia

saying:

Could not read serialized diagnostics file: Invalid File: Invalid diagnostics signature

OAuth Provider? (Twitter, Github, ..):

N/A

OAuth Version:

  • Version 1
  • Version 2

OS (Please fill the version) :

  • iOS :
  • OSX :
  • TVOS :
  • WatchOS :

Installation method:

  • Carthage
  • CocoaPods
  • Swift Package Manager
  • Manually

Library version:

  • head
  • v2.1.0
  • v2.0.0
  • v1.4.1
  • v1.2 (Swift 4.0)
  • other: (Please fill in the version you are using.)

Xcode version:

  • 11.x (Swift 5.1)

  • 10.x (Swift 5.0)

  • 10.x (Swift 4.1)

  • 9.3 (Swift 4.1)

  • 9.0 (Swift 4.0)

  • other: (Please fill in the version you are using.)

  • objective c

Originally created by @max1mvs on GitHub (Apr 30, 2020). Original GitHub issue: https://github.com/OAuthSwift/OAuthSwift/issues/591 ### Description: Building a blank tvOS project renders several issues regarding `@available` attributes referring to code that is only supported in tvOS 13.0 or newer: **OAuthSwiftOpenURLExternally.swift, line 28:** > 'open(_:options:completionHandler:)' is only available in tvOS 10.0 or newer **String+OAuthSwift.swift, line 58-62:** > 'scanUpToString' is only available in tvOS 13.0 or newer > 'scanString' is only available in tvOS 13.0 or newer **UIApplication+OAuthSwift.swift** _Line 22 + 27:_ > 'UIWindowScene' is only available in tvOS 13.0 or newer _Line 23:_ > 'connectedScenes' is only available in tvOS 13.0 or newer > 'UIWindowScene' is only available in tvOS 13.0 or newer Also, I get three warnings on - Collection+OAuthSwift.dia - OAuthSwiftURLHandlerType.dia - SHA1.dia saying: > Could not read serialized diagnostics file: Invalid File: Invalid diagnostics signature ### OAuth Provider? (Twitter, Github, ..): N/A ### OAuth Version: - [ ] Version 1 - [ ] Version 2 ### OS (Please fill the version) : - [ ] iOS : - [ ] OSX : - [x] TVOS : - [ ] WatchOS : ### Installation method: - [ ] Carthage - [ ] CocoaPods - [x] Swift Package Manager - [ ] Manually ### Library version: - [ ] head - [x] v2.1.0 - [ ] v2.0.0 - [ ] v1.4.1 - [ ] v1.2 (Swift 4.0) - [ ] other: (Please fill in the version you are using.) ### Xcode version: - [x] 11.x (Swift 5.1) - [ ] 10.x (Swift 5.0) - [ ] 10.x (Swift 4.1) - [ ] 9.3 (Swift 4.1) - [ ] 9.0 (Swift 4.0) - [ ] other: (Please fill in the version you are using.) - [ ] objective c
kerem closed this issue 2026-03-03 16:48:14 +03:00
Author
Owner

@phimage commented on GitHub (Apr 30, 2020):

The minimum version is not very well specified. Even for iOS, I will do not take much time to make it compatible for version lower than 13.0
I update the code for instance with scanUpToString to fix Xcode warnings and use new api
So maybe an old version could work (or not if not tested by anybody)

<!-- gh-comment-id:621973446 --> @phimage commented on GitHub (Apr 30, 2020): The minimum version is not very well specified. Even for iOS, I will do not take much time to make it compatible for version lower than 13.0 I update the code for instance with scanUpToString to fix Xcode warnings and use new api So maybe an old version could work (or not if not tested by anybody)
Author
Owner

@phimage commented on GitHub (Apr 30, 2020):

I update the head code and add where it is possible tvOS version checking
It seems to compile with tvOS 9
@max1mvs let me know if it works and close the issue , thanks in advance

If I can I will add into CI some other OS version

<!-- gh-comment-id:621988461 --> @phimage commented on GitHub (Apr 30, 2020): I update the head code and add where it is possible tvOS version checking It seems to compile with tvOS 9 @max1mvs let me know if it works and close the issue , thanks in advance If I can I will add into CI some other OS version
Author
Owner

@max1mvs commented on GitHub (Apr 30, 2020):

I don't seem to see the changes in version 2.1.1..? Sorry for being a bit of a nuisance here, but I'm fairly new to all things Github, so I might have missed something here… 😅

<!-- gh-comment-id:622097078 --> @max1mvs commented on GitHub (Apr 30, 2020): I don't seem to see the changes in version 2.1.1..? Sorry for being a bit of a nuisance here, but I'm fairly new to all things Github, so I might have missed something here… 😅
Author
Owner

@max1mvs commented on GitHub (May 1, 2020):

Ok, figured out how to implement the latest build. All errors are gone now. Thank you!

<!-- gh-comment-id:622276168 --> @max1mvs commented on GitHub (May 1, 2020): Ok, figured out how to implement the latest build. All errors are gone now. Thank you!
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/OAuthSwift#383
No description provided.