Create a framework in Swift for Device / Ios Simulator

2

Good afternoon, I have managed to generate a small example framework in swift but it only lets me run it if I deploy it in a Device, I have read that if you generate the framework with the selected simulator you could then execute that framework in a project in the simulator , the problem is that if I try to generate the framework for a simulator, the red name follows. I also take the opportunity to ask if there is no way to generate a framework that works for both Device and Simulator? Thanks

    
asked by Alejandro 21.03.2016 в 17:55
source

1 answer

0

If it is possible to generate the framework for both platforms with lipo is what I used before to have a "universal" framework the problem is that you can not use it when distributing the application, what I recommend is to use Cocoapods even if you are in an early development phase of the framework, you can keep everything local and make things much easier; of any to create a framework for all platforms you can run this script Universal Framework when you make a Archive of the framework

The script will create a Build folder inside the folder of your project, you may have to build the project with a selected simulator before doing Archive

    
answered by 29.06.2016 / 00:08
source