Xcode 11 swift package manager unable resolve packages - ios

I keep on getting the following error when building a project in Xcode 11 which includes a couple of swift packages added via new Xcode interface
Showing All Messages :terminated(1): /Applications/Xcode-beta.app/Contents/Developer/usr/bin/git -C /Users/<xyz>/Library/Developer/Xcode/DerivedData/<xyz>-cqkqfkidemtecxegtugdwffhvvmp/SourcePackages/checkouts/ios-sign-in-with-apple checkout -f 2b61cc97dea9d34f913c22c799476eb8e0a31144 output:
Note: checking out '2b61cc97dea9d34f913c22c799476eb8e0a31144'.
You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:
git checkout -b <new-branch-name>
HEAD is now at 2b61cc9 inicial project
This repository is configured for Git LFS but 'git-lfs' was not found on your path. If you no longer wish to use Git LFS, remove this hook by deleting .git/hooks/post-checkout.

Linking git-lfs solved the issue
ln /usr/local/bin/git-lfs /Applications/Xcode-beta.app/Contents/Developer/usr/bin/git-lfs
Got the inspiration from here github link

Related

Git - Illegal characters in path git visual studio 2019

I'm working on Xamarin.Forms project and I'm in the master branch and I'm trying to check out another branch but I'm getting this error in VS 2019:
& I'm getting this error when using commands:
Notes:
This is my first time checking out this branch
I can check out other branches normally
The paths mentioned in the error don't exist.
I don't care about the ios application for this project, I focus on the Android one.
What should I do to fix this error and check out the branch successfully?
In command line, try and set a sparse checkout clone first, then open the IDE for your Xamarin project:
git clone --filter=blob:none --no-checkout https://github.com/remote/project
cd project
git sparse-checkout set /* !/.vs/JM?/xs/project-cache
git sparse-checkout init
# that sets git config core.sparseCheckoutCone true
git read-tree -mu HEAD
The idea is to ignore the content of .vs/JM?/xs/project-cache (assuming .vs is right under the root folder of the repository) on checkout (of any branch).

Why not appear the files in submodules added into my Xcode project?

I have a problem with my Xcode project. I'm using submodules of frameworks like alamofire. I added this following the github steps... running the following command:
$ git submodule add https://github.com/Alamofire/Alamofire.git
and then the next step like drop into project...
But my problem is then the commit and push. When I clone the project from git using sourcetree in other computer or I remove the repo and I download this, the folder of alamofire and others sdk are empty.
If I open the xcode project is red name, because haven't the files. But in my first local repository all work and if I try change to submodule in sourcetree the files are downloaded and appear.
But if I use:
git clone --recursive https://github.com/meme/myRepo.git FOLDER_NAME
with this command all files are downloaded.
I want get the content of those submodules when I clone my repo into a computer with sourcetree.
How can I solve this to then download the repo appear directly the sdks?
As illustrated in this thread:
There is a "Recurse submodules" option when cloning under "Advanced Options".
That should be enough for your original question.
However:
nothing when pulling, checking out, or switching branched; and no manual recursive submodule update functionality.
So:
The only way I know of updating submodules in SourceTree is to manually open each submodule (and recursively open each nested submodule) and look at the "Uncommitted changed" select only submodules that appear to have change and "Reset" the changes.

Filetree is not refreshing after switching branches - cloud9

In cloud9 IDE, I am doing simple rails app in master branch. I decided to experiment a little, so I created new branch like this:
git checkout -b experiment-branch
Then I created some controllers, models etc. but experiment fails and I do not committed it. However I dont't want to delete this branch, so I tried to go back to master:
git checkout master
and code (controllers, models etc) from the previous experiment was still there in filetree, ApplicationController etc.
I tried git reset --soft <desired-previous-commit-hash> but it not worked.
I assume the second command should return me the state of my app from before creating the branch experiment-branch. Am I right or I do something wrong?
If you have not tracked the new files you add in the experiment-branch - these are still lying around as untracked files.
Untracked files are not removed when you change branches.
You would need to clean them to remove the untracked files. use git clean -n (dry-run) to identify all the files that are untracked.
Then you could git clean -f to clean all the file shown in the dry-run. Or you could use the interactive mode git clean -I
To revert changes from tracked files, use git checkout .
Refer this post for more details.

Git merge conflict with workspace.xml

I'm trying to push my Rails project to Heroku, but Git isn't allowing me to do anything at the moment. Here's what I've done so far:
git push heroku failed because the heroku branch was "ahead" of my local branch, which should not have been possible.
I pulled and there was a conflict with .idea/workspace.xml. I wasn't able to find out what that file is, but it's huge and Git wrote all kinds of garble to it. Too much to manually "resolve" conflicts.
I saw some stackoverflow posts talking about git-ignoring that file (maybe it's some IDE file for RubyMine or something?), so I tried to move the file away to avoid the conflict
I ran git add -A (also tried git add . and git add)
git commit --amend fails because "You are in the middle of a merge"
git merge --abort fails because "Untracked working tree file '.idea/workspace.xml' would be overwritten by merge (despite the fact that the file has been moved)
git reset --merge fails for the same reason.
How can I make Git work again?
.idea/workspace.xml
This file is your idea workspace files. They are generated by IntelliJ tools.
I saw some stackoverflow posts talking about git-ignoring that file (maybe it's some IDE file for RubyMine or something?), so I tried to move the file away to avoid the conflict
Simply add the folder to your .gitignore but since its already committed you will have to remove it from the repository:
# Quit the merge
git merge --abort
# remove the whole folder from the repo
git rm -rf --cached .idea/
# add it to the .gitignore: idea/
# add and commit your changes
git add .- A
git commit -m " Removed idea folder"
git push origin <branch>
If you still unable to do it?
First reset the code to the previous state and then do the above code again.
The reset will take you to your last commit before the pull
git commit -am "message" worked (as opposed to amending a commit)
I have resolved a similar problem by simply deleting the workspace.xml file. By building and running the program again idea will autogenerate a compatible file.

Branch Then 'Reset' Rails Git Repository

I have a bit of a tricky problem. I restarted a current rails project from scratch in a new folder because I was redoing the app as a personal exercise. We've run into some issues on the 'official' version and now need to restart the project.
The problem is that we've been using git to keep track on the official project but I haven't been using it for my personal version.
I've branched the official git master repository using
git checkout -b restart_app
Now I'd like to clear out all the code in that branch and replace it with my personal version. I've tried to google the best approach to doing so but found some differing answers and I'm pretty new to working with git so I thought I'd put up a question here. What would be the best practice/solution for approaching this problem?
"I want replace all the files in restart_app with files from a different project folder"
Delete and replace the files by the ones you want.
The best practice is to do a git rm * first, then add your files, git add and commit.
A nice trick, you can use the --work-tree option of git:
git checkout restart_app
git rm -rf .
git add -A .
git commit -m "empty restart_app"
git --work-tree=/path/to/untracked/code add .
git commit -m "add new code"

Resources