Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xcode Simulator - CyMemDef.dylib: mach-o, but not built for iOS simulator

Tags:

xcode

ios

I am working on a new Macbook and just downloaded and installed Xcode with developer tools.

I have create a brand new project in Xcode (no modification or adding framework / pods). I am trying to run the same on simulator. When I do, my app crashes with "SIGABRT". The log shows the following message:

dyld: Library not loaded: /Library/Application Support/Cylance/Desktop/CyMemDef.dylib
Referenced from: /Users/me/Library/Developer/CoreSimulator/Devices/80FC5E5D-2979-48C9-94F6-6C6D2A8073E6/data/Containers/Bundle/Application/B438FB0C-79A7-445E-B381-5D7E9247623B/demo.app/demo
Reason: no suitable image found.  Did find:
/Library/Application Support/Cylance/Desktop/CyMemDef.dylib: mach-o, but not built for iOS simulator
like image 702
Vishal Aggarwal IndieGameTalks Avatar asked Nov 02 '18 07:11

Vishal Aggarwal IndieGameTalks


1 Answers

Had similar trouble with CryptoKit, which was available only in iOS 13 and higher (while project was targeted iOS 9.3). It appeared that CryptoKit was not marked as weak for some reason. Adding -weak_framework CryptoKit into target's Build Settings > Other Linker Flags solved the problem for me:

enter image description here

like image 166
Vitalii Avatar answered Oct 05 '22 23:10

Vitalii