Skip to content

Commit fbe7d58

Browse files
onevdogGitHub Enterprise
authored andcommitted
Merge pull request #6 from LINE-SDK/LDSTHREE-1423-review-readme
LDSTHREE-1423 Review readme
2 parents 2d7994f + 72b2a07 commit fbe7d58

File tree

2 files changed

+62
-51
lines changed

2 files changed

+62
-51
lines changed

CONTRIBUTING.md

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,17 @@
1-
# How to contribute to fullter_line_sdk
1+
# How to contribute to flutter_line_sdk
22

3-
First of all, thank you so much for taking your time to contribute! fullter_line_sdk is not very different from any other open source projects. It will
4-
be fantastic if you help us by doing any of the following:
3+
Thanks a lot for taking the time to contribute!
54

6-
- File an issue in [the issue tracker](https://github.com/line/fullter_line_sdk/issues)
5+
flutter_line_sdk is not much different from other open source projects. It would
6+
be fantastic to get your help with any of the following:
7+
8+
- File an issue in [the issue tracker](https://github.com/line/flutter_line_sdk/issues)
79
to report bugs and propose new features and improvements.
8-
- Ask a question using [the issue tracker](https://github.com/line/fullter_line_sdk/issues).
9-
- Contribute your work by sending [a pull request](https://github.com/line/fullter_line_sdk/pulls).
10+
- Ask a question using [the issue tracker](https://github.com/line/flutter_line_sdk/issues).
11+
- Contribute your work by sending [a pull request](https://github.com/line/flutter_line_sdk/pulls).
1012

1113
## Contributor license agreement
1214

13-
When you are sending a pull request and it's a non-trivial change beyond fixing typos, please sign
14-
[the ICLA (individual contributor license agreement)](https://cla-assistant.io/line/fullter_line_sdk).
15-
Please [contact us](mailto:[email protected]) if you need the CCLA (corporate contributor license agreement).
15+
If you want to make a pull request with a non-trivial change (not just fixing a typo), please sign the
16+
[Individual Contributor License Agreement)](https://cla-assistant.io/line/flutter_line_sdk).
17+
Please [contact us](mailto:[email protected]) if you need the CCLA (Corporate Contributor License Agreement).

README.md

Lines changed: 51 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
# flutter_line_sdk
22

3-
A Flutter plugin for allowing users to use the native LINE SDKs with Dart in Flutter apps.
3+
A [Flutter] plugin that lets developers access LINE's native SDKs in Flutter apps with [Dart].
44

5-
It provides a quick way to integrate LINE Login features to your app. Once installed, you can navigate your users to use
6-
LINE app or a web page to login with their LINE account. A quick example usage as below:
5+
The plugin helps you integrate LINE Login features in your app. You can redirect users to LINE or a web page where they log in with their LINE credentials. Example:
76

87
```dart
98
import 'package:flutter_line_sdk/flutter_line_sdk.dart';
@@ -25,50 +24,48 @@ void login() async {
2524
}
2625
```
2726

28-
For more examples, see the [example app](https://github.com/line/flutter_line_sdk/tree/master/example) and the related [API definitions](#).
27+
For more examples, see the [example app](https://github.com/line/flutter_line_sdk/tree/master/example) and [API definitions].
2928

3029
## Prerequisites
3130

32-
- iOS 10.0 or later as the deployment target.
33-
- Android `minSdkVersion` set to 17 or higher (Android 4.2 or later).
31+
- iOS 10.0 or later as the deployment target
32+
- Android `minSdkVersion` set to 17 or higher (Android 4.2 or later)
33+
- [LINE Login channel linked to your app](https://developers.line.biz/en/docs/line-login/getting-started/)
3434

35-
To use the LINE SDK with your Flutter app, you need to have a valid LINE Channel bounded to your app.
36-
If you do not have one yet, please follow the [Getting started with LINE Login](https://developers.line.biz/en/docs/line-login/getting-started/)
37-
to create your channel.
35+
To access your LINE Login channel from a mobile platform, you need some extra configuration. In the [LINE Developers console][console], go to your LINE Login channel settings, and enter the below information on the **App settings** tab.
3836

39-
You also need some additional setup when you want to use the channel on a mobile platform.
40-
Once you have created a channel, go to the "App settings" page of the console and complete the following fields.
37+
### iOS app settings
4138

42-
For iOS:
39+
| Setting | Description |
40+
|-------|---------|
41+
| iOS bundle ID | Bundle identifier of your app. In Xcode, find it in your **Runner** project settings, on the **General** tab. Must be lowercase, like `com.example.app`. You can specify multiple bundle identifiers by typing each one on a new line. |
42+
| iOS scheme | Set to `line3rdp.`, followed by the bundle identifier. For example, if your bundle identifier is `com.example.app`, set the iOS scheme to `line3rdp.com.example.app`. Only one iOS scheme can be specified. |
43+
| iOS universal link | Optional. Set to the universal link configured for your app. For more information on how to handle the login process using a universal link, see [Universal Links support](https://developers.line.biz/en/docs/ios-sdk/swift/setting-up-project/#universal-link-support). |
4344

44-
- iOS bundle ID: Bundle identifier of your app found in the "General" tab in your "Runner" Xcode project settings. Must be lowercase. For example, `com.example.app`. You can specify multiple bundle identifiers by entering each one on a new line.
45-
- iOS scheme: Set to `line3rdp.` followed by the bundle identifier. For example, if your bundle identifier is `com.example.app`, set the iOS scheme to `line3rdp.com.example.app`. Only one iOS scheme can be specified.
46-
- iOS universal link: Optional. Set to the universal link configured for your app. For more information on how to handle the login process using a universal link, see [Universal Links support](https://developers.line.biz/en/docs/ios-sdk/swift/setting-up-project/#universal-link-support).
45+
### Android app settings
4746

48-
For Android:
49-
50-
- Android package name: Required. Application's package name used to launch the Google Play store.
51-
- Android package signature: Optional. You can set multiple signatures by entering each one on a new line.
52-
- Android scheme: Optional. Custom URL scheme used to launch your app.
47+
| Setting | Description |
48+
|-------|---------|
49+
| Android package name | Required. Application's package name used to launch the Google Play store. |
50+
| Android package signature | Optional. You can set multiple signatures by typing each one on a new line. |
51+
| Android scheme | Optional. Custom URL scheme used to launch your app. |
5352

5453
## Installation
5554

5655
### Adding flutter_line_sdk package
5756

58-
Please just follow the common way to add this package to your Flutter app. You can find information on this topic in the [Using packages](https://flutter.dev/docs/development/packages-and-plugins/using-packages) page of Flutter documentation.
59-
60-
More specifically, you need to follow these steps:
57+
Use the standard way of adding this package to your Flutter app, as described in the [Flutter documentation](https://flutter.dev/docs/development/packages-and-plugins/using-packages). The process consists of these steps:
6158

62-
1. Open the `pubspec.yaml` file located inside your app folder, and add `flutter_line_sdk:` under the `dependencies` section.
63-
2. Install it. From a terminal, run `flutter pub get`.
59+
1. Open the `pubspec.yaml` file in your app folder and, under `dependencies`, add `flutter_line_sdk:`.
60+
2. Install it by running this in a terminal: `flutter pub get`
6461

65-
Now, the dart part of `flutter_line_sdk` should be installed. Following, you need to setup LINE SDK for iOS and Android project respectively.
62+
Now, the Dart part of `flutter_line_sdk` should be installed. Next, you need to set up LINE SDK for iOS and Android projects, respectively.
6663

67-
### Setup LINE SDK
64+
### Set up LINE SDK
6865

6966
#### iOS
7067

71-
Open the `ios/Runner/Info.plist` file in your app project with a text editor, insert the following snippet just before the last `</dict>` tag:
68+
Open the file `ios/Runner/Info.plist` in a text editor and insert this snippet just before the last `</dict>` tag:
7269

7370
```xml
7471
<key>CFBundleURLTypes</key>
@@ -90,7 +87,7 @@ Open the `ios/Runner/Info.plist` file in your app project with a text editor, in
9087
</array>
9188
```
9289

93-
Since LINE SDK now requires iOS 10.0 or above, and it uses Cocoa Framework to provide underlying native features, you need to add these lines in the `Runner` target in the `ios/Podfile`:
90+
Because LINE SDK now requires iOS 10.0 or above and uses the iOS dynamic Framework to provide underlying native features, you must add these lines in the `Runner` target in `ios/Podfile`:
9491

9592
```diff
9693
target 'Runner' do
@@ -100,19 +97,19 @@ target 'Runner' do
10097

10198
#### Android
10299

103-
No specific settings are required.
100+
No specific settings required.
104101

105102
### Importing and using
106103

107104
#### Setup
108105

109-
Importing `flutter_line_sdk` to any place you want to use it in your project:
106+
Import `flutter_line_sdk` to any place you want to use it in your project:
110107

111108
```dart
112109
import 'package:flutter_line_sdk/flutter_line_sdk.dart';
113110
```
114111

115-
You need to setup your channel ID first. For example, you can call `setup` in the `main` function:
112+
To use the package, you need to set up your channel ID. You can do this by calling the `setup` method, for example in the `main` function:
116113

117114
```diff
118115
- void main() => runApp(MyApp());
@@ -124,14 +121,16 @@ You need to setup your channel ID first. For example, you can call `setup` in th
124121
+ }
125122
```
126123

127-
Or you can find any other place you'd like to call it. But remember it is required to be called once and only once before you use any other methods in LINE SDK.
124+
This is merely an example. You can call `setup` any time you want, provided you call it exactly once, before calling any other LINE SDK methods.
128125

129-
To help you get started with this package quickly, we list some basic usage examples below. `flutter_line_sdk` is fully and well documented and you can find the details in our beautiful [dart style doc site](#).
126+
To help you get started with this package, we list several basic usage examples below. All available `flutter_line_sdk` methods are documented on the [Dart Packages][API Definitions] site.
130127

131128
#### Login
132129

133-
Now you are ready to let your user login with LINE. To get the login result, assign the `Future<LoginResult>` value to a variable.
134-
Keep in mind that wrap the invocation in a `try...on` statement and handle the error gracefully:
130+
Now you are ready to let your user log in with LINE.
131+
132+
Get the login result by assigning the value of `Future<LoginResult>` to a variable.
133+
To handle errors gracefully, wrap the invocation in a `try...on` statement:
135134

136135
```dart
137136
void _signIn() async {
@@ -211,16 +210,26 @@ try {
211210
}
212211
```
213212

214-
> Normally, you do not need to refresh the access token manually because any API call in LINE SDK will attempt to
215-
> refresh the access token automatically if necessary. It is **not recommended** to refresh the access tokens by yourself.
216-
> Automatic access token management by the LINE SDK is usually easier and safer for future upgrading.
213+
Normally, you don't need to refresh access tokens manually, because any API call in LINE SDK will try to refresh the access token automatically when necessary.
214+
**We do not recommend refreshing access tokens yourself.**
215+
It's generally easier, more secure, and more future-proof to let the LINE SDK manage access tokens automatically.
217216

218217
### Error handling
219218

220-
All APIs may throw a `PlatformException` with error `code` and a `message`. Use these information to identify an error happens inside the native SDK. Please note that the code and message of an error might varies on iOS and Android. We encourage you to read the error definition on [iOS](https://developers.line.biz/en/reference/ios-sdk-swift/Enums/LineSDKError.html) and [Android](https://developers.line.biz/en/reference/android-sdk/reference/com/linecorp/linesdk/LineApiError.html) to provide better error recovery and user experience on different platforms.
219+
All APIs can throw a `PlatformException` with error `code` and a `message`. Use this information to identify when an error happens inside the native SDK.
220+
221+
Error codes and messages will vary between iOS and Android. Be sure to read the error definition on [iOS](https://developers.line.biz/en/reference/ios-sdk-swift/Enums/LineSDKError.html) and [Android](https://developers.line.biz/en/reference/android-sdk/reference/com/linecorp/linesdk/LineApiError.html) to provide better error recovery and user experience on different platforms.
221222

222223
## Contributing
223224

224-
If you believe you have discovered a vulnerability or have an issue related to security, please **DO NOT** open a public issue. Instead, send us a mail to [[email protected]](mailto:[email protected]).
225+
If you believe you found a vulnerability or you have an issue related to security, please **DO NOT** open a public issue. Instead, email us at [[email protected]](mailto:[email protected]).
226+
227+
Before contributing to this project, please read [CONTRIBUTING.md].
225228

226-
For contributing to this project, please see [CONTRIBUTING.md](https://github.com/line/line-sdk-ios-swift/blob/master/CONTRIBUTING.md).
229+
<!-- Links and references -->
230+
[Flutter]: https://flutter.dev/
231+
[Dart]: https://dart.dev/
232+
[API definitions]: https://pub.dev/documentation/flutter_line_sdk/latest/
233+
[console]: https://developers.line.biz/console/
234+
[Cocoa Touch]: https://en.wikipedia.org/wiki/Cocoa_Touch
235+
[CONTRIBUTING.md]: https://github.com/line/flutter_line_sdk/blob/master/CONTRIBUTING.md

0 commit comments

Comments
 (0)