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 5
5
const compare = require ( "node-version-compare" ) ;
6
6
const IOS_DEPLOYMENT_TARGET = "8.0" ;
7
7
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" ;
9
10
10
11
// entry
11
12
module . exports = {
37
38
xcodeProject . pbxXCBuildConfigurationSection ( )
38
39
) ;
39
40
let config ;
41
+ let configurationConfig ;
40
42
let buildSettings ;
41
43
42
44
for ( config in configurations ) {
43
- buildSettings = configurations [ config ] . buildSettings ;
44
- buildSettings . CODE_SIGN_IDENTITY = `"${ CODESIGNIDENTITY } "` ;
45
+ configurationConfig = configurations [ config ] ;
46
+ buildSettings = configurationConfig . buildSettings ;
47
+
45
48
buildSettings . CODE_SIGN_ENTITLEMENTS = `"${ entitlementsFile } "` ;
46
49
50
+ if ( configurationConfig . name === 'Release' ) {
51
+ buildSettings . CODE_SIGN_IDENTITY = `"${ RELEASECODESIGNIDENTITY } "` ;
52
+ } else {
53
+ buildSettings . CODE_SIGN_IDENTITY = `"${ DEBUGCODESIGNIDENTITY } "` ;
54
+ }
55
+
47
56
// if deployment target is less then the required one - increase it
48
57
if ( buildSettings . IPHONEOS_DEPLOYMENT_TARGET ) {
49
58
const buildDeploymentTarget = buildSettings . IPHONEOS_DEPLOYMENT_TARGET . toString ( ) ;
You can’t perform that action at this time.
0 commit comments