Using SpriteKit crashes Xcode 8, is there a way to resolve? - xcode

Whenever I try and add any SpriteKit elements to my project, Xcode crashes. The files are created but not added to the project and if adding them manually, it still crashes when trying to open them. After some searching it looks as though previous versions have suffered with the same issue. I had the same issue with 8 beta 6 too.
Is there anything I can do to help with the issue? I can't find anything on the most up to date version so I'm guessing it's either something I'm doing or a problem with my setup.

I've the same issue when I try to maintain 2 Xcode versions in the same system, it is possible but you should install them into separate directories, for example Xcode_731 and Xcode_8 (my actual version is 8A218a GM, I haven't any crash).
This should be unuseful without crashes, but try also to free some memory (quit also simulator app after your crash), in your terminal:
sudo purge

Related

How can I install Xcode 6 along side Xcode 5?

I was wondering if there is a way that I could install Xcode 6 along side Xcode 5. I've seen people say you could but they haven't really explained why. Can someone help to explain why? Also, how would you uninstall it if I wished to in the future?
It's simple. The Xcode 6 beta is named Xcode6-beta.app and you drag install it into /Applications. The GM version of Xcode is called Xcode.app. If you need to switch the command line tools you use xcode-select. Nothing has changed here. It's the same as it's been. When you want to "uninstall" it, drag it to the trash. It's that simple.
You can also change the default command line tools via GUI, if you prefer: XCode > Preferences > Locations, Dropdown "Command Line Tools"...
Attention, you can effectively install Xcode 6 and keep Xcode 5 but this is not working perfectly fine. For example this broke my Xcode 5 IOS6 simulators and I am now unable to run my apps on this old ios version (see here)
I didn't find any solution for now and there may be others problems, so be aware this operation is not without risks
You might be far better off creating a partition with OSX Yosemite and installing Beta Software there. I moved over my apps to the Yosemite partition and only the Xcode 6 Beta 4 ran them - yeah!
Here is where I will work with untested software.
Good luck!

Xcode uses 16 gigs of RAM in 2 minutes

I'm working on a big project and I have some serious problems with Xcode RAM management. In the informative app I'm working on I have over 90 UIVIewControllers on my storyboard. Once I open my project and go to my storyboard file (just changing labels, zooming in and out etc') it takes less than 2 minutes for Xcode to go from 400MB usage to 8 gigs.
This will only happen while I'm using the storyboard.
This never happened to me in other apps I've managed so I believe it got something to do with the size of this app.
The above was on a new MacBook Pro. To test things out I tested it on a Mac Pro with 16 gigs of RAM. First run, same issue. 16 Gigs of ram is used after less than 2 minutes.
Things I've tried:
Deleting DerivedData (the issue is on 2 different machines so it can't be it but tried it anyway)
Deleting project.xcworkspace
Read about stoping indexing BUT without autocomplete and quick help I'll have nothing to compile anyway
I'm using Xcode 4.6.3
sounds like it is a problem with that version of Xcode. I am using 4.6.3, and have never experienced this, (although the apps I work on are never that big). You should definitely try Xcode 5, even if you cant submit to the appstore, at least you'll be able to work on your app. Then you MIGHT be able to open it in version 4.6.3, and submit it from there, not quite sure it will work, but its worth a shot. Make sure you keep a copy of what you have so far incase your Xcode 5 version wont work in 4.6.3, so you dont loose your work. hope this helps.

Xamarin.iOS crash on 6.1 simulator

i recently received my Macbook and wanted to start developing iOS apps with it.
I Created a default Master-Detail App using the Templates in Xamarin.Studio and everything worked.
Now today i wanted to actually do something in the app, but didn't change a single line of code, still the app doesn't show up anymore in the simulator as long as i want it to use the 6.1 sdk for ios. if i use any other (6.0 etc) it works fine.
I already tried clearing my Cache in /Users/MYNAME/Library/Xamarin/ but this didn't change anything.
What would you suggest me to do now? can i simply reinstall the 6.1 sdk?if so, how would i do this?
Thanks for your help
I had a similar problem where the environment hang when I was trying to debug in the simulator (just showing the spinning ball). I found out that it only occured if I had my phone connected to the computer. Perhaps not valid in your case, but it might be a lead in your problem solving.
I'm using the latest version of everything. :)
From within Xamarin Studio (or MonoDevelop):
Project -> Your.Application.Name Options
Build -> iOS Build (iPhone Build in MonoDevelop)
SDK version: -> 6.1 (it's probably still on 6.0)
This fixed it for me. Also, it wouldn't hurt to make sure the target build in info.plist is set to 6.1.
Delete this folder:
/Users/[username]/Library/Application Support/iPhone Simulator/6.1
And if your Library folder is hidden:
sudo chflags nohidden ~/Library/
I have experienced this problem several times again and my previous answer doesn't solve it. Ya know what does? Rebooting the computer. Works every time. shrug
You need to fill the Application name, Identifier, Version # in the project setting.
I had the same problem and got it solved that way.

Xcode 4.4 - There was an internal API error

Hi I just upgraded to Mountain Lion. I created an empty Single View Application and run it. The first time it runs fine but the next runs will give me the "There was an internal API error" pop-up warning TWICE. It's the same with my other projects. They run okay once but gets this error the next runs. There was no warning or any specific warning message of any kind.
Any idea how to solve this?
Would really appreciate your help.
I have it working on iOS6 Beta 4!! This is what I did but other variations may also work:-
Install XCode 4.5 Developer Preview 4
Delete your app from the device
Run your app from Dev Preview 4
Delete your app again (not sure if you have to do this)
Return to XCode 4.4.1
Run your app, stop running, run again!!!
Of course you could continue developing in 4.5, but I prefer to wait.
Installing 4.5 Beta 4 installs updated device support. Once this is done once (possibly on any device) it should work fine. If you use the same device on a different machine you will have to again run it once from 4.5 Beta 4 before using your preferred version of Xcode (You do not need to delete the app from your device this time).
Edit: I am pretty sure that if you make a change to your core data you will need to run from 4.5 for the first time also.
Don't know if this helps, but I've deleted all files in ${HOME}/Library/Developer/Xcode/iOS DeviceSupport and it worked as a charm (Xcode 4.4.1, OSX 10.7)
I had this problem when I upgraded my device to Preview4 but had my MBP still running Xcode Preview3. Updating to Xcode Preview4 made the problem go away for me, no restarts necessary.
Deleting the app manually from the device/simulator will allow you to build and run successfully. A long term solution is to not use a Beta Xcode :)
Sounds crazy but you can also not use the Beta version of XCode 4.
However, you must keep it in your left hand to authorize your iPhone to compile with the non Beta version (don't ask me why, it works).
If you run your app with XCode 4.5 preview & IOS6 Beta 4, the second time you run your app on the device, you'll get the internal API error.
In theory, you cannot use XCode 4.4 to compile on your iOS6 Beta 4 iPhone.
But...
It seems that, if you launch XCode 4.5 Preview, connect your iPhone (so it is recognized), run the application on it (even if you get the error), quit XCode 4.5, launch XCode 4.4 and .. tadaaaa... your iPhone is now recognized as an authorized device to compile on...
And of course, XCode 4.4 doesn't generate the api error...
I have Xcode 5.0.2 and iPhone with iOS 7.0.6.
Every time when I launched my project on iPhone, I saw "There was an internal API error". And it was launched on simulator without any problems.
I did all the stuff that usually helps (like remove an app, clean, restart Xcode, restart a mac, etc.).
This problem went away only after I restored the iPhone. Sad but true.
I don't know so far, why it appeared.

XCode 3.2.4 iOS 4.1 (Final) and CoreData Crashes in Simulator

I've got 2 applications using Core Data with a sqlite persistent store. I've got a data loader routine that I run to populate the CoreData DB from csv files. During development, when my data changes I run the routine from the simulator to generate new databases and copy the new one into the project.
This has been working quite well for XCode 3.2.3 and iOS 4.0. It even works in the XCode 4 Preview 2 and 3. I just installed the final version of XCode 3.2.4 and iOS 4.1. Now my db loader fails. It gives me no message, no warning, no nothing. It just dumps out to the spring board and XCode gives me the "Debugging Terminated" message. It will fail at different times during the load so I'm pretty sure it's not a data issue. I'm not doing any threading. I assume the issue has to do with either Core Data or sqlite, since that's when the crash occurs, but with no info reported I can't tell for sure.
I uninstalled everything. Xcode 3.2.4, Xcode 4 preview (assuming it was an issue caused by XCode 4) and reinstalled XCode 3.2.3/iOS 4.0. Things returned to normal. After getting some work done I attempted to upgrade to 3.2.4/iOS 4.1 again. I uninstalled 3.2.3/iOS 4.0, rebooted. Installed 3.2.4/iOS 4.1, rebooted and tried again. No luck. Same hard crash. Same lack of messaging as to the cause.
I have determined that this only happens with the Simulator with XCode 3.2.4, the device is fine as is XCode 4 and 3.2.3. I've tried playing with the target OS selection (3.0,3.1,4.0,4.1). I've tired adjusting the Compiler from GCC 4.0, GCC 4.2,LLVM GCC 4.2, LLVM 1.5. I've tried setting the Base SDK to iOS Simulator 4.1. Interestingly enough it will work in the iPad simulator when using the 3.2 SDK. So I've at least go that as a work around.
I guess there is one of 3 issues:
An issue with my code that has been uncovered by 3.2.4.
Bug in 3.2.4.
A configuration issue that I've missed.
If anybody has any troubleshooting ideas or answers I'd love to hear them. I've been doing iOS full time since V 2.1 and I am seriously stumped.
Thanks in advance,
I figured out my issue. It looks like the CoreData/Sqlite connection was a total red herring. Following a tip I read on SO, I used OSX's Console application and got a critical message "Failed to launch in time" that was not being displayed in XCode's debugger console.
It looks like the process was being killed due to what is essentially a timeout error. The iPhone will kill an application that takes too long to complete "didFinishLaunching." That's where I was kicking the data load routine off from. The new version of XCode must have adjusted it's timeout values.
So my takeaway is give OSX's console a shot if XCode isn't telling you everything and watch out for those red herrings.
When I upgraded I ran into troubles in the simulator when saving the managedObjectContext. I finally deleted my sqlite CoreData store file and have not run into similar problems. Try deleting your data file (well save a copy of it before deleting to see what is different).

Resources