#include "base/mac/foundation_util.h"
#include "base/mac/scoped_nsautorelease_pool.h"
#include "base/path_service.h"
+#include "base/strings/sys_string_conversions.h"
#include "brightray/common/application_info.h"
#include "brightray/common/mac/main_application_bundle.h"
#include "content/public/common/content_paths.h"
void AtomMainDelegate::SetUpBundleOverrides() {
base::mac::ScopedNSAutoreleasePool pool;
- NSBundle* base_bundle = brightray::MainApplicationBundle();
- base::mac::SetBaseBundleID([[base_bundle bundleIdentifier] UTF8String]);
+ NSBundle* bundle = brightray::MainApplicationBundle();
+ std::string base_bundle_id =
+ base::SysNSStringToUTF8([bundle bundleIdentifier]);
+ NSString* team_id = [bundle objectForInfoDictionaryKey:@"ElectronTeamID"];
+ if (team_id)
+ base_bundle_id = base::SysNSStringToUTF8(team_id) + "." + base_bundle_id;
+ base::mac::SetBaseBundleID(base_bundle_id.c_str());
}
} // namespace atom