22

What I’m doing is trying to make bitbucket pipline do my iOS CD, I included docker fastlanetools/fastlane image and in the steps i pull and run the docker image everything is okay and i was able to let fastlane command work by calling fastlane beta in the steps.

What’s happening is that fastlane exits with the error Apple Generic versioning is not enabled in this project.

I followed apple documentation to enable it from xCode from here I changed all the targets in my project to use App Generic and still not working

here is the output

ANeme
  • 731
  • 5
  • 19
  • It appears agvtool is not installed. Make sure this is available in the docker image you are using. See the script output just above the "Lane Context" box. To test your setup, you could try and run fastlane locally first, to make sure your project supports apple generic versioning. – Eelco Koelewijn Jan 25 '20 at 12:45
  • It is working locally will try to add agvtool to docker – ANeme Jan 25 '20 at 19:58

9 Answers9

20

In case it was this issue xcrun avgtool xcrun: error: unable to find utility "avgtool", not a developer tool or in PATH

after

sudo xcode-select -s /Applications/Xcode.app

fastlane stopped complaining

Anton
  • 1,432
  • 13
  • 17
15

In my case it was the issue of Command Line Tools, which wasn't specified under the location tab. enter image description here

Raja Saad
  • 350
  • 4
  • 12
  • This worked for me - it seems to be particularly a problem setting up Xcode and Fastlane on a new development machine. – Arvoreniad Jun 08 '21 at 23:03
  • @Arvoreniad actually I had 2 versions of Xcode at the same time, when it happened for me. But the scenario you mentioned above can be a problematic one. – Raja Saad Jun 10 '21 at 06:12
8

Add your xcodeproj path. Like

increment_build_number(
    xcodeproj: '../XXX.xcodeproj',
  build_number: number
)
utkukutlu
  • 400
  • 1
  • 4
  • 5
2

I met the same problem. I searched and tried a lot of ways, but still not worked it out. A flash of inspiration came to my mind. I set a certain version via increment_version_number, it was succeeded magically. Then I tried increment_version_number again to make it automatically increment the version number. Lucky me, it worked.

yancaico
  • 1,145
  • 11
  • 21
2

I had two installations of macOS but Xcode only on one of them, after updating I lost the command line tools location. After setting that up in the preferences it worked again

Xcode 12.4 settings

Lucas van Dongen
  • 9,328
  • 7
  • 39
  • 60
2

What i missed was missed setting CURRENT_PROJECT_VERSION (whz. Current Project Version) build setting, which specifies the current version of your project.

Reason:

By default, Xcode does not use any versioning system & no value for Current Project Version. So setting versioning system to Apple Generic ensures that Xcode will include all agvtool-generated version information in your project.

Reference

So make sure, your below set values for

enter image description here

nikdange_me
  • 2,949
  • 2
  • 16
  • 24
1

I highly recommend using this plugin if your issue is not having argvtool accessible in CI/CD when trying to bump stuff uniformly for both IOS/Android before it does it in the macOS runner or action etc

Mike R
  • 679
  • 7
  • 13
1

This also happened to me as part of trying to do it in CI/CD. Turns out I was using an ubuntu machine to run the task, and in order to update an iOS app, you need to ensure you are running it on a macOS system

JackDev
  • 4,891
  • 1
  • 39
  • 48
0

In my case this problem appeared after I updated Xcode and my xcode-select was pointing to the missing folder.

After I executed xcode-select -s /Applications/Xcode_13_4.app Fastlane continued working as it used to before.

Nik
  • 9,063
  • 7
  • 66
  • 81