Skip to content

Commit 3009be4

Browse files
authored
0.11.3 (#154)
# 0.11.3 ## Update * support android channel-io 12.7.0 * support iOS channel-io 12.7.0 ## Bug Fixes * react-native 0.76.0 or higher: Fixes an issue where an error occurs when using setPage.
1 parent e764b76 commit 3009be4

File tree

6 files changed

+20
-10
lines changed

6 files changed

+20
-10
lines changed

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
# 0.11.3
2+
3+
## Update
4+
* support android channel-io 12.7.0
5+
* support iOS channel-io 12.7.0
6+
7+
## Bug Fixes
8+
* react-native 0.76.0 or higher: Fixes an issue where an error occurs when using setPage.
9+
110
# 0.11.2
211

312
## Update

RNChannelIO.podspec

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |s|
22
s.name = "RNChannelIO"
3-
s.version = "0.5.2"
3+
s.version = "0.5.3"
44
s.summary = "RNChannelIO"
55
s.description = "channel plugin for react native"
66
s.homepage = "https://channel.io"
@@ -15,6 +15,6 @@ Pod::Spec.new do |s|
1515
s.ios.deployment_target = '15.0'
1616

1717
s.dependency "React"
18-
s.dependency "ChannelIOSDK", '12.7.0'
18+
s.dependency "ChannelIOSDK", '12.9.0'
1919

2020
end

android/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,5 +57,5 @@ repositories {
5757

5858
dependencies {
5959
implementation 'com.facebook.react:react-native'
60-
api 'io.channel:plugin-android:12.7.0'
60+
api 'io.channel:plugin-android:12.8.1'
6161
}

index.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,7 @@ interface ChannelModuleType {
154154
receivePushNotification: (userInfo: Record<string, any>) => Promise<void>;
155155
hasStoredPushNotification: () => Promise<boolean>;
156156
openStoredPushNotification: () => void;
157+
setPageNull: (profile?: Profile) => void;
157158
setPage: (page?: string | null, profile?: Profile) => void;
158159
resetPage: () => void;
159160
setAppearance: (appearance: Appearance) => void;
@@ -390,15 +391,15 @@ export const ChannelIO: RNChannelIO = {
390391
/**
391392
* Sets the name of the screen along with user chat profile. If track is called before setPage, the event will not reflect the page information.
392393
* @param {String} page This is the screen name when track is called. When calling .track(), the event's page is set to null.
393-
* @param {String} profile The user chat profile value.
394+
* @param {Object} profile The user chat profile value.
394395
* - When nil is assigned to a specific field within the profile object, only the value of that field is cleared.
395396
* - The user chat profile value is applied when a user chat is created.
396397
*/
397398
setPage: (page?: string | null, profile?: Profile) => {
398399
if (typeof page === "string") {
399-
ChannelModule.setPage(page, profile)
400+
ChannelModule.setPage(page, profile ?? {})
400401
} else if (page === null || page === undefined) {
401-
ChannelModule.setPage(null, profile)
402+
ChannelModule.setPageNull(profile ?? {})
402403
} else {
403404
console.error('ChannelIO', '"page" must be type of "string", null or undefined.')
404405
}

ios/RNChannelIO.m

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -376,11 +376,11 @@ - (NSDictionary *)constantsToExport {
376376
[CrossPlatformUtils openBrowserWithUrl:url];
377377
}
378378

379-
RCT_EXPORT_METHOD(setPage:(NSString *)page) {
380-
[ChannelIO setPage:page profile:[[NSDictionary alloc] init]];
379+
RCT_EXPORT_METHOD(setPageNull:(NSDictionary<NSString *, id> *)profile) {
380+
[ChannelIO setPage:NULL profile:profile];
381381
}
382382

383-
RCT_EXPORT_METHOD(setPage:(NSString *)page profile:(NSDictionary<NSString *, id> *)profile) {
383+
RCT_EXPORT_METHOD(setPage:(nullable NSString *)page profile:(NSDictionary<NSString *, id> *)profile) {
384384
[ChannelIO setPage:page profile:profile];
385385
}
386386

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-native-channel-plugin",
3-
"version": "0.11.2",
3+
"version": "0.11.3",
44
"description": "react native module for channel io",
55
"main": "index.ts",
66
"scripts": {

0 commit comments

Comments
 (0)