I suddenly start having this file in my xcode project after I updated my xcode:
myProject.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
What does this file do? Should I exclude it in version control?
You can take a look on the Xcode release notes
Xcode 9.3 adds a new IDEWorkspaceChecks.plist file to a workspace's shared data, to store the state of necessary workspace checks. Committing this file to source control will prevent unnecessary rerunning of those checks for each user opening the workspace. (37293167)
It's good to commit it to your repository.
Related
When I use git, I usually change between branches and my iOSBaseSDK.xcworkspace file is modified.
When this happen my Xcode shows the following alert:
The file "YourProject.xcworkspace" has been modified by another application
The file is located at "LOCATION". Do you want to keep the Xcode version, or use the version on disk?
Keep Xcode Version
Use Version on Disk
I don't understand the meaning of the two options, as they relate to the git branches I am switching between.
What is the difference between Keep Xcode Version and Use Version on Disk?
Let's have this assumption , suppose you have a file inside your xcode project and out of xcode you edited it without hitting save , then inside xcode you tried to edit that same file , then you'll get that message
Xcode version : the one you currently editing
Disk version : the stored version on disk
git changes the local files automatically and when the change is wide xcode shows that message , so after a git pull click Use version on disk
Xcode keeps resurrecting an old version of a bundled data file despite my best efforts to replace it with an updated version of the file.
I put a data file into my iOS document-based app project, did a build, and when run then app found the file in its main bundle as expected. Then I decided to change the data file by replacing it with a newer one. I deleted the old file from the project (reference removed and file deleted). I dragged the new file into Xcode project navigator just as before. I cleaned the build. When I rebuilt, the old file was still being put into the build output folder (the Build/Products/Debug-iphonesimulator/myproduct.app package). The original version of file does not exist anywhere on the system. I'd even emptied the Trash.
Anyone know what's going on? Is there some cache Xcode keeps that's outside the build folder structure and is not cleaned?
This isn't even anything to do with simulators or test devices. The build output is just plain wrong right on the Mac. (The app fails of course: it opens the data file but it's got the wrong, old data in it.) I've tried product cleaning, deleting the file from the project and on disk, putting the master file into Xcode under a new name, even deleting ~/Library/Developer/Xcode/DerivedData/(my project)-(alpha junk).
I'm using Xcode 10.3 on macOS Mojave 10.14.6.
The answer is to change the file type in the File Inspector of Xcode. It was "Default - Data" and should be "Data". My file is a byte stream from a NSKeyedArchiver. Apparently Xcode mangles this by trying to wrap the contents in XML.
I'm working with multiple people on an app in Xcode. Today I started Xcode and tried to run the app on my simulator, but it doesn't run. It builds and gives no errors, but the app won't appear on the simulator. As many questions suggested, I needed to select my executable in the schemes (Manage schemes -> ‘Scheme name’ -> Run -> Info -> ‘Executable dropdown’). But when I edit the scheme, my executable is not visible in the dropdown. Also the .app won't appear in the products folder as it usually does. How do I get it back?
I've tried many things like deleting Derived data, deleting the project and checkout again via version control, I even deleted everything related to Xcode and downloaded it again. But none of this worked.
I also read somewhere that AppCode (IDE from Jetbrains) stores the .app somewhere else. Perhaps this causes an issue with Xcode? But as I said, even if I download the bare project from source control, it builds but doesn't run.
I'm working with Xcode 9.1 at the moment. Also working With AppCode Version 2017.3 EAP.
Maybe the project.pbxproj file does not have the correct reference to the app executable. This might happen when a merge conflict occurs and is not solved correctly.
Try to look for differences in the project.pbxproj file, concerning the occurrences 'YourApp.app' and restore or adjust these where needed.
To look for these differences use the commit history in version control tools like Git Kraken.
When this is done, clear derived data and clean the project. Then build.
The app executable should pop up again now :)
I accidentally hit discard all changes without having "committed". It seems to have wiped all the info from the app when I open Xcode but when I go to the project file all the .swift files and icons are still there. I have tried what the other posts have said about all of the git commands but this seems to be different. Since discarding changes brought me to the starting part of the project but I still have all the files from before is there an alternative way I can restore my program?
Can't you just re-add the files in Xcode?
Xcode > File > Add files to...
... and reselect the .swift files / icons that you mentioned that are still there.
I have a problem pulling from remote with XCode 8. Problem is when I do Git pull, it pulls all changes, and I see that new classes are added in Finder window but it does NOT load them into XCode project. I need to add them manually in XCode every time to my project. I've tried from terminal, source tree and inside XCode, every time, same thing. With prior XCodes everything is working as expected.
Are you also getting change in xcodeproj file? May be the latest commit to server missed pushing changes to xcodeproj because of which Xcode is not able to figure out new classes etc. Xcodeproj file is the way via which Xcode recognise changes to project structure.