diff --git a/README.md b/README.md index 38722ec..b1de1a9 100644 --- a/README.md +++ b/README.md @@ -58,11 +58,9 @@ 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: +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: ```objc // AppDelegate.m diff --git a/RNLine.podspec b/RNLine.podspec index 3df86a6..cb3d93c 100644 --- a/RNLine.podspec +++ b/RNLine.podspec @@ -10,12 +10,12 @@ Pod::Spec.new do |s| s.authors = package['author'] s.homepage = package['homepage'] - s.platform = :ios, "10.0" + s.platform = :ios, "11.0" s.swift_version = '5.0' s.source = { :git => "" } s.source_files = "ios/**/*.{h,m,swift}" - s.dependency 'React' - s.dependency 'LineSDKSwift', '~> 5.0' + s.dependency 'React-Core' + s.dependency 'LineSDKSwift', '~> 5.8.1' end diff --git a/android/build.gradle b/android/build.gradle index 7aea59b..d55cb58 100755 --- a/android/build.gradle +++ b/android/build.gradle @@ -1,33 +1,23 @@ 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" - minSdkVersion = 21 - compileSdkVersion = 28 - targetSdkVersion = 28 - coroutinesAndroidVersion = "1.0.1" - coroutinesCoreVersion = "1.0.1" - gsonVersion = "2.8.6" - linesdkVersion = "5.1.1" + kotlinVersion = '1.7.21' } 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 "com.linecorp:linesdk:5.1.1" + classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion" } } repositories { google() - - jcenter() + mavenCentral() } apply plugin: "com.android.library" @@ -39,7 +29,7 @@ def safeExtGet(prop, fallback) { } android { - compileSdkVersion safeExtGet("compileSdkVersion", 28) + compileSdkVersion safeExtGet("compileSdkVersion", 31) defaultConfig { minSdkVersion safeExtGet('minSdkVersion', 21) @@ -57,9 +47,10 @@ android { } dependencies { + //noinspection GradleDynamicVersion from node modules implementation "com.facebook.react:react-native:+" - implementation "com.linecorp:linesdk:5.1.1" - 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" + implementation "com.linecorp.linesdk:linesdk:5.8.0" + implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlinVersion" + 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 f772dd1..5bac8ac 100644 --- a/android/gradle.properties +++ b/android/gradle.properties @@ -1,5 +1 @@ -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 +android.useAndroidX=true 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 } 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