diff --git a/bin/package.js b/bin/package.js
index 2fa97387..09329495 100755
--- a/bin/package.js
+++ b/bin/package.js
@@ -103,7 +103,7 @@ var all = {
var darwin = {
// Build for OS X
- platform: 'darwin',
+ platform: 'mas',
// Build 64 bit binaries only.
arch: 'x64',
@@ -211,6 +211,8 @@ function buildDarwin (cb) {
}
]
+ infoPlist.ElectronTeamID = '5MAMC8G3L8'
+
fs.writeFileSync(infoPlistPath, plist.build(infoPlist))
// Copy torrent file icon into app bundle
@@ -248,8 +250,9 @@ function buildDarwin (cb) {
*/
var signOpts = {
app: appPath,
- platform: 'darwin',
- verbose: true
+ entitlements: path.join(config.STATIC_PATH, 'parent.entitlements'),
+ 'entitlements-inherit': path.join(config.STATIC_PATH, 'child.entitlements'),
+ platform: 'mas'
}
console.log('OS X: Signing app...')
diff --git a/main/index.js b/main/index.js
index 83a3f5dc..5994e586 100644
--- a/main/index.js
+++ b/main/index.js
@@ -26,14 +26,14 @@ if (process.platform === 'win32') {
argv = argv.filter((arg) => arg.indexOf('--squirrel') === -1)
}
-if (!shouldQuit) {
- // Prevent multiple instances of app from running at same time. New instances signal
- // this instance and quit.
- shouldQuit = app.makeSingleInstance(onAppOpen)
- if (shouldQuit) {
- app.quit()
- }
-}
+// if (!shouldQuit) {
+// // Prevent multiple instances of app from running at same time. New instances signal
+// // this instance and quit.
+// shouldQuit = app.makeSingleInstance(onAppOpen)
+// if (shouldQuit) {
+// app.quit()
+// }
+// }
if (!shouldQuit) {
init()
diff --git a/static/child.entitlements b/static/child.entitlements
new file mode 100644
index 00000000..d8dc69e8
--- /dev/null
+++ b/static/child.entitlements
@@ -0,0 +1,10 @@
+
+
+
+
+ com.apple.security.app-sandbox
+
+ com.apple.security.inherit
+
+
+
diff --git a/static/parent.entitlements b/static/parent.entitlements
new file mode 100644
index 00000000..8c5d1f73
--- /dev/null
+++ b/static/parent.entitlements
@@ -0,0 +1,20 @@
+
+
+
+
+ com.apple.security.app-sandbox
+
+ com.apple.security.files.downloads.read-write
+
+ com.apple.security.files.user-selected.read-write
+
+ com.apple.security.network.client
+
+ com.apple.security.network.server
+
+ com.apple.security.application-groups
+
+ 5MAMC8G3L8.io.webtorrent.webtorrent
+
+
+