No Internet connection via WiFi

Getting into LiveCode for iOS? Ask your questions here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
sphere
Posts: 1145
Joined: Sat Sep 27, 2014 10:32 am
Location: Earth, Except when i Jump

No Internet connection via WiFi

Post by sphere » Tue Aug 29, 2017 11:03 am

Hi,

i'm testing an app on iOs, which works ok on Android.
It's supposed to download a few json files, only at first start.
I check for Internet, and if not available it should quit.
This works.
But i have internet via WiFi on iOs so it should not quit.

So i enabled Wifi and Persistent WiFi (what is the difference?) in the standalone settings.
The inclusions are the same as for Android, so also Internet is included (i do it manually, as automatic does not always work ok).

Still it says no internet.
WiFi internet should be the same as mobile internet i presume?
Browser works and i get Google in iOs. in the app i also check for google.
So in Android no problem, in iOs it is a problem.

To clarify, the piece of internet check:

Code: Select all

 # check on internet connection
   put url "http://www.google.com" into tURL
if tURL is empty then
answer "This app needs Internet Connection on First Launch"&cr&"Please provide a connection and restart this app."
 closeStack
else
Any idea what i might have forgotten to activate for iOs?
Using LC8.1.6 and latest Xcode and build for iOs 10.3

Thanks for any help.

kind regards,
Sphere.

***edit*** this page http://lessons.livecode.com/m/4603/l/68 ... n-settings is too summier on explanations.

***edit 2*** iPhone runs iOs10.3.3 and i just checked with an iPad Air running iOs 10.3.2, same issue, internet is available, but not seen by the app.

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7215
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: No Internet connection via WiFi

Post by jacque » Tue Aug 29, 2017 4:14 pm

Apple no longer allows insecure URLs. Change it to https and it should work. There are ways around this but you'll need to register the URLs in your app to allow them. (I don't recall the details.) It's easier to just use secure https.

You may have the same problem if the JSON files are downloading from an insecure URL.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

sphere
Posts: 1145
Joined: Sat Sep 27, 2014 10:32 am
Location: Earth, Except when i Jump

Re: No Internet connection via WiFi

Post by sphere » Tue Aug 29, 2017 6:50 pm

Hi Jacque,

a yes that could be the issue.
The test json files i download from my website which is https.
But indeed, i did not with the google url.

Perhaps i also should include ssl&encryption, although it does work ok on Android (downloading the files), because i came across this bug http://quality.livecode.com/show_bug.cgi?id=19647 and maybe it is applicable here too, i have to test it.

Also for now manual inclusion of several libraries until those bugs are solved.

Thanks i will try it.

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7215
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: No Internet connection via WiFi

Post by jacque » Tue Aug 29, 2017 6:59 pm

It can't hurt to include the SSL library and it may save you some trouble.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

sphere
Posts: 1145
Joined: Sat Sep 27, 2014 10:32 am
Location: Earth, Except when i Jump

Re: No Internet connection via WiFi

Post by sphere » Tue Aug 29, 2017 7:19 pm

So that was the culprit.
changed http to https.
all the liburldownload thingy's where already https

did not needed to include ssl, but for a next release i think i'll include it just like you said.

It's just a demo app, so hopefully this will evolve to some more and get started to create apps as part-time job next to my fulltime job.
Then i want to get the indie version so i can full support the people who make it possible.

Thanks Jacque for your input.

Best regards,
Jerry

Post Reply

Return to “iOS Deployment”