forceios 11.0.0 → 11.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "forceios",
3
- "version": "11.0.0",
3
+ "version": "11.1.0",
4
4
  "description": "Utilities for creating mobile apps based on the Salesforce Mobile SDK for iOS",
5
5
  "keywords": [ "mobilesdk", "ios", "salesforce", "mobile", "sdk" ],
6
6
  "homepage": "https://github.com/forcedotcom/SalesforceMobileSDK-iOS",
@@ -28,7 +28,7 @@
28
28
  var path = require('path'),
29
29
  shelljs = require('shelljs');
30
30
 
31
- var VERSION= '11.0.0';
31
+ var VERSION= '11.1.0';
32
32
 
33
33
  module.exports = {
34
34
  version: VERSION,
@@ -64,8 +64,8 @@ module.exports = {
64
64
  minVersion: '12.0.0',
65
65
  pluginRepoUri: 'salesforce-mobilesdk-cordova-plugin@v' + VERSION, // GA
66
66
  platformVersion: {
67
- ios: '6.3.0',
68
- android: '11.0.0'
67
+ ios: '7.0.1',
68
+ android: '12.0.1'
69
69
  }
70
70
  },
71
71
  sfdx: {
@@ -110,23 +110,21 @@ function createHybridApp(config) {
110
110
  utils.runProcessThrowError('cordova prepare', config.projectDir);
111
111
 
112
112
  if (config.platform.split(',').indexOf('ios') != -1) {
113
- if (utils.getToolVersion('xcodebuild -version') < 14000000) {
114
- // Use legacy build for xcode 13 and older
115
- useLegacyBuild(config, path.join('platforms', 'ios'));
116
-
117
- // Removing libCordova.a from build (it causes issues e.g. CDVWKWebViewEngine won't register as plugin because it won't be recognized as a kind of CDVPlugin)
118
- utils.logInfo('Updating xcode project file');
119
- var xcodeProjectFile = path.join(config.projectDir,'platforms', 'ios', config.appname + '.xcodeproj', 'project.pbxproj')
120
- var xcodeProjectFileContent = fs.readFileSync(xcodeProjectFile, 'utf8');
121
- var newXcodeProjectFileContent = xcodeProjectFileContent.split('\n').filter(line => line.indexOf('libCordova.a in Frameworks') == -1).join('\n');
122
- fs.writeFileSync(xcodeProjectFile, newXcodeProjectFileContent);
123
- utils.logInfo('Updated xcode project file');
124
-
125
- } else {
113
+ if (utils.getToolVersion('xcodebuild -version') < 14000000) {
114
+ // Use legacy build for xcode 13 and older
115
+ useLegacyBuild(config, path.join('platforms', 'ios'));
116
+ } else {
126
117
  // Patch podfile for xcode 14
127
118
  fixPods(config, path.join('platforms', 'ios'));
128
- }
119
+ }
129
120
 
121
+ // Remove libCordova.a from build
122
+ utils.logInfo('Updating xcode project file');
123
+ var xcodeProjectFile = path.join(config.projectDir,'platforms', 'ios', config.appname + '.xcodeproj', 'project.pbxproj')
124
+ var xcodeProjectFileContent = fs.readFileSync(xcodeProjectFile, 'utf8');
125
+ var newXcodeProjectFileContent = xcodeProjectFileContent.split('\n').filter(line => line.indexOf('libCordova.a in Frameworks') == -1).join('\n');
126
+ fs.writeFileSync(xcodeProjectFile, newXcodeProjectFileContent);
127
+ utils.logInfo('Updated xcode project file');
130
128
  }
131
129
 
132
130
  // Done
@@ -272,7 +270,7 @@ function checkTools(toolNames) {
272
270
  try {
273
271
  utils.log("Checking tools");
274
272
  for (var toolName of toolNames) {
275
- utils.checkToolVersion(SDK.tools[toolName].checkCmd, SDK.tools[toolName].minVersion, SDK.tools[toolName].maxVersion);
273
+ utils.checkToolVersion(SDK.tools[toolName].checkCmd, SDK.tools[toolName].minVersion, SDK.tools[toolName].maxVersion, toolName);
276
274
  }
277
275
  }
278
276
  catch (error) {
package/shared/utils.js CHANGED
@@ -90,23 +90,24 @@ function getVersionNumberFromString(versionString) {
90
90
  * @param {String} cmd Command to run to get the tool version
91
91
  * @param {String} minVersionRequired Minimum version required
92
92
  * @param {String} maxVersionSupported Maximum version supported
93
+ * @param {String} toolName Name of tool
93
94
  *
94
95
  * @throws {Error} if tool not found or version too low
95
96
  */
96
- function checkToolVersion(cmd, minVersionRequired, maxVersionSupported) {
97
+ function checkToolVersion(cmd, minVersionRequired, maxVersionSupported, toolName) {
97
98
  var toolVersionNum = getToolVersion(cmd);
98
99
  var minVersionRequiredNum = getVersionNumberFromString(minVersionRequired);
99
100
 
100
101
  if (toolVersionNum < minVersionRequiredNum) {
101
- throw new Error('Installed ' + toolName + ' version (' + toolVersion + ') is less than the minimum required version ('
102
- + minVersionRequired + '). Please update your version of ' + toolName + '.');
102
+ throw new Error('Installed ' + toolName + ' is less than the minimum required version ('
103
+ + minVersionRequired + ').\nPlease upgrade your version of ' + toolName + '.');
103
104
  }
104
105
 
105
106
  if (maxVersionSupported) {
106
107
  var maxVersionSupportedNum = getVersionNumberFromString(maxVersionSupported);
107
108
  if (toolVersionNum > maxVersionSupportedNum) {
108
- throw new Error('Installed ' + toolName + ' version (' + toolVersion + ') is more than the maximum supported version ('
109
- + maxVersionSupported + '). Please downgrade your version of ' + toolName + '.');
109
+ throw new Error('Installed ' + toolName + ' is more than the maximum supported version ('
110
+ + maxVersionSupported + ').\nPlease downgrade your version of ' + toolName + '.');
110
111
  }
111
112
  }
112
113
  }