-
Notifications
You must be signed in to change notification settings - Fork 194
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: deprecation fix #404
fix: deprecation fix #404
Conversation
@@ -187,9 +187,11 @@ + (CGFloat)statusBarHeight { | |||
|
|||
+ (UIWindow *)getKeyWindow { | |||
if (@available(iOS 13.0, *)) { | |||
for (UIWindow *window in [[AMPUtils getSharedApplication] windows]) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think windows is deprecated in iOS 15, but here is for iOS 13.0.
Do we need to do any changes here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we are good here. There are two windows
:
- https://developer.apple.com/documentation/uikit/uiapplication/1623104-windows?language=objc, this one deprecates in iOS 15
- https://developer.apple.com/documentation/uikit/uiwindowscene/3198091-windows?language=objc, this one starts from iOS 13, is the recommended one
🎉 This PR is included in version 8.11.0 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
…entify-object * commit 'f07749967fb8e628f9f2c743fab2ba6600574d85': chore(release): 8.12.0 [skip ci] feat: expose more function signature for logEvent (amplitude#409) chore: use the reusable workflow to create jira issue (amplitude#408) chore(release): 8.11.1 [skip ci] fix: turn requiringSecureCoding on, adjust the available version (amplitude#407) chore(release): 8.11.0 [skip ci] fix: deprecation fix (amplitude#404) feat: add EU SSL pinning cert, extent it to support multiple domains (amplitude#403) chore(release): 8.10.2 [skip ci] Revert "Compile with code coverage enabled (amplitude#398)" (amplitude#402) chore(release): 8.10.1 [skip ci] fix: wrong carrier info with deprecated method (amplitude#400) Compile with code coverage enabled (amplitude#398) chore(release): 8.10.0 [skip ci] feat: Add versionId to tracking plan data (amplitude#392) chore(release): 8.9.0 [skip ci] fix: fix release action Update Podfile.lock feat: Add support on Swift Package Manager for WatchOS (amplitude#381) docs: add Ampli SDK reference (amplitude#385) # Conflicts: # Sources/Amplitude/AMPURLSession.m
Summary
This PR addresses the following deprecations:
NSURLConnection
, dead code, remove all related codeUIWindow keyWindow
, no need to change, our code use it for older iOS version support: Amplitude-iOS/AMPUtils.m at 06afbb8b9b8da89fa1e7fc58c6342400b77a9ca1 · amplitude/Amplitude-iOSSecTrustGetCertificateAtIndex
, deprecated, need to useSecTrustCopyCertificateChain
, Replace deprecated SecTrustGetCertificateAtIndex in iOS 15?SecTrustEvaluate
, deprecated, need to useSecTrustEvaluateWithError
, example: Fixed SecTrustEvaluate deprecated warning by ddaddy · Pull Request #90 · acmacalister/jetfireUIApplication windows
, deprecated, need to useUIWindowScene.windows
How to resolve: 'keyWindow' was deprecated in iOS 13.0Checklist
No