From 779d4d8bdc0529bdf68c7fe595fe185a6763ec70 Mon Sep 17 00:00:00 2001 From: hiddify Date: Mon, 8 Jan 2024 17:30:45 +0330 Subject: [PATCH] fix: some bugs in ios --- Makefile | 8 +++++--- ios/Flutter/AppFrameworkInfo.plist | 4 ++-- ios/Podfile | 4 +++- ios/Podfile.lock | 7 +------ ios/Runner.xcodeproj/project.pbxproj | 13 +++++++++++++ ios/Runner/Info.plist | 2 +- libcore | 2 +- 7 files changed, 26 insertions(+), 14 deletions(-) diff --git a/Makefile b/Makefile index 04d2ca2e..292fdfaa 100644 --- a/Makefile +++ b/Makefile @@ -92,8 +92,8 @@ macos-libs: curl -L $(CORE_URL)/$(CORE_NAME)-macos-universal.dylib.gz | gunzip > $(DESKTOP_OUT)/libcore.dylib ios-libs: #not tested - mkdir -p $(DESKTOP_OUT)/ &&\ - rm -rf $(IOS_OUT)/Libcore.xcframework + mkdir -p $(DESKTOP_OUT)/ && \ + rm -rf $(IOS_OUT)/Libcore.xcframework && \ curl -L $(CORE_URL)/$(CORE_NAME)-ios.xcframework.tar.gz | tar xz -C "$(IOS_OUT)" && \ mv $(IOS_OUT)/$(CORE_NAME)-ios.xcframework $(IOS_OUT)/Libcore.xcframework @@ -117,7 +117,9 @@ build-macos-libs: make -C libcore -f Makefile macos-universal && mv $(BINDIR)/$(CORE_NAME)-macos-universal.dylib $(DESKTOP_OUT)/libcore.dylib build-ios-libs: - make -C libcore -f Makefile ios && mv $(BINDIR)/$(CORE_NAME)-ios.xcframework $(IOS_OUT)/Libcore.xcframework + rm -rf $(IOS_OUT)/Libcore.xcframework && \ + make -C libcore -f Makefile ios && \ + mv $(BINDIR)/$(CORE_NAME)-ios.xcframework $(IOS_OUT)/Libcore.xcframework release: # Create a new tag for release. @echo "previous version was $$(git describe --tags $$(git rev-list --tags --max-count=1))" diff --git a/ios/Flutter/AppFrameworkInfo.plist b/ios/Flutter/AppFrameworkInfo.plist index 571b2785..076ad3e9 100644 --- a/ios/Flutter/AppFrameworkInfo.plist +++ b/ios/Flutter/AppFrameworkInfo.plist @@ -3,7 +3,7 @@ CFBundleDevelopmentRegion - en + $(DEVELOPMENT_LANGUAGE) CFBundleExecutable $(EXECUTABLE_NAME) CFBundleIdentifier @@ -11,7 +11,7 @@ CFBundleInfoDictionaryVersion 6.0 CFBundleName - Hiddify Next + $(PRODUCT_NAME) CFBundlePackageType FMWK CFBundleShortVersionString diff --git a/ios/Podfile b/ios/Podfile index da1e90fe..4218ce42 100644 --- a/ios/Podfile +++ b/ios/Podfile @@ -35,7 +35,9 @@ target 'Runner' do target 'RunnerTests' do inherit! :search_paths end - pod 'Libcore', :path => './Frameworks/Libcore.xcframework' + # target 'SingBoxPacketTunnel' do + # pod 'Libcore', :path => './Frameworks/Libcore.xcframework' + # end end diff --git a/ios/Podfile.lock b/ios/Podfile.lock index eda50aab..428e894a 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -36,7 +36,6 @@ PODS: - GoogleUtilitiesComponents (1.1.0): - GoogleUtilities/Logger - GTMSessionFetcher/Core (2.3.0) - - Libcore (1.0.0.local) - MLImage (1.0.0-beta4) - MLKitBarcodeScanning (3.0.0): - MLKitCommon (~> 9.0) @@ -106,7 +105,6 @@ DEPENDENCIES: - device_info_plus (from `.symlinks/plugins/device_info_plus/ios`) - Flutter (from `Flutter`) - flutter_native_splash (from `.symlinks/plugins/flutter_native_splash/ios`) - - Libcore (from `./Frameworks/Libcore.xcframework`) - mobile_scanner (from `.symlinks/plugins/mobile_scanner/ios`) - package_info_plus (from `.symlinks/plugins/package_info_plus/ios`) - path_provider_foundation (from `.symlinks/plugins/path_provider_foundation/darwin`) @@ -144,8 +142,6 @@ EXTERNAL SOURCES: :path: Flutter flutter_native_splash: :path: ".symlinks/plugins/flutter_native_splash/ios" - Libcore: - :path: "./Frameworks/Libcore.xcframework" mobile_scanner: :path: ".symlinks/plugins/mobile_scanner/ios" package_info_plus: @@ -176,7 +172,6 @@ SPEC CHECKSUMS: GoogleUtilities: 0759d1a57ebb953965c2dfe0ba4c82e95ccc2e34 GoogleUtilitiesComponents: 679b2c881db3b615a2777504623df6122dd20afe GTMSessionFetcher: 3a63d75eecd6aa32c2fc79f578064e1214dfdec2 - Libcore: 755017c5b3afb0244329093a5f20c1cc04a99831 MLImage: 7bb7c4264164ade9bf64f679b40fb29c8f33ee9b MLKitBarcodeScanning: 04e264482c5f3810cb89ebc134ef6b61e67db505 MLKitCommon: c1b791c3e667091918d91bda4bba69a91011e390 @@ -196,6 +191,6 @@ SPEC CHECKSUMS: sqlite3_flutter_libs: eb769059df0356dc52ddda040f09cacc9391a7cf url_launcher_ios: bf5ce03e0e2088bad9cc378ea97fa0ed5b49673b -PODFILE CHECKSUM: 367d7a6193b749777e3939af38a774b483fbfab7 +PODFILE CHECKSUM: b2f23486238d2db8c0e4efaba841097cb2253271 COCOAPODS: 1.14.3 diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj index b467fc9e..46aef73b 100644 --- a/ios/Runner.xcodeproj/project.pbxproj +++ b/ios/Runner.xcodeproj/project.pbxproj @@ -171,6 +171,7 @@ 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; }; 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; + 7CA62594950187FCFE36B54C /* Pods-Runner-SingBoxPacketTunnel.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner-SingBoxPacketTunnel.debug.xcconfig"; path = "Target Support Files/Pods-Runner-SingBoxPacketTunnel/Pods-Runner-SingBoxPacketTunnel.debug.xcconfig"; sourceTree = ""; }; 7E8B7AF73AD416B8FAA5E9B0 /* Pods-RunnerTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.debug.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.debug.xcconfig"; sourceTree = ""; }; 90E93DE403BDFA627F3AA51E /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = ""; }; 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; @@ -181,8 +182,10 @@ 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 9A37A927A1A9458918B3C12A /* Pods-RunnerTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.release.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.release.xcconfig"; sourceTree = ""; }; + 9AC67B4DCF829F5B6F63AA7D /* Pods-Runner-SingBoxPacketTunnel.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner-SingBoxPacketTunnel.release.xcconfig"; path = "Target Support Files/Pods-Runner-SingBoxPacketTunnel/Pods-Runner-SingBoxPacketTunnel.release.xcconfig"; sourceTree = ""; }; C20A211B58CE31B2738D133C /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = ""; }; DDA50BDF2E5E5DDA3995F24D /* Pods_RunnerTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_RunnerTests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + F3FFE1D9C2D5629FACC123EE /* Pods-Runner-SingBoxPacketTunnel.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner-SingBoxPacketTunnel.profile.xcconfig"; path = "Target Support Files/Pods-Runner-SingBoxPacketTunnel/Pods-Runner-SingBoxPacketTunnel.profile.xcconfig"; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -296,6 +299,9 @@ 7E8B7AF73AD416B8FAA5E9B0 /* Pods-RunnerTests.debug.xcconfig */, 9A37A927A1A9458918B3C12A /* Pods-RunnerTests.release.xcconfig */, 0F7E04B7207513677AF77112 /* Pods-RunnerTests.profile.xcconfig */, + 7CA62594950187FCFE36B54C /* Pods-Runner-SingBoxPacketTunnel.debug.xcconfig */, + 9AC67B4DCF829F5B6F63AA7D /* Pods-Runner-SingBoxPacketTunnel.release.xcconfig */, + F3FFE1D9C2D5629FACC123EE /* Pods-Runner-SingBoxPacketTunnel.profile.xcconfig */, ); path = Pods; sourceTree = ""; @@ -742,6 +748,7 @@ CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 1101; ENABLE_USER_SCRIPT_SANDBOXING = YES; + EXCLUDED_ARCHS = armv7; GCC_C_LANGUAGE_STANDARD = gnu17; GENERATE_INFOPLIST_FILE = YES; INFOPLIST_FILE = SingBoxPacketTunnel/Info.plist; @@ -788,6 +795,7 @@ CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 1101; ENABLE_USER_SCRIPT_SANDBOXING = YES; + EXCLUDED_ARCHS = armv7; GCC_C_LANGUAGE_STANDARD = gnu17; GENERATE_INFOPLIST_FILE = YES; INFOPLIST_FILE = SingBoxPacketTunnel/Info.plist; @@ -804,10 +812,12 @@ LOCALIZATION_PREFERS_STRING_CATALOGS = YES; MARKETING_VERSION = 0.11.1; MTL_FAST_MATH = YES; + ONLY_ACTIVE_ARCH = NO; OTHER_LDFLAGS = "-lresolv"; PRODUCT_BUNDLE_IDENTIFIER = "$(BASE_BUNDLE_IDENTIFIER).SingBoxPacketTunnel"; PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; + SUPPORTED_PLATFORMS = "iphonesimulator iphoneos"; SWIFT_EMIT_LOC_STRINGS = YES; SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; @@ -829,6 +839,7 @@ CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 1101; ENABLE_USER_SCRIPT_SANDBOXING = YES; + EXCLUDED_ARCHS = armv7; GCC_C_LANGUAGE_STANDARD = gnu17; GENERATE_INFOPLIST_FILE = YES; INFOPLIST_FILE = SingBoxPacketTunnel/Info.plist; @@ -845,10 +856,12 @@ LOCALIZATION_PREFERS_STRING_CATALOGS = YES; MARKETING_VERSION = 0.11.1; MTL_FAST_MATH = YES; + ONLY_ACTIVE_ARCH = NO; OTHER_LDFLAGS = "-lresolv"; PRODUCT_BUNDLE_IDENTIFIER = "$(BASE_BUNDLE_IDENTIFIER).SingBoxPacketTunnel"; PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; + SUPPORTED_PLATFORMS = "iphonesimulator iphoneos"; SWIFT_EMIT_LOC_STRINGS = YES; SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; diff --git a/ios/Runner/Info.plist b/ios/Runner/Info.plist index 5724ee2f..f8603e98 100644 --- a/ios/Runner/Info.plist +++ b/ios/Runner/Info.plist @@ -17,7 +17,7 @@ CFBundleInfoDictionaryVersion 6.0 CFBundleName - Hiddify Next + $(PRODUCT_NAME) CFBundlePackageType APPL CFBundleShortVersionString diff --git a/libcore b/libcore index a6ef8d65..69c318fe 160000 --- a/libcore +++ b/libcore @@ -1 +1 @@ -Subproject commit a6ef8d65b683f29942567b1530e8549a1021dfe0 +Subproject commit 69c318feaf959392f83417932f37229066d3040b