From 9320950970830a00dbcd94d85660015d94c47147 Mon Sep 17 00:00:00 2001 From: bingo Date: Mon, 9 May 2022 10:46:51 +0800 Subject: [PATCH 01/10] upgrade android sdk to 5.7.0 --- android/build.gradle | 9 ++++----- android/gradle.properties | 2 +- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/android/build.gradle b/android/build.gradle index 7aea59b..b2eec17 100755 --- a/android/build.gradle +++ b/android/build.gradle @@ -2,14 +2,14 @@ buildscript { //Buildscript is evaluated before everything else so we can't use getExtOrDefault def kotlin_version = rootProject.ext.has('kotlinVersion') ? rootProject.ext.get('kotlinVersion') : project.properties['ReactNativeLine_kotlinVersion'] ext { - buildToolsVersion = "28.0.3" + buildToolsVersion = "30.0.2" minSdkVersion = 21 compileSdkVersion = 28 - targetSdkVersion = 28 + targetSdkVersion = 30 coroutinesAndroidVersion = "1.0.1" coroutinesCoreVersion = "1.0.1" gsonVersion = "2.8.6" - linesdkVersion = "5.1.1" + linesdkVersion = "5.7.0" } repositories { google() @@ -20,7 +20,6 @@ buildscript { classpath "com.android.tools.build:gradle:3.5.1" //noinspection DifferentKotlinGradleVersion classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" - classpath "com.linecorp:linesdk:5.1.1" } } @@ -58,7 +57,7 @@ android { dependencies { implementation "com.facebook.react:react-native:+" - implementation "com.linecorp:linesdk:5.1.1" + implementation 'com.linecorp.linesdk:linesdk:5.7.0' implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.3.50" implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:$coroutinesAndroidVersion" implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutinesCoreVersion" diff --git a/android/gradle.properties b/android/gradle.properties index f772dd1..eedf72a 100644 --- a/android/gradle.properties +++ b/android/gradle.properties @@ -2,4 +2,4 @@ ReactNativeLine_kotlinVersion=1.3.50 ReactNativeLine_compileSdkVersion=28 ReactNativeLine_buildToolsVersion=28.0.3 ReactNativeLine_targetSdkVersion=28 -ReactNativeLine_lineSdkVersion=5.1.1 \ No newline at end of file +ReactNativeLine_lineSdkVersion=5.7.0 \ No newline at end of file From b51de635dd92f26e54cc3d9c52a03a10333ec664 Mon Sep 17 00:00:00 2001 From: bingo Date: Mon, 9 May 2022 10:47:14 +0800 Subject: [PATCH 02/10] upgrade ios sdk to 5.8.1 --- RNLine.podspec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/RNLine.podspec b/RNLine.podspec index 3df86a6..9cefb91 100644 --- a/RNLine.podspec +++ b/RNLine.podspec @@ -11,11 +11,11 @@ Pod::Spec.new do |s| s.authors = package['author'] s.homepage = package['homepage'] s.platform = :ios, "10.0" - s.swift_version = '5.0' + s.swift_version = '5.8.1' s.source = { :git => "" } s.source_files = "ios/**/*.{h,m,swift}" s.dependency 'React' - s.dependency 'LineSDKSwift', '~> 5.0' + s.dependency 'LineSDKSwift', '~> 5.8.1' end From 40e999ba4409aee5ec6c4a9ed52a2654eb7ae2b5 Mon Sep 17 00:00:00 2001 From: bingo Date: Mon, 9 May 2022 11:46:19 +0800 Subject: [PATCH 03/10] fix iOS use_frameworks! broken --- RNLine.podspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RNLine.podspec b/RNLine.podspec index 9cefb91..71702f7 100644 --- a/RNLine.podspec +++ b/RNLine.podspec @@ -16,6 +16,6 @@ Pod::Spec.new do |s| s.source = { :git => "" } s.source_files = "ios/**/*.{h,m,swift}" - s.dependency 'React' + s.dependency 'React-Core' s.dependency 'LineSDKSwift', '~> 5.8.1' end From 180970b1f7a198fd976674d1ac050659f8c087be Mon Sep 17 00:00:00 2001 From: bingo Date: Tue, 17 May 2022 18:08:22 +0800 Subject: [PATCH 04/10] update README --- README.md | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 38722ec..51fa846 100644 --- a/README.md +++ b/README.md @@ -59,10 +59,8 @@ First, install the npm package with yarn. _Autolink_ is automatic. Inside your `AppDelegate.m`, setup the line sdk by passing the channel id obtained. 1. Add `platform :ios, '10.0'` in `Podfile` line:1 -2. Enable `use_frameworks!` in `Podfile` line:3 -3. Comment the code related to flipper, flipper doesn't support `use_frameworks!` ! -4. Modify your info.plist like it says here [Configuring the Info.plist file](https://developers.line.biz/en/docs/ios-sdk/swift/setting-up-project/#configuring-the-info-plist-file) -5. Change your `AppDelegate.m` to match the following: +2. Modify your info.plist like it says here [Configuring the Info.plist file](https://developers.line.biz/en/docs/ios-sdk/swift/setting-up-project/#configuring-the-info-plist-file) +3. Change your `AppDelegate.m` to match the following: ```objc // AppDelegate.m @@ -70,7 +68,7 @@ Inside your `AppDelegate.m`, setup the line sdk by passing the channel id obtain // // Import the Library // -#import "RNLine-Swift.h" +@import RNLine; // // Setup the plugin using your CHANNEL_ID when the app finishes launching @@ -137,7 +135,22 @@ Don't forget to add `application` function, as line's instructions indicate. ``` 3. Add `minSdkVersion = 17` in `android/build.gradle` -4. In your manifest add `xmlns:tools="http://schemas.android.com/tools"` in your `manifest` tag and also `tools:replace="android:allowBackup"` in your `application` tag +4. Add LineSDK as a dependency in `android/build.gradle` +```gradle +android { + // Enable Java 1.8 support. + compileOptions { // <- add this block if didn't setup + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 + } + ... + dependencies { + ... + implementation 'com.linecorp.linesdk:linesdk:5.7.0' // <- add this line + } +} +``` +5. In your manifest add `xmlns:tools="http://schemas.android.com/tools"` in your `manifest` tag and also `tools:replace="android:allowBackup"` in your `application` tag ## API From 16405c33b59695040ff9604b9dbba75feecdf8bd Mon Sep 17 00:00:00 2001 From: Jeong-Sik Yun <45959991+jeong-sik@users.noreply.github.com> Date: Fri, 19 Aug 2022 11:34:26 +0900 Subject: [PATCH 05/10] fix: bot prompt string. aggresive -> aggressive --- ios/LineLogin.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ios/LineLogin.swift b/ios/LineLogin.swift index d4ebb7c..df97c87 100644 --- a/ios/LineLogin.swift +++ b/ios/LineLogin.swift @@ -49,7 +49,7 @@ import LineSDK if let botPrompt = args["botPrompt"] as? String { switch botPrompt { - case "aggressive": parameters.botPromptStyle = LoginManager.BotPrompt(rawValue: "aggresive") + case "aggressive": parameters.botPromptStyle = LoginManager.BotPrompt(rawValue: "aggressive") case "normal": parameters.botPromptStyle = LoginManager.BotPrompt(rawValue: "normal") default: break } From 469c76a5ad5cd77697b76f2a37e07cc540416302 Mon Sep 17 00:00:00 2001 From: Emiliano Botti Date: Tue, 28 Feb 2023 16:22:12 -0300 Subject: [PATCH 06/10] Upgrades iOS platform to 11.0 --- RNLine.podspec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/RNLine.podspec b/RNLine.podspec index 71702f7..cb3d93c 100644 --- a/RNLine.podspec +++ b/RNLine.podspec @@ -10,8 +10,8 @@ Pod::Spec.new do |s| s.authors = package['author'] s.homepage = package['homepage'] - s.platform = :ios, "10.0" - s.swift_version = '5.8.1' + s.platform = :ios, "11.0" + s.swift_version = '5.0' s.source = { :git => "" } s.source_files = "ios/**/*.{h,m,swift}" From 58b72ec3b1209c6a57ff529aef97964c00bcf40f Mon Sep 17 00:00:00 2001 From: Emiliano Botti Date: Thu, 2 Mar 2023 17:16:32 -0300 Subject: [PATCH 07/10] Android & Kotlin upgrade working --- README.md | 19 ++----------------- android/build.gradle | 28 ++++++++++++++++------------ android/gradle.properties | 9 +++++---- 3 files changed, 23 insertions(+), 33 deletions(-) diff --git a/README.md b/README.md index 51fa846..914811b 100644 --- a/README.md +++ b/README.md @@ -68,7 +68,7 @@ Inside your `AppDelegate.m`, setup the line sdk by passing the channel id obtain // // Import the Library // -@import RNLine; +#import "RNLine-Swift.h" // // Setup the plugin using your CHANNEL_ID when the app finishes launching @@ -135,22 +135,7 @@ Don't forget to add `application` function, as line's instructions indicate. ``` 3. Add `minSdkVersion = 17` in `android/build.gradle` -4. Add LineSDK as a dependency in `android/build.gradle` -```gradle -android { - // Enable Java 1.8 support. - compileOptions { // <- add this block if didn't setup - sourceCompatibility JavaVersion.VERSION_1_8 - targetCompatibility JavaVersion.VERSION_1_8 - } - ... - dependencies { - ... - implementation 'com.linecorp.linesdk:linesdk:5.7.0' // <- add this line - } -} -``` -5. In your manifest add `xmlns:tools="http://schemas.android.com/tools"` in your `manifest` tag and also `tools:replace="android:allowBackup"` in your `application` tag +4. In your manifest add `xmlns:tools="http://schemas.android.com/tools"` in your `manifest` tag and also `tools:replace="android:allowBackup"` in your `application` tag ## API diff --git a/android/build.gradle b/android/build.gradle index b2eec17..5714735 100755 --- a/android/build.gradle +++ b/android/build.gradle @@ -1,25 +1,28 @@ buildscript { //Buildscript is evaluated before everything else so we can't use getExtOrDefault - def kotlin_version = rootProject.ext.has('kotlinVersion') ? rootProject.ext.get('kotlinVersion') : project.properties['ReactNativeLine_kotlinVersion'] ext { - buildToolsVersion = "30.0.2" - minSdkVersion = 21 - compileSdkVersion = 28 - targetSdkVersion = 30 + kotlinVersion = rootProject.ext.has('kotlinVersion') + ? rootProject.ext.get('kotlinVersion') + : project.properties['ReactNativeLine_kotlinVersion'] + + buildToolsVersion = project.properties['ReactNativeLine_buildToolsVersion'] + minSdkVersion = project.properties['ReactNativeLine_minSdkVersion'] + compileSdkVersion = project.properties['ReactNativeLine_compileSdkVersion'] + targetSdkVersion = project.properties['ReactNativeLine_targetSdkVersion'] coroutinesAndroidVersion = "1.0.1" coroutinesCoreVersion = "1.0.1" gsonVersion = "2.8.6" - linesdkVersion = "5.7.0" + linesdkVersion = project.properties['ReactNativeLine_lineSdkVersion'] } repositories { google() - jcenter() + mavenCentral() } dependencies { - classpath "com.android.tools.build:gradle:3.5.1" + classpath "com.android.tools.build:gradle:7.0.4" //noinspection DifferentKotlinGradleVersion - classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" + classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion" } } @@ -38,7 +41,7 @@ def safeExtGet(prop, fallback) { } android { - compileSdkVersion safeExtGet("compileSdkVersion", 28) + compileSdkVersion safeExtGet("compileSdkVersion", 31) defaultConfig { minSdkVersion safeExtGet('minSdkVersion', 21) @@ -56,9 +59,10 @@ android { } dependencies { + //noinspection GradleDynamicVersion from node modules implementation "com.facebook.react:react-native:+" - implementation 'com.linecorp.linesdk:linesdk:5.7.0' - implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.3.50" + implementation "com.linecorp.linesdk:linesdk:5.8.0" + implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlinVersion" implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:$coroutinesAndroidVersion" implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutinesCoreVersion" } \ No newline at end of file diff --git a/android/gradle.properties b/android/gradle.properties index eedf72a..af04916 100644 --- a/android/gradle.properties +++ b/android/gradle.properties @@ -1,5 +1,6 @@ -ReactNativeLine_kotlinVersion=1.3.50 +ReactNativeLine_kotlinVersion=1.7.21 ReactNativeLine_compileSdkVersion=28 -ReactNativeLine_buildToolsVersion=28.0.3 -ReactNativeLine_targetSdkVersion=28 -ReactNativeLine_lineSdkVersion=5.7.0 \ No newline at end of file +ReactNativeLine_minSdkVersion=21 +ReactNativeLine_buildToolsVersion=30.0.2 +ReactNativeLine_targetSdkVersion=30 +ReactNativeLine_lineSdkVersion=5.8.0 \ No newline at end of file From 6a365a7b00bb8a453845d2a6886fa5e4959e322b Mon Sep 17 00:00:00 2001 From: Emiliano Botti Date: Thu, 11 May 2023 17:11:13 -0300 Subject: [PATCH 08/10] Bumps version to 2.2.0 --- package.json | 2 +- src/lineSDKWrapper.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 6f9acdd..680eef6 100755 --- a/package.json +++ b/package.json @@ -11,7 +11,7 @@ ], "main": "dist/index.js", "types": "dist/index.d.ts", - "version": "2.1.0", + "version": "2.2.0", "homepage": "https://github.com/xmartlabs/react-native-line#readme", "keywords": [ "react-native", diff --git a/src/lineSDKWrapper.ts b/src/lineSDKWrapper.ts index 28e2bce..baf1ff7 100644 --- a/src/lineSDKWrapper.ts +++ b/src/lineSDKWrapper.ts @@ -11,9 +11,9 @@ import { AccessToken, AccessTokenVerifyResult, BotFriendshipStatus, + LoginArguments, LoginResult, UserProfile, - LoginArguments, } from './types' const { LineLogin } = NativeModules From d0a73609b4a7e3e282b7b5344c8d35b9d7066e7f Mon Sep 17 00:00:00 2001 From: Emiliano Botti Date: Tue, 23 May 2023 13:21:39 -0300 Subject: [PATCH 09/10] Tides up build.gradle --- android/build.gradle | 20 ++++---------------- android/gradle.properties | 7 +------ 2 files changed, 5 insertions(+), 22 deletions(-) diff --git a/android/build.gradle b/android/build.gradle index 5714735..d55cb58 100755 --- a/android/build.gradle +++ b/android/build.gradle @@ -1,18 +1,7 @@ buildscript { //Buildscript is evaluated before everything else so we can't use getExtOrDefault ext { - kotlinVersion = rootProject.ext.has('kotlinVersion') - ? rootProject.ext.get('kotlinVersion') - : project.properties['ReactNativeLine_kotlinVersion'] - - buildToolsVersion = project.properties['ReactNativeLine_buildToolsVersion'] - minSdkVersion = project.properties['ReactNativeLine_minSdkVersion'] - compileSdkVersion = project.properties['ReactNativeLine_compileSdkVersion'] - targetSdkVersion = project.properties['ReactNativeLine_targetSdkVersion'] - coroutinesAndroidVersion = "1.0.1" - coroutinesCoreVersion = "1.0.1" - gsonVersion = "2.8.6" - linesdkVersion = project.properties['ReactNativeLine_lineSdkVersion'] + kotlinVersion = '1.7.21' } repositories { google() @@ -28,8 +17,7 @@ buildscript { repositories { google() - - jcenter() + mavenCentral() } apply plugin: "com.android.library" @@ -63,6 +51,6 @@ dependencies { implementation "com.facebook.react:react-native:+" implementation "com.linecorp.linesdk:linesdk:5.8.0" implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlinVersion" - implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:$coroutinesAndroidVersion" - implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutinesCoreVersion" + implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:1.0.1" + implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.0.1" } \ No newline at end of file diff --git a/android/gradle.properties b/android/gradle.properties index af04916..5bac8ac 100644 --- a/android/gradle.properties +++ b/android/gradle.properties @@ -1,6 +1 @@ -ReactNativeLine_kotlinVersion=1.7.21 -ReactNativeLine_compileSdkVersion=28 -ReactNativeLine_minSdkVersion=21 -ReactNativeLine_buildToolsVersion=30.0.2 -ReactNativeLine_targetSdkVersion=30 -ReactNativeLine_lineSdkVersion=5.8.0 \ No newline at end of file +android.useAndroidX=true From d2e8e504d436ad9f9b3be4cdf709e9ebf6d5fa9a Mon Sep 17 00:00:00 2001 From: Emiliano Botti Date: Tue, 23 May 2023 14:00:52 -0300 Subject: [PATCH 10/10] PR changes --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 914811b..b1de1a9 100644 --- a/README.md +++ b/README.md @@ -58,7 +58,7 @@ First, install the npm package with yarn. _Autolink_ is automatic. Inside your `AppDelegate.m`, setup the line sdk by passing the channel id obtained. -1. Add `platform :ios, '10.0'` in `Podfile` line:1 +1. Add `platform :ios, '11.0'` in `Podfile` line:1 2. Modify your info.plist like it says here [Configuring the Info.plist file](https://developers.line.biz/en/docs/ios-sdk/swift/setting-up-project/#configuring-the-info-plist-file) 3. Change your `AppDelegate.m` to match the following: