I have external closed library that can compile with armv7s (etc) only. when I try to compile against simulator obviously its not running and display some errors. I don't want to insert this library to my code unless I can configure Xcode to use this library only when i test with a device. unfortunately, i tried to do it with cocoapods with no success and i wonder if there any way to do it?
相关问题
- CALayer - backgroundColor flipped?
- Core Data lightweight migration crashes after App
- Core Data lightweight migration crashes after App
- How can I implement password recovery in an iPhone
- State preservation and restoration strategies with
相关文章
- 现在使用swift开发ios应用好还是swift?
- UITableView dragging distance with UIRefreshContro
- Could I create “Call” button in HTML 5 IPhone appl
- TCC __TCCAccessRequest_block_invoke
- Where does a host app handle NSExtensionContext#co
- xcode 4 garbage collection removed?
- Xcode: Is there a way to change line spacing (UI L
- Unable to process app at this time due to a genera
The reason is because the Library is missing the i386 (simulator) architecture slice, not a problem...
Now, when you use the "Sim" target... library and all related code will be excluded.
When you use the "Device" Target... the code and library will be included
Yes, this can be done. I had a similar problem with a framework that caused linker errors only in the simulator so I setup up my project to only use the framework when building for a device.
The following assumes you are not using cocoa pods to link the library. I'm not sure what would need to be changed if you are.
Now do a debug build.
The above change basically means that the library is linked in for all builds except for iOS Simulator builds.
You will probably also need to make some code changes. Any code making any reference to header files or other symbols from the library should be wrapped as follows:
Steps to avoid the simulator problem with static library without simulator architecture: