Syncing data files with iCloud or Device to Device

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
DR White
Posts: 718
Joined: Fri Aug 23, 2013 12:29 pm

Syncing data files with iCloud or Device to Device

Post by DR White » Fri Apr 07, 2017 1:36 pm

Where can I go to find information concerning syncing small simple data files from mobile app with iCloud between devices?

Thanks,

David

MaxV
Posts: 1580
Joined: Tue May 28, 2013 2:20 pm
Contact:

Re: Syncing data files with iCloud or Device to Device

Post by MaxV » Sun Apr 09, 2017 10:34 am

I suppose specialFolderPath("documents"). See http://livecode.wikia.com/wiki/IOS_filesystem
Livecode Wiki: http://livecode.wikia.com
My blog: https://livecode-blogger.blogspot.com
To post code use this: http://tinyurl.com/ogp6d5w

DR White
Posts: 718
Joined: Fri Aug 23, 2013 12:29 pm

Re: Syncing data files with iCloud or Device to Device

Post by DR White » Sun Apr 09, 2017 3:29 pm

MaxV,

Thanks for pointing me a a possible direction,

David

MaxV
Posts: 1580
Joined: Tue May 28, 2013 2:20 pm
Contact:

Re: Syncing data files with iCloud or Device to Device

Post by MaxV » Sun Apr 09, 2017 10:43 pm

there is also the url way:

Code: Select all

put URL "binfile:/myfoldepath/myFile" into URL "iclouddriveapp://newfolderptah/myFile" 
Livecode Wiki: http://livecode.wikia.com
My blog: https://livecode-blogger.blogspot.com
To post code use this: http://tinyurl.com/ogp6d5w

DR White
Posts: 718
Joined: Fri Aug 23, 2013 12:29 pm

Re: Syncing data files with iCloud or Device to Device

Post by DR White » Mon Apr 10, 2017 7:36 pm

MaxV,

So far I have not been able to write and Read from iCloud.
Below is the script that I am using.

Any suggestions?

Thanks,

David
--------------------------------------------------------------------------------------------

-- Save Data to iCloud
---- write to local device
--- Write FileData to file Pill_Pal Allergy
put specialfolderpath("documents") & "/Pill_Pal_Contacts_Bin.txt" into tFile
put arrayEncode(tC) into url ("binfile:"& tFile)

answer "Writting to iCloud"

-- put URL "binfile:/myfoldepath/myFile" into URL "iclouddriveapp://newfolderptah/myFile"
---- Attempt to write to iCloud
put URL ("binfile:"& tFile) into URL "iclouddriveapp://newfolderptah/Pill_Pal_Contacts_Bin.txt"


---- Attempt to read from iCloud

put "iclouddriveapp://newfolderptah/Pill_Pal_Contacts_Bin.txt" into tFileCloud

answer "File Exist Test"
if there is a file url tFileCloud then ---- Reading file
answer "There is iCloud File"
end if

MaxV
Posts: 1580
Joined: Tue May 28, 2013 2:20 pm
Contact:

Re: Syncing data files with iCloud or Device to Device

Post by MaxV » Tue Apr 11, 2017 12:10 am

try:

Code: Select all

launch URL "iclouddriveapp://newfolderptah/Pill_Pal_Contacts_Bin.txt"
Livecode Wiki: http://livecode.wikia.com
My blog: https://livecode-blogger.blogspot.com
To post code use this: http://tinyurl.com/ogp6d5w

DR White
Posts: 718
Joined: Fri Aug 23, 2013 12:29 pm

Re: Syncing data files with iCloud or Device to Device

Post by DR White » Tue Apr 11, 2017 1:15 pm

That does't work either

Post Reply