forked from github/jpush-phonegap-plugin
add: check does com.apple.Push
attribute exist in .pbxproj to avoid not found error.
This commit is contained in:
parent
6059f546f6
commit
7b70564f82
@ -41,6 +41,7 @@ let disablePushNotificationForXCode = (entitlementsPath, pbxprojPath) => {
|
|||||||
// turn off Push Notification Capability
|
// turn off Push Notification Capability
|
||||||
let re4rep = new RegExp('isa = PBXProject;(.|[\r\n])*TargetAttributes(.|[\r\n])*SystemCapabilities(.|[\r\n])*com\.apple\.Push = {(.|[\r\n])*enabled = [01]');
|
let re4rep = new RegExp('isa = PBXProject;(.|[\r\n])*TargetAttributes(.|[\r\n])*SystemCapabilities(.|[\r\n])*com\.apple\.Push = {(.|[\r\n])*enabled = [01]');
|
||||||
let parts = re4rep.exec(data);
|
let parts = re4rep.exec(data);
|
||||||
|
if(parts !== null && parts !== undefined && parts.length > 0) {
|
||||||
result = data.replace(re4rep, parts[0].substr(0, parts[0].length - 1) + '0');
|
result = data.replace(re4rep, parts[0].substr(0, parts[0].length - 1) + '0');
|
||||||
|
|
||||||
// write result to project.pbxproj
|
// write result to project.pbxproj
|
||||||
@ -50,6 +51,7 @@ let disablePushNotificationForXCode = (entitlementsPath, pbxprojPath) => {
|
|||||||
}
|
}
|
||||||
console.log(pbxprojPath + " written successfully");
|
console.log(pbxprojPath + " written successfully");
|
||||||
});
|
});
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user