Xcode 9 Beta Build System fails with no errors - ios

So, this is strange. Trying to build my fairly large project with the new Xcode Beta Build System and it fails with 0 errors. The old build system works fine.
The status bar at the top of the IDE displays the following:
Planning build...
Scanning build tasks...
It has got further than this before, but now seems to be failing really quickly. No idea how I can debug this. Any ideas?

I would recommend you to try these steps:
Quit Xcode
Delete folder ~/Library/Developer/Xcode/DerivedData
Reopen Xcode and try again
Hope it helps
EDIT: Quiting and reopening of Xcode after deletion of derived data is essential, because Xcode can hold derived data in it's cache. So deletion of derived data when Xcode is running does not help very often.

Remove 'Derived Data' before running the build.
To remove, go to
File > Work Space Settings > Go to the directory path > Delete.
Do not forget to clean the project
Cmd + Shift+ k

Related

Xcode crash on opening .xcodeproj file

I am running my React-Native iOS project with Xcode but I don't know which change effects it and my I notices that my Xcode is crashed then I try to open it inside Xcode but it crashes every time then I deleted derived data and also xcuserdata from .xcodeproj file but no success I also tried to use this command "defaults delete com.apple.dt.Xcode" but again no luck I have also looked into .xcodeproj file for conflicts but there is no conflicts I try to run my project with command line but again got this message.
"error Failed to build iOS project. We ran `xcodebuild` command but it exited with error code null. To debug build logs further, consider building your app with Xcode.app, by opening `.xcodeproj`
Can anyone please suggest me a solution for this ?
Delete derived data of xcode and also of project.
react-native run-ios
"error Failed to build iOS project. We ran "xcodebuild" command but it exited with error code null. To debug build logs further, consider building your app with Xcode.app, by opening Raydan.xcodeproj"
I tried almost everything on the internet like.
Deleting Xcode derived data.
Try with .workspace file.
Deleting xcuserData.
but nothing works, At last, I found this problem with react-native-fast-image, upgrading to react-native-fast-image v7.0.0 was causing the problem so downgrading react-native-fast-image to v5.1.2 works for me.
here is the issue reported in their Github.
https://github.com/DylanVann/react-native-fast-image/issues/527
In my personal experience working with React-Native and XCode you should try deleting the build folder for android and/or iOS for whichever you are using it for. Every time you run your code it should re-create a new build once it is deleted.

Build failed with xcode 10 beta

I created a new project on Xcode beta and built it, It gives me the below build error.
Encountered an error communication with IBAgent-iOS on launchscreen.storyboard.
The same storyboard error that I am getting when I try to build any sample projects built on Xcode 10 beta.
Has anyone come across the same issue with Xcode 10 beta IDE?
I face the same issue with Xcode 10.1... issue resolved by just clean the build folder using Command+Shift+K
I hope this will work for you.
I'm on Xcode 13 and still get the issue sometimes. No help with cleaning the build folder or removing DerivedData.
However, this usually saves my life ^^
sudo killall -9 com.apple.CoreSimulator.CoreSimulatorService
I had the same problem with xcode 10 installed from the App Store and I tried removing the derived data, cleaning the build folder... nothing worked.
And then I just restarted my computer and it's working. I did not rename anything. It must be some glitch in the memory which is solved after restarting the system.
I had the same error.
I renamed Xcode from Xcode-beta to Xcode and it worked for me.
You need to remove the Targets from that xib, compile and add them back to your xib and compile. It works!
I renamed the
Xcode to Xcode10 (from finder > Applications),
and then cleaned the build folder
(Xcode > Product > Clean Build Folder).
It worked for me.
Remove the product file (.app) if old build exits
Clean the build (Command + Shift + K)
I'm using Xcode 11 but still, encounter this problem, I've tried to clean the project and rebuild it but it still won't work. The only solution I found it work is to uninstall Xcode and download the new one from App Store, this work fine with me and I can use it normally now. I hope this works for you guys too. Cheer.
If you are getting this issue, then I think it is bug of an Xcode 10. The only fix is uninstall your Xcode 10 , and reinstall it again . It will definitely work. This worked for me. Thanks.

Failed to launch IBCocoaTouchImageCatalogTool via CoreSimulator spawn

I have an Xcode project which was downloaded from the internet so I don't know which Xcode version was used to write it but the language is Swift 2. I opened it in Xcode 7.1 beta 1 and I get the following compile time error.
Failed to launch IBCocoaTouchImageCatalogTool via CoreSimulator spawn
I deleted the DerviedData foler, cleaned and build the project several times. Tried converting the project to latest Swift syntax but it says there's nothing to convert.
I'm all outta ideas. Suggestions?
The same happened to me and it was solved by cleaning the project. However, if you cleaned it —as you say you did—, I would try closing and reopening Xcode. Even though it seems stupid, it works more often than not.
So After Trying a bit i removed the XCassets file form the Copy Bundle Resources, build once without it and then added it again. Solved it for me.
I had the same issue. My solution was to do the following
Clean the Project
Quit Xcode
Reopen Xcode
Build
That got it working for some reason...
The above answers are correct.
I have a bit similar approach.
After, I use these steps:
Clean the project.
Remove your Assets from your project(Remove References). Run the project without assets. Now the project will show some compile errors, these are not very tricky.
Run the project, this time project run without your assets and may be chances of crash. This ensures that project will run.
Now clean the project and add the assets, now run the project. The project runs successfully.
For me it works. I hope it will be helpful to you.
The only correct solution for me that takes only a moment to perform is to delete ~/Library/Developer/CoreSimulator and all of its contents. Immediately after this the build completes successfully.
I believe the solutions that state to reinstall Xcode, ultimately refresh the CoreSimulator folder, that's why they are successful in resolving the issue.
I started experiencing the error after having upgraded to MacOS Big Sur, while using Xcode 11.6 and Xcode 11.7.
Possible solution for those struggling with the above answers.
If you've just restored your machine from a time machine backup (migrating from old to new machine), you may want to re-install Xcode.
It doesn't appear to bring the caches or other important settings across properly from the time machine restore.
I've just taken that; what appears to be a drastic step, but it's worked!
Instructions on how to do so: Completely reinstall Xcode 9
-W
I was also facing the same issue tried cleaning and restarting XCODE didn't worked for me,
so I removed xcassets and added the image sets again one by one, and that worked for me.
Had to add a step Airman00's answer.
List item
Clean the Project
Quit Xcode
Delete derived data
Reopen Xcode Build
That got it working for some reason...
Update to XCode 7.1.1 from 7.1 solved my problem.
With XCode 7.1 I used Airman00's solution but suddenly it stop working.
Hope it helps!
If you have this type of error in your project then follow these steps:
Clean the project
And go to storyboard and select any viewController
And Run the project again
This will successfully resolve the error.
Maybe you have just cleaned Logs directory...Then you can try this:
sudo chmod 777 /Users/[YourUserName]/Library/Logs
I had to restart my machine to get this to work. Just in case, here are the exact steps I did:
Clean project
Quick Xcode
Delete Derived Data
Restart machine
Reopen
I had the same problem recently with Xcode 11.4 on Catalina 10.15.4.
Rebooting, cleaning project folders, or deleting the derived data directory did not help. What solved the problem for me was to remove and reinstall Xcode (I use the AppStore version).
It is possible, that I caused the problem myself by reinstalling macOS 10.15.4 via a Combo-Update.
I tried everything . But nothing worked . So i reinstalled Xcode . I took some time . But worked
Xcode 14 beta solution
If you are finding your production Xcode 13 builds aren't working and you have Xcode beta 14 installed you can try this:
Launch Xcode 14 beta 3
Open the Platforms preference pane
Xcode 13 should now work as expected
Source: https://twitter.com/AnaCalinov/status/1545118596820439040

Data model version error

I can't compile my project on Xcode now for some reason this 2errors data model version keeps poping up. I followed few fixes.
Delete the derivedData from Xcode directories
Disable MOMC from build setting
Reset ios emulator
Nothing is working I wasted 2hours trying to just build this projects which was working yesterday. Please help what should I do to build smoothly?

"Command /usr/sbin/chown failed with exit code 1" when Archiving

I am trying to archive my first iOS 4.3 Application for iPhone and I always encounter this error:
Command /usr/sbin/chown failed with exit code 1
I have searched through various forums, trying solutions such as changing the Alternate Install Group (which I don't know what to change to), and turning on 'Skip Install'.
As dumb as it sounds, in XCode 5.1.1, all I had to do was quit out and restart XCode just now. I know it's not much of an "answer" but it just worked for me.
Edit: this is still working as of July 2018 for folks.
Edit: this is still working as of January 2019 xcode 9.4.1
Edit: this is still working as of February 2023 xcode 14.2
I was having difficulty with the SetOwnerAndGroup part of Archiving - I was getting /usr/sbin/chown failed, and it was getting 'operation not permitted' on each file it tried to 'chown'.
This was easily tested in the terminal - 'chown' doesn't work, but 'sudo chown' does. Since I had no need to be changing file permissions, the simplest solution was to not do the chown.
The screenshot above shows - I just blanked out Install Owner/Group, and that did it.
When I got this error, rebooting my computer fixed it.
I have tried all the other solutions but none of them worked for me. So I have run this on a terminal to change the owner to me on every file in my project:
sudo chown -R my_username:my_group ./my_project_folder
where "my_username" is you username, "my_group" is your group (this is usually staff) and "my_project_folder" your project's folder.
None of the other solutions worked for me on Xcode 4.5. What I had to do was the following:
The fix is by removing the armv6 architecture from both your project and the CordovaLib project, clean
both projects, and rebuild.
Source
To it works in my environment I cleaned all information about permission, as +adalle said, complemented by Tom and Phil
I emptied the fields Install Group, Install Owner, Install Permission including the Cordova SubProject
I had the same issue with Xcode . It started working after restarting Xcode.
In the screenshot , Xcode ->build settings , installed group was empty after restarting Xcode .the group id it has showed as some number.
Not sure if this is the same problem you are having, but this fixed it for me:
When I created my XCode project, my app name had a space in it, so trying to deploy my app always failed. I was able to fix this by using a Custom Archive Name.
In XCode 4...
Edit the Deployment Scheme
Click on the Archive tab
Then specify an Archive Name that doesn't have spaces in it.
I tried all possible variants and they didn't help me. So I downloaded old XCode 4.4.1 and voila - application archived successfully :)
Select the target that's giving you the error
Change Build Active Architecture Only from Yes to No
That worked for me.
For me reboot my mac fixed it. OS High Sierra, xCode 9.2
When this happens to me on Xcode 8, I do "Clean build folder" 2 times (the first time it throws an error, but the second time succeeds) and then archive again.
Note: The "Clean build folder" option is under "Product" Menu, hold the alt button and you will see the "Clean" option changing to "Clean build folder".
Clean your project.
Clean your build Folder. (Product > ⌥ > Clean Build Folder)
Set the target device to Generic iOS Device .

Resources