Skip to content

Commit

Permalink
Merge pull request #131 from cgrossde/issue-130-CFBundleIdentifier
Browse files Browse the repository at this point in the history
Fixes #130, make CFBundleIdentifier dependent on package name if not set...
  • Loading branch information
adam-lynch committed Dec 7, 2014
2 parents 7886187 + 387b4f5 commit ef3a489
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions lib/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,11 @@ module.exports = {
}
});

// Bundle identifier based on package name
if(options.CFBundleIdentifier === undefined) {
options.CFBundleIdentifier = 'com.node-webkit-builder.' + options.CFBundleName.toLowerCase().replace(/[^a-z\-]/g,'');
}

// Read the input file
return readFile(plistInput, 'utf8')
// Parse it
Expand Down
2 changes: 1 addition & 1 deletion test/expected/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<key>CFBundleIconFile</key>
<string>nw.icns</string>
<key>CFBundleIdentifier</key>
<string>com.intel.nw</string>
<string>com.node-webkit-builder.testapp</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
Expand Down

0 comments on commit ef3a489

Please sign in to comment.