Skip to content

Commit

Permalink
Merge pull request #186 from CleverTap/develop
Browse files Browse the repository at this point in the history
Release v0.6.0
  • Loading branch information
akashvercetti authored Sep 3, 2021
2 parents 5baa13d + 32903d8 commit f388e07
Show file tree
Hide file tree
Showing 16 changed files with 349 additions and 49 deletions.
1 change: 1 addition & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
Example
.idea
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
Change Log
==========

Version 0.6.0 *(3rd September 2021)*
-------------------------------------------
- Adds public methods for suspending/discarding & resuming InApp Notifications
- Adds public methods to increment/decrement values set via User properties
- Deprecates `profileGetCleverTapID()` and `profileGetCleverTapAttributionIdentifier()`
- Adds a new public method `getCleverTapID()` as an alternative to above deprecated methods
- Supports CleverTap iOS SDK `v3.10.0`

Version 0.5.2 *(20th July 2021)*
-------------------------------------------
- Supports CleverTap Android SDK `v4.2.0`
Expand Down
46 changes: 38 additions & 8 deletions Example/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,22 @@ class Expandable_ListView extends Component {
case 3:
CleverTap.profileRemoveMultiValueForKey('b', 'letters');
break;
case 4: //Removing a Value from the Multiple Values
case 4:
CleverTap.profileRemoveMultiValueForKey('b', 'letters');
break;
case 5:
CleverTap.profileAddMultiValueForKey('d', 'letters');
break;
case 500:
CleverTap.profileIncrementValueForKey(10, 'score');
CleverTap.profileIncrementValueForKey(3.141,'PI_Float');
CleverTap.profileIncrementValueForKey(3.141592653589793,'PI_Double');
break;
case 501:
CleverTap.profileDecrementValueForKey(10, 'score');
CleverTap.profileDecrementValueForKey(3.141, 'PI_Float');
CleverTap.profileDecrementValueForKey(3.141592653589793, 'PI_Double');
break;
case 6:
onUser_Login();
break;
Expand Down Expand Up @@ -201,6 +211,15 @@ class Expandable_ListView extends Component {
case 45:
getFeatureFlag();
break;
case 450:
CleverTap.suspendInAppNotifications();
break;
case 451:
CleverTap.discardInAppNotifications();
break;
case 452:
CleverTap.resumeInAppNotifications();
break;
case 46:
enablePersonalization();
break;
Expand Down Expand Up @@ -290,7 +309,7 @@ export default class App extends Component {
// Listener to handle incoming deep links
Linking.addEventListener('url', _handleOpenUrl);

// this handles the case where a deep link launches the application
/// this handles the case where a deep link launches the application
Linking.getInitialURL().then((url) => {
if (url) {
console.log('launch url', url);
Expand All @@ -317,7 +336,8 @@ export default class App extends Component {
sub_Category: [{ id: 1, name: 'pushProfile' }, { id: 2, name: 'set Multi Values For Key' }, {
id: 3,
name: 'removeMultiValueForKey'
}, { id: 4, name: 'removeValueForKey' }, { id: 5, name: 'addMultiValueForKey' }]
}, { id: 4, name: 'removeValueForKey' }, { id: 5, name: 'addMultiValueForKey' }
, { id: 500, name: 'Increment Value' }, { id: 501, name: 'Decrement Value' }]
},

{
Expand Down Expand Up @@ -396,6 +416,10 @@ export default class App extends Component {
{
expanded: false, category_Name: "Feature Flag", sub_Category: [{ id: 45, name: 'getFeatureFlag' }]
},
{
expanded: false, category_Name: "InApp Controls", sub_Category: [{ id: 450, name: 'suspendInAppNotifications' }
, { id: 451, name: 'discardInAppNotifications' }, { id: 452, name: 'resumeInAppNotifications' }]
},
{
expanded: false,
category_Name: "App Personalisation",
Expand All @@ -404,7 +428,7 @@ export default class App extends Component {
{
expanded: false,
category_Name: "Attributions",
sub_Category: [{ id: 48, name: 'get CleverTap Attribution Identifier' }]
sub_Category: [{ id: 48, name: '(Deprecated) get CleverTap Attribution Identifier' }]
},
{
expanded: false,
Expand Down Expand Up @@ -507,8 +531,14 @@ removeValueForKey = () => {

};
getCleverTap_id = () => {
// Below method is deprecated since 0.6.0, please check index.js for deprecation, instead use CleverTap.getCleverTapID()
/*CleverTap.profileGetCleverTapID((err, res) => {
console.log('CleverTapID', res, err);
alert(`CleverTapID: \n ${res}`);
});*/

CleverTap.profileGetCleverTapID((err, res) => {
// Use below newly added method
CleverTap.getCleverTapID((err, res) => {
console.log('CleverTapID', res, err);
alert(`CleverTapID: \n ${res}`);
});
Expand Down Expand Up @@ -858,7 +888,7 @@ profile_getProperty = () => {
///Attributions
GetCleverTapAttributionIdentifier = () => {


// Below method is deprecated since 0.6.0, please check index.js for deprecation, use CleverTap.getCleverTapID(callback) instead
//Default Instance
CleverTap.profileGetCleverTapAttributionIdentifier((err, res) => {
console.log('CleverTapAttributionIdentifier', res, err);
Expand Down Expand Up @@ -1034,15 +1064,15 @@ const styles = StyleSheet.create({
},

button_Text: {
width:'100%',
width: '100%',
textAlign: 'center',
color: '#000',
fontWeight: 'bold',
fontSize: 26
},

setSubCategoryFontSizeOne: {
fontSize: 18
fontSize: 18
},

});
54 changes: 27 additions & 27 deletions Example/ios/Example.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
objects = {

/* Begin PBXBuildFile section */
0ED7D526153148432ADDC432 /* libPods-Example.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 7C2F7457C4A128FFD956BCCB /* libPods-Example.a */; };
13B07FBC1A68108700A75B9A /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB01A68108700A75B9A /* AppDelegate.m */; };
13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; };
13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; };
81AB9BB82411601600AC10FF /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */; };
9DC8424141B4358267A0B400 /* libPods-Example.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 2701590A358AE9E74F23A796 /* libPods-Example.a */; };
/* End PBXBuildFile section */

/* Begin PBXFileReference section */
Expand All @@ -21,11 +21,11 @@
13B07FB51A68108700A75B9A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = Example/Images.xcassets; sourceTree = "<group>"; };
13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = Example/Info.plist; sourceTree = "<group>"; };
13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = Example/main.m; sourceTree = "<group>"; };
2701590A358AE9E74F23A796 /* libPods-Example.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-Example.a"; sourceTree = BUILT_PRODUCTS_DIR; };
494B16C126B01FD7008F32F7 /* Example.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; name = Example.entitlements; path = Example/Example.entitlements; sourceTree = "<group>"; };
7C2F7457C4A128FFD956BCCB /* libPods-Example.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-Example.a"; sourceTree = BUILT_PRODUCTS_DIR; };
81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = LaunchScreen.storyboard; path = Example/LaunchScreen.storyboard; sourceTree = "<group>"; };
8CCD02BA391B3B061E22FE30 /* Pods-Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Example.release.xcconfig"; path = "Target Support Files/Pods-Example/Pods-Example.release.xcconfig"; sourceTree = "<group>"; };
BCA6A9B9E7C00E6EAC8C42D4 /* Pods-Example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Example.debug.xcconfig"; path = "Target Support Files/Pods-Example/Pods-Example.debug.xcconfig"; sourceTree = "<group>"; };
CFC784233BA6FB4CD79E3A31 /* Pods-Example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Example.debug.xcconfig"; path = "Target Support Files/Pods-Example/Pods-Example.debug.xcconfig"; sourceTree = "<group>"; };
D5200CA3BDDE01218215BB77 /* Pods-Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Example.release.xcconfig"; path = "Target Support Files/Pods-Example/Pods-Example.release.xcconfig"; sourceTree = "<group>"; };
ED297162215061F000B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; };
/* End PBXFileReference section */

Expand All @@ -34,7 +34,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
0ED7D526153148432ADDC432 /* libPods-Example.a in Frameworks */,
9DC8424141B4358267A0B400 /* libPods-Example.a in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand All @@ -59,16 +59,16 @@
isa = PBXGroup;
children = (
ED297162215061F000B7C4FE /* JavaScriptCore.framework */,
7C2F7457C4A128FFD956BCCB /* libPods-Example.a */,
2701590A358AE9E74F23A796 /* libPods-Example.a */,
);
name = Frameworks;
sourceTree = "<group>";
};
7168044AA71FBFBA4A3B8E24 /* Pods */ = {
isa = PBXGroup;
children = (
BCA6A9B9E7C00E6EAC8C42D4 /* Pods-Example.debug.xcconfig */,
8CCD02BA391B3B061E22FE30 /* Pods-Example.release.xcconfig */,
CFC784233BA6FB4CD79E3A31 /* Pods-Example.debug.xcconfig */,
D5200CA3BDDE01218215BB77 /* Pods-Example.release.xcconfig */,
);
path = Pods;
sourceTree = "<group>";
Expand Down Expand Up @@ -109,13 +109,13 @@
isa = PBXNativeTarget;
buildConfigurationList = 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "Example" */;
buildPhases = (
6DC0FD03AA14172B67400905 /* [CP] Check Pods Manifest.lock */,
855E3FCFBC9FA3705E21D6BE /* [CP] Check Pods Manifest.lock */,
FD10A7F022414F080027D42C /* Start Packager */,
13B07F871A680F5B00A75B9A /* Sources */,
13B07F8C1A680F5B00A75B9A /* Frameworks */,
13B07F8E1A680F5B00A75B9A /* Resources */,
00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */,
D411CCF697F5C7ECAB356675 /* [CP] Copy Pods Resources */,
2D940EE659B7722400DA5FE3 /* [CP] Copy Pods Resources */,
);
buildRules = (
);
Expand Down Expand Up @@ -184,43 +184,43 @@
shellPath = /bin/sh;
shellScript = "set -e\n\nexport NODE_BINARY=node\n../node_modules/react-native/scripts/react-native-xcode.sh\n";
};
6DC0FD03AA14172B67400905 /* [CP] Check Pods Manifest.lock */ = {
2D940EE659B7722400DA5FE3 /* [CP] Copy Pods Resources */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Example/Pods-Example-resources-${CONFIGURATION}-input-files.xcfilelist",
);
inputPaths = (
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
"${PODS_ROOT}/Manifest.lock",
);
name = "[CP] Check Pods Manifest.lock";
name = "[CP] Copy Pods Resources";
outputFileListPaths = (
);
outputPaths = (
"$(DERIVED_FILE_DIR)/Pods-Example-checkManifestLockResult.txt",
"${PODS_ROOT}/Target Support Files/Pods-Example/Pods-Example-resources-${CONFIGURATION}-output-files.xcfilelist",
);
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-Example/Pods-Example-resources.sh\"\n";
showEnvVarsInLog = 0;
};
D411CCF697F5C7ECAB356675 /* [CP] Copy Pods Resources */ = {
855E3FCFBC9FA3705E21D6BE /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Example/Pods-Example-resources-${CONFIGURATION}-input-files.xcfilelist",
);
name = "[CP] Copy Pods Resources";
inputPaths = (
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
"${PODS_ROOT}/Manifest.lock",
);
name = "[CP] Check Pods Manifest.lock";
outputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Example/Pods-Example-resources-${CONFIGURATION}-output-files.xcfilelist",
);
outputPaths = (
"$(DERIVED_FILE_DIR)/Pods-Example-checkManifestLockResult.txt",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Example/Pods-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;
};
FD10A7F022414F080027D42C /* Start Packager */ = {
Expand Down Expand Up @@ -259,7 +259,7 @@
/* Begin XCBuildConfiguration section */
13B07F941A680F5B00A75B9A /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = BCA6A9B9E7C00E6EAC8C42D4 /* Pods-Example.debug.xcconfig */;
baseConfigurationReference = CFC784233BA6FB4CD79E3A31 /* Pods-Example.debug.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
Expand Down Expand Up @@ -288,7 +288,7 @@
};
13B07F951A680F5B00A75B9A /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 8CCD02BA391B3B061E22FE30 /* Pods-Example.release.xcconfig */;
baseConfigurationReference = D5200CA3BDDE01218215BB77 /* Pods-Example.release.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
Expand Down
5 changes: 2 additions & 3 deletions Example/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"dependencies": {
"@react-navigation/drawer": "^5.12.5",
"@react-navigation/native": "^6.0.0-next.1",
"clevertap-react-native": "^0.5.2",
"clevertap-react-native": "git+https://github.com/CleverTap/clevertap-react-native.git#develop",
"react": "17.0.1",
"react-native": "0.64.1",
"react-native-drawer": "^2.5.1",
Expand Down
4 changes: 2 additions & 2 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ android {
defaultConfig {
minSdkVersion 16
targetSdkVersion 30
versionCode 52
versionName "0.5.2"
versionCode 60
versionName "0.6.0"
}
buildTypes {
release {
Expand Down
Loading

0 comments on commit f388e07

Please sign in to comment.