Xcode 8.2.1 quits unexpectedly every time when I open my project - ios

I'm getting an error Xcode 8.2.1 quit unexpectedly whenever Xcode is opened. This was working fine till last night. I have tried restart system but didn't worked.I have updated mac OS with macOS Sierra (version 10.12.3).
I already deleted derived data from preferences but it's not working for me.
please tell me why its happening like this...Thanks a lot in advance...

I've had this situation before.
My solution is that:
quit Xcode clearly
open other no question project or create a new project
open the your project again which will quit unexpectedly
it's maybe Xcode's bug, this is work to me, hope it's work to you too!

That state information might have become corrupted.
Follow these steps hope it will help you
1.) Right click on your project.
2.) Choose package content.
3.) Delete all extra files except project.pbxproj
4.) Come back to your project.
5.) Run

Related

Build Error in Xcode 11.3.1 - IBCocoaTouchFramework-ThirteenAndLater

I am having following error every single time I try to build an app in Xcode 11.3.1 on macOS Catalina 10.15.3. I see this error for UIKit as well as SwiftUI based projects. Xcode fails to load storyboard file (or scene) and fails to build
/<PATH TO PROJECT>/Base.lproj/LaunchScreen.storyboard:1:1:
Failed to find or create execution context for description '<IBCocoaTouchPlatformToolDescription: 0x7fd283181f90> System content for IBCocoaTouchFramework-ThirteenAndLater <IBScaleFactorDeviceTypeDescription: 0x7fd283187160> scaleFactor=2x'.
Please note, this error is not specific to LaunchScreen.storyboard file. I have tried not having launch screen and instead straight Main.storyboard but nothing works.
I have tried everything else including rebooting my mac, killing Simulator process deleting Derived Data. All these steps, a few of these steps but cannot get rid of it. My Xcode is plagued with this issue and I cannot build any project.
If you have encountered this issue, please share what you did to solve it.
Thanks in advance.
In my case, reinstalling Xcode fixed it for me.

Parse error "Could not build module 'UIKit'" but the app runs fine

I created a new project in Xcode 11, the "Single View app" in objective C. In every class the line #import <UIKit/UIKit.h> is highlighted in red, with the message "Could not build module 'UIKit.'" However the app builds and runs with no problem.
I've read a lot of questions like this on SO from years back, but none with XCode 11 and it doesn't sound like any of them would build without breaking. For me it is purely a parsing issue.
I tried deleting derived data, and I reinstalled XCode multiple times. The last time I went through this tutorial for completely erasing XCode from my computer: https://macpaw.com/how-to/uninstall-xcode-on-macos
Through the rest of the day the issue seemed to be gone. But this morning it's back again.
This seems to be happening with any XCode project I have, including brand new ones with no code changes.
I would just ignore the "errors" but it keeps me from being able to use autocomplete which slows down my workflow a lot.
Update
This issue seems to have gone away. I'm not sure why but I'm happy for it.
Update
This issue came back again after updating my computer. I have not been able to update Xcode for a while not. I'm not sure if the issue is related
Update
I was able to update Xcode, and the issue went away again.
I updated my Mac to Catalina 10.15.1 and was able to update Xcode to 11.2. After this the parse error discontinued and all of my syntax highlighting is back to normal.

Why Xcode shows "This app could not be installed at this time." pop-up?

When I run the project and add the app in simulator for the first time, everything is okay. But when I run it again, Xcode prompts this message as a pop-up window at the end of compilation:
This app could not be installed at this time.
I already checked the relevant question, and tried all the advised ways to solve this issue; checking mentioned logs, cleaning project, restarting simulator, changing it, erasing all content and settings in it. Nothing works. I must erase the app and recompile it every time to open the app. Did you get the same message before? Is there any way to detect problem and resolve it? Btw, I use Xcode 9.2 at High Sierra.
This error pop-up may come up for different reasons. There is no specific reason to see it for now. In my case, a JSON file that I added to Bundle in order to provide mock data triggered this issue. This file was containing a Turkish letter in one of the keys. After I fix it, the pop-up is gone. Interestingly, earlier simulators (<=9.1) work properly if JSON file contains Turkish letter but 9.2 simulators cannot tolerate it.
Worked for me when I rebuild the project after deleting the derived data folder.
I think I may have found a solution. This all started a short time after I let Xcode update my project settings. Specifically on my CocoaPod-Subproject. I removed the pods and reinstalled them and now I am no longer getting the pop-up.

Xcode 9 App installation failed, Could not write to the device

I've just updated to Xcode 9 and am getting App installation failed Could not write to the device error popup every other time. I see there are older questions on the subject, but this one is particular to iOS 11 and Xcode 9. I've never had the issue before.
How do I make sure Xcode 9 can install app to device every time?
In my case this issue was caused by using App Store distribution certificate while iPad was connected wirelessly.
Switching to development certificate fixed the issue.
Xcode 9 seems to have many different manifestations of this problem. Some of the other answers address specific problems, but this definitely occurs when there is nothing wrong with your project. These steps always resolve for me (in order from least painful to most painful):
Try running it again. Sometimes it works on the 3rd or 4th time.
Unplug the device and plug it in again.
Restart Xcode.
Clean build folder (not a regular clean - this is cmd+option+shift+K or hold option in the product menu) and then rebuild.
If all else fails, once a full restart fixed it for me. But probable something else was the root cause.
Hopefully Xcode fixes these problems soon...but I'm not hopeful.
In my case, I want to testing watchOS app and I set the debug provisioning profile to release one. I set to automatic and the issue is gone.
The solution that works for Could not write to the device is clicking the run button again after dismissing this error message.
In some cases I get the error App installation failed: unknown error. In this case I need to do a clean before building.
Deleting the app from device also helps.
I had similar issue and got is solved using below steps :
Delete app from device
Disconnect device from system
Restart iPhone device and Xcode
Delete derived data content
Clean your project (Shortcut key : cmd + shift + k)
Rebuild your project
I am facing same issues on my iPad. It was working fine before. But after some time my development version stop working on iPad. I have tried and search on internet but not able to find solutions. I have tried all above cases but no Luck.
At last, I have found solutions. Some developer has changed DATE/TIME settings for my Ipad. Please check date/time because my Provisional profile for apps has expired for the manual date set on iPad.
Hope the following steps will be useful for others,
Check your provisioning profile is valid.
choose the debug profile for signing in target.
Open you scheme under product in menu toolbar or using Cmd + < shortcut.
Choose debug mode for Run in your product scheme.
Tadaa! now you can run the app in your device flawlessly.
Happy coding! :)
I tried all the method , they didn`t work for me .
And I fixed the problem by removing the soft link file made by ln -s
In my case, this issue appears when I added a folder as reference in the project which contains a symlink. Removing the symlink fixed the issue.
Mine occurred when I had not signed in using my itunes developer portal credentials to sign into XCode. When I did it and cleared all derived data, it worked out.
Everyone is solving this problem in a different way. Mine was changing executable name, building the app (throwing the "You don't have permission etc." problem) and changing the executable name back to the original value.
I don't know why but it worked.
I actually had to reboot the system on the Mac, this gets me rid of the problem for a good while, but it eventually comes back. None of the other solutions mentioned here worked for me.
In my case the problem appears while I use manual signing and try to debug the app in Release mode. Although the fastlane builds and uploads fine in this mode fine, direct XCode debugging fails with the error "Could not write to the device". Temp switching to automatic signing mode fixed this issue.
What worked for me:
delete the app from iPhone
clean the code in Xcode
quit Xcode
re-open Xcode, connect my iPhone, and run it again
I got this issue App installation failed - Could not write to the device and I solved it by doing the below steps
Uninstall the app from device.
Clean the project.
Run the project.
It worked for me.
Xcode 9. iOS 11 SDK. Watch SDK 4.x.x - OPEN THE WATCH APP on the iPhone after failed. My Watch tab->(scroll down to the bottom)-> Install your app. Hope this helps. Just need permissions from the "Watch" app.
I had the same question that could be solved by deleting other debug App from my iPhone, then it worked.
When I choose the Automatically manage signing, my problem fixed.Hope my answer can help you.
Sometimes the problem arises when you removing some pod file reference. The only way to solve this in also your pod-file
eg:
use_frameworks!
pod 'KYDrawerController'
pod 'GoogleMaps'
pod 'GooglePlaces'
pod 'Alamofire'
pod 'Firebase'
pod 'Firebase/Messaging'
remove the unwanted file in this place. And also reinstall the pod-file again and open your project it surely works for you.

Xcode 8 Beta (null) was unable to service the request

I have an app that worked fine in the released version of Xcode. I downloaded the beta and after I fixed all the little changes I ran it and it worked. I just came back and ran it again and I get an error saying
The request to open "com.matthewhsingleton.Smoke" failed . (null) was unable to service the request.
I have quit Xcode and reopened it, I have restarted my computer, tried different iPhone simulators and all produce the same resulte
My error was similar, instead of "(null)", the message was: "SpringBoard was unable to service the request"
Restarting the simulator worked for me.
After reading #Droppy suggestion I read the thread and it is a common issue. To solve it is as follows
Problem solved for by an Apple Engineer in the lab. It's an issue they're working on. The bottom line was that when I copied Xcode to Applications folder, there was a bit set on it and that was preventing it from communicating with the simulator.
To fix it:
Copy-paste Xcode-beta.app from Applications folder to somewhere else, e.g. Documents folder.
Delete Xcode-beta.app from Applications folder.
Move Xcode-beta.app from Documents to Applications folder again.
Seen here https://forums.developer.apple.com/message/143094#143094
I had 2 versions of Xcode installed. Xcode 7 and 8. I resolved this issue by setting the command line tools to Xcode 8 in preferences. Open preferences -> Locations -> Command Line tools. Set that to Xcode 8.

Resources