Skip to content

Commit

Permalink
fix: update clevertap import library to solve the build issue in RN C…
Browse files Browse the repository at this point in the history
…leverTap integration
  • Loading branch information
1abhishekpandey committed Mar 30, 2023
1 parent edff49f commit 979364f
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 29 deletions.
3 changes: 2 additions & 1 deletion Example/Podfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
source 'https://github.com/CocoaPods/Specs.git'
use_modular_headers!
use_frameworks!

inhibit_all_warnings!

platform :ios, '15.0'
Expand Down
6 changes: 3 additions & 3 deletions Example/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ PODS:
- CleverTap-iOS-SDK (4.2.1):
- SDWebImage (~> 5.11)
- Rudder (1.13.0)
- Rudder-CleverTap (1.1.0):
- Rudder-CleverTap (1.1.1):
- CleverTap-iOS-SDK (~> 4.2)
- Rudder (~> 1.12)
- SDWebImage (5.15.5):
Expand All @@ -25,9 +25,9 @@ EXTERNAL SOURCES:
SPEC CHECKSUMS:
CleverTap-iOS-SDK: fa1dc112e97829410b15ea456564cb9d552ce23e
Rudder: 840bf4dfd9816ce6a82cb8870f1a2d4a44ed2652
Rudder-CleverTap: ea9c41500c2974d5485432babf3bdb5f5ab1e2eb
Rudder-CleverTap: d921803d0c71bed0ae903f528c3d10ed184efb48
SDWebImage: fd7e1a22f00303e058058278639bf6196ee431fe

PODFILE CHECKSUM: 1351122be7db6d293f48fe787bca19582dbd87df
PODFILE CHECKSUM: b3d3e50f6c54e81833ae3981e7d5ef0b9e30efaf

COCOAPODS: 1.11.3
50 changes: 27 additions & 23 deletions Example/Rudder-CleverTap.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@
6003F5BC195388D20070C39A /* Tests.m in Sources */ = {isa = PBXBuildFile; fileRef = 6003F5BB195388D20070C39A /* Tests.m */; };
71719F9F1E33DC2100824A3D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 71719F9D1E33DC2100824A3D /* LaunchScreen.storyboard */; };
873B8AEB1B1F5CCA007FD442 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 873B8AEA1B1F5CCA007FD442 /* Main.storyboard */; };
E277B7B9783271CD569EA6EE /* Pods_Rudder_CleverTap_Example.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C1753C687D3ABC306294EDC6 /* Pods_Rudder_CleverTap_Example.framework */; };
ED38D34929CAD2CB003A7544 /* SampleRudderConfig.plist in Resources */ = {isa = PBXBuildFile; fileRef = ED38D34629CAD2CB003A7544 /* SampleRudderConfig.plist */; };
ED38D34A29CAD2CB003A7544 /* RudderConfig.swift in Sources */ = {isa = PBXBuildFile; fileRef = ED38D34729CAD2CB003A7544 /* RudderConfig.swift */; };
FE6D42B84B0290CB455CB2CA /* libPods-Rudder-CleverTap_Example.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A2AA06A2DB621CE6B1FE71B4 /* libPods-Rudder-CleverTap_Example.a */; };
/* End PBXBuildFile section */

/* Begin PBXContainerItemProxy section */
Expand Down Expand Up @@ -63,8 +63,8 @@
6DD09709020B190939DEA447 /* Pods-Rudder-CleverTap_Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Rudder-CleverTap_Example.release.xcconfig"; path = "Target Support Files/Pods-Rudder-CleverTap_Example/Pods-Rudder-CleverTap_Example.release.xcconfig"; sourceTree = "<group>"; };
71719F9E1E33DC2100824A3D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
873B8AEA1B1F5CCA007FD442 /* Main.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = Main.storyboard; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
A2AA06A2DB621CE6B1FE71B4 /* libPods-Rudder-CleverTap_Example.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-Rudder-CleverTap_Example.a"; sourceTree = BUILT_PRODUCTS_DIR; };
A5A6D50DF14C6F6409B28C0C /* LICENSE */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = LICENSE; path = ../LICENSE; sourceTree = "<group>"; };
C1753C687D3ABC306294EDC6 /* Pods_Rudder_CleverTap_Example.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Rudder_CleverTap_Example.framework; sourceTree = BUILT_PRODUCTS_DIR; };
ED38D31929C8217B003A7544 /* deploy-cocoapods.yml */ = {isa = PBXFileReference; lastKnownFileType = text.yaml; path = "deploy-cocoapods.yml"; sourceTree = "<group>"; };
ED38D31A29C8217B003A7544 /* notion-pr-sync.yml */ = {isa = PBXFileReference; lastKnownFileType = text.yaml; path = "notion-pr-sync.yml"; sourceTree = "<group>"; };
ED38D31B29C8217B003A7544 /* check-pr-title.yml */ = {isa = PBXFileReference; lastKnownFileType = text.yaml; path = "check-pr-title.yml"; sourceTree = "<group>"; };
Expand Down Expand Up @@ -92,7 +92,7 @@
6003F590195388D20070C39A /* CoreGraphics.framework in Frameworks */,
6003F592195388D20070C39A /* UIKit.framework in Frameworks */,
6003F58E195388D20070C39A /* Foundation.framework in Frameworks */,
FE6D42B84B0290CB455CB2CA /* libPods-Rudder-CleverTap_Example.a in Frameworks */,
E277B7B9783271CD569EA6EE /* Pods_Rudder_CleverTap_Example.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -138,7 +138,7 @@
6003F58F195388D20070C39A /* CoreGraphics.framework */,
6003F591195388D20070C39A /* UIKit.framework */,
6003F5AF195388D20070C39A /* XCTest.framework */,
A2AA06A2DB621CE6B1FE71B4 /* libPods-Rudder-CleverTap_Example.a */,
C1753C687D3ABC306294EDC6 /* Pods_Rudder_CleverTap_Example.framework */,
);
name = Frameworks;
sourceTree = "<group>";
Expand Down Expand Up @@ -259,7 +259,7 @@
6003F586195388D20070C39A /* Sources */,
6003F587195388D20070C39A /* Frameworks */,
6003F588195388D20070C39A /* Resources */,
25B24AABB6D2C3CC5F5E6542 /* [CP] Copy Pods Resources */,
E17F8AFD1FDB11BFD192239B /* [CP] Embed Pods Frameworks */,
);
buildRules = (
);
Expand Down Expand Up @@ -351,46 +351,50 @@
/* End PBXResourcesBuildPhase section */

/* Begin PBXShellScriptBuildPhase section */
25B24AABB6D2C3CC5F5E6542 /* [CP] Copy Pods Resources */ = {
370552148D5F3E2F31815285 /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
);
inputPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Rudder-CleverTap_Example/Pods-Rudder-CleverTap_Example-resources.sh",
"${PODS_ROOT}/CleverTap-iOS-SDK/CleverTapSDK/AmazonRootCA1.cer",
"${PODS_CONFIGURATION_BUILD_DIR}/CleverTap-iOS-SDK/CleverTapSDK.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}/AmazonRootCA1.cer",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/CleverTapSDK.bundle",
"$(DERIVED_FILE_DIR)/Pods-Rudder-CleverTap_Example-checkManifestLockResult.txt",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Rudder-CleverTap_Example/Pods-Rudder-CleverTap_Example-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;
};
370552148D5F3E2F31815285 /* [CP] Check Pods Manifest.lock */ = {
E17F8AFD1FDB11BFD192239B /* [CP] Embed Pods Frameworks */ = {
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-Rudder-CleverTap_Example/Pods-Rudder-CleverTap_Example-frameworks.sh",
"${BUILT_PRODUCTS_DIR}/CleverTap-iOS-SDK/CleverTapSDK.framework",
"${BUILT_PRODUCTS_DIR}/Rudder/Rudder.framework",
"${BUILT_PRODUCTS_DIR}/Rudder-CleverTap/Rudder_CleverTap.framework",
"${BUILT_PRODUCTS_DIR}/SDWebImage/SDWebImage.framework",
);
name = "[CP] Embed Pods Frameworks";
outputPaths = (
"$(DERIVED_FILE_DIR)/Pods-Rudder-CleverTap_Example-checkManifestLockResult.txt",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CleverTapSDK.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Rudder.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Rudder_CleverTap.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SDWebImage.framework",
);
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-Rudder-CleverTap_Example/Pods-Rudder-CleverTap_Example-frameworks.sh\"\n";
showEnvVarsInLog = 0;
};
/* End PBXShellScriptBuildPhase section */
Expand Down
7 changes: 5 additions & 2 deletions Rudder-CleverTap/Classes/RudderCleverTapIntegration.m
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,11 @@

#import "RudderCleverTapIntegration.h"
#import <Rudder/Rudder.h>
@import CleverTapSDK;

#if defined(__has_include) && __has_include(<CleverTap-iOS-SDK/CleverTap.h>)
#import <CleverTap-iOS-SDK/CleverTap.h>
#else
#import <CleverTapSDK/CleverTap.h>
#endif
@implementation RudderCleverTapIntegration

#pragma mark - Initialization
Expand Down

0 comments on commit 979364f

Please sign in to comment.