Skip to content

Commit bc75133

Browse files
author
Emiliano Botti
authored
Merge pull request #106 from xmartlabs/feature/upgrade-native-sdks
[Feature] Upgrade native SDKs
2 parents 87936eb + d2e8e50 commit bc75133

File tree

7 files changed

+21
-36
lines changed

7 files changed

+21
-36
lines changed

README.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,9 @@ First, install the npm package with yarn. _Autolink_ is automatic.
5858

5959
Inside your `AppDelegate.m`, setup the line sdk by passing the channel id obtained.
6060

61-
1. Add `platform :ios, '10.0'` in `Podfile` line:1
62-
2. Enable `use_frameworks!` in `Podfile` line:3
63-
3. Comment the code related to flipper, flipper doesn't support `use_frameworks!` !
64-
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)
65-
5. Change your `AppDelegate.m` to match the following:
61+
1. Add `platform :ios, '11.0'` in `Podfile` line:1
62+
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)
63+
3. Change your `AppDelegate.m` to match the following:
6664

6765
```objc
6866
// AppDelegate.m

RNLine.podspec

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@ Pod::Spec.new do |s|
1010

1111
s.authors = package['author']
1212
s.homepage = package['homepage']
13-
s.platform = :ios, "10.0"
13+
s.platform = :ios, "11.0"
1414
s.swift_version = '5.0'
1515

1616
s.source = { :git => "" }
1717
s.source_files = "ios/**/*.{h,m,swift}"
1818

19-
s.dependency 'React'
20-
s.dependency 'LineSDKSwift', '~> 5.0'
19+
s.dependency 'React-Core'
20+
s.dependency 'LineSDKSwift', '~> 5.8.1'
2121
end

android/build.gradle

Lines changed: 11 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,23 @@
11
buildscript {
22
//Buildscript is evaluated before everything else so we can't use getExtOrDefault
3-
def kotlin_version = rootProject.ext.has('kotlinVersion') ? rootProject.ext.get('kotlinVersion') : project.properties['ReactNativeLine_kotlinVersion']
43
ext {
5-
buildToolsVersion = "28.0.3"
6-
minSdkVersion = 21
7-
compileSdkVersion = 28
8-
targetSdkVersion = 28
9-
coroutinesAndroidVersion = "1.0.1"
10-
coroutinesCoreVersion = "1.0.1"
11-
gsonVersion = "2.8.6"
12-
linesdkVersion = "5.1.1"
4+
kotlinVersion = '1.7.21'
135
}
146
repositories {
157
google()
16-
jcenter()
8+
mavenCentral()
179
}
1810

1911
dependencies {
20-
classpath "com.android.tools.build:gradle:3.5.1"
12+
classpath "com.android.tools.build:gradle:7.0.4"
2113
//noinspection DifferentKotlinGradleVersion
22-
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
23-
classpath "com.linecorp:linesdk:5.1.1"
14+
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
2415
}
2516
}
2617

2718
repositories {
2819
google()
29-
30-
jcenter()
20+
mavenCentral()
3121
}
3222

3323
apply plugin: "com.android.library"
@@ -39,7 +29,7 @@ def safeExtGet(prop, fallback) {
3929
}
4030

4131
android {
42-
compileSdkVersion safeExtGet("compileSdkVersion", 28)
32+
compileSdkVersion safeExtGet("compileSdkVersion", 31)
4333

4434
defaultConfig {
4535
minSdkVersion safeExtGet('minSdkVersion', 21)
@@ -57,9 +47,10 @@ android {
5747
}
5848

5949
dependencies {
50+
//noinspection GradleDynamicVersion from node modules
6051
implementation "com.facebook.react:react-native:+"
61-
implementation "com.linecorp:linesdk:5.1.1"
62-
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.3.50"
63-
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:$coroutinesAndroidVersion"
64-
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutinesCoreVersion"
52+
implementation "com.linecorp.linesdk:linesdk:5.8.0"
53+
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlinVersion"
54+
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:1.0.1"
55+
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.0.1"
6556
}

android/gradle.properties

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1 @@
1-
ReactNativeLine_kotlinVersion=1.3.50
2-
ReactNativeLine_compileSdkVersion=28
3-
ReactNativeLine_buildToolsVersion=28.0.3
4-
ReactNativeLine_targetSdkVersion=28
5-
ReactNativeLine_lineSdkVersion=5.1.1
1+
android.useAndroidX=true

ios/LineLogin.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ import LineSDK
4949

5050
if let botPrompt = args["botPrompt"] as? String {
5151
switch botPrompt {
52-
case "aggressive": parameters.botPromptStyle = LoginManager.BotPrompt(rawValue: "aggresive")
52+
case "aggressive": parameters.botPromptStyle = LoginManager.BotPrompt(rawValue: "aggressive")
5353
case "normal": parameters.botPromptStyle = LoginManager.BotPrompt(rawValue: "normal")
5454
default: break
5555
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
],
1212
"main": "dist/index.js",
1313
"types": "dist/index.d.ts",
14-
"version": "2.1.0",
14+
"version": "2.2.0",
1515
"homepage": "https://github.com/xmartlabs/react-native-line#readme",
1616
"keywords": [
1717
"react-native",

src/lineSDKWrapper.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ import {
1111
AccessToken,
1212
AccessTokenVerifyResult,
1313
BotFriendshipStatus,
14+
LoginArguments,
1415
LoginResult,
1516
UserProfile,
16-
LoginArguments,
1717
} from './types'
1818

1919
const { LineLogin } = NativeModules

0 commit comments

Comments
 (0)