Skip to content

Commit

Permalink
Merge pull request #1 from khipu/2.7.1
Browse files Browse the repository at this point in the history
feat: upgrate to Khipu 2.7.1 and new showFooter param
  • Loading branch information
edavism authored Jul 26, 2024
2 parents 9dc8a68 + 0ffcb47 commit 8edddc1
Show file tree
Hide file tree
Showing 8 changed files with 34 additions and 21 deletions.
2 changes: 1 addition & 1 deletion android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,6 @@ dependencies {
//noinspection GradleDynamicVersion
implementation "com.facebook.react:react-native:+"
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
implementation 'com.khipu:khipu-client-android:2.6.0'
implementation 'com.khipu:khipu-client-android:2.7.1'
}

1 change: 1 addition & 0 deletions android/src/main/java/com/khipu/KhipuModule.kt
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ class KhipuModule(reactContext: ReactApplicationContext) :
options.getString("title")?.let { optionsBuilder.topBarTitle(it) }
options.getString("titleImageUrl")?.let { optionsBuilder.topBarImageUrl(it) }
options.getBoolean("skipExitPage").let { optionsBuilder.skipExitPage(it) }
options.getBoolean("showFooter").let { optionsBuilder.showFooter(it) }
options.getString("locale")?.let { optionsBuilder.locale(it) }
if (options.hasKey("theme")) {
val theme: String = options.getString("theme")!!
Expand Down
10 changes: 8 additions & 2 deletions example/ios/KhipuExample.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -594,7 +594,10 @@
"-DFOLLY_CFG_NO_COROUTINES=1",
"-DFOLLY_HAVE_CLOCK_GETTIME=1",
);
OTHER_LDFLAGS = "$(inherited) ";
OTHER_LDFLAGS = (
"$(inherited)",
" ",
);
REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native";
SDKROOT = iphoneos;
USE_HERMES = true;
Expand Down Expand Up @@ -666,7 +669,10 @@
"-DFOLLY_CFG_NO_COROUTINES=1",
"-DFOLLY_HAVE_CLOCK_GETTIME=1",
);
OTHER_LDFLAGS = "$(inherited) ";
OTHER_LDFLAGS = (
"$(inherited)",
" ",
);
REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native";
SDKROOT = iphoneos;
USE_HERMES = true;
Expand Down
30 changes: 15 additions & 15 deletions example/ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ PODS:
- hermes-engine (0.74.1):
- hermes-engine/Pre-built (= 0.74.1)
- hermes-engine/Pre-built (0.74.1)
- KhenshinProtocol (1.0.42)
- KhenshinSecureMessage (1.2.0):
- KHTweetNacl
- KhipuClientIOS (1.1.5):
- KhenshinProtocol (= 1.0.42)
- KhenshinSecureMessage (= 1.2.0)
- Socket.IO-Client-Swift
- KhenshinProtocol (1.0.44)
- KhenshinSecureMessage (1.3.0):
- KHTweetNacl (= 1.1.4)
- KhipuClientIOS (2.7.1):
- KhenshinProtocol (= 1.0.44)
- KhenshinSecureMessage (= 1.3.0)
- Socket.IO-Client-Swift (= 16.1.0)
- Starscream (= 4.0.6)
- KHTweetNacl (1.1.3)
- KHTweetNacl (1.1.4)
- RCT-Folly (2024.01.01.00):
- boost
- DoubleConversion
Expand Down Expand Up @@ -944,11 +944,11 @@ PODS:
- React-Mapbuffer (0.74.1):
- glog
- React-debug
- react-native-khipu (2.4.0):
- react-native-khipu (2.7.0):
- DoubleConversion
- glog
- hermes-engine
- KhipuClientIOS
- KhipuClientIOS (= 2.7.1)
- RCT-Folly (= 2024.01.01.00)
- RCTRequired
- RCTTypeSafety
Expand Down Expand Up @@ -1390,10 +1390,10 @@ SPEC CHECKSUMS:
fmt: 4c2741a687cc09f0634a2e2c72a838b99f1ff120
glog: c5d68082e772fa1c511173d6b30a9de2c05a69a2
hermes-engine: 16b8530de1b383cdada1476cf52d1b52f0692cbc
KhenshinProtocol: 36184f1ef7bc2a1d3110f9ec4a8fce73c38ecbda
KhenshinSecureMessage: 60ba9ba77e08568dd992b5ef3850596c0dba8ad1
KhipuClientIOS: d343a5e2f05c4477813b10d24e3c1c64070cf43f
KHTweetNacl: bc84ebc987a5235fc58ae9ccb9de01d504e29e0f
KhenshinProtocol: 12df55da4968686dfda93a80c3ffcc87de09cc32
KhenshinSecureMessage: f0604e236fe33a3538ee01129c74c94d724bf546
KhipuClientIOS: 851757710903d9bc6cf9ee053707b138f66a9987
KHTweetNacl: 405b98e955a2fdb50eb8372fde9c6b50b218e51b
RCT-Folly: 02617c592a293bd6d418e0a88ff4ee1f88329b47
RCTDeprecation: efb313d8126259e9294dc4ee0002f44a6f676aba
RCTRequired: f49ea29cece52aee20db633ae7edc4b271435562
Expand All @@ -1418,7 +1418,7 @@ SPEC CHECKSUMS:
React-jsitracing: 233d1a798fe0ff33b8e630b8f00f62c4a8115fbc
React-logger: 7e7403a2b14c97f847d90763af76b84b152b6fce
React-Mapbuffer: 11029dcd47c5c9e057a4092ab9c2a8d10a496a33
react-native-khipu: 379e4266edd028636244d167c871bc627af5d667
react-native-khipu: e2366677ffdba17d255731a1c8c94e62f5d4d680
React-nativeconfig: b0073a590774e8b35192fead188a36d1dca23dec
React-NativeModulesApple: df46ff3e3de5b842b30b4ca8a6caae6d7c8ab09f
React-perflogger: 3d31e0d1e8ad891e43a09ac70b7b17a79773003a
Expand Down
5 changes: 3 additions & 2 deletions example/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,15 @@ export default function App() {

React.useEffect(() => {
startOperation({
operationId: 'hxet5stmvvoj',
operationId: 'pxz1smiyrmji',
options: {
title: 'KhipuReactNative',
titleImageUrl:
'https://s3.amazonaws.com/static.khipu.com/buttons/2024/200x75-black.png',
locale: 'es_CL',
theme: 'light',
skipExitPage: true,
skipExitPage: false,
showFooter: false,
colors: {
// lightBackground: '#0000ff',
// lightPrimary: '#ff00ff',
Expand Down
4 changes: 4 additions & 0 deletions ios/Khipu.swift
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ class Khipu: NSObject {
if (options["skipExitPage"] != nil) {
optionsBuilder = optionsBuilder.skipExitPage(options["skipExitPage"]! as! Bool)
}

if (options["showFooter"] != nil) {
optionsBuilder = optionsBuilder.showFooter(options["showFooter"]! as! Bool)
}

if (options["locale"] != nil) {
optionsBuilder = optionsBuilder.locale(options["locale"]! as! String)
Expand Down
2 changes: 1 addition & 1 deletion react-native-khipu.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Pod::Spec.new do |s|

s.source_files = "ios/**/*.{h,m,mm,swift}"

s.dependency "KhipuClientIOS", "2.0.0"
s.dependency "KhipuClientIOS", "2.7.1"
# Use install_modules_dependencies helper to install the dependencies if React Native version >=0.71.0.
# See https://github.com/facebook/react-native/blob/febf6b7f33fdb4904669f99d795eba4c0f95d7bf/scripts/cocoapods/new_architecture.rb#L79.
if respond_to?(:install_modules_dependencies, true)
Expand Down
1 change: 1 addition & 0 deletions src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ export interface KhipuOptions {
title: string | undefined;
titleImageUrl: string | undefined;
skipExitPage: boolean | undefined;
showFooter: boolean | undefined;
theme: 'light' | 'dark' | 'system' | undefined;
colors: KhipuColors | undefined;
}
Expand Down

0 comments on commit 8edddc1

Please sign in to comment.