fastlane: fastlane cannot update project version

I tried both set_build_number_repository and increment_version_number and receive this error:

[22:01:18]: [SHELL]: Updating CFBundleVersion in Info.plist(s)...
[22:01:18]: [SHELL]:
[22:01:18]: [SHELL]: $(SRCROOT)/ProjectName/Supporting Files/Info.plist
[22:01:18]: [SHELL]: Cannot find "$(SRCROOT)/ProjectName/Supporting Files/Info.plist"
[22:01:18]: [SHELL]: Updated CFBundleVersion in "ProjectName.xcodeproj/../ProjectName Tests/Info.plist" to 55e9c3d

Of course I have plist file on the specified path (./ProjectName/Supporting Files/Info.plist).

Do you have any idea what causing this issue? I can provide additional info if needed, or try to reproduce this issue on demo project

About this issue

  • Original URL
  • State: closed
  • Created 9 years ago
  • Comments: 35 (4 by maintainers)

Most upvoted comments

For clarification, you can still use a relative path if you just remove the $(SRCROOT) part.

Make this

INFOPLIST_FILE = "$(SRCROOT)/Project/info.plist";

into this

INFOPLIST_FILE = "Project/info.plist";

I removed $(SRCROOT) path from my INFOPLIST_FILE variable in Xcode. And now increment_build_number works fine!

Experiencing the same issue. Absolute paths are not an option 😦

Just facing this issue myself - should this really be closed? My team commit the project file and if I hardcode the plist path within project settings in the same fashion as @Pr0Ger this is going to break the project for other members of my team. Why can’t fastlane expand environment variables such as $(SRCROOT)?

If you are having issues with this. It is because your project file has the wrong settings. Basically argvtool does not understand the variable $(SRCROOT).

  1. Open your xcworkspace file.
  2. Go to Build Settings.
  3. Search for Info.plist File.
  4. Remove the variable. So if you had $(SRCROOT)/Program/… it would be become Program/…

looks like it’s an isse in agvtool itself. If you try to run agvtool next-version -all you will see the same error.

Worked the same for me as @zigdanis Just updated .xcodeproj/project.pbxproj removing the $(SRCROOT)

My current workaround is using the set_info_plist_value action with the proper keys and path to the plist.