flutter_naver_login 1.1.1

  • Readme
  • Changelog
  • Example
  • Installing
  • 88

flutter_naver_login #

Build Status Build Status Build Status Build Status Build Status

A Flutter plugin for using the native Naver Login SDKs on Android and iOS.

AndroidX support #

Installation #

To get things up and running, you'll have to declare a pubspec dependency in your Flutter project. Also some minimal Android & iOS specific configuration must be done, otherise your app will crash.

On your Flutter project #

See the installation instructions on pub.

Android #

This assume that you have performed the "link app to package name and base class the Naver Login documentation for Android site.

Your Application Info is shown in the for Naver Developer Website.

Then find out what the Client ID is. The Naver Client ID can be found on the Naver App Dashboard from the Naver Developer Console.

Once you find out your Naver Client ID, URL Scheme and Set Package Name you'll have to do some things.

Then simply copy and paste into ROOT.

<your project root>android/app/src/main/res/values/strings.xml

<?xml version="1.0" encoding="utf-8"?>
    <string name="client_id">[client_id]</string>
    <string name="client_secret">[client_secret]</string>
    <string name="client_name">[client_name]</string>

<your project root>android/app/src/main/AndroidManifest.xml

            android:value="@string/client_id" />
            android:value="@string/client_secret" />
            android:value="@string/client_name" />

A sample of the file can be found here. here.


iOS #


<your project root>ios/

pod install

This assumes that you've done the "Register and Configure Your App with Naver" step in the the Naver Login documentation for iOS site. (Note: you can skip "Step 2: Set up Your Development Environment").

After you've done that, find out what your Naver App Client ID is. You can find your Client ID, Client Secret, URL_SCHEME, in your Naver App's dashboard in the Naver developer.

<your project root>ios/Runner/Info.plist

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
				<!-- other codes -->
        <!-- http allows configurations -->

A sample of a complete Info.plist file can be found here.

Add the following code to log in using the Naver app. <your project root>ios/Runner/ios/Runner/AppDelegate.m


// Implemented when iOS 9.0 Less
- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation {
    return [[NaverThirdPartyLoginConnection getSharedInstance] application:application openURL:url sourceApplication:sourceApplication annotation:annotation];

// Implemented when iOS 9.0 higher

- (BOOL)application:(UIApplication *)app openURL:(NSURL *)url options:(NSDictionary<NSString *,id> *)options {
    return [[NaverThirdPartyLoginConnection getSharedInstance] application:app openURL:url options:options];


 override func application(_ app: UIApplication, open url: URL, options: [UIApplicationOpenURLOptionsKey : Any] = [:]) -> Bool {
        return NaverThirdPartyLoginConnection.getSharedInstance().application(app, open: url, options: options)

How do I use it? #

The library tries to closely match the native Android & iOS login SDK APIs where possible. For complete API documentation, just see the source code. Everything is documented there.

Since sample code is worth more than one page of documentation, here are the usual cases covered:

Getting the Naver acccount of a signed in user #

NaverLoginResult res = await FlutterNaverLogin.logIn();
setState(() {
    name = res.account.name;

The account variable will now contain the following information:

final String nickname;
final String id;
final String name;
final String email;
final String gender;
final String age;
final String birthday;
final String profileImage;

Getting the Naver currentAccessToken of a signed in user #

import 'package:flutter_naver_login/flutter_naver_login.dart';

NaverLoginResult res = await FlutterNaverLogin.logIn();
final NaverLoginResult result = await FlutterNaverLogin.logIn();
NaverAccessToken res = await FlutterNaverLogin.currentAccessToken;
setState(() {
   accesToken = res.accessToken;
   tokenType = res.tokenType;

ios issue #

  1. CocoaPods could not find compatible versions for pod "naveridlogin-sdk-ios" Specs satisfying the naveridlogin-sdk-ios (~> 4.0.12) dependency were found, but they required a higher minimum deployment target.
    • runner target - required a higher deployment target 10.0.
  2. d: warning: directory not found for option '-L/project directory' ld: library not found for -lflutter_naver_login clang: error: linker command failed with exit code 1 (use -v to see invocation)
    • build - clean - commandRun: flutter run
  3. Showing All Messages: Multiple commands produce '/Users/yoonjaepark/dev/my_app/build/ios/Debug-iphonesimulator/Runner.app/Frameworks/Flutter.framework':
    • file - project settings - build system - legacy build system

1.1.1 #

  • readme update

1.1.0 #

  • build.gradle update
  • readme update
  • android logout fix

1.0.1 #

  • ios13 background error fix

1.0.0 #

  • ios13 pod version update

0.3.4 #

  • Readme.md

0.3.3 #

  • ios Naver App login enable

0.3.2 #

  • ios Naver App login disable

0.3.1 #

  • Android Login Cancle error fix

0.3.0 #

  • migrate to AndroidX

0.2.1 #

  • Readme.md

0.2.0 #

  • ios issue add Readme.md

0.1.3 #

  • ios swift to object-c

0.1.2 #

  • ios build issue list add readme.md

0.1.1 #

  • pod spec change.

0.1.0 #

  • ios swift5 support.
  • readme add for ios cocoapods.
  • ios dependency Alamofire (5.0.0-beta.6) vesion update

0.0.1 #

  • Initial release.


flutter_naver_login_example #

Demonstrates how to use the flutter_naver_login plugin.

Getting Started #

This project is a starting point for a Flutter application.

A few resources to get you started if this is your first Flutter project:

For help getting started with Flutter, view our online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:

  flutter_naver_login: ^1.1.1

2. Install it

You can install packages from the command line:

with Flutter:

$ flutter pub get

Alternatively, your editor might support flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:

import 'package:flutter_naver_login/flutter_naver_login.dart';
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
Learn more about scoring.

We analyzed this package on Jan 16, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.7.0
  • pana: 0.13.4
  • Flutter: 1.12.13+hotfix.5

Health issues and suggestions

Document public APIs. (-1 points)

32 out of 32 API elements have no dartdoc comment.Providing good documentation for libraries, classes, functions, and other API elements improves code readability and helps developers find and use your API.

Format lib/flutter_naver_login.dart.

Run flutter format to format lib/flutter_naver_login.dart.

Format lib/src/clock.dart.

Run flutter format to format lib/src/clock.dart.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.1.0 <3.0.0
flutter 0.0.0
Transitive dependencies
collection 1.14.11 1.14.12
meta 1.1.8
sky_engine 0.0.99
typed_data 1.1.6
vector_math 2.0.8
Dev dependencies