今是昨非

今是昨非

日出江花红胜火,春来江水绿如蓝

iOS SDK does not support simulator solution.

title: Solution for iOS SDK Not Supporting Simulator
tags:
- Technology
- iOS
date: 2021-12-27 10:25#

Background#

Third-party iOS SDKs do not support simulators and display an error message: "building for ios simulator, but the linked framework ''xxx (e.g., IDLFaceSDK.framework)" was built for iOS.".

Solution#

First, go to Target -> Build Settings -> Excluded Source FileNames -> Debug and add a line. Note that the key should be selected as Any iOS Simulator SDK, and in the value, add the directory of the SDK mentioned in the error message. Here is an example:

Enterprise WeChat 20211227-104101.png

Next, in the project, add the following code to the places where the corresponding SDK header files are referenced and SDK methods are used:


#if !(TARGET_IPHONE_SIMULATOR)

#import <xxx/xxx.h>

#endif


#if !(TARGET_IPHONE_SIMULATOR)

[xxx share].yyy = xxx;

#endif

Loading...
Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.