# Building iOS frameworks using bitrise?

**URL:** <https://discuss.bitrise.io/t/building-ios-frameworks-using-bitrise/3987>\
**Category:** Question & Answer\
**Tags:** ios\
**Created:** [February 1, 2018, 12:05am UTC](https://discuss.bitrise.io/t/building-ios-frameworks-using-bitrise/3987 "2018-02-01T00:05:53Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![quoc\_axiadids](https://avatars.discourse-cdn.com/v4/letter/q/e480ec/32.png) [@quoc\_axiadids](https://discuss.bitrise.io/u/quoc_axiadids)\
**Post date:** [February 1, 2018, 12:05am UTC](https://discuss.bitrise.io/t/building-ios-frameworks-using-bitrise/3987/1 "2018-02-01T00:05:53Z")

</div>

Hello…

I am trying to build an iOS framework using bitrise.  
At first I received this error when performing the XCODE archive step…

“Failed to parse archive, error: Info.plist not exists at”,  
and when I ran it with a fresh clone on my local machine I noticed that the output directory was empty. Which would explain why Info.plist could not be found.

So I replaced the the ‘Skip Install’ parameter from ‘yes’ to ‘no’ and when I ran it on another fresh installation. The output directory was properly created with the following…

> BCSymbolMaps  
> Info.plist  
> Products  
> dSYMs

I committed my change, and now I am received a new error…

“Failed to parse archive, error: failed to find main app”  
This makes sense because I am building a framework not an iOS application.

I did more investigation to find this [link](http://devcenter.bitrise.io/ios/frequent-ios-issues/#no-mobileprovision_path-found-no-embeddedmobileprovision-found-in).  
Here I found this snippet that contradicts my previous configuration change.

> _If you get this error in the Xcode Archive step you should check your Xcode Projects settings. Most likely you have the Skip Install option set to YES._   
>   
> _This should only be used for iOS frameworks, for iOS apps this should be set to NO._

Has anyone successfully built an iOS framework and could provide some context to steer me on the correct route?

---

<div class="post-metadata">

**Author:** ![quoc\_axiadids](https://avatars.discourse-cdn.com/v4/letter/q/e480ec/32.png) [@quoc\_axiadids](https://discuss.bitrise.io/u/quoc_axiadids)\
**Post date:** [February 1, 2018, 3:57am UTC](https://discuss.bitrise.io/t/building-ios-frameworks-using-bitrise/3987/2 "2018-02-01T03:57:05Z")

</div>

…Update

while debugging… I foudn that the _.framework is being created during testing.  
/Users/vagrant/Library/Developer/Xcode/DerivedData/_/Build/Products/Release-iphonesimulator/\*.framework

---

<div class="post-metadata">

**Author:** ![viktorbenei](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.bitrise.io/viktorbenei/32/18_2.png) [@viktorbenei](https://discuss.bitrise.io/u/viktorbenei)\
**Post date:** [February 1, 2018, 12:58pm UTC](https://discuss.bitrise.io/t/building-ios-frameworks-using-bitrise/3987/3 "2018-02-01T12:58:16Z")

</div>

Hi @quoc_axiadids,

What command / step did you try to build the framework with?

---

<div class="post-metadata">

**Author:** ![quoc\_axiadids](https://avatars.discourse-cdn.com/v4/letter/q/e480ec/32.png) [@quoc\_axiadids](https://discuss.bitrise.io/u/quoc_axiadids)\
**Post date:** [February 1, 2018, 5:11pm UTC](https://discuss.bitrise.io/t/building-ios-frameworks-using-bitrise/3987/4 "2018-02-01T17:11:52Z")

</div>

Hello @viktorbenei,

I am using the same default commands in the bitrise run

xcodebuild -project project -scheme scheme archive -archivePath archicePath | xcpretty

---

<div class="post-metadata">

**Author:** ![quoc\_axiadids](https://avatars.discourse-cdn.com/v4/letter/q/e480ec/32.png) [@quoc\_axiadids](https://discuss.bitrise.io/u/quoc_axiadids)\
**Post date:** [February 2, 2018, 9:03am UTC](https://discuss.bitrise.io/t/building-ios-frameworks-using-bitrise/3987/5 "2018-02-02T09:03:32Z")

</div>

@viktorbenei,

I changed the command to this…

> xcodebuild \  
> -project \  
> -target \  
> -scheme \  
> -sdk iphoneos

This builds a successful framework on my local machine in

> /Users/\*/Library/Developer/Xcode/DerivedData/ … / \*.framework

But how would I create this command in the workflow?  
I can create a script with the working command, then zip the framework file to $BITRISE\_DEPLOY\_DIR, but it does not create an installer page.  
However; is there a workflow step available that can build the framework, and have it publicly accessible via the installer page?

---

<div class="post-metadata">

**Author:** ![viktorbenei](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.bitrise.io/viktorbenei/32/18_2.png) [@viktorbenei](https://discuss.bitrise.io/u/viktorbenei)\
**Post date:** [February 2, 2018, 9:41am UTC](https://discuss.bitrise.io/t/building-ios-frameworks-using-bitrise/3987/6 "2018-02-02T09:41:00Z")

</div>

> [@quoc\_axiadids](#):
>
> I can create a script with the working command, then zip the framework file to $BITRISE\_DEPLOY\_DIR

Indeed that’s our current recommendation. If you have some time feel free to create a Step for that, it’s quite simple to turn a Script into a step! 😉 [http://devcenter.bitrise.io/bitrise-cli/create-your-own-step/](http://devcenter.bitrise.io/bitrise-cli/create-your-own-step/)

> [@quoc\_axiadids](#):
>
> but it does not create an installer page.

Public Install Pages are only available for .ipa and .apk files right now, so it’s not possible to have one for the framework. Of course that page is a public **install** page and you can’t install a framework, so it kind of make sense I guess 😃

You can of course access any of the attached files on the build’s page, in the **Apps & Artifacts** section/tab:

 ![Screen_Shot_2018-02-01_at_15_35_58](https://us1.discourse-cdn.com/flex016/uploads/bitrise/original/2X/5/5a147e9cbf168084d1f4ef04df4ac938e7ffe05b.png)

it’s just the public install page which is not available for other types of files / artifacts.

---

<div class="post-metadata">

**Author:** ![quoc\_axiadids](https://avatars.discourse-cdn.com/v4/letter/q/e480ec/32.png) [@quoc\_axiadids](https://discuss.bitrise.io/u/quoc_axiadids)\
**Post date:** [February 2, 2018, 7:29pm UTC](https://discuss.bitrise.io/t/building-ios-frameworks-using-bitrise/3987/7 "2018-02-02T19:29:54Z")

</div>

Thank you @viktorbenei!

Are there plans in the woodwork to be able to retrieve access to these downloadable links?

I wanted to download the artifact from a different bitrise project that depends on the framework.  
These different bitrise project would be triggered with a cURL request with the link to the framework as an added environment variable. Then it would be downloaded via wget.

---

<div class="post-metadata">

**Author:** ![viktorbenei](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.bitrise.io/viktorbenei/32/18_2.png) [@viktorbenei](https://discuss.bitrise.io/u/viktorbenei)\
**Post date:** [February 3, 2018, 1:03pm UTC](https://discuss.bitrise.io/t/building-ios-frameworks-using-bitrise/3987/8 "2018-02-03T13:03:20Z")

</div>

Use can use the API to fetch artifacts: [http://devcenter.bitrise.io/api/v0.1/#get-appsapp-slugbuildsbuild-slugartifacts](http://devcenter.bitrise.io/api/v0.1/#get-appsapp-slugbuildsbuild-slugartifacts)

---

<div class="post-metadata">

**Author:** ![igor.asharenkov](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.bitrise.io/igor.asharenkov/32/1973_2.png) [@igor.asharenkov](https://discuss.bitrise.io/u/igor.asharenkov)\
**Post date:** [February 6, 2018, 1:41pm UTC](https://discuss.bitrise.io/t/building-ios-frameworks-using-bitrise/3987/9 "2018-02-06T13:41:22Z")

</div>

We’re also using Bitrise for iOS framework development and ended with following script (building fat binary btw, with slices for x86 and arm):

> <https://gist.github.com/deszip/e303f9e0b37b8539aba91f6c0dfac57e>

We also have some apps used for framework testing and we just added script steps after the build where we push framework to the apps repos. This triggers webhooks for them, also on Bitrise.

Hope this helps.

---

<div class="post-metadata">

**Author:** ![viktorbenei](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.bitrise.io/viktorbenei/32/18_2.png) [@viktorbenei](https://discuss.bitrise.io/u/viktorbenei)\
**Post date:** [February 8, 2018, 4:26pm UTC](https://discuss.bitrise.io/t/building-ios-frameworks-using-bitrise/3987/10 "2018-02-08T16:26:45Z")

</div>

Thanks @igor.asharenkov for sharing! 😉
