Is there a way to get a universal path to a file in the iCloud directory? That is, a way to copy a path to a file stored in iCloud which will correctly direct to the file whether you use the path on iOS or MacOS?
Specifically, I'd like to link to an iCloud file in my Bear note taking app. However, I want this link to correctly function whether I use it from my Mac or from my iOS devices. Is there a way I can get such a link?
Ideally, a solution which also works offline would be best. For example, on the Mac, a link such as
file:///Users/username/Library/Mobile Documents/com~apple~Preview/Documents/my_file.pdf will reveal the linked file. However, this doesn't work on iOS. An equivalent link which works both on iOS and MacOS would be the ideal case. The first solution provided works as a device agnostic link, however, it does require an internet connection.