Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to build framework with fastlane?

It's very easy building ipa using fastlane gym. But my aim is building a framework. It works for build a framework below:

gym(
  clean: true,
  scheme: "SGVSDK",
  project: "../Prj/SDK/SGVSDK.xcodeproj",
  # build_path: "./",
  archive_path: "./" + archiveName,
  skip_package_ipa: true,
)

But it can only build device framework? How to build a simulator framwork? Are there any tip for me for SDK CI using fastlane ?

like image 666
qiushuitian Avatar asked Aug 04 '17 06:08

qiushuitian


2 Answers

What worked for me was creating aggregate target for building universal framework (for simulator and device) with additional sh script as described in tutorial here: https://medium.com/@syshen/create-an-ios-universal-framework-148eb130a46c Then in fastfile I build aggregate target like this:

xcodebuild(
    scheme: "Framework-Universal",
    configuration: "Release",
    clean: true,
    build: true
)
like image 154
Leszek Szary Avatar answered Oct 20 '22 15:10

Leszek Szary


I used fastlane swift to build aggregated framework using the following function, maybe it helps you.

buildIosApp(workspace: "PayTabs.xcworkspace", 
scheme: "Aggregated Framework", 
clean: true, 
configuration: "Release", 
skipPackageIpa: true, 
includeSymbols: false, 
skipArchive: true)
like image 1
Mohamed Adly Avatar answered Oct 20 '22 15:10

Mohamed Adly