Reputation: 443
I'm trying to create a SceneKit scene. I can create it, and edit it, but the moment I try to save it I get the error "The document “SceneKit Scene.scn” could not be saved.".
.scn
I try to create, regardless of project (including brand new projects with no changes other than adding this .scn
), and does so regardless of what changes (if any) I've made to the Scene (even no changes at all gives this message).scn
file can be opened separately to the project, but again, it cannot be saved.scn
files as far as I can see (definitely doesn't affect .swift
, .storyboard
or .metal
files).scn
I can't write tols -l
shows staff
, as does Preferences.app > Users & Groups > [right click on my account] > Advanced Options… > Group:)diskutil resetUserPermissions / `id -u`
as suggested by @JeremyP)
didn't help.commit
, pull
, or push
Why is Xcode failing to save .scn
, all the .scn
, and nothing but the .scn
?
Upvotes: 7
Views: 1828
Reputation: 3439
I had the same issue, I fixed my problem by a simple workaround.
You can select your objects in dae file in Xcode editor and hit command + c
and create a new .scn file in Xcode and paste them using command + v
there!
Upvotes: 0
Reputation: 2862
Its a bug, all you have to do is rename the file in Xcode in the scene editor (on the left hand side where all the files are), mine is "ship.scn" - just rename it to whatever, hit enter. Then you can save. Hit save as. Rename back to original name and save.
Upvotes: 1
Reputation: 380
I had a similar issue with playgrounds failing to save, and repeated messages that the file could not be unlocked. I finally solved it by enabling full disk access for Xcode under security and privacy settings.
Upvotes: 0
Reputation: 87
I had same problem but I manage to solve it. Now I can save .scn file no matter where project located. Before I solve problem I have to move my project under User's home directory in order to make it work.
kosua20 point out that "It seems that when creating or importing a .scn file it propagated the user/group and that caused the save to fail"
I create a project name Test under my another partition. When I open it and try to save it I got this message. You can see Test project is under BOOTCAMP while Macintosh HD has my OS and user home
Check your project's group permission and then check if account is in that group, if not then you can either change your account's primary group which I don't recommend or you can use chgrp command to make change to project folder in Terminal. After all this you still have problem then I have no idea.
Hope this help.
Upvotes: 2
Reputation: 399
had the same issue in Xcode 10.2.1. I solved it by changed the location of project or you can create a project in different location.(In my case I synced with iCloud my desktop and documents that may be a problem) now I have created project in different location.
Upvotes: 0
Reputation: 86651
I had the same issue. Changing permissions did not work. Changing the group did not work. Exporting the scene did not work. In the end I tried the solution suggested here:
https://support.apple.com/en-us/HT203538
Actually, I skipped all the way to step 7 and I haven't done steps 8 and 9 yet, but this fixed the issue for me:
diskutil resetUserPermissions / `id -u`
Just run the above in a terminal session. Note that I am logged in as an admin user. That might make a difference.
Upvotes: 3
Reputation: 103
Had the same issue with .scn files and Xcode 10. I solved it exporting the .scn file (File > Export... ) and adding it to the project again. Not a great solution but it works.
Upvotes: 2
Reputation: 36
I've had the same issue with Xcode 10.1. The project was not stored in my home directory hierarchy, and it was assigned to the admin group instead of staff. It seems that when creating or importing a .scn
file it propagated the user/group and that caused the save to fail. What solved it was to make sure that the .scn
file and the whole Xcode project were owned by my user and in the staff group.
Upvotes: 1
Reputation: 11
Had the same issue with scn files not being able to be saved. In my case the project was saved in another disk and moving it to the main disk resolved it.
Upvotes: 1