20

When I run the app in Xcode IOS 6 beta 2 firmware on the device 8 Beta 2, I get the error message: "dyld: could not load inserted library '/ USR / Library / libgmalloc.dylib", because the image was not found. "

What could be the problem?

7 Answers 7

49

Disable "Enable guard Malloc" from diagnostics to run app in device.

6
  • This fixed it for me.
    – olynoise
    Jun 11, 2015 at 22:21
  • I cannot debug the guard malloc in device?
    – madlymad
    Feb 2, 2016 at 8:49
  • Thats y i have answered, disable guard malloc Feb 3, 2016 at 9:25
  • 1
    this worked for me, in ios 10.3, swift 3.1 and xcode 8.3
    – Julio_oa
    Apr 19, 2017 at 0:47
  • Hm, but I actually enabled this myself to guard malloc on the device, and then started getting this error. So, I guess no luck, cannot fully debug on real device which is a shame because I need to debug my Bluetooth code, which is not available in emulator. May 25, 2017 at 14:30
2

This is because Xcode mount wrong DeveloperImage. If you open the Settings-> Developer you will see that the "Enable UIAutomation» and others are missing.

For fix:

  1. move all folders from "/Applications/Xcode6-Beta2.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport" except "8.0 (12A4297e)" to safe place
  2. reboot the phone
  3. connect your phone to xCode 6 beta 2
  4. restore folders in DeviceSupport

This is the only thing that helped me. Even re-flashing on ios8 beta2 does not helps.

4
  • 2
    Modifying the contents of Xcode itself is nearly always the wrong thing to do. I wouldn't recommend doing that.
    – clarkcox3
    Jul 3, 2014 at 22:50
  • I did not have to copy any folders anywhere, but rebooting the phone was mandatory. This helped, thanks!
    – Legoless
    Jul 28, 2014 at 7:46
  • Here is a theory why this happens: devforums.apple.com/message/1000609#1000609
    – hashier
    Aug 5, 2014 at 8:40
  • This actually worked for me on Xcode 9 beta 4, thanks! Aug 3, 2017 at 16:58
0

If you're using any 3rd party IDEs for iOS development (e.g. RubyMotion) you should be able to fix this by rebooting your device without that 3rd party IDE running and building and running an app on your device from Xcode.

1
  • I don't use any 3rd party IDEs.
    – Fanruten
    Jul 4, 2014 at 8:26
0

I've been seeing this on Xcode 7.1. My quick and dirty solution has been to open the right sidebar of the playground, and toggle the platform setting under "Playground Settings".

In my case, I toggled from iOS to OS X and viola, playground compiles and runs as expected.

Reboots had no effect in my case.

0

Just restart your iPhone. It worked for me.

0

Disable "Enable guard Malloc" from diagnostics to run app in device. Edit Scheme step - 1 enter image description here

Step 2: enter image description here you can see Memory Management Uncheck Guard Malloc

-2

Try deleting the app from the device and then reboot. Worked for me.

Your Answer

Reminder: Answers generated by Artificial Intelligence tools are not allowed on Stack Overflow. Learn more

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.