Skip to content

fix: replace deprecated UIActivityIndicatorViewStyleWhiteLarge on iOS 13+ - #582

Open
ishaquehassan wants to merge 1 commit into
ponnamkarthik:masterfrom
ishaquehassan:fix/535-ios-activity-indicator-deprecation
Open

fix: replace deprecated UIActivityIndicatorViewStyleWhiteLarge on iOS 13+#582
ishaquehassan wants to merge 1 commit into
ponnamkarthik:masterfrom
ishaquehassan:fix/535-ios-activity-indicator-deprecation

Conversation

@ishaquehassan

Copy link
Copy Markdown
Contributor

makeToastActivity: in UIView+Toast.m creates the loading spinner with UIActivityIndicatorViewStyleWhiteLarge, 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 UIActivityIndicatorViewStyleLarge and sets the color to white, so the spinner looks exactly the same as before. The Large style is not white by default (unlike the old WhiteLarge constant), so the explicit color keeps the appearance identical. The pre iOS 13 path keeps the original constant but wraps it in a clang diagnostic push/pop so that branch stays warning free too. The @available guard 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.swift already declares an iOS 13.0 minimum so the modern style is always available on SPM builds, and the @available guard 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

… 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
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.

UIActivityIndicatorViewStyleWhiteLarge is deprecated: first deprecated in iOS 13.0

1 participant