Page 1 of 1
iOS 9 put URL Issue
Posted: Wed Mar 16, 2016 9:24 pm
by richmace
I am using the following command to download the contents of a CSV file into a variable:
put URL <url> into topScorersDataRaw
NOTE: <url> contains a url within quotes.
On iOS 8.4, this works perfectly, but on iOS 9.2, the variable is empty.
I have confirmed that I have internet connectivity in the iOS Simulator, because the "launch url" command works.
I am using the following:
Livecode 7.12
Xcode 7.2.1 (7C1002)
Any help you can give me is greatly appreciated.
Re: iOS 9 put URL Issue
Posted: Thu Mar 17, 2016 10:40 am
by richmace
Update:
Looking through the iOS system.log, there is the following error:
App Transport Security has blocked a cleartext HTTP resource load since it is insecure. Temporary exceptions can be configured via your app's Info.plist file.
I don't see this as a configurable option within Livecode. Sounds like Apple have made this change their end on iOS 9.
Re: iOS 9 put URL Issue
Posted: Thu Mar 17, 2016 10:43 am
by richmace
I am going to investigate setting up https and see if this fixes the problem.
Re: iOS 9 put URL Issue
Posted: Thu Mar 17, 2016 10:52 am
by LCNeil
Hi richmace,
Moving to HTTPs will resolve your issue. You can also check the "Disable ATS" button in the iOS standalone settings to bypass the need to do this but we cannot guarantee how long Apple will allow this for-
Kind Regards,
Neil Roger
--
LiveCode Support Team ~
http://www.livecode.com
--
Re: iOS 9 put URL Issue
Posted: Thu Mar 17, 2016 11:13 am
by richmace
Perfect. Yes that fixed it!
Thank you ever so much
This issue has highlighted the fact that I will need secure connections, so I will get that working but at least I can release an update to my app today.
Re: iOS 9 put URL Issue
Posted: Thu Mar 17, 2016 7:01 pm
by quailcreek
Hi richmace,
I need to do the same thing. Download the contents of a CSV file into a variable to populate a datagrid. Would you mind please sharing a little of the code you're using to accomplish this?
Re: iOS 9 put URL Issue
Posted: Thu Mar 17, 2016 11:34 pm
by richmace
Yes, of course.
The following downloads the data and populates a simple text data grid:
NOTE: substritute <url> with your url in quotes (I can't post urls on this forum). My url links to a CSV file. The data grid accepts a tab separated list of columns.
put URL <url> into dataRaw
replace ";" with tab in dataRaw
//answer (dataRaw)
set the dgText of group "Data Grid Field" to dataRaw