diff --git a/example/ios/Podfile b/example/ios/Podfile index 41adb90..4be5337 100644 --- a/example/ios/Podfile +++ b/example/ios/Podfile @@ -1,4 +1,4 @@ -platform :ios, '11.0' +platform :ios, '11.1' require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules' def add_flipper_pods! diff --git a/example/ios/TorExample.xcodeproj/project.pbxproj b/example/ios/TorExample.xcodeproj/project.pbxproj index d55741d..e52c950 100644 --- a/example/ios/TorExample.xcodeproj/project.pbxproj +++ b/example/ios/TorExample.xcodeproj/project.pbxproj @@ -30,6 +30,7 @@ 31C15CFB9EF7CBD68C660F2A /* libPods-TorExample.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-TorExample.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 4D7192F03A36A017E887435B /* Pods-TorExample.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-TorExample.release.xcconfig"; path = "Target Support Files/Pods-TorExample/Pods-TorExample.release.xcconfig"; sourceTree = ""; }; 85A481D925692C9D00942D45 /* TorExample.profdata */ = {isa = PBXFileReference; lastKnownFileType = file; path = TorExample.profdata; sourceTree = ""; }; + 85C8E5052590FB1800701A4C /* libsifir_ios.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = libsifir_ios.framework; path = ../../ios/library/universal/libsifir_ios.framework; sourceTree = ""; }; 871719007ECC5EAD276C345C /* Pods-TorExample.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-TorExample.debug.xcconfig"; path = "Target Support Files/Pods-TorExample/Pods-TorExample.debug.xcconfig"; sourceTree = ""; }; ED297162215061F000B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; }; /* End PBXFileReference section */ @@ -72,6 +73,7 @@ 2D16E6871FA4F8E400B85C8A /* Frameworks */ = { isa = PBXGroup; children = ( + 85C8E5052590FB1800701A4C /* libsifir_ios.framework */, ED297162215061F000B7C4FE /* JavaScriptCore.framework */, 31C15CFB9EF7CBD68C660F2A /* libPods-TorExample.a */, ); @@ -132,7 +134,7 @@ 13B07F8C1A680F5B00A75B9A /* Frameworks */, 13B07F8E1A680F5B00A75B9A /* Resources */, 00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */, - 897C7EC8BEB56E007D60842C /* [CP] Embed Pods Frameworks */, + F7B61BE004B04AA11CD603C2 /* [CP] Embed Pods Frameworks */, ); buildRules = ( ); @@ -204,24 +206,6 @@ shellPath = /bin/sh; shellScript = "export NODE_BINARY=node\n../node_modules/react-native/scripts/react-native-xcode.sh\n"; }; - 897C7EC8BEB56E007D60842C /* [CP] Embed Pods Frameworks */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-TorExample/Pods-TorExample-frameworks.sh", - "${PODS_ROOT}/../../../ios/library/universal/libsifir_ios.dylib", - ); - name = "[CP] Embed Pods Frameworks"; - outputPaths = ( - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/libsifir_ios.dylib", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-TorExample/Pods-TorExample-frameworks.sh\"\n"; - showEnvVarsInLog = 0; - }; CCCC07BCAFDEF1FCADC0D0C9 /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; @@ -244,6 +228,24 @@ shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; showEnvVarsInLog = 0; }; + F7B61BE004B04AA11CD603C2 /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-TorExample/Pods-TorExample-frameworks.sh", + "${PODS_ROOT}/../../../ios/Libsifir_ios.framework", + ); + name = "[CP] Embed Pods Frameworks"; + outputPaths = ( + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Libsifir_ios.framework", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-TorExample/Pods-TorExample-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; FD10A7F022414F080027D42C /* Start Packager */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; @@ -304,7 +306,7 @@ ENABLE_BITCODE = NO; GCC_NO_COMMON_BLOCKS = YES; INFOPLIST_FILE = TorExample/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 11.0; + IPHONEOS_DEPLOYMENT_TARGET = 11.1; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; OTHER_CFLAGS = ( "$(inherited)", @@ -336,7 +338,7 @@ ENABLE_BITCODE = NO; GCC_NO_COMMON_BLOCKS = YES; INFOPLIST_FILE = TorExample/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 11.0; + IPHONEOS_DEPLOYMENT_TARGET = 11.1; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; OTHER_CFLAGS = ( "$(inherited)", @@ -401,7 +403,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; + IPHONEOS_DEPLOYMENT_TARGET = 11.1; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; @@ -447,7 +449,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; + IPHONEOS_DEPLOYMENT_TARGET = 11.1; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; VALIDATE_PRODUCT = YES; diff --git a/ios/sifir-tor.h b/ios/Libsifir_ios.framework/Headers/Libsifir_ios.h similarity index 100% rename from ios/sifir-tor.h rename to ios/Libsifir_ios.framework/Headers/Libsifir_ios.h diff --git a/ios/library/universal/libsifir_ios.dylib b/ios/Libsifir_ios.framework/Libsifir_ios similarity index 99% rename from ios/library/universal/libsifir_ios.dylib rename to ios/Libsifir_ios.framework/Libsifir_ios index 7b39583..0b5e52b 100755 Binary files a/ios/library/universal/libsifir_ios.dylib and b/ios/Libsifir_ios.framework/Libsifir_ios differ diff --git a/ios/Libsifir_ios.framework/Modules/module.modulemap b/ios/Libsifir_ios.framework/Modules/module.modulemap new file mode 100644 index 0000000..e3d0858 --- /dev/null +++ b/ios/Libsifir_ios.framework/Modules/module.modulemap @@ -0,0 +1,5 @@ +framework module "Libsifir_ios" { + header "Libsifir_ios.h" + export * +} + diff --git a/ios/Libsifir_ios.framework/Resources/Info.plist b/ios/Libsifir_ios.framework/Resources/Info.plist new file mode 100644 index 0000000..b701b6e --- /dev/null +++ b/ios/Libsifir_ios.framework/Resources/Info.plist @@ -0,0 +1,22 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + Libsifir_ios + CFBundleIdentifier + sifirapps.sdk.tor + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + Libsifir_Tor + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0 + CFBundleVersion + 0.1.1 + + diff --git a/ios/Tor-Bridging-Header.h b/ios/Tor-Bridging-Header.h index 84660e3..924e603 100644 --- a/ios/Tor-Bridging-Header.h +++ b/ios/Tor-Bridging-Header.h @@ -1 +1,2 @@ #import "React/RCTBridgeModule.h" +#import "Libsifir_ios/Libsifir_ios.h" diff --git a/ios/Tor.xcodeproj/project.pbxproj b/ios/Tor.xcodeproj/project.pbxproj index efec07a..373b85b 100644 --- a/ios/Tor.xcodeproj/project.pbxproj +++ b/ios/Tor.xcodeproj/project.pbxproj @@ -235,6 +235,7 @@ "$(SRCROOT)/../../../React/**", "$(SRCROOT)/../../react-native/React/**", ); + IPHONEOS_DEPLOYMENT_TARGET = 11.1; LIBRARY_SEARCH_PATHS = ( "$(inherited)", "$(PROJECT_DIR)", @@ -259,6 +260,7 @@ "$(SRCROOT)/../../../React/**", "$(SRCROOT)/../../react-native/React/**", ); + IPHONEOS_DEPLOYMENT_TARGET = 11.1; LIBRARY_SEARCH_PATHS = ( "$(inherited)", "$(PROJECT_DIR)", diff --git a/react-native-tor.podspec b/react-native-tor.podspec index b2fa5a4..0fb667c 100644 --- a/react-native-tor.podspec +++ b/react-native-tor.podspec @@ -14,7 +14,8 @@ Pod::Spec.new do |s| s.source = { :git => "https://github.com/Sifir-io/react-native-tor.git", :tag => "#{s.version}" } s.swift_version = '5.0' - s.source_files = "ios/**/*.{h,m,mm,swift}" - s.ios.vendored_libraries= ["ios/library/universal/libsifir_ios.dylib"] + s.source_files = "ios/*.{h,m,mm,swift}" +# s.source_files = "ios/**/*.{swift}" + s.ios.vendored_frameworks= "ios/Libsifir_ios.framework" s.dependency "React" end