Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xcode error - dyld: Library not loaded won't resolve

Okay so for whatever reason I decide to send a app to my phone directly via xCode, it always crashes regardless. It doesn't matter if the app is new or old, I have tried everything and the app always crashes on my physical device.

If I run it on an emulator it works great though and there are no issues!

dyld: Library not loaded: @rpath/PINCache.framework/PINCache
  Referenced from: /private/var/containers/Bundle/Application/8B72BB38-CAF7-4C05-B9BF-A197463C88B4/Truth or Dare.app/Truth or Dare
  Reason: no suitable image found.  Did find:
    /private/var/containers/Bundle/Application/8B72BB38-CAF7-4C05-B9BF-A197463C88B4/Truth or Dare.app/Frameworks/PINCache.framework/PINCache: code signature invalid for '/private/var/containers/Bundle/Application/8B72BB38-CAF7-4C05-B9BF-A197463C88B4/Truth or Dare.app/Frameworks/PINCache.framework/PINCache'

    /private/var/containers/Bundle/Application/8B72BB38-CAF7-4C05-B9BF-A197463C88B4/Truth or Dare.app/Frameworks/PINCache.framework/PINCache: stat() failed with errno=25
    /private/var/containers/Bundle/Application/8B72BB38-CAF7-4C05-B9BF-A197463C88B4/Truth or Dare.app/Frameworks/PINCache.framework/PINCache: code signature invalid for '/private/var/containers/Bundle/Application/8B72BB38-CAF7-4C05-B9BF-A197463C88B4/Truth or Dare.app/Frameworks/PINCache.framework/PINCache'

    /private/var/containers/Bundle/Application/8B72BB38-CAF7-4C05-B9BF-A197463C88B4/Truth or Dare.app/Frameworks/PINCache.framework/PINCache: stat() failed with errno=1
    /private/var/containers/Bundle/Application/8B72BB38-CAF7-4C05-B9BF-A197463C88B4/Truth or Dare.app/Frameworks/PINCache.framework/PINCache: code signature invalid for '/private/var/containers/Bundle/Application/8B72BB38-CAF7-4C05-B9BF-A197463C88B4/Truth or Dare.app/Frameworks/PINCache.framework/PINCache'

    /private/var/containers/Bundle/Application/8B72BB38-CAF7-4C05-B9BF-A197463C88B4/Truth or Dare.app/Frameworks/PINCache.framework/PINCache: stat() failed with errno=1
(lldb) 

Update: I have scoured the whole internet and there is not a single answer has worked.

I have tried setting the Embed setting in Build Settings to YES

I have tried a project rebuild

I have tried making a new user account

I have tried cleaning out the provisioning profiles in my keychain and on my device

I have tried to restart both the MacBook and my iDevice.

I have tried a whole new project.

like image 912
Dustin Palmatier Avatar asked Nov 06 '22 12:11

Dustin Palmatier


1 Answers

Problem Solved The problem with nothing to do with something I did or could’ve controlled, needless to say that I recoded the whole app from scratch for nothing, even though I like it a whole lot better now.

The problem was the version of iOS I was running. I had used a Beta version of iOS (iOS 13.3 Beta 3) and this had for some reason been conflicting with the DeviceSupport folder I added to Xcode and wasn’t working properly.

If you are here because you are having the same issue, follow the following steps!

Method 1: Clean your build - Open the damaged project - CMD + SHIFT + K - CMD + B

Method 2: Reset Keychain to Default *• THIS WILL RESET YOUR KEYCHAIN • - Open Keychain Access - Select Keychain Access > Preferences - Select General - Select Reset My Default Keychain

Method 3: Reset Certificates on Device - Open Xcode - Connect affected iDevice - Press CMD + Shift + 2 - Right Click Device - Select View Provisioning Profiles - Delete any profiles that pertain to your app

Method 4: Reinstall the latest supported version of iOS If you haven’t installed any beta versions of iOS, you can ignore this - Back up your device in case anything goes wrong! - Go download the latest stage version of iOS that in the form of IPSW and is signed - Connect iDevice to computer - Select Restore while pressing (SHIFT/CMD) and then select the downloaded IPSW file and wait.

like image 131
Dustin Palmatier Avatar answered Nov 14 '22 22:11

Dustin Palmatier