diff --git a/src/scripts/ios/capabilities.js b/src/scripts/ios/capabilities.js index fc5440e8..3842143a 100755 --- a/src/scripts/ios/capabilities.js +++ b/src/scripts/ios/capabilities.js @@ -15,8 +15,8 @@ function enableAssociatedDomains (preferences) { console.log('BRANCH SDK: Updating iOS Xcode preferences') - var projectFile = preferences.projectPlatform.parseProjectFile(path.join(preferences.projectRoot, 'platforms', 'ios')) var entitlementsFile = path.join(preferences.projectRoot, 'platforms', 'ios', preferences.projectName, 'Resources', preferences.projectName + '.entitlements') + var projectFile = preferences.iosProjectModule.parseProjectFile(path.join(preferences.projectRoot, 'platforms', 'ios')) activateAssociativeDomains(projectFile.xcode, entitlementsFile) addPbxReference(projectFile.xcode, entitlementsFile) diff --git a/src/scripts/sdk/configXml.js b/src/scripts/sdk/configXml.js index 1eb87dd0..c5a172ec 100644 --- a/src/scripts/sdk/configXml.js +++ b/src/scripts/sdk/configXml.js @@ -60,7 +60,6 @@ return { 'projectRoot': projectRoot, - 'projectPlatform': projectPlatform, 'bundleId': bundleId, 'branchKey': branchKey, 'uriScheme': uriScheme, @@ -70,6 +69,7 @@ 'androidPrefix': androidPrefix, // optional 'androidTestMode': androidTestMode // optional 'projectName': getProjectName(configXml), + 'iosProjectModule': getProjectModule(context), } } @@ -82,8 +82,8 @@ } } - // read project platform - function getProjectPlatform (context) { + // read iOS project module from cordova context + function getProjectModule (context) { // try pre-5.0 cordova structure try { return context.requireCordovaModule('cordova-lib/src/plugman/platforms').ios