skip to Main Content

I’m trying to run SceneKit in Xcode, but when I connect my physical device (iPhone 11) the import of SceneKit fails and the following error occurs: "Cannot load underlying module for ‘SceneKit’". Can anybody give me a hint how to fix that? Import of UIKit and ARKit seems to work normally, and even SceneKit before connection to physical device worked.

  • HW: MacBook Air M1 2020

  • OS: macOS Ventura Version 13.3.1 (a) (22E772610a)

  • Xcode: Version 14.3 (14E222b)

connected with

  • iPhone 11

  • iOS-Version: 16.4.1 (a)

Already tried to reset the path to command-line tools via sudo xcode-select --reset and sudo xcode-select -switch /Library/Developer/CommandLineTools and also tried to delete all files in "DerivedData" but even after restart and rebuild no progress.

Thanks!

2

Answers


  1. I had the same issue with SpriteKit module.
    I tried a lot of troubleshooting solutions like:

    • Cleaning the Build folder;
    • Restarting Xcode;
    • Reinstalling Xcode (!);
    • Deleting contents of Xcode’s Derived Data folder.

    Nothing worked πŸ˜• But I believe I found the solution! ☺️

    Here’s the fix that worked for me:
    Simply delete Xcode cached data.

    To delete Xcode cached data:

    1. Close Xcode;
    2. Open System Preferences on you Mac;
    3. Go to General tab and select Storage section;
    4. Locate Developer section (the system might take few moments to calculate the size of the files on the drive);
    5. Press on ‘i’ icon next to Developer section;
    6. Under "Xcode Project Build Files" locate cache list item (I already deleted it, so I don’t remember the original name πŸ˜‹ )
    7. Delete the cache and wait for the deletion process to complete;
    8. Open Xcode. You’re good to go!

    This worked for me.

    Login or Signup to reply.
  2. I fixed this issue by deleting Derived Data.

    1. Xcode -> Settings
    2. Press arrow button near Derived Data -> it will open folder where Derived Data is located
    3. Close Xcode
    4. Remove all files in Derived Data folder

    That’s it!

    Xcode -> Settings

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search