Why is this not working on iOs?

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

Why is this not working on iOs?

Post by sphere » Wed Aug 10, 2016 8:44 pm

Hi,

i'm trying to understand why this works on Android, windows-lc-ide, mac-lc-ide, but not iOs iPhone 5s simulator or as test on real iPhone 5s device?

Code: Select all

 put URL "http://somewebaddress/getinfo.php" into varResults
   put varResults into field "Data" of card 2
Do i need to give another permission for it?

Thanks!
regards,
Sphere

sphere
Posts: 1145
Joined: Sat Sep 27, 2014 10:32 am

Re: Why is this not working on iOs?

Post by sphere » Wed Aug 10, 2016 9:07 pm

ok i already know.
I left out a piece of code in the above message

So only the 2 lines in the above message work.

iOs dos not like this:

Code: Select all

if the environment is "mobile" then
put URL "http://somewebaddress/getinfo.php" into varResults
   put varResults into field "Data" of card 2
end if

i still don't know why, because it seems valid, also for iOs.

Thanks Sphere.
No problem, you're welcome ;)

LCMark
Livecode Staff Member
Livecode Staff Member
Posts: 1232
Joined: Thu Apr 11, 2013 11:27 am

Re: Why is this not working on iOs?

Post by LCMark » Thu Aug 11, 2016 6:32 pm

@sphere: By default Apple does not allow iOS apps to make http requests - you have to use https. If you need to make http requests then you have to check the 'Disable ATS' check box in the iOS standalone settings pane.

Note that Apple is being quite aggressive in this regard - they are intending to drop support for HTTP requests from iOS apps completely in the near future unless you can justify the need for them when you submit your app.

sphere
Posts: 1145
Joined: Sat Sep 27, 2014 10:32 am

Re: Why is this not working on iOs?

Post by sphere » Thu Aug 11, 2016 7:17 pm

Hi Mark,

thanks for your comments.
Same like Firefox, they also want to switch to https in the future and no more http.

The Joomla website i maintain is now also on https, i installed a certificate (also free these days :) ) and enabled the https in DirectAdmin and in Joomla.
So i also changed the url in the script accordingly.

Thanks!
Sphere

Post Reply