1

I am struggling with a problem while using Gitlab CI/CD. I am using for my project two of my external frameworks. The project builds without errors but when running the pipeline I'm getting an error that says

This Copy Files build phase contains a reference to a missing file 'xxxxxx.framework'.

My project looks like bellow

enter image description here

This is en error I'm getting:

enter image description here

When I add framework file not the framework project then CI/CD will pass BUT then I'm getting the error when trying to archive project

Building for iOS, but the linked framework 'xxxxxx.framework' was built for iOS Simulator.

I don't know how to solve those problems to get everything work.

Thanks for any kind of help. Regards

Matt199
  • 264
  • 2
  • 18

2 Answers2

2

In case anyone is having this problem and is cloning a git repository that has submodules, be sure include the submodules when cloning.

Juan
  • 147
  • 3
  • 6
0

Most probably what you will need out of these 2 options is to use the x.framework one. The error

Building for iOS, but the linked framework 'xxxxxx.framework' was built for iOS Simulator.

as it says, comes from the fact that the framework is only built for iOS Simulator.

Why is that?

Well, the iOS Simulator runs on x86_64 architecture (as OS X does), while iOS runs on arm architecture. So you'll have to compile the frameworks for both architectures. Fortunately, there is a way to do this, and basically what you need to achieve is to create a fat binary of the framework.

There is a script here from Sundeep Gupta https://gist.github.com/sundeepgupta/3ad9c6106e2cd9f51c68cf9f475191fa which can be used to compile the frameworks for both, iOS Simulator and iOS target architectures. There are also several different resources on the internet which explain what steps you need to make in order to create fat binaries.

Vlad Rusu
  • 1,414
  • 12
  • 17