appstore-sandbox

App Sandbox capability missing in Xcode project

与世无争的帅哥 提交于 2020-05-16 20:03:50
问题 According to this guide, there should be an App Sandbox capability in the project file: However, for some reason my app project does not have any App Sandbox capability that I can turn on: Why is it missing, and how can I get it there? 回答1: First of all, you should open the ***.entitlements file. In this file, add a Key named App Sandbox and changed Value to YES . After completing the above steps, click command + b then go back to Signing & Capabilities , the App Sandbox will appear. 回答2: If

MacOS sandboxed application: access files without NSOpenPanel

夙愿已清 提交于 2020-05-14 04:02:30
问题 In a sandboxed NSDocument-based application, any compatible document can be accessed using the NSOpenPanel, no matter where the document is saved. Without NSOpenPanel, the application can only access files in the sandbox container. As my application manages two types of subclassed NSdocument (Text as a reader/writer and Image as a reader only), I try to implement a separate "Open Recent" menu for images. I disabled the the ordinary behaviour for them as they are opened by the user, overriding

iOS 13 - How to login in in-app purchase Sandbox account?

匆匆过客 提交于 2020-05-09 20:33:07
问题 In order to test my in-app purchases with iOS 13 I have updates one of my test devices to iOS 13.1 beta. On iOS 12 and before I there was a special Sandbox login in Settings/iTunes & App Store/Sandbox Account : However, after the update to iOS 13 this section is missing. I tried to follow the instruction in the answer to a similar problem on iOS 12 but nothing worked. I completely rest the device and logged out both at Settings/iTunes & App Store and at Settings/Apple ID , so currently the

iOS 13 - How to login in in-app purchase Sandbox account?

拈花ヽ惹草 提交于 2020-05-09 20:33:07
问题 In order to test my in-app purchases with iOS 13 I have updates one of my test devices to iOS 13.1 beta. On iOS 12 and before I there was a special Sandbox login in Settings/iTunes & App Store/Sandbox Account : However, after the update to iOS 13 this section is missing. I tried to follow the instruction in the answer to a similar problem on iOS 12 but nothing worked. I completely rest the device and logged out both at Settings/iTunes & App Store and at Settings/Apple ID , so currently the

macOS Granting full-disk access to sandboxed app not working

痞子三分冷 提交于 2020-02-28 07:57:51
问题 I'm experimenting with full-disk access and can't make it working. Here is list of steps I did: Sandbox is turned ON. In fact the entitlements file looks like: <key>com.apple.security.app-sandbox</key> <true/> <key>com.apple.security.files.bookmarks.app-scope</key> <true/> <key>com.apple.security.files.user-selected.read-write</key> <true/> I created archive of the app and tried to distribute it using boths Developer ID or Development methods I placed the binary of my app to /Applications

Reading osx screenshot image in sandbox

纵然是瞬间 提交于 2020-01-16 01:14:19
问题 I want to get the screenshot triggered by different osx shortcuts. So i add an observer with kMDItemIsScreenCapture . Following code was used to add observer. _query = [[NSMetadataQuery alloc] init]; [_query setDelegate:self]; [_query setPredicate:[NSPredicate predicateWithFormat:@"kMDItemIsScreenCapture = 1"]]; [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(screenshotQueryUpdated:) name:NSMetadataQueryDidUpdateNotification object:_query]; [_query startQuery];

What entitlements must I specify to use defaults write com.apple.screencapture in NSTask()

你离开我真会死。 提交于 2020-01-15 07:20:09
问题 I got the app working fine then went to submit to the app store and discovered this thing called the sandbox :-p I have been reading the documentation and developer forums, but I cant figure out specifically what entitlement I need to add to get this working: let task = NSTask() task.launchPath = "/bin/bash" task.arguments = ["-c", "defaults write com.apple.screencapture type gif;killall SystemUIServer"] task.launch() I've thought perhaps com.apple.screencapture and com.apple.security

Access sidecar files in a Mac sandboxed app

被刻印的时光 ゝ 提交于 2020-01-10 03:25:17
问题 I need to access sidecar XMP files in a document-based photo editor application. The image files are the documents, and I need to access the sidecar XMP file when the user open and save an image document. Is it possible to access sidecar files (such as XMP) in a sandboxed document-based application? I understand that it's not possible by default, but what is the minimal temporary security exception that is needed to allow that? Is there a workaround for this without using temporary exception?

Programmatically shut down or sleep sandboxed application Mac

大城市里の小女人 提交于 2020-01-06 12:43:35
问题 I am trying to make an application for the Mac App Store that will shut down/sleep the Mac after a user-set time. I have tried to use AppleScript, but that won't work if I am going to use it in Sandbox mode, I have tried to Google for a solution, but I cant seem to figure it out. Hope someone can give me a hint or link to relevant documentation. edit: made it more precise to what I desire to accomplish. 回答1: There is no way to do this. You may try to get a temporary-exception to run "shutdown

Swift file reading permission error on macOS sandbox

徘徊边缘 提交于 2020-01-06 04:36:43
问题 I'm trying to read the contents of a file on the filesystem in a macOS Swift app (Xcode 9 / Swift 4). I'm using the following snippet for it: let path = "/my/path/string.txt" let s = try! String(contentsOfFile: path) print(s) My problem is the following: This works in a Playground This works when I use the Command Line Tool macOS app template This terminates in a permission error when I use the Cocoa App macOS app template The permission error is the following: Fatal error: 'try!' expression