Accessing files in iCloud Drive
5 posts
• Page 1 of 1
Accessing files in iCloud Drive
I have a file that I'd like to keep in iCloud Drive so that I can access it from APL either on my Mac or on on my laptop.
According to Apple's documentation, the first step is to give Dyalog APL (a third party app) permission to access iCloud Drive. You do this on the System Preferences panel going to Apple Id, selecting iCloud Drive, then using Options to select your third party app from a list. Unfortunately Dyalog APL does not appear there, although several other third party apps do (eg MacFamilyTree, Affinity Designer, Pixelmator etc).
Is there something that Dyalog APL needs to do (presumably at install time) to register as one of these third party apps?
Mike Powell
According to Apple's documentation, the first step is to give Dyalog APL (a third party app) permission to access iCloud Drive. You do this on the System Preferences panel going to Apple Id, selecting iCloud Drive, then using Options to select your third party app from a list. Unfortunately Dyalog APL does not appear there, although several other third party apps do (eg MacFamilyTree, Affinity Designer, Pixelmator etc).
Is there something that Dyalog APL needs to do (presumably at install time) to register as one of these third party apps?
Mike Powell
- mikepowell
- Posts: 6
- Joined: Thu Dec 05, 2013 8:01 pm
Re: Accessing files in iCloud Drive
This may not be what you are looking for, but here is a method that (sort of) works for me.
I have a file on my iCloud Drive named, say, a_cloud.csv. In the APL session, I use ⎕CSV to fetch the file into an APL variable, say, a_local:
)clear
clear ws
a_local←⎕csv '/Users/CEK1/Library/Mobile Documents/com~apple~CloudDocs/a_cloud.csv'
⍴a_local
161 1
However, it doesn't work if you don't specify the full path name for some reason:
⎕CMD 'pwd'
/Users/CEK1
b_local←⎕csv '~/Library/Mobile Documents/com~apple~CloudDocs/a_cloud.csv'
FILE NAME ERROR: ~/Library/Mobile Documents/com~apple~CloudDocs/a_cloud.csv: Unable to open file ("No such file or directory")
b_local←⎕CSV'~/Library/Mobile Documents/com~apple~CloudDocs/a_cloud.csv'
∧
I haven't had any luck with ⎕NGET, but that's probably my unfamiliarity with ⎕NGET.
If your laptop is a PC, I don't know the Windows file spec for the iCloud Drive.
I have a file on my iCloud Drive named, say, a_cloud.csv. In the APL session, I use ⎕CSV to fetch the file into an APL variable, say, a_local:
)clear
clear ws
a_local←⎕csv '/Users/CEK1/Library/Mobile Documents/com~apple~CloudDocs/a_cloud.csv'
⍴a_local
161 1
However, it doesn't work if you don't specify the full path name for some reason:
⎕CMD 'pwd'
/Users/CEK1
b_local←⎕csv '~/Library/Mobile Documents/com~apple~CloudDocs/a_cloud.csv'
FILE NAME ERROR: ~/Library/Mobile Documents/com~apple~CloudDocs/a_cloud.csv: Unable to open file ("No such file or directory")
b_local←⎕CSV'~/Library/Mobile Documents/com~apple~CloudDocs/a_cloud.csv'
∧
I haven't had any luck with ⎕NGET, but that's probably my unfamiliarity with ⎕NGET.
If your laptop is a PC, I don't know the Windows file spec for the iCloud Drive.
- kennedyce
- Posts: 6
- Joined: Thu Aug 15, 2013 7:27 pm
Re: Accessing files in iCloud Drive
Here's another way to fetch data from an iCloud Drive:
)CLEAR
clear ws
)copy loaddata
/Applications/Dyalog-18.2.app/Contents/Resources/Dyalog/ws/loaddata.dws saved Wed Apr 6 16:21:17 2022
c←LoadTEXT '/Users/CEK1/Library/Mobile Documents/com~apple~CloudDocs/a_cloud.csv'
⍴c
162 1
)CLEAR
clear ws
)copy loaddata
/Applications/Dyalog-18.2.app/Contents/Resources/Dyalog/ws/loaddata.dws saved Wed Apr 6 16:21:17 2022
c←LoadTEXT '/Users/CEK1/Library/Mobile Documents/com~apple~CloudDocs/a_cloud.csv'
⍴c
162 1
- kennedyce
- Posts: 6
- Joined: Thu Aug 15, 2013 7:27 pm
Re: Accessing files in iCloud Drive
Hi Kennedyce,
The reason why your example which uses ~ does not work is that Dyalog does not expand ~ like UNIX shells do.
We have thought about it, but we have not come up with a cross-platform design that we are happy with.
Regards,
Vince
The reason why your example which uses ~ does not work is that Dyalog does not expand ~ like UNIX shells do.
We have thought about it, but we have not come up with a cross-platform design that we are happy with.
Regards,
Vince
- Vince|Dyalog
- Posts: 439
- Joined: Wed Oct 01, 2008 9:39 am
Re: Accessing files in iCloud Drive
Thanks for the replies. This was just what I needed to find where I was going wrong.
I think I was misspelling the iCloud folder name. I was using ".../com-apple-CloudDocs/..." when I should have been using ".../com~apple~CloudDocs/...". Now I have it working nicely.
Thanks again,
Mike
I think I was misspelling the iCloud folder name. I was using ".../com-apple-CloudDocs/..." when I should have been using ".../com~apple~CloudDocs/...". Now I have it working nicely.
Thanks again,
Mike
- mikepowell
- Posts: 6
- Joined: Thu Dec 05, 2013 8:01 pm
5 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 1 guest
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group