5

I built a framework as generic iOS device and imported it on Xcode. Everything works fine when I select my physical iPhone 7 as device, however, when I choose simulator, the classes are not find and I cannot compile the framework (even auto complete doesn't work).

Do you have any ideas why?

(btw: the framework I'm using is chart-ios. I did a tiny change to it and wanted to compile it again).

Pascal
  • 2,590
  • 3
  • 21
  • 46
  • 1
    Possible duplicate of [iOS9: Using dynamic framework with Simulator and Device](https://stackoverflow.com/questions/35871571/ios9-using-dynamic-framework-with-simulator-and-device) – Andreas Oetjen Nov 07 '17 at 08:58
  • 2
    This is exactly what you are looking for: https://stackoverflow.com/questions/39890114/creating-a-universal-framework-using-xcode-8/39895873#39895873 You need a binary that has x86_64 i386 armv7 arm64 architectures. In order to achieve that you need to first generate a build using simulator and then using a generic device. Finally you need to merge them into one binary using lipo. It is all explained on the link I shared before. – iOSAddicted Jan 27 '18 at 02:01

1 Answers1

1

simulator runs on i386 architecture. If you compile your static libraries for i386 as well you will be able to use them on the simulator.

Try adding "i386" to the "Valid Architectures"

Kadian
  • 644
  • 4
  • 6