File tree Expand file tree Collapse file tree 1 file changed +12
-3
lines changed
Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Original file line number Diff line number Diff line change 55 const compare = require ( "node-version-compare" ) ;
66 const IOS_DEPLOYMENT_TARGET = "8.0" ;
77 const COMMENT_KEY = / _ c o m m e n t $ / ;
8- const CODESIGNIDENTITY = "iPhone Developer" ;
8+ const DEBUGCODESIGNIDENTITY = "iPhone Developer" ;
9+ const RELEASECODESIGNIDENTITY = "iPhone Distribution" ;
910
1011 // entry
1112 module . exports = {
3738 xcodeProject . pbxXCBuildConfigurationSection ( )
3839 ) ;
3940 let config ;
41+ let configurationConfig ;
4042 let buildSettings ;
4143
4244 for ( config in configurations ) {
43- buildSettings = configurations [ config ] . buildSettings ;
44- buildSettings . CODE_SIGN_IDENTITY = `"${ CODESIGNIDENTITY } "` ;
45+ configurationConfig = configurations [ config ] ;
46+ buildSettings = configurationConfig . buildSettings ;
47+
4548 buildSettings . CODE_SIGN_ENTITLEMENTS = `"${ entitlementsFile } "` ;
4649
50+ if ( configurationConfig . name === 'Release' ) {
51+ buildSettings . CODE_SIGN_IDENTITY = `"${ RELEASECODESIGNIDENTITY } "` ;
52+ } else {
53+ buildSettings . CODE_SIGN_IDENTITY = `"${ DEBUGCODESIGNIDENTITY } "` ;
54+ }
55+
4756 // if deployment target is less then the required one - increase it
4857 if ( buildSettings . IPHONEOS_DEPLOYMENT_TARGET ) {
4958 const buildDeploymentTarget = buildSettings . IPHONEOS_DEPLOYMENT_TARGET . toString ( ) ;
You can’t perform that action at this time.
0 commit comments