1
votes

I never wrote any Mac App before. I heard now you can port your iOS app to Mac by Catalyst. I followed the instructions from Apple's official website and found I could even not read a file which is located in the local hard drive in my Mac. I got the following error information:

Error Domain=NSCocoaErrorDomain Code=257 "The file “info.json” couldn’t be opened because you don’t have permission to view it." UserInfo={NSFilePath=/Users/echo/Documents/Youtube/Work/Programming/info.json, NSUnderlyingError=0x600000ca2670 {Error Domain=NSPOSIXErrorDomain Code=1 "Operation not permitted"}}

I am using Catalina beta 8. Can anybody give me some hint on how to get that permission?

1

1 Answers

1
votes

To get permission to access files, go to the Project Overview > Your Target > Signing & Capabilities and enable Read permissions for User Selected File (or Read/Write).

User selected