appstore-sandbox

SMLoginItemSetEnabled sometimes silently fails to launch sandboxed UI helper

情到浓时终转凉″ 提交于 2019-11-29 13:23:03
问题 I have an app that is sandboxed, and includes a helper that presents some UI (as a full-screen window, but could be a status item or similar too). This works... most of the time. But sometimes it doesn't; it just silently fails to start the helper. Since the helper has UI, I use SMLoginItemSetEnabled to load it, then NSXPCConnection to communicate with it. But sometimes SMLoginItemSetEnabled fails to launch it, while still returning YES. This seems to be due to an old build of the app

“Invalid year” error when setting up Sandbox Tester Account

a 夏天 提交于 2019-11-29 12:53:04
Getting a strange error when setting up Sandbox Tester in iTunesConnect. For some reason, iTunesConnects throws an error: "Invalid year". It looks like this: Oddly I cannot specify a year because it only asks me for month and day: I don't use the same email I used when creating apple ID and I don't have any +abc in my email address. I tried with gmail.com and hotmail.com but the result was the same in both cases. What is going on? Rajat I have also heard about it, not able to check it right now, check this also iTunesConnect unable to accept invitation - Invalid Year 来源: https://stackoverflow

WkWebView problems in macOS Mojave

你。 提交于 2019-11-29 12:18:09
I have a very simple App that just displays a Website in a WKWebView but after upgrading to macOS Mojave i get some weird warnings messages. The App compiles but doesn't start. My Code: @IBOutlet var webView: WKWebView! override func loadView() { webView = WKWebView() webView.navigationDelegate = self view = webView } override func viewDidLoad() { super.viewDidLoad() let url = URL(string: "https://www.apple.com")! webView.load(URLRequest(url: url)) } The warnings i get: 2018-10-08 19:27:24.466406+0200 MyApp[616:13277] [default] Unable to load Info.plist exceptions (eGPUOverrides) 2018-10-08 19

iOS 12 IAP Sandbox

人走茶凉 提交于 2019-11-29 11:39:14
问题 I was watching this WWDC18 talk, and they've explicitly announced that they'll allow developers to simultaneously connect one Sandbox Account for IAP testing - when in Developer Mode and in iOS12 . Screenshot of the moment that they show the feature Straight to the question: I've tried to access it from both my iPhone 6S and iPhone X - both on iOS 12 -, but neither had this option at the end of the screen. Also, I've searched about this topic, and no one seems to be addressing this issue. The

How can I know the Apple Event Access Groups used by an application?

北慕城南 提交于 2019-11-29 08:03:09
Apples' Sandobox is supposed to use Apple Event Access Groups, which allow applications to communicate with each other, as described in the WWDC video " Session 206 Secure Automation Techniques In OS X " However, what is not mentioned (and I could find no reference to it in Xcode 5.x documentation) is how can I find out which Apple Event Access Groups are defined for a specific application. For example, if I want my App to communicate with Pages (or Photoshop, or Firefox, etc.), how can I find documentation about its Apple Event Access Groups? Where are they defined, and what tool can I use to

Creating a security scope bookmark for a file from one of a directory containing it

爷,独闯天下 提交于 2019-11-29 01:56:27
I have a security scope bookmark for a directory, provided by a user via an openDialog request. I'm trying to create another security scope bookmark for a file inside this directory: NSURL *musicFolder = /* Secured URL Resolved from a NSData, bookmark not stale */; if (![musicFolder startAccessingSecurityScopedResource]) { NSLog(@"Error accessing bookmark."); } NSString *file = @"myfile.txt"; /* This file exists inside the directory */ NSURL *pathURL = [musicFolder URLByAppendingPathComponent:file]; NSError *systemError; NSData *bookmarkData = [pathURL bookmarkDataWithOptions

How do I get the users home directory in a sandboxed app?

南楼画角 提交于 2019-11-28 21:16:42
NSHomeDirectory() is retuning my sandbox root, not my home directory. [@"~" stringByExpandingTildeInPath] is doing the same thing. This /Users/username/Library/Containers/appID/Data is what's being returned. How do I get /Users/username/ ? CRD If you want the path to the user's real home directory you can use: char *realHome = getpwuid(getuid())->pw_dir; Full example: #include <unistd.h> #include <sys/types.h> #include <pwd.h> #include <assert.h> NSString *RealHomeDirectory() { struct passwd *pw = getpwuid(getuid()); assert(pw); return [NSString stringWithUTF8String:pw->pw_dir]; } This gives

App Sandbox: document-scoped bookmark not resolving; not returning any error

帅比萌擦擦* 提交于 2019-11-28 10:49:41
I'm sandboxing my app, and trying to allow for import/export of multiple files, using an XML file to refer to them. To allow my app (or another sandboxed app) access to the files listed in the XML, I'm also including a serialized security-scoped bookmark. I'm serializing it as described in this answer , and my unit tests (which are not sandboxed) write and read the XML data without issue. When my app resolves the bookmark, the NSURL returned is nil, as is the NSError reference. Since I don't believe that should be the case, why is it happening? I can work around it by prompting the user to

“Invalid year” error when setting up Sandbox Tester Account

我只是一个虾纸丫 提交于 2019-11-28 06:58:05
问题 Getting a strange error when setting up Sandbox Tester in iTunesConnect. For some reason, iTunesConnects throws an error: "Invalid year". It looks like this: Oddly I cannot specify a year because it only asks me for month and day: I don't use the same email I used when creating apple ID and I don't have any +abc in my email address. I tried with gmail.com and hotmail.com but the result was the same in both cases. What is going on? 回答1: I have also heard about it, not able to check it right

Creating a security scope bookmark for a file from one of a directory containing it

China☆狼群 提交于 2019-11-27 21:45:35
问题 I have a security scope bookmark for a directory, provided by a user via an openDialog request. I'm trying to create another security scope bookmark for a file inside this directory: NSURL *musicFolder = /* Secured URL Resolved from a NSData, bookmark not stale */; if (![musicFolder startAccessingSecurityScopedResource]) { NSLog(@"Error accessing bookmark."); } NSString *file = @"myfile.txt"; /* This file exists inside the directory */ NSURL *pathURL = [musicFolder URLByAppendingPathComponent