Skip to content

Instantly share code, notes, and snippets.

@litoarias
Last active February 10, 2023 07:23
Show Gist options
  • Save litoarias/20b7aaf4307498f935a04ec1fde60e03 to your computer and use it in GitHub Desktop.
Save litoarias/20b7aaf4307498f935a04ec1fde60e03 to your computer and use it in GitHub Desktop.
Fastlane generator IPA Enterprise and Build Cordova project
fastlane_version "1.111.0"
scheme = "YOur scheme project"
configuration = "Release" # Debug or Release
project_name = "Your Project Name"
export_method = "enterprise" # app-store, ad-hoc, package, enterprise, development, developer-id
timestamp = Date.parse(Time.now.to_s)
ipa_name = "#{project_name}_#{timestamp}.ipa"
output_dir = "~/Desktop/Route destination your IPA/"
default_platform :ios
platform :ios do
before_all do
end
desc "cordova packaging + ipa + sign"
lane :IPA do
archiveApp(scheme, configuration, output_dir, ipa_name, export_method)
end
def archiveApp(scheme, config, outputDir, ipaName, export)
##############################################################################
sigh(
force: true,
output_path: "./fastlane/mobileprovision"
)
gym(
scheme: scheme,
configuration: config,
buildlog_path: outputDir,
output_directory: outputDir,
output_name: ipaName,
export_method: export,
include_bitcode: false,
silent: false,
clean: true,
verbose: true
)
##############################################################################
end
after_all do |lane|
# This block is called, only if the executed lane was successful
end
error do |lane, exception|
end
end
#!/bin/bash
# Counting the number of lines in a list of files
# for loop over arguments
cd $1 (route of your project)
cordova platform rm ios
cordova platform add ios@4.3.1
npm install
bower install
grunt release
cordova build ios
cp -r ~/Desktop/fastlane $1/platforms/ios/
cd $1/platforms/ios
open -a "Xcode" Your Project.xcodeproj
fastlane ios IPA
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment