How to build and upload to bitrise a framework

We have a project that consists of an iOS app and a bunch of frameworks we want to build and distribute together with the app.
How can I tell bitrise to store the generated frameworks together with the generated .ipa?

1 Like

Hi @FWFabio,

If you have a Deploy to Bitrise.io step in your workflow with its default configs, then all you have to do is move your framework files into $BITRISE_DEPLOY_DIR (the default directory deployed by the step).

You can of course add as many Deploy steps as you want to, and set which one should deploy what, but it’s usually easier to move the files into the deploy dir and have a single deploy step.

For more advanced configs & tips see the docs at: http://devcenter.bitrise.io/tips-and-tricks/attach-any-file-to-build/

Note: the Deploy to Bitrise.io by default does not deploy from sub directories, it’s not recursive! It deploys every file from the deploy dir but not from dirs under that dir! More info: http://devcenter.bitrise.io/tips-and-tricks/attach-any-file-to-build/#deploy-a-directory

If you have any questions just let us know! :wink:

Thanks Viktor,
I have just another problem. How do I know where my frameworks are? As far as I remember they are copied to the intermediates directory under derived data. How can I know what the derived data folder is on bitrise?

Depends on your project, probably a find inside DerivedData can help. There’s no “canonical” path unfortunately.

How do I know the path to derivedData? I think I can find my way from there.

cd $HOME
find . -name 'DerivedData'

./Library/Developer/Xcode/DerivedData

So it’s at $HOME/Library/Developer/Xcode/DerivedData (same as on your Mac).

Note: this is the default location of DerivedData, it can be changed with Xcode project settings. If you did change that then it will be located at the path you specified. But for a fresh Xcode project, where DerivedData is not changed, this is the path.