I have an Xcode project setup with multiple targets/schemes so that I have several apps under the same codebase.
I created the following testing lane in my Fastfile which runs the "sigh" tool for every one of my apps:
lane :testing do
["First", "Second", "Third", "Fourth"].each do |scheme_name|
sigh
end
end
Looking at the fastlane documentation, I see you can define a bundle identifier, which sigh uses. But I need it to automatically grab the current bundle identifier from each target/scheme's plist and use that for sigh. Can this be accomplished?
Something like (psuedo code):
bundle_id = get_bundle_id_from_plist
sigh(app_identifier: bundle_id)
I tried using this plugin: https://github.com/SiarheiFedartsou/fastlane-plugin-versioning which has a method for getting plist path. I then ran this code:
bundle_id = get_info_plist_value(path: get_info_plist_path(target: scheme_name), key: 'CFBundleIdentifier')
puts bundle_id
The output is $(PRODUCT_BUNDLE_IDENTIFIER), which actually what is in the plist value, so I'm getting closer. But I need this to return the actual bundle id, not just the variable it points to.
The whole reason for me wanting to use sigh is because each app/target has its own provisioning profiles that I had to manually generate initially because of CarPlay entitlement. I would like it to automatically create new provisioning profiles for each target when they expire.