Skip to content

Conversation

@Joaguirrem
Copy link
Collaborator

🔄 Type of change:

  • ✨Feature/chore
  • ♻️ Refactor
  • 🔧 Bugfixes

✏️ Description:

  • Bump the version number to 5.0.0.

Copy link
Collaborator

@mirland mirland left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't we need to create a migration guide?

@mirland mirland requested a review from Copilot March 27, 2025 20:25
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR bumps the version number to 5.0.0 and updates documentation references accordingly.

  • Updated the version and package reference in the summary tag
  • Updated module import and usage examples from "LineLogin" to "Line"
Files not reviewed (3)
  • android/build.gradle: Language not supported
  • example/package-lock.json: Language not supported
  • package.json: Language not supported
Comments suppressed due to low confidence (2)

README.md:116

  • Ensure that the package version update in the summary is consistently reflected throughout the documentation and related examples.
<summary>@xmartlabs/react-native-line v5</summary>

README.md:153

  • The module name was updated from 'LineLogin' to 'Line'. Verify that this change aligns with the corresponding package refactor so that users import the correct module.
1. Import the `Line` module:

@mirland
Copy link
Collaborator

mirland commented Mar 27, 2025

@CodiumAI-Agent /review

@CodiumAI-Agent
Copy link

CodiumAI-Agent commented Mar 27, 2025

PR Reviewer Guide 🔍

(Review updated until commit ba9646c)

Here are some key observations to aid the review process:

⏱️ Estimated effort to review: 1 🔵⚪⚪⚪⚪
🧪 No relevant tests
🔒 No security concerns identified
⚡ Recommended focus areas for review

Documentation Consistency

Verify that all references and usage examples, including module names and API signatures, are updated consistently to reflect the new version. Ensure that the migration from the old API (using "LineLogin") to the new one (using "Line") is clearly communicated.

      <summary>@xmartlabs/react-native-line v5</summary>

      ```objectivec
      #import "react_native_line-Swift.h"

      ...

      - (BOOL)application:(UIApplication *)application openURL:(NSURL *)url options:(NSDictionary<UIApplicationOpenURLOptionsKey,id> *)options
      {
        return [LineLogin application:application open:url options:options];
      }
      ```
    </details>
    <br>

4. Insert the following snippet in your `Info.plist` to match the [LINE documentation](https://developers.line.biz/en/docs/line-login-sdks/ios-sdk/swift/setting-up-project/#config-infoplist-file):

    ```xml
    <key>CFBundleURLTypes</key>
    <array>
        <dict>
            <key>CFBundleTypeRole</key>
            <string>Editor</string>
            <key>CFBundleURLSchemes</key>
            <array>
                <string>line3rdp.$(PRODUCT_BUNDLE_IDENTIFIER)</string>
            </array>
        </dict>
    </array>
    <key>LSApplicationQueriesSchemes</key>
    <array>
        <string>lineauth2</string>
    </array>
    ```

## Usage

1. Import the `Line` module:

    ```typescript
    import Line from '@xmartlabs/react-native-line'
    ```

2. Initialize the module with the `setup` method:

    ```typescript
    useEffect(() => {
      Line.setup({ channelId: 'YOUR_CHANNEL_ID' })
    }, [])
    ```

3. Login with the `login` method:

    ```typescript
    Line.login({})
    ```

## API

| Function                                                 | Description                                                                                                                                                                                                                        |
| -------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `login(params: LoginParams): Promise<LoginResult>` | Starts the login flow of Line's SDK (Opens the apps if it's installed and defaults to the browser otherwise). It accepts the same argumements as the LineSDK, in an object `{ key: value }`, defaults the same way as LineSDK too. |
| `getCurrentAccessToken(): Promise<AccessToken>` | Returns the access token of the current user. |
| `getProfile(): Promise<UserProfile>` | Returns the current user profile information. |
| `logout(): Promise<void>` | Revokes the access token of the current user. |
| `refreshAccessToken(): Promise<AccessToken>` | Refreshes the access token of the current user. |
| `setup(params: SetupParams): Promise<void>` | Initializes the Line SDK. |
| `verifyAccessToken(): Promise<VerifyResult>` | Checks whether the access token of the current user is valid. |
| `getFriendshipStatus(): Promise<FriendshipStatus>` | Gets the friendship status between the LINE Official Account (which is linked to the current channel) and the user if [configured](https://developers.line.biz/en/docs/line-login-sdks/ios-sdk/swift/link-a-bot/). |

@Joaguirrem
Copy link
Collaborator Author

Don't we need to create a migration guide?

Yes, we do need to create a migration guide.

@CodiumAI-Agent
Copy link

Persistent review updated to latest commit ba9646c

@Joaguirrem
Copy link
Collaborator Author

Don't we need to create a migration guide?

05577a5

@Joaguirrem Joaguirrem merged commit 46e5982 into main Mar 27, 2025
1 check passed
@Joaguirrem Joaguirrem deleted the v5.0.0 branch March 27, 2025 21:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants