Re: Sharing code between projects
Re: Sharing code between projects
- Subject: Re: Sharing code between projects
- From: Jens Alfke <email@hidden>
- Date: Mon, 29 Apr 2013 09:27:46 -0700
On Apr 29, 2013, at 8:56 AM, Cody Garvin < email@hidden> wrote: I'd look into creating a repo for that code base and adding it as a us module to your main project. This is all assuming everything is git based. A simple git submodule update will make sure your submodule code base is up to date. You can treat your submodules as you would a normal repo
+1 to this. I used to keep library source in a single place and then add it to multiple projects, but hardcoding the path to the library makes the app projects non-portable. It also means you can inadvertently break of other apps if you edit the library in one of them, e.g. by making an incompatible API change or altering the behavior of a method.
Submodules may feel like a pain to set up the first time, but once you get used to them they're quite easy. Besides keeping the library code inside your app source folder, they also have the advantage that the library stays locked to the same revision until you explicitly update it.
—Jens |
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden