Cannot add model version xcode 7.3 - ios

I've added new model version before in this project but for some reason I cannot add them now. When I right click on ****.xcdatamodeld and select "Add model version" from Editor menu. New version is showing up in Finder when I click "Show in Finder" but not under ****.xcdatamodeld nor in File Inspector??? I cannot add them manually under ****.xcdatamodeld as well.
I've added Apple Watch support in my project recently, in case if this information helps.

To be honest, I don't think I found a satisfactory answer but a few workarounds to what I think is a bug.
A solution here refers to incorrect directory structure, I did not give this a try as the xCode versions seem quite old but maybe it might help you: Issues with directory structure
This seems like a hack which worked for some, even in xCode 7.2
While none of these options worked for me, even quitting xCode, restarting Mac, I just had the beta 7.1 lying around, adding a new version worked perfectly and then I switched back to 7.3 to continue the rest.

To be honest, I don't think I found a satisfactory answer but a it solved my problem.i created a new project, in that project I did my model versioning(in latest xcode) and copied that model object in to my project.It works well.

Having just experienced watching nothing happen after selecting Add Model Version, I quickly found (stumbled upon) a solution that works. Credit goes to Shawn's hack link, in which Mundi points to the xcdatamodels.
Alt-select an xcdatamodel and then Show in Finder
Quit Xcode
In the Finder folder with all the versions, I found one version already existed (but wasn't showing in Xcode) with the version I had tried to make several times.
Delete this imposter!
Open Xcode and try Add Model Version
The new version was added.

Related

Xcode 7.3.1 autocomplete code completion not working

Ever since Xcode 7.3 the autocompletion or code completion doesn't work properly.
I have tried:
Deleting Derived Data folder
Clean Targets and Build
Reinstalling Xcode
It does autocomplete after you type it out fully the first time. But if you haven't referenced it once (i.e. like enums) it only shows what you typed out before (not showing full list of enums). Pressing escape doesn't help either.
Any other suggestions? Or anyone else experiencing the same?
Without doing anything, In Build-Settings -> Deployment changing iOS Deployment target from 8.0 to 8.1 resolved the issue for me.
It also works for XCode 6 as mentioned here
Also works on Xcode 8, Simply change the deployment target from iOS 9.0 to iOS 9.1.
Xcode 8 has now fixed this very annoying autocomplete issue. So anyone who is still having this problem, update to Xcode 8.
Edit: Please note, this has not solved for others. So your milage may vary. For me, it has fixed without doing anything extra. But they are using their new 'intelligent' autocomplete. Thinking about it, it could be part of the indexing. Deleting the DerivedData folder could help.
Perhaps, this answer is too late, I'll share it anyway.
First of all, I've uninstalled Alcatraz and all plugins.
Second, I've followed ElonChan's instructions explained on:
Xcode 7.3 autocomplete issues
As a result, autocompletion automagically got back! Thanks #ElonChan.
I hope this answer also solves your problem.
This Happen usually when you are using core Data in your project.(because of automatic indexing of files by xcode not been done) The simple way to avoid this thing is that just click to your project name and clean project come back the same file where you wanna see suggestions type any word and thats it.
There is a way to set shortcut keys for code completion. Xcode -> Preferences -> Key Bindings -> find Show Completions and set whatever non-duplicate keys you want.

XCode - Command /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc failed with exit code 1

Lately I've started to take up a course for learning swift to devolp iOS OS X and Watch OS apps. I'm taking this course on udacity. The first step is to download a project and put it in a folder on your desktop. I had to open the app and then run it, which should've worked. But not for me somehow. I hit run and the following error showed up (this is the complete error log):
Some poeple suggested that I should update my XCode but I already have. I currently have XCode 7.3! I'm quite new to this platform, that's also why I'm doing this course, so I don't really know what I have to do. Can someone please tell me what's going on here?
This is the result of a corrupted swift class. If you encounter a class looking similar to the following code:
Ôæ≠fiÔæ≠fiqcaJÔæ≠fihJ0ç硡ˇ2ç硡ˇ$5y$ġˇˇ% 7.ġˇˇÔæ≠fiÔæ≠fiP‚—ġˇˇfl‚ġˇˇ ˗ġˇˇ∞B‚ġˇˇÄ+€
Try to re-create the class or re-download it. This solved my problem and to me, it would look like the only solution possible for a corrupted class.
Delete derived data.
Windows->Projects->select your project and delete derived data
This worked for me for couple of projects which i downloaded from internet.
I do everything restarts Xcode, rebuild Project, adding toolChains lock unlock them,
so there are two possibilities
first, maybe you install the beta version of Xcode
or try this, this work for me->
I tried to run a project in Xcode12/Swift4, while the project was written on Xcode8/Swift3
so I install Xcode version 11.7 and run this work for me.
if you not done with 11.7 then install another version of Xcode and try the appreciated version
May this help you

Xcode stalls on "loading" when trying to create new project

Xcode 6 never gets past "Loading" when I try to create a new project. I actually was able to create a new project yesterday, but I decided to just ditch it completely (deleted). Clearly there must be a bad file somewhere, possibly related to the project I deleted, since I also see the same stalling behavior now with Xcode 5.1, which has worked fine for creating new projects in the past. Xcode 6 has worked fine when starting with an already existing project and still appears to do so. I did not see this exact problem in your data base, though one person saw the project creation freeze before reaching the stage I get to. Their solution was to delete Xcode and every possible file related to it, which I'm a little squeamish about, since I don't want to affect existing projects, and don't have an understanding of what the various files are for.
Deleting the DerivedData of Xcode should fix the issue. You can do this by heading to ~/Library/Developer/XCode/DerivedData (with a Finder window open press cmd+G) and deleting all the subfolders of it.
This is embarrassing, but if it could happen to me, maybe it could happen to someone else. The problem was that the window that came up after the second step in defining the type of project to be created, the one in which you choose where to save the project's files, extended off the bottom of the screen, so that only the very tops of the buttons were visible. Eventually, I realized the one to the far right might be the one to click to continue. Which it was. Feel free to delete this question.

Compilation failed for data model at path - xcode 6

In one of my project, I am using CoreData to store all local data and it was working absolutely fine till xcode 5.1.1. But with the upgrade to xcode 6, I started getting compilation error. The error looks like this:
/Users//Desktop/test/test/test.xcdatamodeld: Compilation failed
for data model at path
'/Users//Library/Developer/Xcode/DerivedData/test-bheksmasmjewxsejmxeyasvvhrer/Build/Products/Debug-iphonesimulator/test.app/test.momd/test.mom'
I tried searching SO for the issue, found some suggestions and implemented them in my project as well. But none of the suggestions worked for me and am left wondering "what the h**l this issue is. Any hint/suggestion/solution will be a great help right now.
Thanks
Not sure if you ever resolved this issue, but I had the same issue after I erroneously versioned my data model. I found the steps below fixed my issue:
In Xcode locate your .xcdatamodeld file then click "Show in Finder" and delete the .xcdatamodel file that was not previously visible in Xcode or that was erroneously versioned.
Hope this helps you in some way, if you are still looking for answers.

Extension project templates not appearing in Xcode 6

I'm not sure if I am the only one experiencing this program, but I have tried searching and have not been able to find anyone in my current situation. I downloaded Xcode 6 beta and was interested in Extension programming for iOS 8. However, I have been unable to locate the extensions in my project templates when creating a new project in Xcode, I saw a YouTube video (unrelated to extension programming) but I did notice that the option was not there for the said video. Now, I have had a look through the contents of the Xcode 6 beta package and have been able to locate the actual templates themselves, so I have no doubt they are present, it just seems that they are not actually being loaded.
For the record, I also downloaded some example custom keyboard code from GitHub in order to see whether Xcode will recognise it and it does, going as far as actually displaying the 'E' icon beside the build target. I should also mention that I do have a build of Xcode 5 also present on my machine.
Is anyone else experiencing this issue, or does anyone know how to overcome it?
Thanks
You create a extension by creating a new target in an existing project.
Check this link for more information
I had the same problem. The solution was to not try to add the extension in File/new/File... menu but in File/new/Target... menu.
You can add extension to any existing project.

Resources