Comparing version 11.1.0 to 12.0.0
{ | ||
"name": "forceios", | ||
"version": "11.1.0", | ||
"version": "12.0.0", | ||
"description": "Utilities for creating mobile apps based on the Salesforce Mobile SDK for iOS", | ||
@@ -5,0 +5,0 @@ "keywords": [ "mobilesdk", "ios", "salesforce", "mobile", "sdk" ], |
@@ -31,3 +31,3 @@ /* | ||
var VERSION= '11.1.0'; | ||
var VERSION= '12.0.0'; | ||
@@ -68,9 +68,9 @@ module.exports = { | ||
platformVersion: { | ||
ios: '7.0.1', | ||
ios: '7.1.0', | ||
android: '12.0.1' | ||
} | ||
}, | ||
sfdx: { | ||
checkCmd: 'sfdx -v', | ||
minVersion: '6.0.0' | ||
sf: { | ||
checkCmd: 'sf -v', | ||
minVersion: '2.0.0' | ||
} | ||
@@ -122,3 +122,3 @@ }, | ||
platforms: ['ios', 'android'], | ||
toolNames: ['git', 'node', 'npm', 'cordova', 'sfdx'], | ||
toolNames: ['git', 'node', 'npm', 'cordova', 'sf'], | ||
appTypes: ['hybrid_local', 'hybrid_remote', 'hybrid_lwc'], | ||
@@ -125,0 +125,0 @@ appTypesToPath: { |
@@ -93,3 +93,3 @@ /* | ||
config.serverDir = path.join(config.projectDir, SERVER_PROJECT_DIR) | ||
utils.runProcessThrowError('sfdx force:project:create -n ' + SERVER_PROJECT_DIR, config.projectDir); | ||
utils.runProcessThrowError('sf force project create -n ' + SERVER_PROJECT_DIR, config.projectDir); | ||
@@ -114,9 +114,3 @@ // Copy cordova js to static resources | ||
if (config.platform.split(',').indexOf('ios') != -1) { | ||
if (utils.getToolVersion('xcodebuild -version') < 14000000) { | ||
// Use legacy build for xcode 13 and older | ||
useLegacyBuild(config, path.join('platforms', 'ios')); | ||
} else { | ||
// Patch podfile for xcode 14 | ||
fixPods(config, path.join('platforms', 'ios')); | ||
} | ||
fixPods(config, path.join('platforms', 'ios')); | ||
@@ -134,28 +128,5 @@ // Remove libCordova.a from build | ||
return prepareResult; | ||
} | ||
// | ||
// Use legacy build system in XCode | ||
// | ||
function useLegacyBuild(config, iosSubDir) { | ||
var xcSettingsDir = path.join(config.projectDir, iosSubDir, config.appname + '.xcworkspace', 'xcshareddata') | ||
var xcSettingsFile = path.join(xcSettingsDir, 'WorkspaceSettings.xcsettings'); | ||
var plistFileContent = '<?xml version="1.0" encoding="UTF-8"?>\n' + | ||
'<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">\n' + | ||
'<plist version="1.0">\n' + | ||
'<dict>\n' + | ||
'<key>BuildSystemType</key>\n' + | ||
'<string>Original</string>\n' + | ||
'<key>DisableBuildSystemDeprecationDiagnostic</key>\n' + | ||
'<true/>\n' + | ||
'</dict>\n' + | ||
'</plist>\n'; | ||
utils.logInfo('Creating WorkspaceSettings.xcsettings for project. Setting the BuildSystemType to original in ' + xcSettingsFile); | ||
utils.mkDirIfNeeded(xcSettingsDir) | ||
fs.writeFileSync(xcSettingsFile,plistFileContent,'utf8'); | ||
utils.logInfo('Created WorkspaceSettings.xcsettings for project ' + config.appname); | ||
} | ||
// | ||
// Patch pod file for hybrid apps on xcode 14 | ||
@@ -243,6 +214,27 @@ // | ||
]); | ||
}; | ||
// | ||
// Print next steps for Native Login | ||
// | ||
function printNextStepsForNativeLogin(ide, projectPath, result) { | ||
var workspacePath = path.join(projectPath, result.workspacePath); | ||
var bootconfigFile = path.join(projectPath, result.bootconfigFile); | ||
var entryFile = (ide === 'XCode') ? 'SceneDelegate' : 'MainApplication'; | ||
// Printing out next steps | ||
utils.logParagraph(['Next steps' + (result.platform ? ' for ' + result.platform : '') + ':', | ||
'', | ||
'Your application project is ready in ' + projectPath + '.', | ||
'To use your new application in ' + ide + ', do the following:', | ||
' - open ' + workspacePath + ' in ' + ide, | ||
' - Update the OAuth Client ID, Callback URI, and Community URL in ' + entryFile + ' class.', | ||
' - build and run', | ||
'Before you ship, make sure to plug your OAuth Client ID and Callback URI,', | ||
'and OAuth Scopes into ' + bootconfigFile + ', since it is still used for', | ||
'authentication if we fallback on the webview.' | ||
]); | ||
} | ||
// | ||
// Print next steps for server project if present | ||
@@ -259,11 +251,9 @@ // | ||
'From ' + projectPath + ' do the following to setup a scratch org, push the server code:', | ||
' - sfdx force:org:create -f server/config/project-scratch-def.json -a MyOrg', | ||
' - sf force org create -f server/config/project-scratch-def.json -a MyOrg', | ||
' - cd server', | ||
' - sfdx force:source:push -u MyOrg', | ||
' - sf force source push -u MyOrg', | ||
'You also need a password to login to the scratch org from the mobile app:', | ||
' - sfdx force:user:password:generate -u MyOrg' | ||
' - sf force user password generate -u MyOrg' | ||
]); | ||
} | ||
} | ||
@@ -394,3 +384,8 @@ | ||
var ide = SDK.ides[result.platform || config.platform.split(',')[0]]; | ||
printNextSteps(ide, config.projectPath, result); | ||
if (config.templatepath != undefined && config.templatepath.includes('NativeLogin')) { | ||
printNextStepsForNativeLogin(ide, config.projectPath, result); | ||
} else { | ||
printNextSteps(ide, config.projectPath, result); | ||
} | ||
} | ||
@@ -397,0 +392,0 @@ printNextStepsForServerProjectIfNeeded(config.projectPath); |
@@ -126,3 +126,4 @@ /* | ||
var result = runProcessThrowError(cmd, null, true /* return output */); | ||
toolVersion = result.replace(/\r?\n|\r/, '').replace(/[^0-9\.]*/, ''); | ||
// Remove @salesforce/cli/ from the beginning of sf cli version. | ||
toolVersion = result.replace(/\r?\n|\r/, '').replace(/[^0-9\.]*/, '').replace('@salesforce/cli/', ''); | ||
} | ||
@@ -129,0 +130,0 @@ catch (error) { |
109966
2495