Cocoapods missing project.pbxproj after Git clone - ios

Im using cocoapods-0.36.0.beta.1 for a Swift IOS 8 project.
I keep code on a Git repo.
I got in a mess updating some libraries and decided to just clone down my project again.
I did the usual pod install after the clone. No complaints. Looked normal.
When i go to open the workspace I get
If i open the project i get
Has anyone any ideas on this as i'd love to get my project back? thanks

If you have the original project you can show the .xcodeproj's packet content and copy the .pbxproj file. Than, paste it inside the cloned .xcodeproj's packet content.

Related

Xcode delete pod files folder and schema after discard all changes

when I use Xcode 9 source control everything was good.
When I updated Xcode up to 10 and when I press discard all changes - Xcode has deleted pod files, run schemas, and one folder where I store .xliff files.
When I pressed to 'Discard all changes' I see this alert
I know that I can reinstall Pods and made new schema, but I don't won't do it every time.
Please give me advise to fix this problem.
Please give me my source control back)))
I had a similar issue and I solve it with this way.
In Terminal
cd "your project dir"
git add

Xcode 9 - linker command failed with exit code 1

While compiling the application getting as following error
" compiled with older version of Swift language (3.0) than previous files (4.0) file "
Could you please help me?
Use the xcworkspace to build instead of the xcproject?
This usually happens when using Cocoapods and you are building from the xcproject which doesn't know about the cocoapod libraries.
Delete the derived data and do a clean build.
And if you are building a framework, make sure you've selected Generic IOS Device while building or set the Build for Active Architecture only as true in Build Settings.
I think this happens because you changed your app name or maybe the target
look to solve this problem see your target in Podfile
and then come back to your xcode in the targets
select your target app and in linked Frameworks and Libraries (the last one down) see if there's
any pods with light color and a strange name than your target in the podfile
and remove it using the minus button down .
I'd rather fix the specific problem, but if none of the other answers worked a full reset can solve it. If you are getting this error and you are also getting error readouts that refer to "duplicate symbol files", AND all other efforts have failed, then a full reset could work for you.
What worked for me:
Read the error report to identify the repo that supposedly contains duplicate files.
Drag repo to the trash.
re-clone your repo.
set up your repo with correct remote tracking. git remote add <url.git>, or git remote set-url <url.git>
This absolutely worked for me. In my case for some elusive reason, when I ran git pull upstream develop for a local dependency, git would pull in/generate duplicate files from multiple commits.
After following the above steps, the issue went away and git pull upstream develop was no longer pulling from multiple commits at once. Perhaps there was a weird git cache for my repo.
I had the two copies of files in the codebase. Deleting one copy helped code to build successfully
I am probably late for you, but for future devs in problems...
If you have been manipulating the podfile or creating new targets or maybe changing the name of any of them, check that in build phases options your just have correct pod framework for the name of the targets.
if you have pod
first clean project and close Xcode then open terminal and go to folder of Project then pod update
open the project and run
in my case work!
I fixed this problem today by running the app in the simulator using the target associated with the bundle file named in the Build Settings-->Bundle Loader setting of the test target. Previously I had deleted my derived data folder while working on a different target that has a different Product Name than the one associated with the test target bundle file. Rerunning the app in the simulator must have recreated the bundle file in the derived data folder that the test target is looking for and then my tests started running fine.

Find .xcscmblueprint file

I have been suffering from my project and the latest Xcode 8, it seems to be i can't find this file .xcscmblueprint that contains the source control details of my project.
There is some conflicts in that file and even if i deleted the git from my Xcode project it wont be fixed unless i fixed it from that file.
i am also using pods with this project and i tried a lot to find it but i couldn't and also in this location is not generated and not found :
ProjectName > ProjectName.xcworkspace > xcshareddata >
ProjectName.xcscmblueprint
So how is it possible to generate or find this file ?
Update:
The main problem I'm facing with my git in the Xcode project is that the repository issue (scenario):
1- I have edited one class in the project.
2- i went to commit my changes in Xcode.
3- i get the following message :
4- In order for me to fix that i close Xcode completely and open it again and without changing anything.
5- commit and push the code successfully and Xcode doesn't complain about the repo.
I tried to clean the Xcode project, remove the git from Xcode and re init a new git, its the same issue over and over and i just can't seem to fix it ones for all.
Any Suggestions ?

XCodeproj empty after cloning from Git

I have an Swift project that utilizes two libraries: the SQLite and SwiftCSV project. They can be found on: https://github.com/stephencelis/SQLite.swift and https://github.com/naoty/SwiftCSV respectively. I followed the instructions on each respective Github README to incorporate the projects into my project which works fine, but when I push my project to Github and I have another teammate of mine clone the project, the SwiftCSV and SQLite projects turn up empty so my teammate has to re-add them into his project. I have been trying to google different responses but maybe I am looking for the wrong keywords. Any ideas on how to fix this?
You should (and may be) adding the above projects to your repo as submodules (if not, read up on them).
If you used submodules, they are not automatically checked out when you clone a repository. You can, however, use clone's --recursive flag to ensure submodules are checked out when someone first clones your project:
git clone --recursive git#github.com:your/project.git
If the project has already been cloned, one can check out the submodules by running the following incantation from within their project directory:
git submodule update --init
Note: Xcode is usually smart about letting you check out submodules from within Xcode itself. Check the Source Control menu and see if SQLite.swift or SwiftCSV show up under Working Copies.
If you merely downloaded the projects and dragged them into your Xcode project (rather than use submodules, as instructed above), they'll likely be referencing directories outside of your project. Make sure you move them to your project's directory before dragging them into your Xcode project. If you don't, the projects will appear red/unavailable on subsequent clones.
usually, xcodeproj is in gitignore, please remove it from .gitignore file

Does 'pod setup' need to be run every time a CocoaPod is added to a project?

Original issue: xcodeproj components didn't display in workspace
I've installed Cocoapods on my machine. When I install a pod in a project, a workspace is created, but when I open the workspace the files associated with the original project don't display. I had Xcode closed when I created the pod. I've attached a screen cap of my project after installing the Pods.
I think I've got an installation problem, but I don't know where I need to look to fix it. What/where should I be checking?!
Update: Compiler error
The following compiler error comes up when I open the workspace file:
podsexample.xcodeproj Couldn't load podsexample.xcodeproj because it is already opened from another project or workspace
I closed Xcode when I created the pod, so I'm stumped on this one.
Update 2: It works, but is this the way it's supposed to work? I got partway to the answer to my problem by following the steps outlined in this helpful post:
Can't get to work CocoaPods and Yosemite
In order to open the workspace file correctly, I have to run 'pod setup' each time. Are CocoaPods supposed to work like this, or is setup supposed to be a one time thing? If I've got an installation/configuration problem, where/what should I be looking at to fix?
Screen Cap of Original Issue
podsexample.xcodeproj Couldn't load podsexample.xcodeproj because it is already opened from another project or workspace
Looks like you had two copies of Xcode open with the same project. One was inside the Xcodeworkspace that CocoaPods created, and the other was the original Xcodeproject itself. Xcode doesn't allow this, so it won't compile as long as both are open. You only need to open the XCWorkspace.

Resources