I have an Expo project that I had to detach to use native libraries. I’m using git for version control. I notice that as I develop the ios/my-project/Supporting/EXShell.json and ios/my-project/Supporting/EXShell.plist keep changing.
I’m wondering if I should keep those files in version control or it’s fine to git ignore? If it’s fine to ignore, won’t those files be needed on a fresh clone of the repo? Or will they get generated? If so, what generates them?
We recently added support for EXBuildConstants.plist to make this less annoying. If you create a new plist file called EXBuildConstants.plist in the same directory as EXShell.plist and add it to your Xcode file tree, that one should get modified rather than EXShell. Then you should be able to add EXShell.plist to version control and ignore EXBuildConstants.plist. New ExpoKit projects have this already set up by default.
@jesse On SDK18, it doesn’t seem to be regenerated when I build the project. I get an error from MainActivity.java saying that the generated package doesn’t exist. What should I do to cause the build process to regenerate ExponentBuildConstants.java?
@jesse Yes, my understanding was that this topic was about how to deal with git for these generated files. ExponentBuildConstants.java can’t be ignored because it is not regenerated during the build process. It shouldn’t be committed when automatically modified because that leads to unnecessary conflicts. My understanding is that this was the case on the iOS side with EXShell.plist until SDK18 when EXShell.plist became static and EXBuildConstants.plist was added and automatically regenerated as needed, making it safely ignorable.
@ben I think I misunderstood your post. I thought you meant that EXBuildConstants.plist would be generated by exp start and therefore it could be safely ignored. This doesn’t seem to be the case. We can ignore it but each team member needs to manually add it. What do you think of making exp start create EXBuildConstants.plist if it does not already exist?
EXBuildConstants.plist is not being used even I created it and upgrade to sdk 18.0.0
When I build in xcode (a detached project) and run in the ios simulator the app will show error about using the exp in EXSHell instead of the url in EXBuildConstants.plist.