简体   繁体   中英

dyld: warning: What is this error?

dyld: warning: could not load inserted library '/usr/local/lib/dgagent/libpreload.dylib' because no suitable image found.  Did find:
/usr/local/lib/dgagent/libpreload.dylib: mach-o, but not built for iOS simulator

I get this output to the console log as soon as I try to build and run my app on Xcode 8.

This does not happen when I run the same app using Xcode 7. The app is fine and there are no complaints. The app is using Swift 2.3 (legacy is set to yes in Xcode 8). This is frustrating because I need to test my app on the iOS 10 simulator because on my device the app isn't working properly on iOS 10 (works on iOS 9.3.5)

I know the original question is quite old, but I hit the same kind of error today and noticed the OP is also blighted with the Digital Guardian (dgagent) "security" software. DG replaces various system libraries with "secure" versions that cripple the OS to enforce corporate policies about file accesses, block web sites etc. For me, the libpreload.dynlib was replaced by DG and when a new DG version got installed by IT, it only had 64-bit versions of the libraries, not 32-bit, and some old 32-bit apps like Exceed stopped working.

The very first paragraph in the Xcode 8 release notes tells you:

The version of Swift 2 (2.3) used in Xcode 8 is very close to the version used in Xcode 7.3.1. However, it has been updated for the newer SDKs, and therefore is not compatible with Swift frameworks compiled in Xcode 7.3.1.

(My italics.)

I don't know the exact reason but I got this error when I renamed my older version of Xcode from Xcode to Xcode8.2 thinking it would be easier for me to manage the different versions. I renamed it back to Xcode and opened Settings > Locations and re-picked the corresponding Command Line Tools for Xcode 8.2 and the warning disappeared.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM