appstore-sandbox

Launch helper from sandboxed application

北城余情 提交于 2019-12-06 05:05:57
问题 I have a sandboxed application. I need it to launch a helper application (from within the main application's bundle) every time it starts up. However, this fails: NSError *error; [[NSWorkspace sharedWorkspace] launchApplicationAtURL:helperURL options:NSWorkspaceLaunchDefault configuration:nil error:&error]; The error is: The application “Helper” could not be launched because it is corrupt., NSUnderlyingError=0x10214c700 "The operation couldn’t be completed. (OSStatus error -10827.)"} Now, the

Mac App Rejection - Temporary Exception Entitlement Key for Safari

我只是一个虾纸丫 提交于 2019-12-06 04:19:06
Let's consider an app doing the following steps using AppleScript, in order to auto-login to some website: 1- Open "Safari" and navigate to website 2- Fill the username and password fields with JavaScript do JavaScript " document.getElementById('password_input').value = 'userPassword' " 3- Submit form using JavaScript --- do JavaScript " document.forms['login_form'].submit() " For a sandboxed Mac app, com.apple.security.temporary-exception.apple-events entitlement key must be added for "Safari", in order to execute AppleScript procedure above. <key>com.apple.security.temporary-exception.apple

NSSavePanel is not saving a file after sandboxing an app

此生再无相见时 提交于 2019-12-05 20:54:27
问题 I'm having a problem saving a string file with NSSavePanel after sandboxing the app for the Mac App Store. I set com.apple.security.files.user-selected.read-write to YES and the NSOpenPanel is working as it should. When I try to save a new file, though, it seems that everything is working fine but then there is no saved file where it should be.... This is the code I am using to save the file: NSSavePanel *save = [NSSavePanel savePanel]; long int result = [save runModal]; if (result ==

Check if path under app-scoped bookmark is writable inside sandboxed app

折月煮酒 提交于 2019-12-05 11:06:05
I have an OS X app, which stores an app-scoped bookmark to persist access to certain directories. I am able to write to those directories without any problems, but there is a part in my code where I want to make an extra check to confirm that the path is writable and it fails. var fileManager: NSFileManager = NSFileManager.defaultManager() var baseUrl: NSURL = try! NSURL(byResolvingBookmarkData: data, …) var fileUrl: NSURL = url.URLByAppendingPathComponent("foo.txt") // Changing this order has no effect, I make only the first start access call, // the second one is to demonstrate that it's not

CFMessagePort and sandboxing

匆匆过客 提交于 2019-12-05 08:25:35
I am adapting a MacOS application to use sandboxing. It uses a helper application (an exe in the same bundle) that fails when I try calling CFMessagePortCreateRemote with a 'deny mach-lookup' message in the console. I can see the com.apple.security.temporary-exception.mach-lookup.global-name entitlement key could solve this, but it is only temporary. Is there a way to achieve a communication between two apps with a mach port in a sandboxed application? Errors: let port = CFMessagePortCreateLocal(nil, "XXXYYYZZZZ.MyAppGroupName" as CFString, Callback, nil, nil) let runLoopSource =

Getting path to users Library folder in OS X

。_饼干妹妹 提交于 2019-12-05 03:19:48
I need to open a NSSavePanel with the users Library folder as destination folder. Normally I would do this by entering ~/Library/ in [NSSavePanel beginSheetForDirectory] . This works fine as long as the application is not sandboxed. For sandboxed applications this will result in the NSSavePanel trying to access a folder inside the applications document "box". I cannot refer to /Users/username/Library/ as I do not know the users username at runtime. So how do I link to this path in cocoa? Not sure if this will work on a sandboxed application but this is how I do it right now. This will return

Creating playlists in iTunes using Scripting Bridge in a Sandboxed app

霸气de小男生 提交于 2019-12-04 17:10:40
Is this possible? In this question I saw that you add to the entitlements file: <key>com.apple.security.scripting-targets</key> <dict> <key>com.apple.iTunes</key> <array> <string>com.apple.iTunes.library.read</string> <string>com.apple.iTunes.playback</string> </array> </dict> for read access. But how do you get write access? I looked in the documentation and they suggest the manual for sdef , but I couldn't extract any information from this. Also, would this hamper a submission to the App Store? Alex Alright, from what I know (and from what logic tells me) adding entitlements which are not

Sandbox - killall Operation not permitted

杀马特。学长 韩版系。学妹 提交于 2019-12-04 17:01:15
I'm writing a small Mac application (in Obj-C) which runs the following command: system("killall Finder"); I wanted to see what would happen if I sandbox the app (as sandboxing will be required on June 01), and the app wouldn't work. I got the following response: killall: warning: kill -TERM 6524: Operation not permitted Is there any way to get around that? As in a specific entitlement to add or another way to run the command? Thanks in advance. Your app completely goes against the spirit of the sandbox, so there's almost no chance that the MAS reviewers will accept it. Also, you may be

Mac app store helper tool Sandboxing

让人想犯罪 __ 提交于 2019-12-04 15:13:00
My app consist of two executables the main app executable small console app to process some files, this executable is on Resources folder (no root privileges required) The thing is that I don't know how to submit this app to appstore, I get the following response from apple Invalid Signature - the main app bundle appname at path appname.app is signed but the signature is invalid. The following error(s) were reported from codesign: a sealed resource is missing or invalid In architecture: i386 If I remove helper app, it bypasses this error, but app won't work at all. Anyone knows a good way or

Launch helper from sandboxed application

可紊 提交于 2019-12-04 09:58:40
I have a sandboxed application. I need it to launch a helper application (from within the main application's bundle) every time it starts up. However, this fails: NSError *error; [[NSWorkspace sharedWorkspace] launchApplicationAtURL:helperURL options:NSWorkspaceLaunchDefault configuration:nil error:&error]; The error is: The application “Helper” could not be launched because it is corrupt., NSUnderlyingError=0x10214c700 "The operation couldn’t be completed. (OSStatus error -10827.)"} Now, the error is misleading, because the app launches fine if I disable the sandbox entitlement. Apparently