Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cannot find "$(SRCROOT) agvtool | increment_build_number | Fastlane

The avgtool associated with increment_build_number plugin in Fastlane returning error.

When I'm running increment_build_number in Fastlane, I'm getting

Updating CFBundleVersion in Info.plist(s)...

$(SRCROOT)/Info.plist
Cannot find "$(SRCROOT)/Info.plist"

The reason for the issue is that the avgtool couldn't identify the $(SRCROOT)

One of the solution found is to update the path to the Info.plist in Xcode settings to absolute path.

As there are a number of developers working on this project, updating the project settings with absolute path (to the plist) will affect others to build the project.

Is there any other way I can get this issue fixed?

like image 666
Alex Andrews Avatar asked Mar 22 '18 13:03

Alex Andrews


2 Answers

The current solution to your problem would be to remove the $(SRCROOT) from your build settings. $(SRCROOT) means "directory where .xcodeproj is" so you will be perfectly fine to remove it (Xcode will still look for it relatively from the .xcodeproj).

We've recently removed agvtool from the get_version_number action (in version 2.87.0 in favor of using the xcodeproj gem where we can more nicely handle which target is found, handle $(SRCROOT), and remove that "avgtool setup process". I will be working on replacing agvtool in increment_build_number and get_build_number soon which should hopefully prevent further issues like this one.

like image 58
joshdholtz Avatar answered Nov 02 '22 02:11

joshdholtz


You can open the project setting and find the key INFOPLIST_FILE

  • INFOPLIST_FILE = "$(SRCROOT)/ProjectName-info.plist";

Then remove the $(SRCROOT) and make sure that after you change Xcode still finding your info plist

The new value may be:

  • INFOPLIST_FILE = "/ProjectName-info.plist";

  • INFOPLIST_FILE = "/MyProjectFolderName/ProjectName-info.plist";

like image 41
Hiro Avatar answered Nov 02 '22 03:11

Hiro