profile
viewpoint

Ask questionsApp Transport Security in DEBUG mode [iOS]

per docs, LCMicroService.bundle() attempts to hit the local development server when compiled in DEBUG mode. I didn't see a note of the subsequent errors reported anywhere but you'll want to add an exception for localhost to silence the warnings in the console:

e.g. temporarily added to my project's Info.plist:

(note: only for development! inadvisable for production)

<key>NSAppTransportSecurity</key>
<dict>
	<key>NSExceptionDomains</key>
	<dict>
		<key>localhost</key>
		<dict>
			<key>NSTemporaryExceptionAllowsInsecureHTTPLoads</key>
			<true/>
		</dict>
	</dict>
</dict>
LiquidPlayer/LiquidCore

Answer questions ericwlange

Thanks @daetal-us . Yes, you have to enable cleartext HTTP. I should make that clear in the documentation. I also just discovered that this doesn't work in Android at all because if you use the distribution (rather than build from source), it is never in debug mode since the library is distributed in release mode. Hence, the logic to hit the dev server is compiled out. I need to figure out if I can detect the build flavor of the client app, not the library itself. So I will use this issue to cover both the problems in iOS and Android.

useful!

Related questions

No questions were found.
Github User Rank List