Posts

Post not yet marked as solved
7 Replies
3.2k Views
Hello, I am try to use WKWebview to handle webpage load. But I have met an authorisation cycle.Our website have more than one redirect(302).Just like PageA->PageB-PageC->PageA. The PageC need cookies of PageB'response.The cookies of PageB'response seems like right,I can see the right cookies of response. When PageB redirect to PageC the PageC's request header have no the cookie before.I want to inject cookie, But The delegate of WKWebView can not handle 302 response, So I can not inject cookie in right way?
Posted
by kesonkey.
Last updated
.
Post not yet marked as solved
0 Replies
691 Views
When I want to get a specified cookie item which response by the server with WKWebview , I have met some trouble. The Charles tool can view the cookie item in response,When I debug the app the Safari developer storage also can view the cookie item,But I can not use iOS function to get it. Here is some test. WKHTTPCookieStore *cookieStore = self.webView.configuration.websiteDataStore.httpCookieStore;     [cookieStore getAllCookies:^(NSArray<NSHTTPCookie *> * Nonnull cookies) {       for (NSHTTPCookie *cookie in cookies) { NSLog(@"CookieStore cookie name is %@",cookie.name);       }     }];  [[NSHTTPCookieStorage sharedHTTPCookieStorage].cookies enumerateObjectsUsingBlock:^(NSHTTPCookie * Nonnull obj, NSUInteger idx, BOOL * Nonnull stop) {     NSLog(@"NSHTTPCookieStorage cookie name is %@",obj.name);   }];  [self.webView evaluateJavaScript:@"document.cookie;" completionHandler:^(id Nullable ret, NSError * _Nullable error) {       NSLog(@"documents cookies is %@ error is %@",ret,error);     }]; All test log have no the cookie , If the 'WKHTTPCookieStore' or ' NSHTTPCookieStorage' are different with the Safari developer cookie storage ? If YES ,How can i get the cookie?
Posted
by kesonkey.
Last updated
.
Post not yet marked as solved
0 Replies
394 Views
Hi,I have met a trouble, Our Developer account have 4 App ID Prefix, But only one is Team ID, When I test 'sign in with apple', The app which is not Team ID prefix get the error 'invalid_client'. With this article, https://fluffy.es/how-to-solve-invalid_client-error-in-sign-in-with-apple/ I have make a check, All seems like ok. The result is passed. I want to know if this error is effected by App ID Prefix?
Posted
by kesonkey.
Last updated
.