Page 1 of 1

Syncing data files with iCloud or Device to Device

Posted: Fri Apr 07, 2017 1:36 pm
by DR White
Where can I go to find information concerning syncing small simple data files from mobile app with iCloud between devices?

Thanks,

David

Re: Syncing data files with iCloud or Device to Device

Posted: Sun Apr 09, 2017 10:34 am
by MaxV
I suppose specialFolderPath("documents"). See http://livecode.wikia.com/wiki/IOS_filesystem

Re: Syncing data files with iCloud or Device to Device

Posted: Sun Apr 09, 2017 3:29 pm
by DR White
MaxV,

Thanks for pointing me a a possible direction,

David

Re: Syncing data files with iCloud or Device to Device

Posted: Sun Apr 09, 2017 10:43 pm
by MaxV
there is also the url way:

Code: Select all

put URL "binfile:/myfoldepath/myFile" into URL "iclouddriveapp://newfolderptah/myFile" 

Re: Syncing data files with iCloud or Device to Device

Posted: Mon Apr 10, 2017 7:36 pm
by DR White
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

Re: Syncing data files with iCloud or Device to Device

Posted: Tue Apr 11, 2017 12:10 am
by MaxV
try:

Code: Select all

launch URL "iclouddriveapp://newfolderptah/Pill_Pal_Contacts_Bin.txt"

Re: Syncing data files with iCloud or Device to Device

Posted: Tue Apr 11, 2017 1:15 pm
by DR White
That does't work either