Post

Replies

Boosts

Views

Activity

Reply to Google Pay with WKWebview
A further update : We used user agent string listed at https://myip.ms/view/comp_browsers/13092/Safari_14.html We used  applicationNameForUserAgent property of WKWebViewConfiguration. Referring the table at above link, we used user agent string in this configuration for WKWebView. The button started appearing but its text is still not turning to 'Buy With G Pay '. It is just showing GPay ..... User agent string I used is : "Mozilla/5.0 (iPhone; CPU iPhone OS 14_5_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.0 EdgiOS/46.3.13 Mobile/15E148 Safari/605.1.15". In Safari browser, the button initially takes same appearance as seen in iOS WkWebView but then button text automatically changes and then becomes ' Buy With G Pay '. Looks like something additional happening in Safari browser which needs to be found out.
Topic: Safari & Web SubTopic: General Tags:
Jul ’21
Reply to Synchronization inside concurrent NSOperationQueue of NSURLSession.
We just went through the documentation again (https://developer.apple.com/documentation/foundation/nsurlsession/1410330-datataskwithurl ). This link is about CompletionHandler instance method of NSURLSessiondataTask. It was our mistake that the main statement in documentation got skipped while reading . That statement is ... Delegate methods for handling authentication challenges, however, are still called. We did not want to compromise security and hence we did not use completionHandler approach. But reading above statement it means, even if we use completionHandler approach the necessary callback (DidReceiveChallenge()) does not get skipped. And that is what we wanted. Conclusion : I don't think we need to set maxConcurrentOperationCount to 1 while using completionHandler approach described in above documentation link. With completionHandler approach the delegate queue can be a real concurrent queue and it can execute many tasks simultaneously. OOPer and eskimo, please report your opinion on my conclusion specified here. Once again, thanks a lot.
Topic: App & System Services SubTopic: Core OS Tags:
Mar ’21
Reply to Wrong order received by NSURLSession delegate?
A. We have done these 2 things for order of callbacks , We have maintained dictionary taskId, data format . This is the dictionary that gets filled during DidReceiveData (NSUrlSession session, NSUrlSessionDataTask dataTask, NSData data) callbacks . So the data gets filled in appropriately. We set TaskDescription on each task added to NSUrlSession. We set it with endpoint name. string strTaskDescription = strEndPointName; getRequestTask.TaskDescription = strTaskDescription; So inside DidCompleteWithError(NSUrlSession session, NSUrlSessionTask task, NSError error) we again check the taskdescrition and come to know about the endpoint name. The data for taskidentifier( key) is also retrieved. B. The only concern that we have is about usage of NSOperationQueue set for NSURLSession. If its maximumConcurrentOperations is not set to 1 then the dictionary (specified in pont A above) will get accessed by multiple concurrent tasks( operations) . Will its usage get synchronized automatically ?
Mar ’21
Reply to Wrong order received by NSURLSession delegate?
Our application has 7 api calls on home screen . We want the home screen to get loaded faster. We fire all 7 calls concurrently and not serially. We have to go with NSURLSessionDelegate as SSL pinning is implemented and hence we can not go with completion handler approach. Setting maxConcurrentOperationCount to 1 would rather slow the home screen loading. Is there any work around to get real time concurrency ? Will our app crash if we do not set maxConcurrentOperationCount to 1?
Mar ’21