How to increment build number using fastlane and jenkins for iOS CICD setup?
Check the versioning settings in Xcode -Xcode -> Target -> Build Settings -> Search for Versioning
- Change Versioning System to Apple Generic
- Set Current Project Version to a version value you want to startFor Example, Current Project Version = 1
In Fastlane script you can pick from below as per your requirement :
increment_version_number # Automatically increment patch version number increment_version_number( bump_type: "patch" # Automatically increment patch version number ) increment_version_number( bump_type: "minor" # Automatically increment minor version number ) increment_version_number( bump_type: "major" # Automatically increment major version number ) increment_version_number( version_number: "2.1.1" # Set a specific version number ) increment_version_number( version_number: "2.1.1", # specify specific version number (optional, omitting it increments patch version number) xcodeproj: "./path/to/MyApp.xcodeproj" # (optional, you must specify the path to your main Xcode project if it is not in the project root directory) )