fix: replace deprecated UIActivityIndicatorViewStyleWhiteLarge on iOS 13+ - #582
Open
ishaquehassan wants to merge 1 commit into
Open
Conversation
… 13+ Use UIActivityIndicatorViewStyleLarge with an explicit white color on iOS 13 and up, and wrap the old WhiteLarge constant in a clang diagnostic push/pop for the pre iOS 13 path so neither branch warns. Closes ponnamkarthik#535
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
makeToastActivity:inUIView+Toast.mcreates the loading spinner withUIActivityIndicatorViewStyleWhiteLarge, which Apple deprecated in iOS 13.0. Building the plugin against a current iOS SDK prints that deprecation warning on every compile. It was reported in #535 and also came up in #516.On iOS 13 and up it now uses
UIActivityIndicatorViewStyleLargeand sets the color to white, so the spinner looks exactly the same as before. TheLargestyle is not white by default (unlike the oldWhiteLargeconstant), so the explicit color keeps the appearance identical. The pre iOS 13 path keeps the original constant but wraps it in aclang diagnosticpush/pop so that branch stays warning free too. The@availableguard follows the same pattern already used a bit lower in the file for the safe area insets.There is no behavior change, it is purely a compile time warning cleanup.
Package.swiftalready declares an iOS 13.0 minimum so the modern style is always available on SPM builds, and the@availableguard keeps CocoaPods builds on older deployment targets safe.Testing
Compile time only change with no runtime difference. The repo's CI already runs an iOS release build for the example app, which compiles the changed file.
Closes #535