Xcode 8 freezes on Signing product - xcode

I can no longer access any storyboards or XIBs in my project. As soon as I do,Xcode starts building and when it gets to Signing product it just hangs. I left it open for about half an hour, nothing happens. I need to Force Quit every time.
Signing works otherwise thou, that's the weird part. I can build normally, I can run on simulator, device, I can archive, everything is fine, EXCEPT when I open an IB file.
I tried all the usual, deleting DerivedData, cleaning everything, nothing seems to work. This is extremely frustrating and I can't find anything on the subject.
I'm using Xcode 8.2 beta (8C30a) currently, but it's also happening in the release 8.1.

Can you file a bug report with a bit more info? Please provide a copy of the build log and the output of sysdiagnose Xcode (it will produce an archive).
http://bugreporter.apple.com/
Thanks!

Related

100+ "Class implemented in both MapKit and VectorKit" warnings with Xcode 9.0.1 and above

While running my project (which doesn't even use MapKit), my console gets spammed with more than a hundred class duplicate warnings:
objc[6377]: Class ___MKPlaceBusinessInfoItemAccessibility_super is implemented in both /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/AccessibilityBundles/MapKit.axbundle/MapKit (0x12f128f00) and /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/AccessibilityBundles/VectorKit.axbundle/VectorKit (0x12f2187b0). One of the two will be used. Which one is undefined.
These warnings were not present with Xcode 9.0.0, I am only experiencing this on Xcode 9.0.1 and above.
I am aware that this is a bug and I found a radar that is about this issue. Is there a way to silence these warnings without affecting the visibility of other SDK warnings?
This is actually a bug in the current iOS Framework and has nothing to do with anything in your app, module cache, libraries, etc. The reason this appears to be non deterministic is that it is only there when the Accessibility Layer is active, which it isn't on the simulator, except under very specific circumstances. The three I'm aware of:
The Accessibility Inspector is on
UI Instrumented Testing
VoiceOver for OSX is On (other ATs as well)
To get this to go away you should:
Exit Accessibility Inspector (if it's on)
Open Simulator
Hardware -> "Erase All Content and Settings"
Re run application.
Literally NEVER run this simulator with the Accessibility Inspector
Literally NEVER run UI tests on this simulator, which also rely on the Accessibility Layer to do their work, though I don't think doing so will cause the error to stick around until you "Erase all...." again, it will just be present for that test run.
Every time you do one of those last two bullet points, you will have to clear the data again...
The core issue is that MapKit and VectorKit both link to core accessibility bundles, but apparently have not done so dynamically, so those bundles are included in both modules. Such warnings are very safely ignored, though very verbose and frustrating.
Unfortunately there is no other fix for this... maybe you could download an old version of the simulator if you don't need iOS 11 features. Or just don't run instrumented tests/Accessibility Inspector/VoiceOver/I HOPE THEY FIX THIS SOON!
Got the same issue on 9.0.1.
You should quit Xcode and all Simulators.
Run rm -rf ~/Library/Developer/Xcode/DerivedData/ModuleCache.
Start Xcode again.
This issue was solved for me.
I don't give a damn about accessibility in the simulator so I just renamed one of the duplicate files so it wouldn't be found:
mv /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/AccessibilityBundles/MapKit.axbundle/MapKit /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/AccessibilityBundles/MapKit.axbundle/MapKit_
lol
Resetting the iOS simulator fixed this for me.
Simulator -> Hardware -> Erase All Content and Settings...
Exactly the same problem, in my case, I tried to delete all the files in DerivedData folder, but still not work.
And later I found that if I switch to another kind of simulator, for instance, switch from 'iPhone 8' to 'iPhone 8 plus', the warning would disappear.
So, simply delete the 'iPhone 8' simulator from simulator list, and then add the 'iPhone 8' simulator again, it works.
Not sure if the problem will come again, since it's also my third time dealing with this.
As you can see, there's something wrong with CoreSimulator of /Applications/Xcode.app. Apple Xcode Developer defined this symbol in both MapKit and VectorKit, which is the fundamental error.
You cannot modify Xcode, so only Apple's Staff can solve it.
Just stop wasting your time, except falling back to Xcode 9.0
Solved!
-On simulator
--Hardware
----Erase all content and settings
-Close xcode and simulators
-remove the content of ~/Library/Developer/Xcode/DerivedData/ModuleCache
-Start xcode...
My case is a bit different: I met this issue while running XCUITest.
After launching the XCUITest process, the target app crashes upon launch.
However, after I removed all the Web proxies, this issue is fixed!

Xcode 8.0 Simulator broken

Something has gone wrong with my Xcode install... I was running my app and seeing odd behaviour within the app itself, for starters I wasn't able to run the build in the simulator.. it'd install and never launch, eventually putting up a dialogue box about being unable to bless the connection to the simulator. I'd had this problem a few days before but it eventually went away, googling just revealed people having issues with the beta builds or beta MacOSX.
Eventually today I rebooted my Mac and having done so, launching Xcode gave me some other error about the simulator, which I didn't properly take notice of. Since then my project no longer lists any simulators to deploy with, if i try to add new simulators the button to add the simulator does nothing and I have to cancel the dialogue box. If I try and run the simulator or watch simulator directly it just beach balls indefinitely and i have to force kill it.
I've created a new user account and within that made a new Xcode project, which also has no simulators.
I've got a zipped backup of my Xcode from before this problem occurred which I've extracted and swapped in place and it makes no difference.
I guess I could do with redownloading the app off the AppStore in hope that the installer would do something to fix this problem.
Anyone got any thoughts on other things I can try?!
Cheers
What is most likely to be the case is that your XCode installation is corrupt. The best thing to do is to delete Xcode entirely and also these directories and files:
~/Library/Caches/com.apple.dt.*
~/Library/Caches/xctest
~/Library/Containers/com.apple.dt.*
~/Library/Developer
~/Library/MobileDevice
~/Library/Preferences/com.apple.dt.*
~/Library/SavedState/com.apple.dt.*
Then reboot your system and reinstall Xcode. Hopefully that should have cleared out the issue.

XCode project corruption

I've been working on an iOS project in XCode for a while now (XCode 4.4.1). This morning, I started up XCode (first time fresh for a while) and it started downloading an update. Once this was done, I noticed that most of my project was gone. All of my original files had been removed from the project. I checked the filesystem and they were still there.
I restored the project folder from Timemachine but the project was really confused and throught it was a MacOS project. So I created a new project and just copied my files into it.
That kinda of worked but now when my app runs it always runs in portrait mode even though I've set the project options to only run in landscape mode. In landscape mode, the text (and buttons and such) are all 90 degrees off. When I rotate the simulator the app does not respond.
I've set the storyboards to all run in both inferred and landscape orientation but neither worked.
Am I missing a project setting that will let my app work again?
Has anyone else suffered a project corruption like this?
I saw something like this when I migrated to iOS 6. I just bit the bullet and manually changed my MainWindow/RootViewController setup into a MainStoryboard. It worked out pretty well. Make sure you've disabled devil autolayout too.
Problem solved: I'm dumb.
The project was corrected so I rebuilt it. Being stupid, I changed the name of a couple of files (the view controllers) but forgot to update the storyboards. That's what happened when things go bung at 5AM.

Xcode 4 Error: Error Starting Executable

I ran into problem with testing my app on iOS and Xcode when I am uploading it to my actual devices (iphone and iPad), and I'm wondering if someone knows the issue and can help me out:
Normally when I build my app on my devices, the app is installed and launched on my devices. But as I am preparing for submitting my first app I was testing around and changing the Bundle Identifier, App ID, and Development Provisions (so the issue may have something to do with it), and now, when I try to build my app on my devices, although it's installed on my devices fine, Xcode will not launch the app anymore. Instead, I got this error message:
Error Starting Executable.
Error launching remote program: No such file
or directory.
Does anyone know what the issue is? And What is this derived data folder about?
Much thanks!
I have also faced that problem. I have closed, restarted Xcode; deleted the application from device and reinstalled it again, then the problem has gone.
Running App from a Clean Slate
For me the problem did not resolve until I did the following in this order:
Delete the app from the device (Do this before trying to debug again)
Quit XCode (Don't just close the project)
Delete the app build folder (example path: /Users/myusername/Library/Developer/Xcode/DerivedData/MyProject-fhkaamuyvqhubaezinqbmxbnaufd/)
Restart XCode
Finally -- Try debugging again on the iOS device
The app build folder of step 3 refers to your app's build folder that is a child of "DerivedData". To find this you can reveal your app in finder, then backtrack until you get to "DerivedData" folder and delete the folder above that like "MyApp-crazylongweirdletters". Without this step (3), I could not debug, so this is a critical step and you must quit XCode before you do this step.
For some it appears simply restarting XCode does the trick, but not for me.
I only post this answer because the earlier answers did NOT work for me. Hopefully others banging their heads will find this and get a sigh of relief. :)
Notes:
The issue started happening for me when I modified the bundle id of the app.
My code signing is and was correct. My provisioning profile was the "Team Provisioning Profile" which should work for any app id (default for "iPhone Developer" automatic profile selector).
I was doing a DEBUG build (not release / distribution).
You cant debug (start from Xcode) an application signed with a distribution profile if I remember well... And then you get such messages, gdb failling to attach to process.
I finally found my error!
I was playing around with my info.plist file, and I changed the Executable Name and Bundle and Bundle Display name! As soon as I changed those back to the Defaults (EXECUTABLE_NAME, PRODUCT_NAME, PRODUCT_NAME respectively) it worked perfectly.
Delete the app from the device (tap-and-hold then delete) and try again.
For me, none of those worked. Same error, but different solution.
My problem was cause by me accidently changing the "Deployment Target" (ios version) to a version higher than what was on the phone I tried to run the code on.
The fix was simple - drop the deployment target to below or equal to the ios software version on my phone :)
I got the same error by not having my code signing correct.
Go to your project > Targets > Build Settings > Check code signing for debug state.
I stumbled upon this as a solution to another issue whch was a warning when trying to build an app on a new 4.3.5 device.
If i set the profile to distribution I do not get a warning message when building the app, but the debugger will attach to the device.
If i set the code signing to the distribution profile, i get no warnings in the build process, but the debugger will not attach. So the answer above about being signing based seems to be correct. This might also only be an issue on newer 4.3.5 devices with xcode
Product -> Clean in the menubar
This error some times happen due to incomplete "Restore" or "Sync" process of your device which keeps the .app files locked up.
What I did I had to jailbreak my device to go find the app under /User/Applications/XXXXX-XXXX-XXX/ and phisically delete the .app
For one of the apps it worked and for other one I realized it just does not run GDB automatically so the error message is totally misleading, so I set the GDB to manual and it worked and did not give me that error, but of course I have to run the app manually for the debug session to start.
It also may have required some other stuff that I did before like checking the provision profile, but this was the last step that made it work.
Before this I tried all the solutions did not work for me, and obviously simply deleting the app by holding down your finger on the screen did not work, as it removed the icon but all the files were still there. ( Since it was a development app not a downloaded App Store app )
had same problem,
quit the XCode...delete app from device...run the program again..
i solved that way..one of my friends had to restart the device.
I have the same problem. I solved it by changing the project's directory name and then launching the app again.
I had this problem on a recently restored device where my in-development apps had not been reinstalled—they were showing up on Springboard as "Waiting" to be downloaded from the App Store. Deleting the app from Springboard fixed the problem.
I've faced this issue since yesterday on two different devices, both iOS 4.x. Deleting the DerivedData folder, deleting the app, restarting the Xcode, and cleaning the code did NOT work. Repeating all the steps, in addition to rebooting the device fixed it for me.
Here I am posting an update to the issue. Might be helpful for someone with the same problem. I have Xcode 4.4 and launched it on a device with iOS 5.0 . If Xcode doesnt have the 5.0 simulators

sudden error after removing app from iphone simulator on Xcode

my app was working perfectly fine, until I cleaned the targets and deleted the app from iphone simulator.
It now compiles but ends itself as soon as it runs, with NSInternalInconsistency exception.
Trying NSLog only tells me that the error comes from the main function, which I didn't touch.
I think the error has to do with the modal view, but it was running perfectly until I removed the app on iphone simulator. Only, I changed some of the image file names from Resources folder right before I cleaned the targets... (but even so, it was running well before cleaning/deleting).
Has anyone had this experience where everything that has worked suddenly gives you an error after cleaning/removing? How did you deal with this?
Please help me out.
Only, I changed some of the image file names from Resources folder right before I cleaned the targets... (but even so, it was running well before cleaning/deleting).
it was running well because the renamed images weren't changed in the app on the simulator.
Files aren't deleted from the app bundle when you install your app with Xcode.
Clean All doesn't remove them, neither does the deletion of the build directory. Unless the app is removed from the simulator the old files are still available for the simulator.
Find the places where the old images are still referenced in your project.

Resources