iOS 9 put URL Issue

Getting into LiveCode for iOS? Ask your questions here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
richmace
Posts: 5
Joined: Wed Mar 16, 2016 9:10 pm

iOS 9 put URL Issue

Post by richmace » Wed Mar 16, 2016 9:24 pm

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.

richmace
Posts: 5
Joined: Wed Mar 16, 2016 9:10 pm

Re: iOS 9 put URL Issue

Post by richmace » Thu Mar 17, 2016 10:40 am

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.

richmace
Posts: 5
Joined: Wed Mar 16, 2016 9:10 pm

Re: iOS 9 put URL Issue

Post by richmace » Thu Mar 17, 2016 10:43 am

I am going to investigate setting up https and see if this fixes the problem.

LCNeil
Livecode Staff Member
Livecode Staff Member
Posts: 1223
Joined: Wed Oct 03, 2012 4:07 pm

Re: iOS 9 put URL Issue

Post by LCNeil » Thu Mar 17, 2016 10:52 am

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-
Screen Shot 2016-03-17 at 09.50.38.png
Kind Regards,

Neil Roger
--
LiveCode Support Team ~ http://www.livecode.com
--

richmace
Posts: 5
Joined: Wed Mar 16, 2016 9:10 pm

Re: iOS 9 put URL Issue

Post by richmace » Thu Mar 17, 2016 11:13 am

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.

quailcreek
Posts: 746
Joined: Sun Feb 04, 2007 11:01 pm

Re: iOS 9 put URL Issue

Post by quailcreek » Thu Mar 17, 2016 7:01 pm

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?
Tom
MacBook Pro OS Mojave 10.14

richmace
Posts: 5
Joined: Wed Mar 16, 2016 9:10 pm

Re: iOS 9 put URL Issue

Post by richmace » Thu Mar 17, 2016 11:34 pm

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

Post Reply