Skip to content

Commit 5279c9f

Browse files
committed
Added iOS framework target to GitUpKit
1 parent aa5a206 commit 5279c9f

File tree

114 files changed

+22696
-18434
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

114 files changed

+22696
-18434
lines changed

.gitignore

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
11
.DS_Store
22
xcuserdata
33
project.xcworkspace
4-
5-
libgit2-*

.gitmodules

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
[submodule "XLFacility"]
22
path = GitUpKit/Third-Party/XLFacility
33
url = https://github.com/swisspol/XLFacility.git
4+
[submodule "libgit2"]
5+
path = GitUpKit/Third-Party/libgit2
6+
url = https://github.com/git-up/libgit2.git

GitUp/GitUp.xcodeproj/project.pbxproj

+35-17
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,20 @@
3333
/* End PBXBuildFile section */
3434

3535
/* Begin PBXContainerItemProxy section */
36+
E21753051B9150AE00BE234A /* PBXContainerItemProxy */ = {
37+
isa = PBXContainerItemProxy;
38+
containerPortal = E28A16DA1B87021600218332 /* GitUpKit.xcodeproj */;
39+
proxyType = 1;
40+
remoteGlobalIDString = E267E1A71B84D6C500BAB377;
41+
remoteInfo = GitUpKit;
42+
};
43+
E217538A1B91641F00BE234A /* PBXContainerItemProxy */ = {
44+
isa = PBXContainerItemProxy;
45+
containerPortal = E28A16DA1B87021600218332 /* GitUpKit.xcodeproj */;
46+
proxyType = 2;
47+
remoteGlobalIDString = E217531B1B91613300BE234A;
48+
remoteInfo = "GitUpKit (iOS)";
49+
};
3650
E21DCAF01B2538C5006424E8 /* PBXContainerItemProxy */ = {
3751
isa = PBXContainerItemProxy;
3852
containerPortal = E2C338A319F8562F00063D95 /* Project object */;
@@ -54,13 +68,6 @@
5468
remoteGlobalIDString = E2C338C419F8562F00063D95;
5569
remoteInfo = Tests;
5670
};
57-
E28A16E31B87022000218332 /* PBXContainerItemProxy */ = {
58-
isa = PBXContainerItemProxy;
59-
containerPortal = E28A16DA1B87021600218332 /* GitUpKit.xcodeproj */;
60-
proxyType = 1;
61-
remoteGlobalIDString = E267E1A71B84D6C500BAB377;
62-
remoteInfo = GitUpKit;
63-
};
6471
/* End PBXContainerItemProxy section */
6572

6673
/* Begin PBXCopyFilesBuildPhase section */
@@ -191,6 +198,7 @@
191198
isa = PBXGroup;
192199
children = (
193200
E28A16E01B87021600218332 /* GitUpKit.framework */,
201+
E217538B1B91641F00BE234A /* GitUpKit.framework */,
194202
E28A16E21B87021600218332 /* GitUpTests.xctest */,
195203
);
196204
name = Products;
@@ -256,6 +264,7 @@
256264
buildRules = (
257265
);
258266
dependencies = (
267+
E21753061B9150AE00BE234A /* PBXTargetDependency */,
259268
);
260269
name = Tool;
261270
productName = Tool;
@@ -277,7 +286,6 @@
277286
);
278287
dependencies = (
279288
E21DCAF11B2538C5006424E8 /* PBXTargetDependency */,
280-
E28A16E41B87022000218332 /* PBXTargetDependency */,
281289
);
282290
name = Application;
283291
productName = GitUp;
@@ -327,6 +335,13 @@
327335
/* End PBXProject section */
328336

329337
/* Begin PBXReferenceProxy section */
338+
E217538B1B91641F00BE234A /* GitUpKit.framework */ = {
339+
isa = PBXReferenceProxy;
340+
fileType = wrapper.framework;
341+
path = GitUpKit.framework;
342+
remoteRef = E217538A1B91641F00BE234A /* PBXContainerItemProxy */;
343+
sourceTree = BUILT_PRODUCTS_DIR;
344+
};
330345
E28A16E01B87021600218332 /* GitUpKit.framework */ = {
331346
isa = PBXReferenceProxy;
332347
fileType = wrapper.framework;
@@ -400,16 +415,16 @@
400415
/* End PBXSourcesBuildPhase section */
401416

402417
/* Begin PBXTargetDependency section */
418+
E21753061B9150AE00BE234A /* PBXTargetDependency */ = {
419+
isa = PBXTargetDependency;
420+
name = GitUpKit;
421+
targetProxy = E21753051B9150AE00BE234A /* PBXContainerItemProxy */;
422+
};
403423
E21DCAF11B2538C5006424E8 /* PBXTargetDependency */ = {
404424
isa = PBXTargetDependency;
405425
target = E21DCAE71B253847006424E8 /* Tool */;
406426
targetProxy = E21DCAF01B2538C5006424E8 /* PBXContainerItemProxy */;
407427
};
408-
E28A16E41B87022000218332 /* PBXTargetDependency */ = {
409-
isa = PBXTargetDependency;
410-
name = GitUpKit;
411-
targetProxy = E28A16E31B87022000218332 /* PBXContainerItemProxy */;
412-
};
413428
/* End PBXTargetDependency section */
414429

415430
/* Begin PBXVariantGroup section */
@@ -453,7 +468,7 @@
453468
buildSettings = {
454469
GCC_DYNAMIC_NO_PIC = YES;
455470
HEADER_SEARCH_PATHS = "../GitUpKit/Third-Party/libgit2/include";
456-
OTHER_LDFLAGS = "../GitUpKit/Third-Party/libgit2/lib/libgit2.a";
471+
OTHER_LDFLAGS = "$(BUILD_DIR)/$(CONFIGURATION)/libgit2.a";
457472
PRODUCT_NAME = gitup;
458473
SKIP_INSTALL = YES;
459474
};
@@ -464,7 +479,7 @@
464479
buildSettings = {
465480
GCC_DYNAMIC_NO_PIC = YES;
466481
HEADER_SEARCH_PATHS = "../GitUpKit/Third-Party/libgit2/include";
467-
OTHER_LDFLAGS = "../GitUpKit/Third-Party/libgit2/lib/libgit2.a";
482+
OTHER_LDFLAGS = "$(BUILD_DIR)/$(CONFIGURATION)/libgit2.a";
468483
PRODUCT_NAME = gitup;
469484
SKIP_INSTALL = YES;
470485
};
@@ -475,7 +490,7 @@
475490
buildSettings = {
476491
GCC_DYNAMIC_NO_PIC = YES;
477492
HEADER_SEARCH_PATHS = "../GitUpKit/Third-Party/libgit2/include";
478-
OTHER_LDFLAGS = "../GitUpKit/Third-Party/libgit2/lib/libgit2.a";
493+
OTHER_LDFLAGS = "$(BUILD_DIR)/$(CONFIGURATION)/libgit2.a";
479494
PRODUCT_NAME = gitup;
480495
SKIP_INSTALL = YES;
481496
};
@@ -485,13 +500,15 @@
485500
isa = XCBuildConfiguration;
486501
baseConfigurationReference = E27E37571B86F670000A551A /* Debug.xcconfig */;
487502
buildSettings = {
503+
SDKROOT = macosx;
488504
};
489505
name = Debug;
490506
};
491507
E2C338CD19F8562F00063D95 /* Release */ = {
492508
isa = XCBuildConfiguration;
493509
baseConfigurationReference = E27E37591B86F670000A551A /* Release.xcconfig */;
494510
buildSettings = {
511+
SDKROOT = macosx;
495512
};
496513
name = Release;
497514
};
@@ -518,7 +535,7 @@
518535
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
519536
BUNDLE_VERSION = 0;
520537
BUNDLE_VERSION_STRING = 1.0.1;
521-
CODE_SIGN_IDENTITY = "Developer ID Application";
538+
CODE_SIGN_IDENTITY = "Mac Developer";
522539
FRAMEWORK_SEARCH_PATHS = "$(SRCROOT)";
523540
GCC_DYNAMIC_NO_PIC = YES;
524541
INFOPLIST_FILE = Application/Info.plist;
@@ -533,6 +550,7 @@
533550
isa = XCBuildConfiguration;
534551
baseConfigurationReference = E27E37581B86F670000A551A /* Distribution.xcconfig */;
535552
buildSettings = {
553+
SDKROOT = macosx;
536554
};
537555
name = Distribution;
538556
};

GitUpKit/Core/GCRepository.m

+5
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,13 @@ @implementation GCRepository {
4545
// We can't guarantee XLFacility has been initialized yet as +load method can be called in arbitrary order
4646
+ (void)load {
4747
assert(pthread_main_np());
48+
49+
assert(git_libgit2_features() & GIT_FEATURE_THREADS);
50+
assert(git_libgit2_features() & GIT_FEATURE_HTTPS);
51+
assert(git_libgit2_features() & GIT_FEATURE_SSH);
4852
assert(git_libgit2_init() >= 1);
4953
assert(libssh2_init(0) == 0); // We can't have libgit2 using libssh2_session_init() and in turn calling this function on an arbitrary thread later on
54+
assert(git_openssl_set_locking() == -1);
5055
}
5156

5257
- (instancetype)initWithRepository:(git_repository*)repository error:(NSError**)error {

0 commit comments

Comments
 (0)