今是昨非

今是昨非

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

Solution for iOS SDK not supporting simulator

Background#

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

Solution#

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

Enterprise WeChat 20211227-104101.png

Next, in your project, add the following code to include the corresponding SDK header file and to use SDK methods:


#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.