XCode workspace integrity - couldn't load project (pods.xcodepoj) - ios

I pulled from git and everything works fine except I got this error even though I can still run the project. Is there a way to fix this?

This usually means there was a merge conflict that got committed to the actual project.pbxproj file.
Since this is a Pods project (which is ephemeral and can be recreated at will) you can run pod install from the command line (in the same folder as your Podfile and it will regenerate the project.

problem:- Workspace integrity (could not load project) I got the same issue also I hit and try many solutions (Restart mac, Cache data remove, pods update, pods install, etc) but all in vain.
Solution : Once I try to open the project the "Xcode.copy" opened intead of my original Xcode . I just close all projects after that I open the project from selecting Xcode directly from the finder.
Note:- do not go to the project folder then open project from "projectName.xcworkspace"
you just need to go finder(Spotlite search) and open Xcode and open from finder then you must select the desired project. The project will work perfectly and after that you can open project manually (in your folder etc)
:) These things working from my side.

Related

XCode 9....cant open workspace, stuck on Loading

I have this project that I haven't used in a while and since last using it, I have upgraded to Xcode 9 and High Sierra, now I can't open my workspace file :(
This is as far as I get:
And nothing, this project is in an iCloud folder, I have tried taking out of an iCloud folder, removed some folders from my Library folder...still nothing, this is the only recent copy I have for this project and I cant open the xcworkspace file. PLEASE HELP!
UPDATE
I removed contents.xcworkspacedata from my workspace Contents folder and removed project.xcworkspace from my xcodeproj file Content folder and now I am able to open the project, but it says no files when there is, I can open the xcodeproj file and the files are there, also I have no Schemes either.
I had similar problem, I fixed by turning off my wifi, then open my project and turning on my wifi again. iCloud sync was the problem.

iOS Swift No Such File or Directory In Debug-iphoneos

Somebody please save me.
This is the error I'm getting. I've tried cleaning, doing a build clean, pod installs and updates. I have not found a solution.
Shell Script Invocation Error Group
/Users/arthuraraujo/Library/Developer/Xcode/DerivedData/Anti-Social_Club-gizjofrkxroutxezxlbuadlvpwbo/Build/Products/Debug-iphoneos/Anti-Social: No such file or directory
I have similar issues in the past and doing the following work for me. Hope your problem is same as mine:
Close xCode
Go to this folder Group
/Users/arthuraraujo/Library/Developer/Xcode/DerivedData/Anti-Social_Club-gizjofrkxroutxezxlbuadlvpwbo/Build/Products/Debug-iphoneos/
and delete Anti-Social.
Restart xCode, clean & build.
It is hard to really tell you the solution with just the information provided. However, the first thing I would try is deleting the derived data, as CodeBender stated. You should also look at your search paths in your project's building settings to make sure your pods are correct/ connecting your pods files to your project.
Possible duplicate of:
Xcode 8 Shell Script Invocation Error
Here is what I did when I got this:
Used this site to completely remove All Versions of cocoapods:
https://superuser.com/questions/686317/how-to-fully-uninstall-the-cocoapods-from-the-mac-machine
Re-installed current stable version of cocoapods (v1.1.1 for me)
Deleted podlock and pods directory
Deleted old .xcworkspace file (this was key for me).
Did "pod install"
Opened xcode and cleaned project and deleted derivedData.
Go to your build phases and remove libReact.a from the linked libraries.
Then add libReact.a but select this one:
libReact.a from 'React' target in 'Pods' project

Xcode build process stuck at "Copying swiftdocs"

Creating a build for my Xcode project takes too much time. It gets stuck at "Copying swiftdocs". I am making a build to run on device. I cant understand why this is happening. No relevant info available on internet. Just for the info, I am using Cocoa Pods in the project.
Is it anywhere related to pods? I am unable to run the app on device.
Xcode stuck indexing error (compiling model, copying swiftdocs, etc.)
Open your Project Folder.
Find ProjectName.xcodeproj file.
Right-Click Copy and Paste to Safe Place.
Right-Click Show Package Contents.
Find project.xcworkspace file and delete that file.
Reopen Your Project and clean and Rebuild.
If your problem is not solved then replace the file with your backup file.
Hope this will work for you. If still not restart your mac some time it works with restart.

Xcode: issue "file xxx.png is missing from working copy" at project building

After deleting/adding some png files to project, i have got messages when building project.
"file ProjectPath\aaa\xxx.png is missing from working copy."
All these files are in the project, and the application is running. However, these messages are annoying. Looked .plist file, but there is no mention of these files.
What should I do to remove these messages?
The warning will disappear as soon as you commit your changes (Xcode 8).
It seems that this problem may have different causes, but it's often in relation with source control software.
In my case, I solved it by going to Git, and adding the files again. I mean running the following command:
git add .
You can also disable source control by unchecking
Xcode -> Preferences -> Source Control -> Enable Source Control
if you're managing it via command line or any other app.
In XCode -> SoureControl:
Update + Refresh Status did it for me.
In my case, the file was missing from the source control.
To fix, I had to discard this file (be careful only discard the missing file not all your project):
Xcode->Source Control->commit
Right Click the missing file
Choose Discard Changes
Disable Source Control, clean build folder (Alt+Shift+Cmd+K), then Enable Source Control again.
Xcode -> Preferences -> Source Control -> Enable Source Control
In my case, Xcode had somehow found old .svn directories that referenced the missing files. I had to go up a level above my project folder to find those .svn files. Once deleted, I restarted Xcode and everything was fine.
I had a similar issue with a handful of files that had long since been deleted from my Xcode project while I was still using Xcode 7.
My solution was to:
Create files with the names Xcode was complaining about (they don't need any content)
Add the files to my Xcode project (in Xcode right click on my main project directory, click Add files to my_project_name and select the files that were just created
Select the newly added files and delete them - select move to trash.
This got rid of the warnings for me.
To add onto Alexander Vasenin's answer...
First I Committed and Pushed my changes
Xcode Main Menu > Source Control > Commit
Then I Discarded All Changes to get rid of the errors
Xcode Main Menu > Source Control > Discard All Changes
After that, the errors stating "file xxx.png is missing from working copy" disappeared.
This is occurred when you delete file on Xcode, but didnt tell svn server about it.
Go to command line tool, and delete file directly.
svn delete missingFile.m
and commit it
svn commit -m "Deleting file"
note that if you delete .svn folder, the warning is disappear but you will lost communication with svn server.
I worked it out.
just open your third-party SVN tool, find the miss files, Revert;
that's all.
I had same problem and solved it by add git .
Open Command Line Tool
cd "project folder path"
git add .
Later,restart Xcode project and open your project again.
Show on target->build phases -> copy Bundle Resources.
and
clean build folder command+shift+alt+k
I had to manually go into Terminal and remove the files with git rm ProjectPath\aaa\xxx.png and then commit. After that everything worked fine.
Got this for every project after moving on to XCode 8. This solved it:
With Option Key pressed, Product (in title menu) -> Clean Build Folder.
In my case, I had wrong data from my old projects in the simulator. Solved by reset content and settings in the simulator:
Simulator -> Reset content and settings...
For me the following worked:
Since I do not and did never use Git, I created a new project (XCode 8, I could not see the usual "use Git" or however the checkmark was labeled). Then I bluntly deleted all the files in this new project; went to the old messed up project, copied everything in the project folder, came back to the newly created project, pasted the old stuff, opened that - all the warnings about files that have not been existing for months are gone. Fingers crossed.
I had the same issue and solved it by simply dragging the specified files from finder into the project navigator (ensuring that "copy files" is selected in the dialog) and committing the files.
These warnings are not build warnings, they are about your SVN repository.
It is correct that the directories shown no longer exist, CocoaPods stores the headers in Pods/Headers/{Private,Public} now. You have to update your working copy to reflect those changes.
In my case I drag & dropped a number of files on my Xcode project window to add them. It made copies into my source directory but didn't put them where I wanted them to go (it put them at the root of my directory, I wanted them in a sub-directory). Without thinking I just grabbed them in the Finder and moved them to the directory I wanted them in. After going back into the project window it of course could not find them so I deleted them in the window and re added them. After compiling I started getting these errors.
I thought, as some mention above that it was a git issue but when I ran "git ls-tree --full-tree -r HEAD" I didn't see the files at all??
Anyway to fix it all I did was use the "Add File..." menu command to add each of the files to the default location, do a clean build, and then delete them from the project window (using move to trash) and it got rid of all the errors.
I had the warnings, and also could not commit changes under XCode (using svn). All I had to do was restart XCode and the problem went away.
This works for me:
Xcode -> ("option + click") Product -> Clean Build Folder...
Than restart xCode
In my case it was a problem with git and a case-insensitive file system.
I had inadvertently submitted the same file twice, using file paths that differed only in case:
MyProject/Resources/foo.png
MyProject/resources/foo.png
Xcode was complaining about one of the missing files.
Fixed by deleting the offending files, and re-adding.
cd MyProject
mv Resources/foo.png /tmp
git rm Resources/foo.png
git rm resources/foo.png
git commit
mv /tmp/foo.png Resources
git add Resources/foo.png
git commit
This is definitely related to source control. I renamed and moved a couple of non-committed plist files and got this error. I am using svn. I was able to fix this via Source Control - Commit by removing old referenced files.

Running Cocoa Pods application on machine where it isnt installed

I recently created an iOS project utilizing cocoa pods to install AfNetworking. I zipped the project and send to someone to check out. They are saying they cannot run the project and they are getting an error because the libpods.a is missing. My assumption is that they didnt open the project from the xcworkspace and tried to open via xcproj, but havent been able to confirm.
Someone who receives a cocoapods based application doesn't need to run pod:install on their machine do they?? (They do not have cocoapods on their machine. )
If the project folder (including the workspace and all subfolders such as the Pods folder) has been zipped in its entirety, and you've got it working on your machine, then the pods folder and its contents should be present, and the problem is probably that the project has been opened instead of the workspace.
You don't need Cocoapods installed at build time. You need it to create and populate the pods project and set up the workspace, but once that done, nothing else is needed until you want to update the Podfile.

Resources