From deddf9853388dbd707946c380805a21322431f78 Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Wed, 18 May 2016 16:42:26 +0900 Subject: [PATCH 1/2] Currently set base bundle ID --- atom/app/atom_main_delegate.cc | 4 ++++ atom/app/atom_main_delegate.h | 4 ++++ atom/app/atom_main_delegate_mac.mm | 8 ++++++++ 3 files changed, 16 insertions(+) diff --git a/atom/app/atom_main_delegate.cc b/atom/app/atom_main_delegate.cc index 0a298308ad0b..655ccce2e35b 100644 --- a/atom/app/atom_main_delegate.cc +++ b/atom/app/atom_main_delegate.cc @@ -83,6 +83,10 @@ bool AtomMainDelegate::BasicStartupComplete(int* exit_code) { chrome::RegisterPathProvider(); +#if defined(OS_MACOSX) + SetUpBundleOverrides(); +#endif + return brightray::MainDelegate::BasicStartupComplete(exit_code); } diff --git a/atom/app/atom_main_delegate.h b/atom/app/atom_main_delegate.h index 5f4369302f5f..8f2976a9cd1b 100644 --- a/atom/app/atom_main_delegate.h +++ b/atom/app/atom_main_delegate.h @@ -31,6 +31,10 @@ class AtomMainDelegate : public brightray::MainDelegate { #endif private: +#if defined(OS_MACOSX) + void SetUpBundleOverrides(); +#endif + brightray::ContentClient content_client_; scoped_ptr browser_client_; scoped_ptr renderer_client_; diff --git a/atom/app/atom_main_delegate_mac.mm b/atom/app/atom_main_delegate_mac.mm index 33a8dea4aabb..b26d5f46f644 100644 --- a/atom/app/atom_main_delegate_mac.mm +++ b/atom/app/atom_main_delegate_mac.mm @@ -7,6 +7,8 @@ #include "base/mac/bundle_locations.h" #include "base/files/file_path.h" #include "base/files/file_util.h" +#include "base/mac/foundation_util.h" +#include "base/mac/scoped_nsautorelease_pool.h" #include "base/path_service.h" #include "brightray/common/application_info.h" #include "brightray/common/mac/main_application_bundle.h" @@ -48,4 +50,10 @@ void AtomMainDelegate::OverrideChildProcessPath() { PathService::Override(content::CHILD_PROCESS_EXE, helper_path); } +void AtomMainDelegate::SetUpBundleOverrides() { + base::mac::ScopedNSAutoreleasePool pool; + NSBundle* base_bundle = brightray::MainApplicationBundle(); + base::mac::SetBaseBundleID([[base_bundle bundleIdentifier] UTF8String]); +} + } // namespace atom From 906948218f151b0f4bd1b2afb2618e8c64fc4f27 Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Wed, 18 May 2016 16:48:22 +0900 Subject: [PATCH 2/2] docs: Update MAS guide without using temporary-exception --- .../mac-app-store-submission-guide.md | 26 +++++-------------- 1 file changed, 7 insertions(+), 19 deletions(-) diff --git a/docs/tutorial/mac-app-store-submission-guide.md b/docs/tutorial/mac-app-store-submission-guide.md index 15b6142b57a9..75ebb0776581 100644 --- a/docs/tutorial/mac-app-store-submission-guide.md +++ b/docs/tutorial/mac-app-store-submission-guide.md @@ -52,12 +52,17 @@ First, you need to prepare two entitlements files. com.apple.security.app-sandbox - com.apple.security.temporary-exception.sbpl - (allow mach-lookup (global-name-regex #"^org.chromium.Chromium.rohitfork.[0-9]+$")) + com.apple.security.application-groups + + your.bundle.id + ``` +_You have to replace `your.bundle.id` with the Bundle ID specified in your app's +`Info.plist`._ + And then sign your app with the following script: ```bash @@ -101,23 +106,6 @@ After signing your app, you can use Application Loader to upload it to iTunes Connect for processing, making sure you have [created a record][create-record] before uploading. -### Explain the Usages of `temporary-exception` - -When sandboxing your app there was a `temporary-exception` entry added to the -entitlements, according to the [App Sandbox Temporary Exception -Entitlements][temporary-exception] documentation, you have to explain why this -entry is needed: - -> Note: If you request a temporary-exception entitlement, be sure to follow the -guidance regarding entitlements provided on the iTunes Connect website. In -particular, identify the entitlement and corresponding issue number in the App -Sandbox Entitlement Usage Information section in iTunes Connect and explain why -your app needs the exception. - -You may explain that your app is built upon Chromium browser, which uses Mach -port for its multi-process architecture. But there is still probability that -your app failed the review because of this. - ### Submit Your App for Review After these steps, you can [submit your app for review][submit-for-review].