I'm working in a project that has a few libraries that seem to be in a remote repository. For example:
When I clone the project, all of the libraries with that icon are missing. Is there another command I need to execute to download them?
For reference, this is an iOS project and these are Objective C libraries.
Generally third party libraries are added in project via CocoaPods or git submodules.
If your project using CocoaPods then you will find a podfile inside project directory, open terminal and navigate to directory contain podfile and then type in this command pod install to checkout all libraries, it will create a workspace, once you have workspace open that project via workspace always.
If other libraries are added as submodule then you can checkout using git submodule update --init.
My guess is that they are submodules of the repository you're clonning. Try adding the --recursive option to the clone command.
Related
I followed this link to add project to GitHub. I could successfully create the repository using these instructions.
But unable to add an Xcode project with pods(.xcworkspace) to GitHub.
I am aware that we shoud add only podfile to reduce the load. But Not sure how to achive this.
After few hours of trial error found the below solution to be working. If anyone have better soultion please suggest.
Open your git hub web, create a new repository with a readme and .gitignore file.
Clone the repo to your machine.Open terminal.
cd your_directory
git clone your_repo_url
copy and paste your existing project folder to this directory("your directory")- make sure you have deleted the local git from this folder Refer this link
open gitignore file and uncommnet the below line.(# Add this line if you want to avoid checking in source code from the Xcode workspace)
*.xcworkspace
In terminal run command git status
This will list out new changes you have done in the folder.
run command git add --all
run commit -m "commit message"
git push
Make sure you have removed large files from your project, files like video audio etc.
While you check out this repository to another folder, make sure you run pod install and create xcworkspace.
I'm interested on Running this GitHub repository of an iOS Application: https://github.com/septadev/SEPTA-iOS I opened the iSEPTA.xcodeproj file on XCode from the iSEPTA folder, but I'm getting these Buildtime Errors. For example: No such module 'ReSwift', and this is the window I get prompted when I select any of the yellow alerts, I'm not sure if I should perform these changes, yet.
Could it be some incomparability with my XCode and Swift versions?
Please, help!!
This project uses Carthage as a dependency management system for using external dependencies.
You should install Carthage to your computer and then run carthage update from the terminal in the root directory of the project. This will instal the dependencies and will allow you to run the project.
Take a look at Cartfile: it indicates this repo is using Carthage package manager. Follow their instructions to install dependent libraries
This repository requires Carthage ( https://github.com/Carthage/Carthage ) - this is a dependency manager. You can install it using Homebrew (https://brew.sh/)
brew install carthage
then you have to run carthageBuild.sh script (which runs carthage update):
./carthageBuild.sh
and then you have to open: Septa.xcworkspace file
This would be the correct solution if the project used Cocoapods. Since it uses Carthage, look to others answers unless you are referencing this answer to a similar issue.
You need to use Cocoapods to integrate the pods attached to the project. Often times projects will not come with them precompiled. Either you opened the blue project file with the *.xcodeproj extension instead of the white project file with the *.xcworkspace extension.... or you don't have the pods installed at all. In which case read below.
Instructions as follows:
cd to project directory
Install Cocoapods
sudo gem install cocoapods
Ensure the you have the given pods in your repo collection for install
pod repo update
Install the pods
pod install
Validate Project Settings
This is necessary until cocoapods v1.6 release (beta is out).
Open the white project file with the *.xcworkspace extension
After those steps are complete, the project should run normally.
As a POC, I created a new repository (on BitBucket) and tried to push a dummy project, everything worked as it should; I tried to apply the same exact process on my actual project, which has cocoapods, it has been pushed successfully, but when I tried to checked it out, I got the source code without the pods!
I viewed the source of the repo, it does not contains the pod directory.
Here are the files that I tried to push (16 files and folders, 192MB Size):
And that's what the repo contains (14 files and folders 121MB Size):
Note that the last tow folders in my local machine (Pods and widget) are not in the repo.
There is no .gitignore file.
Also, I checked:
git push ignore cocoapods
Commit to git after switching to workspace and adding CocoaPods in Xcode?
without any useful results.
Any advice would be appreciated.
CocoaPods is a dependency manager:
The dependencies for your projects are specified in a single text file called a Podfile. CocoaPods will resolve dependencies between libraries, fetch the resulting source code, then link it together in an Xcode workspace to build your project.
You can run pod install to install the pods for your project, which will create and populate the Pods/ directory.
The reason the Pods/ directory isn't in your repository even in the absence of a .gitignore file is probably that it contains other Git repositories (i.e. directories containing their own .git/ directory). Git doesn't track nested repositories.
(It is also possible that Xcode ignores that directory by default, but I'm not an iOS developer so I can't be sure about that.)
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
I am new to manage library dependencies in Objective-C projects.
I need to know how to link a library in my svn.
link :svn://ibrahim#svn.xxxx.info/development/iOS/myFoundation/here_Are_the_.{h/m}'
I only know how Specifies a dependency of the projects on Github.
Ex from Terminal :
1-open -e Podfile
2-dependency 'ASIHTTPRequest'
3-pod install myproj.xcodeproj/
Any idea for svn will be great.