Xcode error when running on device: “Could not allocate a resource”

前端 未结 1 782
北海茫月
北海茫月 2021-01-02 15:45

I\'m getting the error \"Could not allocate a resource\" when I try to run on any of my devices. I\'ve seen this as a possible fix:

sudo rm -rf /var/db/lock         


        
相关标签:
1条回答
  • 2021-01-02 16:38

    After you delete that folder, you need to recreate again and make proper permissions, because iTunes need rw rights to that folder:

       sudo mkdir /var/db/lockdown
       sudo chmod go+w  /var/db/lockdown
    

    without having iTunes open. Then everything should be fine. Also keep in mind the same operation may be required for /private/var/db/lockdown [a mirror]

    If you moved and old Mac to a new one, make sure /var/db/lockdown/SystemConfiguration.plist contains your mac actual UUID . Generally it is not recommended to delete a system folder, anyway, without really knowing what you do. ;) Actually I replicated your problem moving /var/db/lockdown to another location, starting iTunes, getting error. Then recreate etc.

    0 讨论(0)
提交回复
热议问题