user1728406
user1728406

Reputation: 257

Using agvtool with multiple .xcodeproject files in one directory

I have tried using agvtool for ios build versionining. It works great when there is a single .xcodeproj file in the directory. In my case, our project structure is such that it has 4 .xcodeproj files in a single directory. When firing agvtool command in this directory it throws error message, 'agvtool does not work with multiple projects in the same directory'. Anyone has any idea how can I make agvtool work with this folder structure?

Upvotes: 21

Views: 2057

Answers (2)

patel dhruval
patel dhruval

Reputation: 1052

For me, there were actually 2 xcode project files. i.e. projectName.xcodeproj and projectNameModule.xcodeproj. That happened as I removed some commits where we updated the project name from projectName to projectNameModule. For some reason even after reverting those name changes, the project *Module.xcodeproj and *Module.xcworkspace files were still existing. I just deleted those unused files and it fixed the issue for me.

Upvotes: 0

Peter Theill
Peter Theill

Reputation: 3220

For people finding this post and using Fastlane, I just wanted to tell about the plugin https://github.com/SiarheiFedartsou/fastlane-plugin-versioning which have a increment_version_number_in_plist command which does not use agvtool (and support multiple .xcodeproj files in a single folder.

You just need to install the plugin above and replace your increment_version_number action with increment_version_number_in_plist .. they have a very similar contract.

Upvotes: 4

Related Questions