Skip to content

Commit

Permalink
3.1.30 (#297)
Browse files Browse the repository at this point in the history
* 3.1.29

* update package version

* pod repo update

* update android dependency

* support the async version of NamiPurchaseManager functions

* async await
  • Loading branch information
namidan authored Feb 5, 2024
1 parent 3639163 commit d68ff02
Show file tree
Hide file tree
Showing 11 changed files with 23 additions and 17 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/CI.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ jobs:
working-directory: source/examples/Basic

- name: Install iOS pods
run: RCT_NEW_ARCH_ENABLED=0 SWIFT_VERSION=5 pod install
run: RCT_NEW_ARCH_ENABLED=0 SWIFT_VERSION=5 pod install --repo-update
working-directory: source/examples/Basic/ios

- name: Rebuild cache detox
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/app_prod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ jobs:

- name: Install test iOS dependencies
run: |
pod install
pod install --repo-update
working-directory: source/examples/Basic/ios

- name: Build resolve Swift dependencies
Expand Down Expand Up @@ -316,7 +316,7 @@ jobs:

- name: Install test tvOS dependencies
run: |
RCT_NEW_ARCH_ENABLED=0 SWIFT_VERSION=5 pod install
RCT_NEW_ARCH_ENABLED=0 SWIFT_VERSION=5 pod install --repo-update
working-directory: source/examples/TestNamiTV/ios

- name: Build resolve Swift dependencies
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/app_stg.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ jobs:

- name: Install test iOS dependencies
run: |
pod install
pod install --repo-update
working-directory: source/examples/Basic/ios

- name: Build resolve Swift dependencies
Expand Down Expand Up @@ -316,7 +316,7 @@ jobs:

- name: Install test tvOS dependencies
run: |
RCT_NEW_ARCH_ENABLED=0 SWIFT_VERSION=5 pod install
RCT_NEW_ARCH_ENABLED=0 SWIFT_VERSION=5 pod install --repo-update
working-directory: source/examples/TestNamiTV/ios

- name: Build resolve Swift dependencies
Expand Down
2 changes: 1 addition & 1 deletion android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"

implementation 'com.github.jeziellago:compose-markdown:0.3.0'
compileOnly "com.namiml:sdk-amazon:3.1.24"
compileOnly "com.namiml:sdk-amazon:3.1.30"

implementation 'com.facebook.react:react-native:+' // From node_modules
coreLibraryDesugaring "com.android.tools:desugar_jdk_libs:1.1.5"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ class NamiBridgeModule(reactContext: ReactApplicationContext) :
} else {
Arguments.createArray()
}
val settingsList = mutableListOf("extendedClientInfo:react-native:3.1.28")
val settingsList = mutableListOf("extendedClientInfo:react-native:3.1.30")
namiCommandsReact?.toArrayList()?.filterIsInstance<String>()?.let { commandsFromReact ->
settingsList.addAll(commandsFromReact)
}
Expand Down
2 changes: 1 addition & 1 deletion examples/Basic/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ dependencies {
implementation fileTree(dir: "libs", include: ["*.jar"])
implementation "com.facebook.react:react-native:+" // From node_modules
implementation 'com.github.jeziellago:compose-markdown:0.3.0'
implementation "com.namiml:sdk-android:3.1.24"
implementation "com.namiml:sdk-android:3.1.30"

implementation project(':react-native-screens')

Expand Down
4 changes: 2 additions & 2 deletions examples/TestNamiTV/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -227,8 +227,8 @@ dependencies {
implementation "com.facebook.react:react-native:+" // From node_modules
implementation 'com.github.jeziellago:compose-markdown:0.3.0'

amazonImplementation "com.namiml:sdk-amazon:3.1.24"
playImplementation "com.namiml:sdk-android:3.1.24"
amazonImplementation "com.namiml:sdk-amazon:3.1.30"
playImplementation "com.namiml:sdk-android:3.1.30"

if (enableHermes) {
def hermesPath = "../../node_modules/hermes-engine/android/";
Expand Down
2 changes: 1 addition & 1 deletion ios/Nami.m
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ @implementation NamiBridge (RCTExternModule)
}

// Start commands with header iformation for Nami to let them know this is a React client.
NSMutableArray *namiCommandStrings = [NSMutableArray arrayWithArray:@[@"extendedClientInfo:react-native:3.1.28"]];
NSMutableArray *namiCommandStrings = [NSMutableArray arrayWithArray:@[@"extendedClientInfo:react-native:3.1.30"]];

// Add additional namiCommands app may have sent in.
NSObject *appCommandStrings = configDict[@"namiCommands"];
Expand Down
14 changes: 10 additions & 4 deletions ios/NamiPurchaseManagerBridge.swift
Original file line number Diff line number Diff line change
Expand Up @@ -99,14 +99,20 @@ class RNNamiPurchaseManager: RCTEventEmitter {

@objc(skuPurchased:resolver:rejecter:)
func skuPurchased(skuId: String, resolve: @escaping RCTPromiseResolveBlock, reject _: @escaping RCTPromiseRejectBlock) {
let isSkuPurchased = NamiPurchaseManager.skuPurchased(skuId)
resolve(isSkuPurchased)
Task {
let isSkuPurchased = await NamiPurchaseManager.skuPurchased(skuId)
resolve(isSkuPurchased)
}
resolve(false)
}

@objc(anySkuPurchased:resolver:rejecter:)
func anySkuPurchased(skuIds: [String], resolve: @escaping RCTPromiseResolveBlock, reject _: @escaping RCTPromiseRejectBlock) {
let isSkusPurchased = NamiPurchaseManager.anySkuPurchased(skuIds)
resolve(isSkusPurchased)
Task {
let isSkusPurchased = await NamiPurchaseManager.anySkuPurchased(skuIds)
resolve(isSkusPurchased)
}
resolve(false)
}

@objc(consumePurchasedSku:)
Expand Down
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-nami-sdk",
"version": "3.1.28",
"version": "3.1.30",
"description": "React Native Module for Nami - Easy subscriptions & in-app purchases, with powerful built-in paywalls and A/B testing.",
"main": "index.ts",
"types": "index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion react-native-nami-sdk.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Pod::Spec.new do |s|
s.source_files = "ios/**/*.{h,m,swift}"
s.requires_arc = true

s.dependency 'Nami', '3.1.28'
s.dependency 'Nami', '3.1.30'
s.dependency 'React'

end

0 comments on commit d68ff02

Please sign in to comment.