Cannot find "$(SRCROOT) agvtool | increment_build_number | Fastlane
Asked Answered
R

2

16

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?

Resonator answered 22/3, 2018 at 13:28 Comment(0)
D
24

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.

Depositor answered 24/3, 2018 at 15:52 Comment(0)
W
15

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";

Whisper answered 11/3, 2019 at 4:13 Comment(2)
I had to skip the first / to get it to work properly.Petite
Yes, belong to your project settings. I thought so. Just make sure Xcode can read the Plist file.Whisper

© 2022 - 2024 — McMap. All rights reserved.