turbo-ios-base icon indicating copy to clipboard operation
turbo-ios-base copied to clipboard

Local rails app won't load

Open johndbritton opened this issue 3 years ago • 1 comments

I've been able to get this working with the app at https://turbo-native-demo.glitch.me, but when I try to connect to a local development rails app at http://localhost:3000 things go wrong.

I've set TURBO_URL->development to http://localhost:3000 and App Transport Security Settings->Allows Local Networking is YES. When building and launching the app, I get the following output in the Xcode console:

2022-02-08 11:38:09.881444-0500 App[87765:101296449] [Storyboard] Unknown class _TtC3App14ViewController in Interface Builder file.
2022-02-08 16:38:09 +0000 - [ColdBootVisit] startVisit()
2022-02-08 16:38:10 +0000 - [Bridge] ← pageLoadFailed
2022-02-08 11:38:10.138793-0500 App[87765:101296449] [Loading] 0x157030818 - [pageProxyID=5, webPageID=6, PID=87769] WebPageProxy::didFailLoadForFrame: frameID=3, domain=NSURLErrorDomain, code=-999
2022-02-08 16:38:10 +0000 - [Bridge] ← pageLoaded

This looks to me like there's something in iOS preventing the webview from loading from localhost. Note this is using http, not https. I tried enabling NSAllowsArbitraryLoads but that didn't help either.

Am I missing something really simple here?

johndbritton avatar Feb 08 '22 16:02 johndbritton

I'm running into the same issue:

2022-08-22 21:35:11.523103-0700 App[16183:1914871] [Storyboard] Unknown class _TtC3App14ViewController in Interface Builder file.
2022-08-22 21:35:11.786683-0700 App[16183:1914871] [ViewportSizing] maximumViewportInset cannot be larger than frame
2022-08-22 21:35:11.786743-0700 App[16183:1914871] [ViewportSizing] minimumViewportInset cannot be larger than frame
2022-08-23 04:35:11 +0000 - [ColdBootVisit] startVisit()
2022-08-23 04:35:12 +0000 - [Bridge] ← pageLoadFailed
2022-08-22 21:35:12.308362-0700 App[16183:1914871] [Loading] 0x13802c818 - [pageProxyID=6, webPageID=7, PID=16193] WebPageProxy::didFailLoadForFrame: frameID=3, domain=NSURLErrorDomain, code=-999
2022-08-23 04:35:12 +0000 - [Bridge] ← pageLoaded

Same settings too:

Screen Shot 2022-08-22 at 9 46 39 PM

I've reviewed the docs a few times and quadruple checked all the configurations, but the error persists.

bradgessler avatar Aug 23 '22 04:08 bradgessler