关于App Store中使用AFNetworking(含UIWebView)的应用更新截止时间咨询
Hey there, let's break down your questions step by step based on Apple's official policies from that timeframe and common developer experiences:
Apple UIWebView Deprecation Update Timeline Clarification
- Regarding the update window before December 31, 2020: Apple allowed continuous updates to your already-live App Store app during this period — not just a single update. As long as each new submission was reviewed and approved prior to that cutoff date, you could push multiple updates without issue.
- After December 31, 2020, any app update still containing UIWebView references would be rejected during App Store review. Your existing app would remain available to users, but you wouldn't be able to release new updates until you removed all UIWebView dependencies.
Migrating HMAC SHA256 Security Module from AFNetworking to Alamofire
Since your security layer is built on AFNetworking's HMAC SHA256 implementation, here are practical tips to smooth the transition to Alamofire:
- Alamofire doesn't include built-in HMAC utilities, but you can implement the logic independently using Apple's native frameworks. For iOS 13+,
CryptoKitoffers a clean way to generate HMAC SHA256 signatures:
If you need to support iOS versions older than 13, you can use theimport CryptoKit func generateHMACSHA256Signature(for inputString: String, secretKey: String) -> String { guard let inputData = inputString.data(using: .utf8), let keyData = secretKey.data(using: .utf8) else { return "" } let symmetricKey = SymmetricKey(data: keyData) let hmacSignature = HMAC<SHA256>.authenticationCode(for: inputData, using: symmetricKey) return Data(hmacSignature).base64EncodedString() }CommonCryptoframework instead (you'll need to add a bridging header for it). - Integrate this helper function into Alamofire's request flow using
RequestAdapter. This lets you automatically inject the HMAC signature into request headers or parameters before each call, mirroring how you likely handled it with AFNetworking's request serializers. - Be sure to test rigorously with your existing API endpoints. Small differences in string encoding, whitespace handling, or parameter ordering can cause mismatched signatures that break authentication.
内容的提问来源于stack exchange,提问作者Rashid Ali
相关产品推荐
相关产品推荐

