apache / apache/cordova-node-xcode
addBuildPhase keeps adding phases when they already exist
- Dominant language
- JavaScript
- Stars
- 217
- Forks
- 102
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 6
Description
This is the build script line
```
xcodeProject.addBuildPhase(
[], 'PBXShellScriptBuildPhase', 'Configure Crashlytics', undefined, options
).buildPhase;
fs.writeFileSync(xcodeProjectPath, xcodeProject.writeSync());
$logger.trace('Xcode project written');
} else {
$logger.error(xcodeProjectPath + ' is missing.');
reject();
return;
}
```
So I guess everytime the CLI build runs it adds a NEW "Configure Crashlytics" to the build phase. Eventually my machine just outright died because the script was running hundreds of times.
Is there maybe a way before this I can check to see if it exists first before just adding it again?
Contributor guide
Research direction
Start by locating the addBuildPhase call shown in the build script and inspect how it handles existing phases named "Configure Crashlytics". Re-run the CLI build against an Xcode project more than once; done means repeated runs leave one such build phase and still write the project successfully.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ios, javascript, node.js
- Domain
- cli, mobile-dev
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100