Skip to content

Commit

Permalink
style: fix spelling
Browse files Browse the repository at this point in the history
  • Loading branch information
ethanneff committed Dec 16, 2016
1 parent a5bd04b commit 8cab579
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions hooks/lib/ios/plist.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@

// entry
module.exports = {
update: update
addBranchSettings: addBranchSettings
}

function update (perferences) {
var filePath = 'platforms/ios/' + perferences.bundleName + '/' + perferences.bundleName + '-Info.plist'
function addBranchSettings (preferences) {
var filePath = 'platforms/ios/' + preferences.bundleName + '/' + preferences.bundleName + '-Info.plist'
var xml = readPlist(filePath)
var obj = convertXmlToObject(xml)

obj = appendPlist(obj, perferences)
obj = appendPlist(obj, preferences)
xml = convertObjectToXml(obj)

writePList(filePath, xml)
Expand All @@ -39,10 +39,10 @@
return fs.writeFileSync(filePath, xml, { encoding: 'utf8' })
}

function appendPlist (obj, perferences) {
function appendPlist (obj, preferences) {
var urlType = {
CFBundleURLName: SDK,
CFBundleURLSchemes: [perferences.uriScheme]
CFBundleURLSchemes: [preferences.uriScheme]
}

if (!obj.hasOwnProperty('CFBundleURLTypes')) {
Expand All @@ -56,7 +56,7 @@
for (var i = urls.length - 1; i >= 0; i--) {
var url = urls[i]
if (url.hasOwnProperty('CFBundleURLName') && url.CFBundleURLName === SDK) {
url.CFBundleURLSchemes = [perferences.uriScheme]
url.CFBundleURLSchemes = [preferences.uriScheme]
found = true
break
}
Expand All @@ -68,8 +68,8 @@
}

// override
obj.branch_key = perferences.branchKey
obj.branch_app_domain = perferences.linkDomain
obj.branch_key = preferences.branchKey
obj.branch_app_domain = preferences.linkDomain

return obj
}
Expand Down

0 comments on commit 8cab579

Please sign in to comment.