Not updating project.pbxproj?
The CURRENT_PROJECT_VERSION entries in ios/{project_name}.xcodeproj/project.pbxproj aren't being updated when the package is executed. Is there anything that we can do about that?
Found the issue. It's due to target.name === appPkg.name condition. The solution is to update "name": in the main package.json to match the prefix of the project folder in ios/ directory. E.g "name": "MyProject" if
you've got ios/MyProject.xcodeproj. It's not ideal since in our case it's not following the lowercase convention but it's okay.
https://github.com/stovmascript/react-native-version/blob/f5577a25951c68bc4a6cc638a6b1aa5045b469af/index.js#L402
I guess we could change this condition to always test both properties after converting them .toLowerCase(). Do you want to make a PR?
This check also means it won't work for multiple targets. It updates both Info.plist files but only one of the targets in the project.pbxproj.
Using --legacy and setting CURRENT_PROJECT_VERSION in the project rather than the targets seems to do the trick.
Using
--legacyand settingCURRENT_PROJECT_VERSIONin the project rather than the targets seems to do the trick.
Incredible, but it works as it should! Thank you