I’m trying to create an JSON file in xCode but somehow it makes an directory from it.
I create an empty file and name is: user.json.
When saving it turns into an directory (get’s that symbol ) and it is not possible to edit the file or creating any data in the file.
My xCode version is: 14.3.1.
App is for OSX / MacOS.
I’ll send an printscreen for showing the issue.
2
Answers
After searching some more i found the problem. The problem wasn't in xCode but on my iMac. The file extension json was connected to an wrong app. By connecting the json extension to Smart JSON Editor the problem was gone.
Thanks for your trying and help.
I can’t reproduce the problem from your description, but here’s the full set of steps that results in a new JSON file. My Xcode version is also 14.3.1.
Here’s a random sample project:
I right-click (or Command-click) on any folder and pick "New file…":
Then, pick the "Empty" option:
I enter your "user.json" name for the file:
And voi-la, the file is created and ready to be used. Xcode even recognizes it as a JSON file: