Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[RNV] Error: ENOENT: no such file or directory, open 'ios/$(SRCROOT)/Target2.plist' #174

Open
strdr4605 opened this issue Feb 21, 2020 · 2 comments

Comments

@strdr4605
Copy link

I have a project with multiple android flavors and ios targets. I want to have a consistent version and build number between all flavors and targets.
For android, I see that version and build numbers are shared across all flavors (Which is fine for me).
When I run react-native-version I get

[RNV] Versioning Android...
[RNV] Android updated
[RNV] Versioning iOS...
[RNV] Error: ENOENT: no such file or directory, open 'ios/$(SRCROOT)/Target2.plist'

Here is my structure in the ios folder.

|-assets
|-Target1
|    |-files for Target1
|-Target2
|    |-files for Target2
|-MainTarget
|    |-AppDelegate.h
|    |-Info.plist
|    |-files for MainTarget
|-MainTarget-tvOS
|    |-Info.plist
|-MainTarget.xcodeproj
|-MainTarget.xcworkspace
|-Target3
|    |-files for Target3
|-Target4
|    |-files for Target4
|-Target1.plist
|-Target2.plist
|-Target3.plist
|-Target4.plist

How can I fix the issue so RNV would modify the version for all targets ?

@damiansnp
Copy link

Hey there, if it's not too late, check this out for iOS: https://medium.com/@salvador.rhenz/setting-info-plist-path-on-xcode-11-65bed161bea5

Basically, what you have to do is to go through the files for every target (Target1, Target2 etc.) and click on them to see their details panel on the right. Then, for each file (in this case I think it's enough for every target's Info.plist, but I've also set it for entitlements and google's plist too), after you got that panel showing the file details, under Identity and Type there's a Location property. Make sure that it's set to Relative to Project and then in the Build Settings for the target to which that file belongs (doesn't apply to google's plist, only entitlements and info plist), set the file's location to match the one shown under the Location property. In your example, that would be for Target1 Target1/Info.plist.

After doing this, react-native-version will automatically version all the Info.plist files from each target.

@strdr4605
Copy link
Author

This task was postponed. But solving another issue I change to Relative to Project. Will try to add again react-native-version in the future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants