Skip to content

Commit 912c7a7

Browse files
committed
Revise subproject integration instructions
1 parent e8f5ce0 commit 912c7a7

File tree

1 file changed

+20
-21
lines changed

1 file changed

+20
-21
lines changed

README.md

Lines changed: 20 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -108,47 +108,46 @@ _dSYM files are not currently included in the GitHub release zip files. You will
108108
1. Unzip the file.
109109
1. Follow the Carthage instructions #3 or #4, depending on platform.
110110

111+
Note that the iOS framework we release is a "fat" framework containing slices for both the iOS Simulator and devices. This makes it easy to get started with your iOS project. However, Apple does not currently allow apps containing frameworks with simulator slices to be submitted to the app store. Carthage (above) already has a solution for this. If you're looking to roll your own, take a look at Realm's [strip frameworks script](https://github.com/realm/realm-cocoa/blob/master/scripts/strip-frameworks.sh).
112+
111113

112114
## Subproject
113115

114-
### OS X
116+
### Examples
117+
118+
* OS X: [CommitViewer](https://github.com/Abizern/CommitViewer)
119+
* iOS: [ObjectiveGit iOS Example](https://github.com/Raekye/ObjectiveGit-iOS-Example)
120+
121+
1. Add ObjectiveGit as a submodule to your project:
115122

116-
Example: [CommitViewer](https://github.com/Abizern/CommitViewer)
123+
```
124+
git submodule add https://github.com/libgit2/objective-git.git External/ObjectiveGit
125+
```
117126

127+
1. Run `script/bootstrap`.
118128
1. Drag the `ObjectiveGitFramework.xcodeproj` file into the Project Navigator pane of your project.
119-
1. Add the ObjectiveGit framework as a target dependency of your application.
129+
1. Add `ObjectiveGit-Mac` or `ObjectiveGit-iOS` as a target dependency of your application, depending on platform.
120130
1. Link your application with `ObjectiveGit.framework`.
121-
1. Add a new "Copy Files" build phase, set the destination to "Frameworks" and add `ObjectiveGit.framework` to that. This will package the framework with your application as an embedded private framework.
122131
1. Set the “Header Search Paths” (`HEADER_SEARCH_PATHS`) build setting to the correct path for the libgit2 headers in your project. For example, if you added the submodule to your project as `External/ObjectiveGit`, you would set this build setting to `External/ObjectiveGit/External/libgit2/include`. If you see build errors saying that `git2/filter.h` cannot be found, then double-check that you set this setting correctly.
123-
1. Don't forget to `#import <ObjectiveGit/ObjectiveGit.h>` as you would with any other framework.
132+
1. Add a new "Copy Files" build phase, set the destination to "Frameworks" and add `ObjectiveGit.framework` to the list. This will package the framework with your application as an embedded private framework.
133+
* It's hard to tell the difference between the platforms, but the Mac framework is in `build/Debug` whereas the iOS framework is in `build/Debug-iphoneos`
134+
1. Don't forget to `#import <ObjectiveGit/ObjectiveGit.h>` or `@import ObjectiveGit;` as you would with any other framework.
124135

125-
### iOS
126-
127-
Example: [ObjectiveGit iOS Example](https://github.com/Raekye/ObjectiveGit-iOS-Example)
128-
129-
Getting started is slightly more difficult on iOS because third-party frameworks are not officially supported. ObjectiveGit offers a static library instead. In summary:
130-
131-
1. Drag `ObjectiveGitFramework.xcodeproj` into the Project Navigator.
132-
1. Add `ObjectiveGit-iOS` as a target dependency of your application.
133-
1. Link your application to `libObjectiveGit-iOS.a`, `libz.dylib`, and `libiconv.dylib`.
134-
1. In your target's build settings:
135-
1. Set "Always Search User Paths" to `YES`
136-
1. Add `$(BUILT_PRODUCTS_DIR)/usr/local/include` and
137-
`PATH/TO/OBJECTIVE-GIT/External/libgit2/include` to the "User Header
138-
Search Paths"
139-
1. Add `-all_load` to the "Other Linker Flags"
140136

141137

142138
## Contributing
143139

144-
Fork the repository on GitHub, make it awesomer (preferably in a branch named for the topic), send a pull request.
140+
1. Fork this repository
141+
1. Make it awesomer (preferably in a branch named for the topic)
142+
1. Send a pull request
145143

146144
All contributions should match GitHub's [Objective-C coding
147145
conventions](https://github.com/github/objective-c-conventions).
148146

149147
You can see all the amazing people that have contributed to this project
150148
[here](https://github.com/libgit2/objective-git/contributors).
151149

150+
152151
## License
153152

154153
ObjectiveGit is released under the MIT license. See

0 commit comments

Comments
 (0)