[futurebasic] Running app from Download folder

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : March 2017 : Group Archive : Group : All Groups

From: Ken Shmidheiser <kshmidheiser@...>
Date: Wed, 8 Mar 2017 21:34:52 -0500
Steve asked:

> When the app runs from the Downloads folder in macOS 10.12, it cannot properly locate this folder.


Steve

Try adding:

com.apple.security.files.downloads.read-write

to your app's entitlements file.

http://tinyurl.com/zd434y4

Ken

include "NSLog.incl"

local fn DownloadsFolderURL as CFURLRef
'~'1
dim as CFURLRef downloadsURL
BeginCCode
    downloadsURL = (CFURLRef)[[[NSFileManager defaultManager] URLsForDirectory:NSDownloadsDirectory inDomains:NSUserDomainMask] lastObject];
EndC
end fn = downloadsURL

dim as CFURLRef downloadsFolder

downloadsFolder = fn DownloadsFolderURL

NSLog( @"%@", downloadsFolder )

RunApplicationEventLoop()