Skip to content

Commit

Permalink
Merge pull request #64 from emartech/MV-281-Accept-null-application-c…
Browse files Browse the repository at this point in the history
…ode-on-changeApplicationCode-method

Mv 281 accept null application code on change application code method
  • Loading branch information
biancalui-emarsys authored Jun 10, 2022
2 parents 7096e2b + 24fe9c1 commit c850d04
Show file tree
Hide file tree
Showing 15 changed files with 6,952 additions and 7,038 deletions.
17 changes: 8 additions & 9 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,28 +2,28 @@
buildscript {
repositories {
google()
jcenter()
mavenCentral()
maven {
url 'https://maven.google.com/'
name 'Google'
}
}

dependencies {
classpath('com.android.tools.build:gradle:4.0.0')
classpath('com.android.tools.build:gradle:7.1.3')
}
}

apply plugin: 'com.android.library'

android {
compileSdkVersion 29
compileSdkVersion 31
buildToolsVersion "28.0.3"
defaultConfig {
minSdkVersion 21
targetSdkVersion 29
versionCode 5
versionName "1.5"
minSdkVersion 24
targetSdkVersion 31
versionCode 6
versionName "1.6"
}
lintOptions {
abortOnError false
Expand All @@ -37,7 +37,6 @@ android {

repositories {
google()
jcenter()
mavenCentral()
maven {
url 'https://maven.google.com/'
Expand All @@ -47,5 +46,5 @@ repositories {

dependencies {
implementation "com.facebook.react:react-native:+"
implementation "com.emarsys:emarsys-sdk:3.2.0"
implementation "com.emarsys:emarsys-sdk:3.2.2"
}
Original file line number Diff line number Diff line change
Expand Up @@ -556,7 +556,7 @@ public void onCompleted(@Nullable Throwable errorCause) {
}

@ReactMethod
public void changeApplicationCode(@NonNull final String applicationCode, final Promise promise) {
public void changeApplicationCode(@Nullable final String applicationCode, final Promise promise) {
try {
Emarsys.getConfig().changeApplicationCode(applicationCode, new CompletionListener() {
@Override
Expand Down
2 changes: 1 addition & 1 deletion ios/RNEmarsysWrapper.m
Original file line number Diff line number Diff line change
Expand Up @@ -477,7 +477,7 @@ - (void)resolveProducts:(NSArray * _Nonnull)products resolver:(RCTPromiseResolve
}
}

RCT_EXPORT_METHOD(changeApplicationCode:(NSString * _Nonnull)applicationCode resolver:(RCTPromiseResolveBlock)resolve rejecter:(RCTPromiseRejectBlock)reject ) {
RCT_EXPORT_METHOD(changeApplicationCode:(NSString * _Nullable)applicationCode resolver:(RCTPromiseResolveBlock)resolve rejecter:(RCTPromiseRejectBlock)reject ) {
@try {
[Emarsys.config changeApplicationCode:applicationCode completionBlock:^(NSError * _Nullable error) {
if (NULL != error) {
Expand Down
2 changes: 1 addition & 1 deletion ios/RNEmarsysWrapper.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@ Pod::Spec.new do |s|
s.source_files = "ios/*.{h,m}"
s.requires_arc = true
s.dependency "React", ">= 0.67.3"
s.dependency "EmarsysSDK", "~> 3.2.0"
s.dependency "EmarsysSDK", "~> 3.2.2"

end
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-native-emarsys-wrapper",
"version": "1.5.0",
"version": "1.6.0",
"description": "React Native wrapper for Emarsys SDK",
"main": "index.js",
"scripts": {
Expand Down
5 changes: 2 additions & 3 deletions sample/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,6 @@ android {
// keyPassword 'android'
//}
}
buildToolsVersion = buildToolsVersion
buildTypes {
debug {
signingConfig signingConfigs.debug
Expand Down Expand Up @@ -184,8 +183,8 @@ dependencies {
implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.1.0"
implementation "androidx.multidex:multidex:2.0.1"

implementation "com.emarsys:emarsys-sdk:3.2.0"
implementation "com.emarsys:emarsys-firebase:3.2.0"
implementation "com.emarsys:emarsys-sdk:3.2.2"
implementation "com.emarsys:emarsys-firebase:3.2.2"

// JSC from node_modules
if (useIntlJsc) {
Expand Down
3 changes: 3 additions & 0 deletions sample/android/app/proguard-rules.pro
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,6 @@
# http://developer.android.com/guide/developing/tools/proguard.html

# Add any project specific keep options here:

-keep class com.swmansion.reanimated.** { *; }
-keep class com.facebook.react.turbomodule.** { *; }
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import com.emarsys.rnwrapper.RNEmarsysEventHandler;
import com.facebook.react.PackageList;
import com.facebook.react.ReactApplication;
import com.swmansion.reanimated.ReanimatedPackage;
import com.emarsys.rnwrapper.RNEmarsysWrapperPackage;
import com.facebook.react.ReactNativeHost;
import com.facebook.react.ReactPackage;
Expand Down
4 changes: 1 addition & 3 deletions sample/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,10 @@ buildscript {
}
repositories {
google()
jcenter()
mavenCentral()
}
dependencies {
classpath('com.android.tools.build:gradle:4.2.2')
classpath('com.android.tools.build:gradle:7.1.3')
classpath("com.google.gms:google-services:4.3.10")

// NOTE: Do not place your application dependencies here; they belong
Expand All @@ -35,7 +34,6 @@ allprojects {
}

google()
jcenter()
mavenCentral()
}
}
2 changes: 1 addition & 1 deletion sample/android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Mon Mar 07 12:38:20 CET 2022
distributionBase=GRADLE_USER_HOME
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip
distributionPath=wrapper/dists
zipStorePath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
Loading

0 comments on commit c850d04

Please sign in to comment.