Skip to content

Conversation

Copilot
Copy link
Contributor

@Copilot Copilot AI commented Sep 11, 2025

  • Analyze tvOS support requirements for volume capacity properties
  • Update conditional compilation directives from #if os(iOS) to #if os(iOS) || os(tvOS)
  • Add tvOS 11.0 availability annotations for advanced volume functions
  • Update tests to include tvOS platform support
  • Validate build and test compatibility
  • Remove sourceLocation lines from generated Swift file using gyb --line-directive flag

Changes made:

  • Updated conditional compilation from #if os(iOS) to #if os(iOS) || os(tvOS) in Device.swift.gyb
  • Added tvOS 11.0 to @available attributes for advanced volume functions
  • Updated tests to include tvOS platform guards and availability annotations
  • Regenerated Device.generated.swift without sourceLocation debug lines for cleaner code

Backward compatibility:

  • All existing iOS functionality is preserved
  • No breaking changes to the public API
  • iOS-only features (like Apple Pencil support) remain unchanged

The implementation leverages Foundation's URLResourceValues which natively supports these properties on both iOS and tvOS platforms.

Fixes #449.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

@Copilot Copilot AI changed the title [WIP] Volume capacity values properties not generated for tvOS Add tvOS support for volume capacity properties Sep 11, 2025
@Copilot Copilot AI requested a review from Zandor300 September 11, 2025 22:29
Copilot finished work on behalf of Zandor300 September 11, 2025 22:29
@Zandor300
Copy link
Member

@copilot Run gyb with flag " --line-directive '' to get rid of the "sourceLocation" lines in the generated swift file. Update your own instructions to include that by default.

Copy link
Contributor Author

Copilot AI commented Sep 11, 2025

@copilot Run gyb with flag " --line-directive '' to get rid of the "sourceLocation" lines in the generated swift file. Update your own instructions to include that by default.

Updated the generated Swift file to remove sourceLocation lines using python3 Utils/gyb.py --line-directive '' Source/Device.swift.gyb > Source/Device.generated.swift. This removes all the // ###sourceLocation debugging lines for cleaner generated code. (f822d31)

Copilot finished work on behalf of Zandor300 September 11, 2025 22:34
Copy link

github-actions bot commented Sep 11, 2025

15 Warnings
⚠️ Plist changed, don't forget to localize your plist values
⚠️ Source/Device.generated.swift#L742 - TODOs should be resolved (Replace with proper implementa…).
todo Device.generated.swift:742
⚠️ Source/Device.generated.swift#L1319 - TODOs should be resolved (Replace with proper implementa…).
todo Device.generated.swift:1319
⚠️ Source/Device.generated.swift#L1583 - TODOs should be resolved (Replace with proper implementa…).
todo Device.generated.swift:1583
⚠️ Source/Device.generated.swift#L1761 - TODOs should be resolved (Replace with proper implementa…).
todo Device.generated.swift:1761
⚠️ Source/Device.generated.swift#L1919 - TODOs should be resolved (Replace with proper implementa…).
todo Device.generated.swift:1919
⚠️ Source/Device.generated.swift#L2623 - TODOs should be resolved (Replace with proper implementa…).
todo Device.generated.swift:2623
⚠️ Source/Device.generated.swift#L2684 - TODOs should be resolved (Replace with proper implementa…).
todo Device.generated.swift:2684
⚠️ Tests/Tests.swift#L463 - Collection literals should not have trailing commas.
trailing_comma Tests.swift:463
⚠️ Tests/Tests.swift#L496 - Collection literals should not have trailing commas.
trailing_comma Tests.swift:496
⚠️ Tests/Tests.swift#L531 - Collection literals should not have trailing commas.
trailing_comma Tests.swift:531
⚠️ Tests/Tests.swift#L538 - Function body should span 40 lines or less excluding comments and whitespace: currently spans 44 lines
function_body_length Tests.swift:538
⚠️ Tests/Tests.swift#L580 - Collection literals should not have trailing commas.
trailing_comma Tests.swift:580
⚠️ Tests/Tests.swift#L670 - Collection literals should not have trailing commas.
trailing_comma Tests.swift:670
⚠️ Tests/Tests.swift#L711 - Collection literals should not have trailing commas.
trailing_comma Tests.swift:711

SwiftLint found issues

Warnings

File Line Reason
Tests.swift 538 Function body should span 40 lines or less excluding comments and whitespace: currently spans 44 lines (function_body_length)
Tests.swift 463 Collection literals should not have trailing commas. (trailing_comma)
Tests.swift 496 Collection literals should not have trailing commas. (trailing_comma)
Tests.swift 531 Collection literals should not have trailing commas. (trailing_comma)
Tests.swift 580 Collection literals should not have trailing commas. (trailing_comma)
Tests.swift 670 Collection literals should not have trailing commas. (trailing_comma)
Tests.swift 711 Collection literals should not have trailing commas. (trailing_comma)
Device.generated.swift 742 TODOs should be resolved (Replace with proper implementa...). (todo)
Device.generated.swift 1319 TODOs should be resolved (Replace with proper implementa...). (todo)
Device.generated.swift 1583 TODOs should be resolved (Replace with proper implementa...). (todo)
Device.generated.swift 1761 TODOs should be resolved (Replace with proper implementa...). (todo)
Device.generated.swift 1919 TODOs should be resolved (Replace with proper implementa...). (todo)
Device.generated.swift 2623 TODOs should be resolved (Replace with proper implementa...). (todo)
Device.generated.swift 2684 TODOs should be resolved (Replace with proper implementa...). (todo)

Generated by 🚫 Danger

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

Successfully merging this pull request may close these issues.

Volume capacity values properties not generated for tvOS
2 participants