Dynamic deployment to apple store (testflight/app store) using fastlane

323 Views Asked by At

Hello community I am having trouble with using fastlane to achieve a specific scenario. Please help me if anyone can, below are my requirements: I want to dynamically create new bundle Id, create certificates for the same, set new certificates and bundle id automatically in xcode and then deploy the application to testflight/app store.

From the below code I am able to do all, but the issue is in xcode the I have to re-select the certificate else I get an error of certificate not in key chain. When I reselect the auto selected certificate the error disappears, what I want is to not select certificate to remove the error.

Following is my code:

default_platform(:ios)

platform :ios do desc "Push a new beta build to TestFlight" lane :testflightNew do

produce(
  app_name: 'WhiteLabel3',
  language: 'English',
  app_version: '1.0',
  sku: 'com.xxxxxxxx'
)

# 4
cert
# 5
sigh(force: true)
produce(
  username: '[email protected]',
  app_identifier: 'com.xxxxxxx',
  app_name: 'WhiteLabel3',
  language: 'English',
  app_version: '1.0',
  sku: 'com.xxxxxxxx',  
)
disable_automatic_code_signing
update_app_identifier(
  xcodeproj: "whitelabel.xcodeproj",
  plist_path: "/Users/tusharaswal/Desktop/Projects/whitelabel/ios/whitelabel/Info.plist", # Path to info plist file, relative to xcodeproj
  app_identifier: "com.xxxxxxxx" # The App Identifier
)

update_project_provisioning(
  xcodeproj: "whitelabel.xcodeproj",
  profile: "/Users/tusharaswal/Desktop/Projects/whitelabel/ios/xxxxxxxxx", # optional if you use sigh
  build_configuration: "Release",
  code_signing_identity: "iPhone Distribution"
)
update_project_team(
  path: "whitelabel.xcodeproj",
  teamid: "XXXXXXXXX"
)
gym(scheme: "Release")
pilot

end end

0

There are 0 best solutions below