From bc5fe14c8db4a18b14f2073766445f609084644d Mon Sep 17 00:00:00 2001 From: Adam Mihalik Date: Thu, 1 Sep 2022 11:16:08 +0200 Subject: [PATCH] feat/Show debug log that SDK is obsolete --- android/src/main/AndroidManifest.xml | 1 + .../android/app/src/main/AndroidManifest.xml | 1 + example/ios/Podfile | 4 +- example/ios/Podfile.lock | 28 +++--- example/ios/example.xcodeproj/project.pbxproj | 16 ++-- example/src/App.tsx | 1 + ios/Exponea.swift | 7 ++ ios/Exponea.xcodeproj/project.pbxproj | 90 +++++++++---------- ios/Podfile | 2 +- ios/Podfile.lock | 24 ++--- ios/Tests/MockExponea.swift | 13 +++ react-native-exponea-sdk.podspec | 6 +- 12 files changed, 112 insertions(+), 81 deletions(-) diff --git a/android/src/main/AndroidManifest.xml b/android/src/main/AndroidManifest.xml index b6bf39e..2f4431e 100644 --- a/android/src/main/AndroidManifest.xml +++ b/android/src/main/AndroidManifest.xml @@ -12,5 +12,6 @@ + diff --git a/example/android/app/src/main/AndroidManifest.xml b/example/android/app/src/main/AndroidManifest.xml index 6d343fb..3126714 100644 --- a/example/android/app/src/main/AndroidManifest.xml +++ b/example/android/app/src/main/AndroidManifest.xml @@ -39,6 +39,7 @@ + diff --git a/example/ios/Podfile b/example/ios/Podfile index cb88fea..660dc8a 100644 --- a/example/ios/Podfile +++ b/example/ios/Podfile @@ -21,7 +21,7 @@ target 'example' do # # Note that if you have use_frameworks! enabled, Flipper will not work and # you should disable the next line. - + # Fix various Flipper issues during build time. use_flipper!({ "Flipper-DoubleConversion" => "1.1.7" }) @@ -42,7 +42,7 @@ target 'example' do # We need to make one crude patch to RCT-Folly - set `__IPHONE_10_0` to our iOS target + 1 # https://github.com/facebook/flipper/issues/834 - 84 comments and still going... `sed -i -e $'s/__IPHONE_10_0/__IPHONE_12_0/' Pods/RCT-Folly/folly/portability/Time.h` - end + end end diff --git a/example/ios/Podfile.lock b/example/ios/Podfile.lock index 66ca29f..d758a1c 100644 --- a/example/ios/Podfile.lock +++ b/example/ios/Podfile.lock @@ -1,10 +1,11 @@ PODS: - - AnyCodable-FlightSchool (0.4.1) + - AnyCodable-FlightSchool (0.4.0) - boost (1.76.0) - CocoaAsyncSocket (7.6.5) - DoubleConversion (1.1.6) - - ExponeaSDK (2.11.2) - - ExponeaSDK-Notifications (2.11.2) + - ExponeaSDK (2.12.1): + - SwiftSoup (= 2.4.3) + - ExponeaSDK-Notifications (2.12.1) - FBLazyVector (0.67.0) - FBReactNativeSpec (0.67.0): - RCT-Folly (= 2021.06.28.00-v2) @@ -275,9 +276,9 @@ PODS: - React-jsinspector (0.67.0) - React-logger (0.67.0): - glog - - react-native-exponea-sdk (0.5.2): - - AnyCodable-FlightSchool (~> 0.4.0) - - ExponeaSDK (~> 2.11.2) + - react-native-exponea-sdk (1.0.0): + - AnyCodable-FlightSchool (= 0.4.0) + - ExponeaSDK (= 2.12.1) - React - react-native-safe-area-context (3.3.2): - React-Core @@ -381,6 +382,7 @@ PODS: - RNScreens (3.11.0): - React-Core - React-RCTImage + - SwiftSoup (2.4.3) - Yoga (1.14.0) - YogaKit (1.18.1): - Yoga (~> 1.14) @@ -466,6 +468,7 @@ SPEC REPOS: - fmt - libevent - OpenSSL-Universal + - SwiftSoup - YogaKit EXTERNAL SOURCES: @@ -543,12 +546,12 @@ EXTERNAL SOURCES: :path: "../node_modules/react-native/ReactCommon/yoga" SPEC CHECKSUMS: - AnyCodable-FlightSchool: d27283db6e9feaddb0fa73a25835e5cdf41b3213 + AnyCodable-FlightSchool: 9bf42632b5256c78710e2f4fb18ce78e89180883 boost: a7c83b31436843459a1961bfd74b96033dc77234 CocoaAsyncSocket: 065fd1e645c7abab64f7a6a2007a48038fdc6a99 DoubleConversion: 831926d9b8bf8166fd87886c4abab286c2422662 - ExponeaSDK: e0c7406084546406667200c88966db429cdbae16 - ExponeaSDK-Notifications: cf8c3820cc71330d7b16f4b61dfd710bda95fa33 + ExponeaSDK: a5cfdb245311656eb9d77251e665a32058dd2bf1 + ExponeaSDK-Notifications: 51afe956fe5697dfa7625cbb0cbc5128fda581da FBLazyVector: dce905f90eacf2e62ffbc2a4bbda8ea630aabd8a FBReactNativeSpec: 7444057cd46e87525b82f3e41f05e1db0d0029f2 Flipper: 30e8eeeed6abdc98edaf32af0cda2f198be4b733 @@ -576,7 +579,7 @@ SPEC CHECKSUMS: React-jsiexecutor: 3001f865cfd2c66c1298f427be47b8797ae5843b React-jsinspector: c9d1ddf4b1efbcf90323e3581ccff200cf4de346 React-logger: 5d42caeaf0c31a9b29efb33e10e7f7031f958bfd - react-native-exponea-sdk: 1caba2f1a100043534d46693de8b2f6629a4b1fa + react-native-exponea-sdk: b0c54fd47429af9f7a5ca3f96e8859cb29f8c3e3 react-native-safe-area-context: 584dc04881deb49474363f3be89e4ca0e854c057 React-perflogger: 9454d63e7027e0830fa3e527628558160684f5dd React-RCTActionSheet: 240d798e2f5bd1ba2e85503a00fd390f560e6827 @@ -594,9 +597,10 @@ SPEC CHECKSUMS: RNGestureHandler: bf572f552ea324acd5b5464b8d30755b2d8c1de6 RNReanimated: 17e828d603c7ed3c25d332c0cdbb037838dc53a9 RNScreens: fd535547baa4ef8aeaee1a8b1e3ffd17b8df44a4 + SwiftSoup: 3384f2e618cfc1b3cbc7852c16692fe8de13fb8f Yoga: 3f5bfc54ce164fcd5b5d7f9f4232182d6298dd56 YogaKit: f782866e155069a2cca2517aafea43200b01fd5a -PODFILE CHECKSUM: 963714aefa7b2eda578977f7087d464a91248b57 +PODFILE CHECKSUM: af83b04fd953261cc017254f2f8a6a114028ea18 -COCOAPODS: 1.11.2 +COCOAPODS: 1.11.3 diff --git a/example/ios/example.xcodeproj/project.pbxproj b/example/ios/example.xcodeproj/project.pbxproj index 75d00d8..a58f31b 100644 --- a/example/ios/example.xcodeproj/project.pbxproj +++ b/example/ios/example.xcodeproj/project.pbxproj @@ -555,7 +555,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "export NODE_BINARY=node\n../node_modules/react-native/scripts/react-native-xcode.sh"; + shellScript = "export NODE_BINARY=node\n../node_modules/react-native/scripts/react-native-xcode.sh\n"; }; 09B4C7F927DA856EBE88A2F1 /* [CP] Embed Pods Frameworks */ = { isa = PBXShellScriptBuildPhase; @@ -1319,7 +1319,7 @@ 00E356F71AD99517003FC87E /* Release */, ); defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; + defaultConfigurationName = Debug; }; 052EDAD824A5D927006558C4 /* Build configuration list for PBXNativeTarget "ExampleNotificationService" */ = { isa = XCConfigurationList; @@ -1328,7 +1328,7 @@ 052EDAD724A5D927006558C4 /* Release */, ); defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; + defaultConfigurationName = Debug; }; 052EDAEC24A5D99E006558C4 /* Build configuration list for PBXNativeTarget "ExampleNotificationContent" */ = { isa = XCConfigurationList; @@ -1337,7 +1337,7 @@ 052EDAEE24A5D99E006558C4 /* Release */, ); defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; + defaultConfigurationName = Debug; }; 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "example" */ = { isa = XCConfigurationList; @@ -1346,7 +1346,7 @@ 13B07F951A680F5B00A75B9A /* Release */, ); defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; + defaultConfigurationName = Debug; }; 2D02E4BA1E0B4A5E006451C7 /* Build configuration list for PBXNativeTarget "example-tvOS" */ = { isa = XCConfigurationList; @@ -1355,7 +1355,7 @@ 2D02E4981E0B4A5E006451C7 /* Release */, ); defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; + defaultConfigurationName = Debug; }; 2D02E4BB1E0B4A5E006451C7 /* Build configuration list for PBXNativeTarget "example-tvOSTests" */ = { isa = XCConfigurationList; @@ -1364,7 +1364,7 @@ 2D02E49A1E0B4A5E006451C7 /* Release */, ); defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; + defaultConfigurationName = Debug; }; 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "example" */ = { isa = XCConfigurationList; @@ -1373,7 +1373,7 @@ 83CBBA211A601CBA00E9B192 /* Release */, ); defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; + defaultConfigurationName = Debug; }; /* End XCConfigurationList section */ }; diff --git a/example/src/App.tsx b/example/src/App.tsx index 7671388..5288e9c 100644 --- a/example/src/App.tsx +++ b/example/src/App.tsx @@ -77,6 +77,7 @@ export default class App extends React.Component<{}, AppState> { `Configuring Exponea SDK with ${projectToken}, ${authorization} and ${baseUrl}`, ); Exponea.setLogLevel(LogLevel.VERBOSE); + Exponea.checkPushSetup(); Exponea.configure({ projectToken: projectToken, authorizationToken: authorization, diff --git a/ios/Exponea.swift b/ios/Exponea.swift index e726cd5..b4f1f85 100644 --- a/ios/Exponea.swift +++ b/ios/Exponea.swift @@ -13,6 +13,13 @@ import ExponeaSDK @objc(IsExponeaReactNativeSDK) protocol IsExponeaReactNativeSDK { } +@objc(ExponeaRNVersion) +public class ExponeaRNVersion: NSObject, ExponeaVersionProvider { + required public override init() { } + public func getVersion() -> String { + "1.0.0" + } +} @objc(Exponea) class Exponea: RCTEventEmitter { diff --git a/ios/Exponea.xcodeproj/project.pbxproj b/ios/Exponea.xcodeproj/project.pbxproj index a90b2f3..61fd0f2 100644 --- a/ios/Exponea.xcodeproj/project.pbxproj +++ b/ios/Exponea.xcodeproj/project.pbxproj @@ -30,9 +30,9 @@ 05E6DA4824A4DEBC004EE0F9 /* Exponea+PushNotifications.swift in Sources */ = {isa = PBXBuildFile; fileRef = 05E6DA4724A4DEBC004EE0F9 /* Exponea+PushNotifications.swift */; }; 05FD376F248FDE5A0078847C /* Exponea.m in Sources */ = {isa = PBXBuildFile; fileRef = 05FD376D248FDE5A0078847C /* Exponea.m */; }; 05FD3772248FDE7F0078847C /* Exponea.swift in Sources */ = {isa = PBXBuildFile; fileRef = 05FD3771248FDE7F0078847C /* Exponea.swift */; }; - 5BC7243D98CB54FD4B2B8F47 /* libPods-Exponea.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3FACC1B762FF573A4473848C /* libPods-Exponea.a */; }; + 7650AB4366BAD682C01C2571 /* libPods-Exponea.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 9621437D770CFF34AA8E3AA7 /* libPods-Exponea.a */; }; CC619AC4265CCD7B00296FA3 /* ExponeaRNAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = CC619AC3265CCD7A00296FA3 /* ExponeaRNAppDelegate.m */; }; - E2327026E2D2343195E7BF29 /* libPods-Tests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = D76D1BDBBE570E6F821E5FD6 /* libPods-Tests.a */; }; + FFB1440D18502CBC9320801A /* libPods-Tests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A9A5B777D62CDEF189390484 /* libPods-Tests.a */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -86,14 +86,14 @@ 05FD3771248FDE7F0078847C /* Exponea.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Exponea.swift; sourceTree = ""; }; 05FD3773248FDFDD0078847C /* Podfile */ = {isa = PBXFileReference; lastKnownFileType = text; path = Podfile; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; 134814201AA4EA6300B7C361 /* libExponea.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libExponea.a; sourceTree = BUILT_PRODUCTS_DIR; }; - 320D6849F659E03CE89FE484 /* Pods-Exponea.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Exponea.debug.xcconfig"; path = "Target Support Files/Pods-Exponea/Pods-Exponea.debug.xcconfig"; sourceTree = ""; }; - 38B2D1311E2ED05A320D8F69 /* Pods-Exponea.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Exponea.release.xcconfig"; path = "Target Support Files/Pods-Exponea/Pods-Exponea.release.xcconfig"; sourceTree = ""; }; - 3FACC1B762FF573A4473848C /* libPods-Exponea.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-Exponea.a"; sourceTree = BUILT_PRODUCTS_DIR; }; - 8172B908346413B0080D5C9B /* Pods-Tests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Tests.release.xcconfig"; path = "Target Support Files/Pods-Tests/Pods-Tests.release.xcconfig"; sourceTree = ""; }; + 863AF8A8A8367A20DA72112D /* Pods-Exponea.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Exponea.debug.xcconfig"; path = "Target Support Files/Pods-Exponea/Pods-Exponea.debug.xcconfig"; sourceTree = ""; }; + 871ACDB696CEF17222C3A7EF /* Pods-Tests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Tests.debug.xcconfig"; path = "Target Support Files/Pods-Tests/Pods-Tests.debug.xcconfig"; sourceTree = ""; }; + 9621437D770CFF34AA8E3AA7 /* libPods-Exponea.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-Exponea.a"; sourceTree = BUILT_PRODUCTS_DIR; }; + A9A5B777D62CDEF189390484 /* libPods-Tests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-Tests.a"; sourceTree = BUILT_PRODUCTS_DIR; }; CC619AC2265CCD6D00296FA3 /* ExponeaRNAppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ExponeaRNAppDelegate.h; sourceTree = ""; }; CC619AC3265CCD7A00296FA3 /* ExponeaRNAppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ExponeaRNAppDelegate.m; sourceTree = ""; }; - D36C7DBFCD0AFF73E7628E55 /* Pods-Tests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Tests.debug.xcconfig"; path = "Target Support Files/Pods-Tests/Pods-Tests.debug.xcconfig"; sourceTree = ""; }; - D76D1BDBBE570E6F821E5FD6 /* libPods-Tests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-Tests.a"; sourceTree = BUILT_PRODUCTS_DIR; }; + CC6EA75C9AE6DEA678FDDDEA /* Pods-Tests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Tests.release.xcconfig"; path = "Target Support Files/Pods-Tests/Pods-Tests.release.xcconfig"; sourceTree = ""; }; + D2F39F9789CCD78D03C2BE9A /* Pods-Exponea.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Exponea.release.xcconfig"; path = "Target Support Files/Pods-Exponea/Pods-Exponea.release.xcconfig"; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -102,7 +102,7 @@ buildActionMask = 2147483647; files = ( 05C542CA2490E0010095903D /* libExponea.a in Frameworks */, - E2327026E2D2343195E7BF29 /* libPods-Tests.a in Frameworks */, + FFB1440D18502CBC9320801A /* libPods-Tests.a in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -110,7 +110,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 5BC7243D98CB54FD4B2B8F47 /* libPods-Exponea.a in Frameworks */, + 7650AB4366BAD682C01C2571 /* libPods-Exponea.a in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -143,11 +143,11 @@ name = Products; sourceTree = ""; }; - 145FC7C71612C5803ED3BA9C /* Frameworks */ = { + 21B43BCC2CE11CD06834AE0F /* Frameworks */ = { isa = PBXGroup; children = ( - 3FACC1B762FF573A4473848C /* libPods-Exponea.a */, - D76D1BDBBE570E6F821E5FD6 /* libPods-Tests.a */, + 9621437D770CFF34AA8E3AA7 /* libPods-Exponea.a */, + A9A5B777D62CDEF189390484 /* libPods-Tests.a */, ); name = Frameworks; sourceTree = ""; @@ -155,10 +155,10 @@ 516CC95B79D3E8AC0B2CD93A /* Pods */ = { isa = PBXGroup; children = ( - 320D6849F659E03CE89FE484 /* Pods-Exponea.debug.xcconfig */, - 38B2D1311E2ED05A320D8F69 /* Pods-Exponea.release.xcconfig */, - D36C7DBFCD0AFF73E7628E55 /* Pods-Tests.debug.xcconfig */, - 8172B908346413B0080D5C9B /* Pods-Tests.release.xcconfig */, + 863AF8A8A8367A20DA72112D /* Pods-Exponea.debug.xcconfig */, + D2F39F9789CCD78D03C2BE9A /* Pods-Exponea.release.xcconfig */, + 871ACDB696CEF17222C3A7EF /* Pods-Tests.debug.xcconfig */, + CC6EA75C9AE6DEA678FDDDEA /* Pods-Tests.release.xcconfig */, ); path = Pods; sourceTree = ""; @@ -186,8 +186,8 @@ 05C542C62490E0010095903D /* Tests */, 134814211AA4EA7D00B7C361 /* Products */, 516CC95B79D3E8AC0B2CD93A /* Pods */, - 145FC7C71612C5803ED3BA9C /* Frameworks */, 05C542C52490E0010095903D /* Tests.xctest */, + 21B43BCC2CE11CD06834AE0F /* Frameworks */, ); sourceTree = ""; }; @@ -198,12 +198,12 @@ isa = PBXNativeTarget; buildConfigurationList = 05C542CF2490E0010095903D /* Build configuration list for PBXNativeTarget "Tests" */; buildPhases = ( - A1BBCCC87EBB4E08AE4731FB /* [CP] Check Pods Manifest.lock */, + 06C4C626082D07796C782FA7 /* [CP] Check Pods Manifest.lock */, 05C542C12490E0010095903D /* Sources */, 05C542C22490E0010095903D /* Frameworks */, 05C542C32490E0010095903D /* Resources */, 05C542D02490E21F0095903D /* ShellScript */, - 51548E13BE963560476C0622 /* [CP] Copy Pods Resources */, + 73AAFE465314FCA2AFF16AD2 /* [CP] Copy Pods Resources */, ); buildRules = ( ); @@ -219,7 +219,7 @@ isa = PBXNativeTarget; buildConfigurationList = 58B511EF1A9E6C8500147676 /* Build configuration list for PBXNativeTarget "Exponea" */; buildPhases = ( - B9D0E36377244B6926AAE519 /* [CP] Check Pods Manifest.lock */, + 539C83DA68F714E27A494B1B /* [CP] Check Pods Manifest.lock */, 58B511D71A9E6C8500147676 /* Sources */, 58B511D81A9E6C8500147676 /* Frameworks */, 58B511D91A9E6C8500147676 /* CopyFiles */, @@ -302,27 +302,29 @@ shellPath = /bin/sh; shellScript = "if which swiftlint >/dev/null; then\n swiftlint\nelse\n echo \"warning: SwiftLint not installed, download from https://github.com/realm/SwiftLint\"\nfi\n"; }; - 51548E13BE963560476C0622 /* [CP] Copy Pods Resources */ = { + 06C4C626082D07796C782FA7 /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); + inputFileListPaths = ( + ); inputPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-Tests/Pods-Tests-resources.sh", - "${PODS_ROOT}/ExponeaSDK/ExponeaSDK/ExponeaSDK/Classes/Database/DatabaseModel.xcdatamodeld", - "${PODS_CONFIGURATION_BUILD_DIR}/React-Core/AccessibilityResources.bundle", + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; + outputFileListPaths = ( ); - name = "[CP] Copy Pods Resources"; outputPaths = ( - "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/DatabaseModel.momd", - "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/AccessibilityResources.bundle", + "$(DERIVED_FILE_DIR)/Pods-Tests-checkManifestLockResult.txt", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Tests/Pods-Tests-resources.sh\"\n"; + 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; }; - A1BBCCC87EBB4E08AE4731FB /* [CP] Check Pods Manifest.lock */ = { + 539C83DA68F714E27A494B1B /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -337,33 +339,31 @@ outputFileListPaths = ( ); outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-Tests-checkManifestLockResult.txt", + "$(DERIVED_FILE_DIR)/Pods-Exponea-checkManifestLockResult.txt", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; 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; }; - B9D0E36377244B6926AAE519 /* [CP] Check Pods Manifest.lock */ = { + 73AAFE465314FCA2AFF16AD2 /* [CP] Copy Pods Resources */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); - inputFileListPaths = ( - ); inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", - ); - name = "[CP] Check Pods Manifest.lock"; - outputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Tests/Pods-Tests-resources.sh", + "${PODS_ROOT}/ExponeaSDK/ExponeaSDK/ExponeaSDK/Classes/Database/DatabaseModel.xcdatamodeld", + "${PODS_CONFIGURATION_BUILD_DIR}/React-Core/AccessibilityResources.bundle", ); + name = "[CP] Copy Pods Resources"; outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-Exponea-checkManifestLockResult.txt", + "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/DatabaseModel.momd", + "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/AccessibilityResources.bundle", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - 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"; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Tests/Pods-Tests-resources.sh\"\n"; showEnvVarsInLog = 0; }; /* End PBXShellScriptBuildPhase section */ @@ -418,7 +418,7 @@ /* Begin XCBuildConfiguration section */ 05C542CD2490E0010095903D /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = D36C7DBFCD0AFF73E7628E55 /* Pods-Tests.debug.xcconfig */; + baseConfigurationReference = 871ACDB696CEF17222C3A7EF /* Pods-Tests.debug.xcconfig */; buildSettings = { CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; @@ -445,7 +445,7 @@ }; 05C542CE2490E0010095903D /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 8172B908346413B0080D5C9B /* Pods-Tests.release.xcconfig */; + baseConfigurationReference = CC6EA75C9AE6DEA678FDDDEA /* Pods-Tests.release.xcconfig */; buildSettings = { CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; @@ -582,7 +582,7 @@ }; 58B511F01A9E6C8500147676 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 320D6849F659E03CE89FE484 /* Pods-Exponea.debug.xcconfig */; + baseConfigurationReference = 863AF8A8A8367A20DA72112D /* Pods-Exponea.debug.xcconfig */; buildSettings = { CLANG_ENABLE_MODULES = YES; HEADER_SEARCH_PATHS = ( @@ -605,7 +605,7 @@ }; 58B511F11A9E6C8500147676 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 38B2D1311E2ED05A320D8F69 /* Pods-Exponea.release.xcconfig */; + baseConfigurationReference = D2F39F9789CCD78D03C2BE9A /* Pods-Exponea.release.xcconfig */; buildSettings = { CLANG_ENABLE_MODULES = YES; HEADER_SEARCH_PATHS = ( diff --git a/ios/Podfile b/ios/Podfile index 21fb503..3dc4610 100644 --- a/ios/Podfile +++ b/ios/Podfile @@ -11,7 +11,7 @@ target 'Exponea' do use_react_native!(:path => config["reactNativePath"]) - pod "ExponeaSDK", "2.12.0" + pod "ExponeaSDK", "2.12.1" pod 'AnyCodable-FlightSchool', '0.4.0' end diff --git a/ios/Podfile.lock b/ios/Podfile.lock index 002add9..243f271 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -1,8 +1,9 @@ PODS: - - AnyCodable-FlightSchool (0.4.1) + - AnyCodable-FlightSchool (0.4.0) - boost (1.76.0) - DoubleConversion (1.1.6) - - ExponeaSDK (2.11.2) + - ExponeaSDK (2.12.1): + - SwiftSoup (= 2.4.3) - FBLazyVector (0.67.2) - FBReactNativeSpec (0.67.2): - RCT-Folly (= 2021.06.28.00-v2) @@ -14,7 +15,7 @@ PODS: - fmt (6.2.1) - glog (0.3.5) - Nimble (8.0.7) - - Quick (4.0.0) + - Quick (5.0.1) - RCT-Folly (2021.06.28.00-v2): - boost - DoubleConversion @@ -278,13 +279,14 @@ PODS: - React-jsi (= 0.67.2) - React-logger (= 0.67.2) - React-perflogger (= 0.67.2) + - SwiftSoup (2.4.3) - Yoga (1.14.0) DEPENDENCIES: - - AnyCodable-FlightSchool (~> 0.4.0) + - AnyCodable-FlightSchool (= 0.4.0) - boost (from `../node_modules/react-native/third-party-podspecs/boost.podspec`) - DoubleConversion (from `../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec`) - - ExponeaSDK (~> 2.11.2) + - ExponeaSDK (= 2.12.1) - FBLazyVector (from `../node_modules/react-native/Libraries/FBLazyVector`) - FBReactNativeSpec (from `../node_modules/react-native/React/FBReactNativeSpec`) - glog (from `../node_modules/react-native/third-party-podspecs/glog.podspec`) @@ -325,6 +327,7 @@ SPEC REPOS: - fmt - Nimble - Quick + - SwiftSoup EXTERNAL SOURCES: boost: @@ -389,16 +392,16 @@ EXTERNAL SOURCES: :path: "../node_modules/react-native/ReactCommon/yoga" SPEC CHECKSUMS: - AnyCodable-FlightSchool: d27283db6e9feaddb0fa73a25835e5cdf41b3213 + AnyCodable-FlightSchool: 9bf42632b5256c78710e2f4fb18ce78e89180883 boost: a7c83b31436843459a1961bfd74b96033dc77234 DoubleConversion: 831926d9b8bf8166fd87886c4abab286c2422662 - ExponeaSDK: e0c7406084546406667200c88966db429cdbae16 + ExponeaSDK: a5cfdb245311656eb9d77251e665a32058dd2bf1 FBLazyVector: 244195e30d63d7f564c55da4410b9a24e8fbceaa FBReactNativeSpec: c94002c1d93da3658f4d5119c6994d19961e3d52 fmt: ff9d55029c625d3757ed641535fd4a75fedc7ce9 glog: 85ecdd10ee8d8ec362ef519a6a45ff9aa27b2e85 Nimble: a73af6ecd4c9106f434f3d55fc54570be3739e0b - Quick: 6473349e43b9271a8d43839d9ba1c442ed1b7ac4 + Quick: 749aa754fd1e7d984f2000fe051e18a3a9809179 RCT-Folly: 803a9cfd78114b2ec0f140cfa6fa2a6bafb2d685 RCTRequired: cd47794163052d2b8318c891a7a14fcfaccc75ab RCTTypeSafety: 393bb40b3e357b224cde53d3fec26813c52428b1 @@ -423,8 +426,9 @@ SPEC CHECKSUMS: React-RCTVibration: 99c7f67fba7a5ade46e98e870c6ff2444484f995 React-runtimeexecutor: 2450b43df7ffe8e805a0b3dcb2abd4282f1f1836 ReactCommon: d98c6c96b567f9b3a15f9fd4cc302c1eda8e3cf2 + SwiftSoup: 3384f2e618cfc1b3cbc7852c16692fe8de13fb8f Yoga: 9b6696970c3289e8dea34b3eda93f23e61fb8121 -PODFILE CHECKSUM: 19250af3f643256e1d30124762003e49a648b824 +PODFILE CHECKSUM: ead1fadae2e67e4efbf6e521e108ef52bf281c72 -COCOAPODS: 1.11.2 +COCOAPODS: 1.11.3 diff --git a/ios/Tests/MockExponea.swift b/ios/Tests/MockExponea.swift index 7a50c6c..be2bbf7 100644 --- a/ios/Tests/MockExponea.swift +++ b/ios/Tests/MockExponea.swift @@ -79,6 +79,19 @@ class MockExponea: ExponeaType { } } + var inAppMessagesDelegateValue: InAppMessageActionDelegate = InAppDelegate() + var inAppMessagesDelegate: InAppMessageActionDelegate { + get { + calls.append(Call(name: "inAppMessagesDelegate:get", params: [])) + return inAppMessagesDelegateValue + } + set { + calls.append(Call(name: "inAppMessagesDelegate:set", params: [newValue])) + inAppMessagesDelegateValue = newValue + } + } + + var safeModeEnabled: Bool { get { fatalError("Not implemented") } set { fatalError("Not implemented \(newValue)") } diff --git a/react-native-exponea-sdk.podspec b/react-native-exponea-sdk.podspec index de3b594..2c32e91 100644 --- a/react-native-exponea-sdk.podspec +++ b/react-native-exponea-sdk.podspec @@ -11,9 +11,9 @@ Pod::Spec.new do |s| DESC s.homepage = "https://github.com/github_account/react-native-exponea-sdk" # brief license entry: - s.license = "The Apache License, Version 2.0" + s.license = "MIT License" s.authors = { "Exponea" => "contact@exponea.com" } - s.platforms = { :ios => "10.3" } + s.platforms = { :ios => "11.0" } s.source = { :git => "https://github.com/github_account/react-native-exponea-sdk.git", :tag => "#{s.version}" } s.source_files = "ios/**/*.{h,c,m,swift}" @@ -21,7 +21,7 @@ Pod::Spec.new do |s| s.requires_arc = true s.dependency "React" - s.dependency "ExponeaSDK", "2.12.0" + s.dependency "ExponeaSDK", "2.12.1" s.dependency "AnyCodable-FlightSchool", "0.4.0" end