Discussion Forums  >  Xcode, Errors, Installing, Configuring

Replies: 6    Views: 1118

David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
09/28/15 10:11 PM (8 years ago)

Gotta love the NSAppTransportSecurity, dig this!

OK, so I'm working on BT 4.0 for iOS, the latest iOS Core I want all of you to start playing with. It "was" closer than it is now, thanks to iOS9. But, it shouldn't be too long until you see all the changes. Expect a forum-topper post about this in the coming days. This post is about something totally different and just for fun. For those of us familiar with the UIWebView (a UI compontent used in boatloads of iOS apps to show web content) you'll get a load out of this. While testing a BT 4.0 app I ran into some trouble loading a random website. Google, Yahoo, ESPN, etc. NONE of them will load in iOS9 without the NSAppTransportSecurity stuff in the .plist (prior to compiling the project). This of course is driving advertisers and publishers wild all over the internet. Getting "arbitrary loads" to work that don't use https:// is relatively easy. BUT, getting SSL loads (https://) to work without first adding them to an exceptions list is tough. Real tough. Anyway, have a look at the debug output below. This is ONE WEBSITE after ONE CALL to loadURL. You can see the insane amount of "work" going on behind the scenes with the UIWebView. It's no wonder it's unpredicatable!!! Secret: Have a look at the "handleSwipeLeft" in the output log. I expect you to smile when you see this. I also expect you to being speculating about what I'm up to in the 4.0 Core :-) BEGIN CONSOLE OUTPUT AFTER LOADING ONE SCREEN. CAN YOU FIND THE SSL ERRORS? I counted 20 different "loads" and 20 different "finishes" with one single URL. What a joke. 2015-09-28 22:05:25.973 Buzztouch[4892:3784320] BT_customURL: handleSwipeLeft (super) 2015-09-28 22:05:25.974 Buzztouch[4892:3784320] BT_customURL: handleSwipeLeft (super). Just finished swipe, loading screen with itemId: espn 2015-09-28 22:05:25.974 Buzztouch[4892:3784320] BT_customURL: loadScreenWithItemId (super) itemId:espn 2015-09-28 22:05:25.974 Buzztouch[4892:3784320] BT_application: getScreenDataByItemId espn 2015-09-28 22:05:25.975 Buzztouch[4892:3784320] BT_application: screenType is BT_customURL for screen with nickname: "ESPN" and itemId: espn 2015-09-28 22:05:25.975 Buzztouch[4892:3784320] BT_customURL: handleTapToLoadScreen (super) loading nickname: "ESPN" itemId: espn itemType: BT_customURL 2015-09-28 22:05:25.975 Buzztouch[4892:3784320] BT_application: getViewControllerForScreen nickname: "ESPN" itemId: espn type: BT_customURL 2015-09-28 22:05:25.976 Buzztouch[4892:3784320] BT_customURL: INIT 2015-09-28 22:05:25.976 Buzztouch[4892:3784320] BT_navController: pushViewController 2015-09-28 22:05:25.981 Buzztouch[4892:3784320] BT_customURL: viewWillDisappear (super) 2015-09-28 22:05:26.004 Buzztouch[4892:3784320] BT_customURL: viewDidLoad (super) 2015-09-28 22:05:26.006 Buzztouch[4892:3784320] BT_customURL: showProgress (super) 2015-09-28 22:05:26.007 Buzztouch[4892:3784320] BT_viewUtilities: getProgressView 2015-09-28 22:05:26.009 Buzztouch[4892:3784320] BT_customURL: viewWillAppear (super) 2015-09-28 22:05:27.010 Buzztouch[4892:3784320] BT_customURL: loadDataURL: http://www.espn.com 2015-09-28 22:05:27.020 Buzztouch[4892:3784320] BT_customURL: shouldStartLoadWithRequest: http://www.espn.com/ 2015-09-28 22:05:27.021 Buzztouch[4892:3784320] BT_customURL: webViewDidStartLoad 2015-09-28 22:05:27.291 Buzztouch[4892:3784320] BT_customURL: shouldStartLoadWithRequest: http://m.espn.go.com/wireless/index?i=COM 2015-09-28 22:05:27.499 Buzztouch[4892:3784320] BT_customURL: shouldStartLoadWithRequest: http://espn.go.com/ 2015-09-28 22:05:28.135 Buzztouch[4892:3784320] BT_customURL: shouldStartLoadWithRequest: http://tpc.googlesyndication.com/safeframe/1-0-2/html/container.html 2015-09-28 22:05:28.136 Buzztouch[4892:3784320] BT_customURL: webViewDidStartLoad 2015-09-28 22:05:28.164 Buzztouch[4892:3784320] BT_customURL: shouldStartLoadWithRequest: about:blank 2015-09-28 22:05:28.164 Buzztouch[4892:3784320] BT_customURL: webViewDidStartLoad 2015-09-28 22:05:28.165 Buzztouch[4892:3784320] BT_customURL: webViewDidFinishLoad 2015-09-28 22:05:28.172 Buzztouch[4892:3784320] BT_customURL: webViewDidFinishLoad 2015-09-28 22:05:28.183 Buzztouch[4892:3784320] BT_customURL: webViewDidFinishLoad 2015-09-28 22:05:28.272 Buzztouch[4892:3784320] BT_customURL: shouldStartLoadWithRequest: about:blank 2015-09-28 22:05:28.273 Buzztouch[4892:3784320] BT_customURL: webViewDidStartLoad 2015-09-28 22:05:28.274 Buzztouch[4892:3784320] BT_customURL: webViewDidFinishLoad 2015-09-28 22:05:28.282 Buzztouch[4892:3784320] BT_customURL: shouldStartLoadWithRequest: about:blank 2015-09-28 22:05:28.282 Buzztouch[4892:3784320] BT_customURL: webViewDidStartLoad 2015-09-28 22:05:28.284 Buzztouch[4892:3784320] BT_customURL: webViewDidFinishLoad 2015-09-28 22:05:28.322 Buzztouch[4892:3784320] BT_customURL: shouldStartLoadWithRequest: about:blank 2015-09-28 22:05:28.323 Buzztouch[4892:3784320] BT_customURL: webViewDidStartLoad 2015-09-28 22:05:28.324 Buzztouch[4892:3784320] BT_customURL: webViewDidFinishLoad 2015-09-28 22:05:28.639 Buzztouch[4892:3784320] BT_customURL: shouldStartLoadWithRequest: about:blank 2015-09-28 22:05:28.639 Buzztouch[4892:3784320] BT_customURL: webViewDidStartLoad 2015-09-28 22:05:28.641 Buzztouch[4892:3784320] BT_customURL: webViewDidFinishLoad 2015-09-28 22:05:28.854 Buzztouch[4892:3784320] BT_customURL: shouldStartLoadWithRequest: https://espn.go.com/disneyid/responder/?clientId=ESPN-ESPNCOM-PROD&scheme=http&postMessageOrigin=http%3A%2F%2Fespn.go.com%2F&cookieDomain=espn.go.com&config=PROD&langPref=en-US&cssOverride=https%3A%2F%2Fcdn.secure.espn.go.com%2Fcombiner%2Fc%3Fcss%3Ddisneyid%2Fcore.css&responderPage=https%3A%2F%2Fespn.go.com%2Fdisneyid%2Fresponder%2F 2015-09-28 22:05:28.854 Buzztouch[4892:3784320] BT_customURL: webViewDidStartLoad 2015-09-28 22:05:28.884 Buzztouch[4892:3784320] BT_customURL: shouldStartLoadWithRequest: about:blank 2015-09-28 22:05:28.884 Buzztouch[4892:3784320] BT_customURL: webViewDidStartLoad 2015-09-28 22:05:28.886 Buzztouch[4892:3784320] BT_customURL: webViewDidFinishLoad 2015-09-28 22:05:29.071 Buzztouch[4892:3784320] BT_customURL: shouldStartLoadWithRequest: https://cdn.registerdisney.go.com/v2/ESPN-ESPNCOM-PROD/en-US?include=config,l10n,js,html&scheme=http&postMessageOrigin=http%3A%2F%2Fespn.go.com%2F&cookieDomain=espn.go.com&config=PROD&cssOverride=https%3A%2F%2Fcdn.secure.espn.go.com%2Fcombiner%2Fc%3Fcss%3Ddisneyid%2Fcore.css&responderPage=https%3A%2F%2Fespn.go.com%2Fdisneyid%2Fresponder%2F 2015-09-28 22:05:29.072 Buzztouch[4892:3784320] BT_customURL: webViewDidStartLoad 2015-09-28 22:05:29.084 Buzztouch[4892:3784320] BT_customURL: webViewDidFinishLoad 2015-09-28 22:05:29.110 Buzztouch[4892:3784320] BT_customURL: shouldStartLoadWithRequest: http://tpc.googlesyndication.com/sodar/cTrvNaRi.html 2015-09-28 22:05:29.110 Buzztouch[4892:3784320] BT_customURL: webViewDidStartLoad 2015-09-28 22:05:29.235 Buzztouch[4892:3784320] BT_customURL: webViewDidFinishLoad 2015-09-28 22:05:29.240 Buzztouch[4892:3784320] BT_customURL: shouldStartLoadWithRequest: https://secure-us.imrworldwide.com/ocr/e?aHR0cHM6Ly93d3cuZmFjZWJvb2suY29tL2JyYW5kbGlmdC5waHA.Y2FtcGFpZ25faWQ9ZmYxZDRkYTE3OTgyOGY0OGM2MTM3YmY3ZGQxMGVhMTYmY3JlYXRpdmVfaWQ9MjA0NDk3YjdjNjJhMGFiY2MwMWQxZTkzMGNhMWFjMTgmcGxhY2VtZW50X2lkPTJmMGZiOTY3ZDJlNzIyMmYyMWUxYzhjMzM0NTZmNGY3Jm1lZGlhX3R5cGU9aW1hZ2UmY29udGVudF90eXBlPWpzJnNlZ21lbnQxPVVTJnNlZ21lbnQyPTgwNyZzZWdtZW50Mz1JT1Mmb3N2ZXJzaW9uPWlPUyhpUGhvbmUpJmRldmljZV90eXBlPVBITiZwbGF0Zm9ybT1NQkwmYWR2ZXJ0aXNlcl9pZD1QSE4mdmVyPTEmaD02ZjU4NzJjNGIw 2015-09-28 22:05:29.241 Buzztouch[4892:3784320] BT_customURL: webViewDidStartLoad 2015-09-28 22:05:29.248 Buzztouch[4892:3784320] BT_customURL: shouldStartLoadWithRequest: https://d.audienceiq.com/r/dd/id/L21rdC80NC9jaWQvMjUyNzcwMjAvdC8yL2NhdC8yNTI3NzIxOA/url/https://secure-wbw.imrworldwide.com/cgi-bin/wbw?p_uid=$!%7BTURN_UUID%7D&r=$!%7BCACHE_BUSTER%7D&nlsn_pid=2&nlsn_eid=7d67f65c8ac7ea46e0d92385a359755d&nlsn_rlist=1&nlsn_params=ff1d4da179828f48c6137bf7dd10ea16--204497b7c62a0abcc01d1e930ca1ac18--2f0fb967d2e7222f21e1c8c33456f4f7--image--js--US--807--IOS--iOS(iPhone)--PHN--MBL--PHN--1--NA--6f5872c4b0&ci=ENT9487&nlsn_ver=1&p_ver=1&sig=6dab4913a58fcfa1c06938ecf369a5ba 2015-09-28 22:05:29.249 Buzztouch[4892:3784320] BT_customURL: webViewDidStartLoad 2015-09-28 22:05:29.296 Buzztouch[4892:3784320] BT_customURL: webViewDidFinishLoad 2015-09-28 22:05:29.408 Buzztouch[4892:3784320] BT_customURL: webViewDidFinishLoad 2015-09-28 22:05:29.569 Buzztouch[4892:3784320] BT_customURL: shouldStartLoadWithRequest: https://secure-wbw.imrworldwide.com/cgi-bin/wbw?p_uid=8883621699709606811&r=2831628225453792155&nlsn_pid=2&nlsn_eid=7d67f65c8ac7ea46e0d92385a359755d&nlsn_rlist=1&nlsn_params=ff1d4da179828f48c6137bf7dd10ea16--204497b7c62a0abcc01d1e930ca1ac18--2f0fb967d2e7222f21e1c8c33456f4f7--image--js--US--807--IOS--iOS(iPhone)--PHN--MBL--PHN--1--NA--6f5872c4b0&ci=ENT9487&nlsn_ver=1&p_ver=1&sig=6dab4913a58fcfa1c06938ecf369a5ba 2015-09-28 22:05:29.843 Buzztouch[4892:3784320] BT_customURL: shouldStartLoadWithRequest: about:blank 2015-09-28 22:05:29.843 Buzztouch[4892:3784320] BT_customURL: webViewDidStartLoad 2015-09-28 22:05:29.844 Buzztouch[4892:3784320] BT_customURL: webViewDidFinishLoad 2015-09-28 22:05:29.848 Buzztouch[4892:3784320] BT_customURL: shouldStartLoadWithRequest: https://tags.bluekai.com/site/24667?ret=html&phint=pageName%3Despn%3Afrontpage&phint=channel%3Despn%3Afrontpage&phint=eVar34%3D&phint=events%3Devent3&phint=prop1%3Despn&phint=swid%3D1297219B-4493-4939-87A4-49EB2D218E6E&phint=prop4%3Dindex-news&phint=prop9%3D&phint=prop23%3D&phint=prop25%3D&phint=prop26%3D&phint=prop30%3Dpremium-no&phint=prop32%3D&phint=prop45%3D&phint=__bk_t%3DESPN%3A%20The%20Worldwide%20Leader%20in%20Sports&phint=__bk_k%3D&phint=__bk_l%3Dhttp%3A%2F%2Fespn.go.com%2F&limit=10&bknms=ver=2.0,ua=81c74c4f031a46c6031a46c6031a46c6,t=1443503129797,m=4b4e4ecaab1f1c93ab1f1c93ab1f1c93,k=1,lang=2101283a4c7bb2319e1953819e195381,sr=667x375x32,tzo=420,hss=true,hls=true,idb=false,addb=undefined,odb=function,cpu=4b4e4ecaab1f1c93ab1f1c93ab1f1c93,platform=81c74c4f031a46c6031a46c6031a46c6,notrack=,plugins=4b4e4ecaab1f1c93ab1f1c93ab1f1c93,cn=e9154ec0027a6d82aff86a707613c5d1&r=8706030 2015-09-28 22:05:29.849 Buzztouch[4892:3784320] BT_customURL: webViewDidStartLoad 2015-09-28 22:05:29.945 Buzztouch[4892:3784320] BT_customURL: webViewDidFinishLoad 2015-09-28 22:05:30.048 Buzztouch[4892:3784320] BT_customURL: webViewDidFinishLoad 2015-09-28 22:05:30.193 Buzztouch[4892:3784478] NSURLSession/NSURLConnection HTTP load failed (kCFStreamErrorDomainSSL, -9843) 2015-09-28 22:05:30.298 Buzztouch[4892:3784478] NSURLSession/NSURLConnection HTTP load failed (kCFStreamErrorDomainSSL, -9843) 2015-09-28 22:05:30.737 Buzztouch[4892:3784320] BT_customURL: shouldStartLoadWithRequest: about:blank 2015-09-28 22:05:30.738 Buzztouch[4892:3784320] BT_customURL: webViewDidStartLoad 2015-09-28 22:05:30.740 Buzztouch[4892:3784320] BT_customURL: webViewDidFinishLoad 2015-09-28 22:05:31.343 Buzztouch[4892:3784320] BT_customURL: shouldStartLoadWithRequest: about:blank 2015-09-28 22:05:31.344 Buzztouch[4892:3784320] BT_customURL: webViewDidStartLoad 2015-09-28 22:05:31.347 Buzztouch[4892:3784320] BT_customURL: webViewDidFinishLoad 2015-09-28 22:05:31.372 Buzztouch[4892:3784320] BT_customURL: shouldStartLoadWithRequest: about:blank 2015-09-28 22:05:31.373 Buzztouch[4892:3784320] BT_customURL: webViewDidStartLoad 2015-09-28 22:05:31.419 Buzztouch[4892:3784320] BT_customURL: webViewDidFinishLoad 2015-09-28 22:05:31.432 Buzztouch[4892:3784320] BT_customURL: shouldStartLoadWithRequest: about:blank 2015-09-28 22:05:31.434 Buzztouch[4892:3784320] BT_customURL: webViewDidStartLoad 2015-09-28 22:05:31.436 Buzztouch[4892:3784320] BT_customURL: webViewDidFinishLoad 2015-09-28 22:05:31.443 Buzztouch[4892:3784320] BT_customURL: shouldStartLoadWithRequest: about:blank 2015-09-28 22:05:31.444 Buzztouch[4892:3784320] BT_customURL: webViewDidStartLoad 2015-09-28 22:05:31.450 Buzztouch[4892:3784320] BT_customURL: webViewDidFinishLoad
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
09/28/15 10:49 PM (8 years ago)
Holy smokes. No wonder they put bigger processors in the new iPhones... Cheers! -- Smug
 
nadthevlad
Code is Art
Profile
Posts: 1025
Reg: Jun 07, 2012
Denver
21,850
like
09/28/15 10:59 PM (8 years ago)
Have you considered moving the web view over to WKWebView instead of UIWebView. I know you have backwards compatibility to think about but SFSafariViewController gets you around all the ATS BS for displaying a simple address like espn.com
 
nadthevlad
Code is Art
Profile
Posts: 1025
Reg: Jun 07, 2012
Denver
21,850
like
09/28/15 11:00 PM (8 years ago)
Have you considered moving the web view over to WKWebView instead of UIWebView. I know you have backwards compatibility to think about but SFSafariViewController gets you around all the ATS BS for displaying a simple address like espn.com
 
nadthevlad
Code is Art
Profile
Posts: 1025
Reg: Jun 07, 2012
Denver
21,850
like
09/28/15 11:00 PM (8 years ago)
oops
 
Niraj
buzztouch Evangelist
Profile
Posts: 2943
Reg: Jul 11, 2012
Cerritos
37,930
like
09/29/15 06:55 AM (8 years ago)
Swipe goodness! :-) The Ad Blocker technology should help in reducing the quantity of requests. Agree with Nick, the Safari VC will help to modernize the BT core. Bummer though, the backwards compatibility forces both types of webbiews to remain in the BT Core for a few more years. The good news is that iOS 9 is compatible with iPhone 4S and iPad 2! Thanks for sharing. -- Niraj
 
mrDavid
BTMods.com
Profile
Posts: 3936
Reg: May 21, 2011
San Diego, CA
51,910
like
09/29/15 04:23 PM (8 years ago)
I've been updating apps all this week for the damn plist issues loading half of my pages. LOL. Cool. Looking forward to 4.0. Thanks D! mrDavid
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.