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:
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