diff --git a/GitUp/GitUp.xcodeproj/project.pbxproj b/GitUp/GitUp.xcodeproj/project.pbxproj index b728b708..ec1054e8 100644 --- a/GitUp/GitUp.xcodeproj/project.pbxproj +++ b/GitUp/GitUp.xcodeproj/project.pbxproj @@ -15,7 +15,6 @@ 0A2F489223683DD60072C6FB /* AuthenticationWindowController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 0A2F489023683DD60072C6FB /* AuthenticationWindowController.xib */; }; 0A3388BC2353BD630022528D /* WelcomeWindowController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 0A3388BA2353BD630022528D /* WelcomeWindowController.xib */; }; 0A0C000126D8020000BEEF00 /* libgit2.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0A0C001126D8020000BEEF00 /* libgit2.xcframework */; }; - 0A0C000226D8020000BEEF00 /* libssh2.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0A0C001226D8020000BEEF00 /* libssh2.xcframework */; }; 0A0C000326D8020000BEEF00 /* libssl.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0A0C001326D8020000BEEF00 /* libssl.xcframework */; }; 0A0C000426D8020000BEEF00 /* libcrypto.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0A0C001426D8020000BEEF00 /* libcrypto.xcframework */; }; 0A0C000526D8020000BEEF00 /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0A0C001526D8020000BEEF00 /* Security.framework */; }; @@ -134,7 +133,6 @@ 0AD4625A232711B000BE28D1 /* WelcomeWindowController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = WelcomeWindowController.m; sourceTree = ""; }; 0AE7F5EE2312C1B000B06050 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; 0A0C001126D8020000BEEF00 /* libgit2.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = libgit2.xcframework; path = "../GitUpKit/Third-Party/libgit2.xcframework"; sourceTree = SOURCE_ROOT; }; - 0A0C001226D8020000BEEF00 /* libssh2.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = libssh2.xcframework; path = "../GitUpKit/Third-Party/libssh2.xcframework"; sourceTree = SOURCE_ROOT; }; 0A0C001326D8020000BEEF00 /* libssl.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = libssl.xcframework; path = "../GitUpKit/Third-Party/libssl.xcframework"; sourceTree = SOURCE_ROOT; }; 0A0C001426D8020000BEEF00 /* libcrypto.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = libcrypto.xcframework; path = "../GitUpKit/Third-Party/libcrypto.xcframework"; sourceTree = SOURCE_ROOT; }; 0A0C001526D8020000BEEF00 /* Security.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Security.framework; path = System/Library/Frameworks/Security.framework; sourceTree = SDKROOT; }; @@ -184,7 +182,6 @@ 0A0C000526D8020000BEEF00 /* Security.framework in Frameworks */, 0A0C000626D8020000BEEF00 /* CoreFoundation.framework in Frameworks */, 0A0C000126D8020000BEEF00 /* libgit2.xcframework in Frameworks */, - 0A0C000226D8020000BEEF00 /* libssh2.xcframework in Frameworks */, 0A0C000326D8020000BEEF00 /* libssl.xcframework in Frameworks */, 0A0C000426D8020000BEEF00 /* libcrypto.xcframework in Frameworks */, DBBEE685256B0A0200F96DAF /* libiconv.tbd in Frameworks */, @@ -212,7 +209,6 @@ 0A0C001426D8020000BEEF00 /* libcrypto.xcframework */, 0A0C001126D8020000BEEF00 /* libgit2.xcframework */, DBBEE684256B0A0200F96DAF /* libiconv.tbd */, - 0A0C001226D8020000BEEF00 /* libssh2.xcframework */, 0A0C001326D8020000BEEF00 /* libssl.xcframework */, DBBEE687256B0A0A00F96DAF /* libz.tbd */, 0A0C001526D8020000BEEF00 /* Security.framework */, @@ -497,7 +493,7 @@ ); runOnlyForDeploymentPostprocessing = 1; shellPath = /bin/sh; - shellScript = "# Information derived from https://stackoverflow.com/questions/77397157/mapbox-xcframework-ios-signature-couldn-t-be-copied-to-signatures-because-an-i\nif [ \"$XCODE_VERSION_MAJOR\" -ge \"1500\" ]; then\n echo \"Remove signature files (Xcode 15 workaround)\"\n find \"$BUILD_DIR/${CONFIGURATION}/libssl.xcframework-macos.signature\" -name \"*.signature\" -type f | xargs -r rm\n find \"$BUILD_DIR/${CONFIGURATION}/libcrypto.xcframework-macos.signature\" -name \"*.signature\" -type f | xargs -r rm\n find \"$BUILD_DIR/${CONFIGURATION}/libssh2.xcframework-macos.signature\" -name \"*.signature\" -type f | xargs -r rm\n find \"$BUILD_DIR/${CONFIGURATION}/Sparkle.xcframework-macos.signature\" -name \"*.signature\" -type f | xargs -r rm\nelse\n echo \"No signature files to remove (Xcode version is less than 1500)\"\nfi\n"; + shellScript = "# Information derived from https://stackoverflow.com/questions/77397157/mapbox-xcframework-ios-signature-couldn-t-be-copied-to-signatures-because-an-i\nif [ \"$XCODE_VERSION_MAJOR\" -ge \"1500\" ]; then\n echo \"Remove signature files (Xcode 15 workaround)\"\n find \"$BUILD_DIR/${CONFIGURATION}/libssl.xcframework-macos.signature\" -name \"*.signature\" -type f | xargs -r rm\n find \"$BUILD_DIR/${CONFIGURATION}/libcrypto.xcframework-macos.signature\" -name \"*.signature\" -type f | xargs -r rm\n find \"$BUILD_DIR/${CONFIGURATION}/Sparkle.xcframework-macos.signature\" -name \"*.signature\" -type f | xargs -r rm\nelse\n echo \"No signature files to remove (Xcode version is less than 1500)\"\nfi\n"; }; /* End PBXShellScriptBuildPhase section */ diff --git a/GitUpKit/Core/GCRepository.m b/GitUpKit/Core/GCRepository.m index 43f9ac8a..31ae819f 100644 --- a/GitUpKit/Core/GCRepository.m +++ b/GitUpKit/Core/GCRepository.m @@ -18,7 +18,6 @@ #endif #import -#import #import #if !TARGET_OS_IPHONE #import @@ -119,7 +118,6 @@ + (void)load { assert(git_libgit2_features() & GIT_FEATURE_HTTPS); assert(git_libgit2_features() & GIT_FEATURE_SSH); assert(git_libgit2_init() >= 1); - 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 #if !TARGET_OS_IPHONE struct stat info; diff --git a/GitUpKit/GitUpKit.xcodeproj/project.pbxproj b/GitUpKit/GitUpKit.xcodeproj/project.pbxproj index a7efa2d3..5ade920c 100644 --- a/GitUpKit/GitUpKit.xcodeproj/project.pbxproj +++ b/GitUpKit/GitUpKit.xcodeproj/project.pbxproj @@ -8,18 +8,15 @@ /* Begin PBXBuildFile section */ 0A0B000126D8010000BEEF00 /* libgit2.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0A0B001126D8010000BEEF00 /* libgit2.xcframework */; }; - 0A0B000226D8010000BEEF00 /* libssh2.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0A0B001226D8010000BEEF00 /* libssh2.xcframework */; }; 0A0B000326D8010000BEEF00 /* libssl.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0A0B001326D8010000BEEF00 /* libssl.xcframework */; }; 0A0B000426D8010000BEEF00 /* libcrypto.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0A0B001426D8010000BEEF00 /* libcrypto.xcframework */; }; 0A0B000526D8010000BEEF00 /* CoreFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0A0B001526D8010000BEEF00 /* CoreFoundation.framework */; }; 0A0B000626D8010000BEEF00 /* libgit2.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0A0B001126D8010000BEEF00 /* libgit2.xcframework */; }; - 0A0B000726D8010000BEEF00 /* libssh2.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0A0B001226D8010000BEEF00 /* libssh2.xcframework */; }; 0A0B000826D8010000BEEF00 /* libssl.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0A0B001326D8010000BEEF00 /* libssl.xcframework */; }; 0A0B000926D8010000BEEF00 /* libcrypto.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0A0B001426D8010000BEEF00 /* libcrypto.xcframework */; }; 0A0B000A26D8010000BEEF00 /* CoreFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0A0B001526D8010000BEEF00 /* CoreFoundation.framework */; }; 0A0B000B26D8010000BEEF00 /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0A1DA51D265806140041E737 /* Security.framework */; }; 0A0B000C26D8010000BEEF00 /* libgit2.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0A0B001126D8010000BEEF00 /* libgit2.xcframework */; }; - 0A0B000D26D8010000BEEF00 /* libssh2.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0A0B001226D8010000BEEF00 /* libssh2.xcframework */; }; 0A0B000E26D8010000BEEF00 /* libssl.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0A0B001326D8010000BEEF00 /* libssl.xcframework */; }; 0A0B000F26D8010000BEEF00 /* libcrypto.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0A0B001426D8010000BEEF00 /* libcrypto.xcframework */; }; 0A0B001026D8010000BEEF00 /* CoreFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0A0B001526D8010000BEEF00 /* CoreFoundation.framework */; }; @@ -365,7 +362,6 @@ /* Begin PBXFileReference section */ 0A0B001126D8010000BEEF00 /* libgit2.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = libgit2.xcframework; path = "Third-Party/libgit2.xcframework"; sourceTree = ""; }; - 0A0B001226D8010000BEEF00 /* libssh2.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = libssh2.xcframework; path = "Third-Party/libssh2.xcframework"; sourceTree = ""; }; 0A0B001326D8010000BEEF00 /* libssl.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = libssl.xcframework; path = "Third-Party/libssl.xcframework"; sourceTree = ""; }; 0A0B001426D8010000BEEF00 /* libcrypto.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = libcrypto.xcframework; path = "Third-Party/libcrypto.xcframework"; sourceTree = ""; }; 0A0B001526D8010000BEEF00 /* CoreFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreFoundation.framework; path = System/Library/Frameworks/CoreFoundation.framework; sourceTree = SDKROOT; }; @@ -600,7 +596,6 @@ 0A0B000B26D8010000BEEF00 /* Security.framework in Frameworks */, 0A0B000A26D8010000BEEF00 /* CoreFoundation.framework in Frameworks */, 0A0B000626D8010000BEEF00 /* libgit2.xcframework in Frameworks */, - 0A0B000726D8010000BEEF00 /* libssh2.xcframework in Frameworks */, 0A0B000826D8010000BEEF00 /* libssl.xcframework in Frameworks */, 0A0B000926D8010000BEEF00 /* libcrypto.xcframework in Frameworks */, DBBEE674256B09B500F96DAF /* libiconv.tbd in Frameworks */, @@ -616,7 +611,6 @@ 0A1DA51E265806140041E737 /* Security.framework in Frameworks */, 0A0B000526D8010000BEEF00 /* CoreFoundation.framework in Frameworks */, 0A0B000126D8010000BEEF00 /* libgit2.xcframework in Frameworks */, - 0A0B000226D8010000BEEF00 /* libssh2.xcframework in Frameworks */, 0A0B000326D8010000BEEF00 /* libssl.xcframework in Frameworks */, 0A0B000426D8010000BEEF00 /* libcrypto.xcframework in Frameworks */, DBBEE655256B095000F96DAF /* libiconv.tbd in Frameworks */, @@ -632,7 +626,6 @@ 0A0B001626D8010000BEEF00 /* Security.framework in Frameworks */, 0A0B001026D8010000BEEF00 /* CoreFoundation.framework in Frameworks */, 0A0B000C26D8010000BEEF00 /* libgit2.xcframework in Frameworks */, - 0A0B000D26D8010000BEEF00 /* libssh2.xcframework in Frameworks */, 0A0B000E26D8010000BEEF00 /* libssl.xcframework in Frameworks */, 0A0B000F26D8010000BEEF00 /* libcrypto.xcframework in Frameworks */, 1DADC0DE25A25D5D008C2C35 /* libiconv.tbd in Frameworks */, @@ -661,7 +654,6 @@ 0A0B001426D8010000BEEF00 /* libcrypto.xcframework */, 0A0B001126D8010000BEEF00 /* libgit2.xcframework */, DBBEE654256B095000F96DAF /* libiconv.tbd */, - 0A0B001226D8010000BEEF00 /* libssh2.xcframework */, 0A0B001326D8010000BEEF00 /* libssl.xcframework */, DBBEE637256B08D300F96DAF /* libsqlite3.xcframework */, DBBEE64C256B094000F96DAF /* libz.tbd */, diff --git a/GitUpKit/Third-Party/libgit2 b/GitUpKit/Third-Party/libgit2 index ac28d52d..4c47e7af 160000 --- a/GitUpKit/Third-Party/libgit2 +++ b/GitUpKit/Third-Party/libgit2 @@ -1 +1 @@ -Subproject commit ac28d52d0bb35661d337235aa35601e8e9dfa420 +Subproject commit 4c47e7af40432242e96bf5a2fb4a8a5612b928de diff --git a/GitUpKit/Third-Party/libgit2.xcframework/Info.plist b/GitUpKit/Third-Party/libgit2.xcframework/Info.plist index c2547f74..ed501e7a 100644 --- a/GitUpKit/Third-Party/libgit2.xcframework/Info.plist +++ b/GitUpKit/Third-Party/libgit2.xcframework/Info.plist @@ -26,7 +26,7 @@ HeadersPath Headers LibraryIdentifier - macos-arm64_x86_64 + ios-arm64_x86_64-simulator LibraryPath libgit2.a SupportedArchitectures @@ -35,7 +35,9 @@ x86_64 SupportedPlatform - macos + ios + SupportedPlatformVariant + simulator BinaryPath @@ -43,7 +45,7 @@ HeadersPath Headers LibraryIdentifier - ios-arm64_x86_64-simulator + macos-arm64_x86_64 LibraryPath libgit2.a SupportedArchitectures @@ -52,9 +54,7 @@ x86_64 SupportedPlatform - ios - SupportedPlatformVariant - simulator + macos CFBundlePackageType diff --git a/GitUpKit/Third-Party/libgit2.xcframework/ios-arm64/libgit2.a b/GitUpKit/Third-Party/libgit2.xcframework/ios-arm64/libgit2.a index 20c93aa6..0d6705a6 100644 Binary files a/GitUpKit/Third-Party/libgit2.xcframework/ios-arm64/libgit2.a and b/GitUpKit/Third-Party/libgit2.xcframework/ios-arm64/libgit2.a differ diff --git a/GitUpKit/Third-Party/libgit2.xcframework/ios-arm64_x86_64-simulator/libgit2.a b/GitUpKit/Third-Party/libgit2.xcframework/ios-arm64_x86_64-simulator/libgit2.a index 81d4bbb8..7ffb535b 100644 Binary files a/GitUpKit/Third-Party/libgit2.xcframework/ios-arm64_x86_64-simulator/libgit2.a and b/GitUpKit/Third-Party/libgit2.xcframework/ios-arm64_x86_64-simulator/libgit2.a differ diff --git a/GitUpKit/Third-Party/libgit2.xcframework/macos-arm64_x86_64/libgit2.a b/GitUpKit/Third-Party/libgit2.xcframework/macos-arm64_x86_64/libgit2.a index 2cb84192..529bf1ed 100644 Binary files a/GitUpKit/Third-Party/libgit2.xcframework/macos-arm64_x86_64/libgit2.a and b/GitUpKit/Third-Party/libgit2.xcframework/macos-arm64_x86_64/libgit2.a differ diff --git a/GitUpKit/Third-Party/rebuild-libgit2.sh b/GitUpKit/Third-Party/rebuild-libgit2.sh index 97fc72db..f8eb93c8 100755 --- a/GitUpKit/Third-Party/rebuild-libgit2.sh +++ b/GitUpKit/Third-Party/rebuild-libgit2.sh @@ -20,9 +20,6 @@ function build_arch_library() { exit 1 fi - local LIBSSH2_PREFIX="$DIRNAME/libssh2.xcframework/$XCFRAMEWORK_SUBDIR" - local LIBSSL_PREFIX="$DIRNAME/libssl.xcframework/$XCFRAMEWORK_SUBDIR" - local LIBCRYPTO_PREFIX="$DIRNAME/libcrypto.xcframework/$XCFRAMEWORK_SUBDIR" local SDKROOT="`xcrun --sdk "$PLATFORM" --show-sdk-path`" local DEPLOYMENT_TARGET="$IOS_VERSION_MIN" local REGEX_BACKEND="builtin" @@ -45,17 +42,13 @@ function build_arch_library() { -DBUILD_CLI=OFF \ -DBUILD_EXAMPLES=OFF \ -DBUILD_FUZZERS=OFF \ - -DUSE_SSH=libssh2 \ + -DUSE_SSH=exec \ -DUSE_HTTPS=SecureTransport \ -DUSE_SHA1=CollisionDetection \ -DUSE_SHA256=CommonCrypto \ -DREGEX_BACKEND="$REGEX_BACKEND" \ -DUSE_HTTP_PARSER=builtin \ - -DPKG_CONFIG_EXECUTABLE=/usr/bin/false \ - -DLIBSSH2_INCLUDE_DIR="$LIBSSH2_PREFIX/Headers" \ - -DLIBSSH2_LIBRARY="$LIBSSH2_PREFIX/libssh2.a" \ - -DHAVE_LIBSSH2_MEMORY_CREDENTIALS=1 \ - -DCMAKE_REQUIRED_LIBRARIES="$LIBSSH2_PREFIX/libssh2.a;$LIBSSL_PREFIX/libssl.a;$LIBCRYPTO_PREFIX/libcrypto.a;z" + -DPKG_CONFIG_EXECUTABLE=/usr/bin/false cmake --build "$BUILD_DIR" --target install --config Release }