Skip to content

fix(ios): silence Swift build warnings - #130

Open
shivapoudel wants to merge 1 commit into
ionic-team:mainfrom
shivapoudel:fix/ios-swift-warnings
Open

shivapoudel wants to merge 1 commit into
ionic-team:mainfrom
shivapoudel:fix/ios-swift-warnings

Conversation

@shivapoudel

Copy link
Copy Markdown

Building the plugin with Xcode 26 gives 11 warnings from this package:

  • 4 "extension declares a conformance of imported type … to imported protocol 'Decodable'" in LibraryModels+Decodable.swift. The types come from OSInAppBrowserLib, so the conformances are marked @retroactive. This needs a Swift 5.10+ compiler (Xcode 15.3+); the package's swift-tools-version is 5.9, so say if you would rather gate it.
  • 7 in InAppBrowserPlugin.swift: the DispatchQueue.main.async closures that hold self strongly while the closures inside them use [weak self]. They now capture self weakly too.

No behaviour change. We apply the same diff as a pnpm patch in our app and a clean build shows none of these warnings.

🤖 Generated with Claude Code

- Declare the Decodable conformances of OSIABDismissStyle, OSIABViewStyle, OSIABAnimationEffect and OSIABToolbarPosition as @retroactive: the types come from OSInAppBrowserLib.
- Capture self weakly in the DispatchQueue.main.async closures, which already use [weak self] in the closures nested inside them.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
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.

1 participant