Closed mina4gerges closed 1 year ago
👋 Hi @mina4gerges and Thank you for reaching out to us. In order for us to provide optimal support, please submit a ticket to our support team at support@appsflyer.com. When submitting the ticket, please specify:
Same Problem here, any solution?
Report
Plugin Version
^6.9.4"
On what Platform are you having the issue?
IOS
What did you do?
Adding in AppDelgate.m for SSL pining:
` // Override TrustKit's logger method, useful for local debugging void (^loggerBlock)(NSString ) = ^void(NSString message) { NSLog(@"TrustKit log: %@", message); }; [TrustKit setLoggerBlock:loggerBlock];
NSDictionary trustKitConfig = @{ // Swizzling because we can't access the NSURLSession instance used in React Native's fetch method kTSKSwizzleNetworkDelegates: @YES, kTSKPinnedDomains: @{ @"test.com" : @{ kTSKIncludeSubdomains: @YES, // Pin all subdomains kTSKEnforcePinning: @YES, // Block connections if pinning validation failed kTSKDisableDefaultReportUri: @YES, kTSKPublicKeyHashes : @[ @"BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB=", @"BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB=", // Fake backup key but we need to provide 2 pins ], }, }}; [TrustKit initSharedInstanceWithConfiguration:trustKitConfig]; [TrustKit sharedInstance].pinningValidatorCallback = ^(TSKPinningValidatorResult result, NSString notedHostname, TKSDomainPinningPolicy policy) { if (result.finalTrustDecision == TSKTrustEvaluationFailedNoMatchingPin) { NSLog(@"TrustKit certificate matching failed"); // Add more logging here. i.e. Sentry, BugSnag etc } };`
What did you expect to happen?
Get API response
What happened instead?
No able to get any response from API (no errors no response)