In this context the error 1 is
EPERM, meaning there’s definitely some sort of permissions issue. This is likely to be something to do with Gatekeeper.
The best way to test this is to zip up your app, upload it to a web server (if you don’t have a handy web server, email it to yourself), and then download it again. The downloaded archive will be flagged as needing to be checked by Gatekeeper, as will the contents of the archive when you unpack it. You can then run the app and it’s likely that it’ll have the same problem you’re friend is seeing.
Once you’re able to reproduce the problem, post back and we can talk about what might be causing it.
Share and Enjoy
Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware
let myEmail = "eskimo" + "1" + "@apple.com"
Thank you for your reply!
Thats a good tip!
I uploaded a zipped version to my web server and downloaded it again
I didnt receive any notification when unpacking and when running the app again (from my Downloads directory) I got a warning if i want to open the app downloaded from my server and after clicking open the app starts normally..
So i wasnt able to reproduce the error.
In terms of permissions I needed file-access to read and write a file to the filesystem so i added the following to my entitlements:
com.apple.security.assets.pictures.read-write with a Boolean of YES
is there a way to allow writing to the user folder without the user selecting a folder?
(ive implemented a drag and drop view to resize images in their original folder)
Right now the program only resizes and saves the new image when the original path was in the pictures folder
But i didnt find any entitlement to allow writing for example to the documents folder
Ive managed to find someone else with a mac and the app ran as expected so I guess its maybe not the apps fault?
But does anyone have an idea why it does not open on the other mac ?
The proper way to do that is by using the File open and save panels. They will give you a security-scoped bookmark (URL) that you can use normally.
Okay so would it be possible to select the URLs via the DropView i created and export the images via a save panel when I use the "user-selected" entitlement?
I'm not sure what you mean by "DropView". Can you explain, at a high level, the kind of behaviour you would like to support?
It sounds like you are asking about drag and drop. There is nothing wrong with doing that, but it isn't quite as simple.
Hey John; Sorry i forgot that DropView was the name i gave my NSView extending class. And yes i meant a drag and drop behavior. I have now implemented it as you suggested but with my drag and drop view handling the input paths and I used the openPanel to select a folder to write the files to which worked perfectly! So thank you for your answer! :)
I think I found the error why the program wasnt starting:
I transferred the .app / .dmg to my friend via Telegram Messenger and it seems like they sanitized or manipulated
something of the executable that it wasnt runnable anymore.
I uploaded the dmg to my server and he downloaded it: now everything works as expected
Thanks for your input!