0

I went though on this tutorial to link my Cocoa Touch Framework to my app.

It works for iOS device but not for simulator. Why? I get a lot of linking error when simulator build product was added, but it works when iOS device build product is added.

enter image description here

János
  • 32,867
  • 38
  • 193
  • 353

2 Answers2

1

OP has the problem with Derived Data folder. If someone still gets this error even by cleaning up Derived Data, keep reading

You are getting this error because the framework isn't compiled for i386 architecture(architecture for simulator).

You need to compile two different frameworks. One for the simulator and one for the devices.

However, there is way to create a Universal Framework(which works for both) but you need to do a little work for that.

Here is a link to the tutorial :

https://medium.com/@syshen/create-an-ios-universal-framework-148eb130a46c

or this :

Xcode 6 iOS Creating a Cocoa Touch Framework - Architectures issues

Community
  • 1
  • 1
Vinay Jain
  • 1,653
  • 20
  • 28
1

Finally the fix was to clear the ~/Library/Developer/Xcode/DerivedData folder? Clean then build. I am sure I pressed CMD + K and SHIFT + ALT + CMD + K previously, but it seems it was not enough. Now I can run in simulator.

check comments

János
  • 32,867
  • 38
  • 193
  • 353