Code Monkey home page Code Monkey logo

react-native-line's People

Contributors

blackbing avatar emibotti avatar jeong-sik avatar manikandanb24 avatar marcof09 avatar nicoache1 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

react-native-line's Issues

Error onlyWebLogin cannot be cast from Boolean to String

I'm currently using

react native: 0.60.5
@xmartlabs/react-native-line : 2.0.1

const loginResult = await Line.login({
scopes: ['email', 'profile'],
botPrompt: 'normal',
onlyWebLogin : true
})

When adding onlyWebLogin field to loginArguments, the following error occurs :
Value for onlyWeblogin cannot be cast from Boolean to String
checkInstance[ReadablenativeMap.java:141]
getNullableValue[ReadablenativeMap.java:129]
getString[ReadablenativeMap.java:163]
login[RnLine.kt:61]
...

Thank you.

Undefined symbols: _RCTRegisterModule

  1. use react-native cli create a project.
  2. add this lib, and follow the [setup] five steps.
  3. xcode build error.
    image

Undefined symbols for architecture arm64:
"_RCTRegisterModule", referenced from:
_initialize_LineLogin in LineLogin-138bef0e233c3c4437231f24c868aa03c1831bc8c7a540fc7b932c7a4d7a2881.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

can anyone help me ?

Android Emulator won't run.

Description

I completed the settings according to read.me, but the Android build does not work with the following error.
ios runs correctly.

I am getting an error in RNLine.kt.

error what went wrong
/node_modules/@xmartlabs/react-native-line/android/src/main/java/com/xmartlabs/rnline/RNLine.kt: (262, 36): Unresolved reference: to

  • React: 17.0.2
  • React Native: 0.67.3
  • React Native Line: verybuy/react-native-line#8dcc99d

iOS not redirecting back to app

Description

Hello
I'm fairly new to mobile development. I've successfully implemented this into my project (big thank you by the way) however I've hit a snag. On iOS when I enter my Line login details I am prompted to open the app (cancel/ok) however I get the error Safari cannot open this page because the address is invalid

Everything works perfectly on Android

Could you point me in the right direction?

Package versions

  • React: 18
  • React Native: 0.72.3
  • React Native Line: 2.2.0
    Screenshot 2023-08-12 at 8 57 05 PM

adding AppDelegate.mm incase that's relevant

#import "AppDelegate.h"

#import <React/RCTBundleURLProvider.h>
#import "RNLine-Swift.h"

@implementation AppDelegate

  • (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
    {
    [LineLogin setupWithChannelID:@"2000308557" universalLinkURL:nil];

    self.moduleName = @"Food Menu TW";
    // You can add your custom initial props in the dictionary below.
    // They will be passed down to the ViewController used by React Native.
    self.initialProps = @{};
    return [super application:application didFinishLaunchingWithOptions:launchOptions];
    }

  • (NSURL *)sourceURLForBridge:(RCTBridge *)bridge
    {
    #if DEBUG
    return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@".expo/.virtual-metro-entry"];
    #else
    return [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];
    #endif
    }

  • (BOOL)application:(UIApplication *)app openURL:(NSURL *)url options:(NSDictionary<UIApplicationOpenURLOptionsKey,id> *)options
    {
    return [LineLogin application:app open:url options:options];
    }

  • (BOOL)application:(UIApplication *)application continueUserActivity:(NSUserActivity *)userActivity restorationHandler:(void (^)(NSArray<id> * _Nullable))restorationHandler
    {
    BOOL handledLine = [LineLogin application:application continue:userActivity restorationHandler:restorationHandler];
    return handledLine;
    }
    @EnD

Error build android

error: no suitable method found for getLoginIntent(Context,String)
Intent intent = LineLoginApi.getLoginIntent(context, channelId);
^
method LineLoginApi.getLoginIntent(Context,String,LineAuthenticationParams) is not applicable
(actual and formal argument lists differ in length)
method LineLoginApi.getLoginIntent(Context,LineAuthenticationConfig,LineAuthenticationParams) is not applicable
(actual and formal argument lists differ in length)
/home/thuc/Desktop/fukuon/node_modules/react-native-line-sdk/android/src/main/java/com/xmartlabs/lineloginmanager/LineLogin.java:135: error: cannot find symbol
result.putString("accessToken", accessToken.getAccessToken());
^
symbol: method getAccessToken()
location: variable accessToken of type LineAccessToken
2 errors

Login callback() issue

Γ€fter line login when I call function of any other library's NativeModule this error occurs. Like calling the signin function of googleplus library.
screenshot_1522062268

How to config library in react-native 0.69

Your environment

You can run (react-native -v) to obtain info and paste it below:

  • React:18.2.0
  • React Native:0.69.1
  • React Native Line:2.1.0

Description

I want to use lib but I do not config it for my project even though I followed the instructions and example!

Missing access token when logout and re-login

First , I login and get success user_profile.

LineLogin.login()
     .then(user => {
       console.log(user.profile);
     })
     .catch(err => {
       console.log(err);
     });

Next I logout:
LineLogin.logout()
And, I re-login and it's not show form login Line and log error:

Error: Missing access token.
at createErrorFromErrorData (NativeModules.js:115)
at NativeModules.js:78
at MessageQueue.__invokeCallback (MessageQueue.js:296)
at MessageQueue.js:120
at MessageQueue.__guard (MessageQueue.js:218)
at MessageQueue.invokeCallbackAndReturnFlushedQueue (MessageQueue.js:119)
at debuggerWorker.js:71

I debug in LineLoginManager.m and it's jump to line 102:

if ([shared isAuthorized])
    {
        [self getProfile:loginResolver // line 102
                rejecter:loginRejecter];
    }

I try debugging but it is very difficult for me, please help me !

No value return from Promise after logged in

LineLogin.login()
    .then((user) => {
      console.log(user.profile.displayName)
    })
    .catch((err) => {
      console.log(err)
    })

When clicked my button, It was redirected to Line. And after logged-in successful, it returned back to my application but no any value return.

Any suggestions, please?
Cheers!

i can't use the every function on LineLogin()

This is my code. I don't know it's a bug or my mistake

i create a button and that on press to this function --> onLineButtonPress()

import LineLogin from '@xmartlabs/react-native-line';

const onLineButtonPress = async () => {
try {
const {accessToken} = await LineLogin.login();

  console.log(accessToken, 'accessToken');
} catch (error) {
  console.log(error, 'error');
}

};

i can't use the method that provide on LineLogin()

it's will always show [TypeError: Cannot read property 'getCurrentAccessToken' of null] error
it's happen every function.

react-native": "0.71.8"
"@xmartlabs/react-native-line": "^2.1.0",

Error universal links can not redirect to app

Description

After authorizing my application. The Line App opens to this page to navigate to my application.
I received the notice: "Safari cannot open this page because the address is invalid"
I follow this docs.
https://developers.line.biz/en/docs/ios-sdk/swift/universal-links-support/
But in step 3. I not sure how. Becase your lib use Objective-C.
I think this is the reason lead to mine problem.
Could you tell me how to fix it?
Hope you help me and thank you very much. <3

'RNLine-Swift.h' file not found

Your environment

You can run (react-native -v) to obtain info and paste it below:

  • React: 18.2.0
  • React Native: 0.71.8
  • React Native Line: ^2.2.0

Description

In AppDelegate.mm, I can't import "RNLine-Swift.h"
I moved to top, and the problem is not solved

Screenshots

image

I get error when login new version LINE

Your environment

  • Redmi 8 , android 10

You can run (react-native -v) to obtain info and paste it below:

  • React: 17.0.2
  • React Native: 0.66.3
  • React Native Line: 2.1.0

Description

Error
at Object.promiseMethodWrapper [as login] (NativeModules.js:106)
at _callee4$ (lineSDKWrapper.js:23)
at tryCatch (runtime.js:63)
at Generator.invoke [as _invoke] (runtime.js:294)
at Generator.next (runtime.js:119)
at tryCatch (runtime.js:63)
at invoke (runtime.js:155)
at runtime.js:190
at tryCallTwo (core.js:45)

Screenshots

IMG_1150

Steps To Reproduce

  1. Complete all setup for android
  2. Click login Button, app navigate to LINE app
  3. Login LINE app and received error above

Expected behavior

Actual behavior

Snack or minimal code example

How to get email address?

Thank you for the great library.

I was able to retrieve profile information with this lib, but not yet find the way to get email address of the login user.
I confirmed I can pass 'email' and 'openid' to loginWithPermissions() and they are shown on Line authorization screen, but the response from line doesn't contain email.

Could you advise how to get email address? or it's not supported yet?

@import RNLine; but still Use of undeclared identifier 'LineLogin'

As subject, 'LineLogin' cannot be defined, no matter if I install 'LineSDKSwift' or 'LineSDKSwift/ObjC' or nothing.

I modified the Podfile to install LineSDK as below :

platform :ios, '10.0'
#use_frameworks! # It cause many issues so that I mask it.
target 'CSApp3' do
config = use_native_modules!

use_react_native!(:path => config["reactNativePath"])

Line Login

pod 'LineSDKSwift/ObjC', '~> 5.0'
......................................................................................

Then amend Info.plist :

    <key>CFBundleURLSchemes</key>
		<array>
			...................... (ignore) .............................
                              <!-- Specify URL scheme to use when returning from LINE to your app.-->
                              <string>line3rdp.$(PRODUCT_BUNDLE_IDENTIFIER)</string>
		</array>
<key>LSApplicationQueriesSchemes</key>
<array>
	................... (ignore) .......................
            <!-- Specify URL scheme to use when launching LINE from your app.-->
            <string>lineauth2</string>
</array>

and then, modify AppDelegate.m

@import RNLine;

........................ (ignore) ...........................

  • (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
    {
    #ifdef FB_SONARKIT_ENABLED
    InitializeFlipper(application);
    #endif

        RCTBridge *bridge = [[RCTBridge alloc] initWithDelegate:self launchOptions:launchOptions];
        RCTRootView *rootView = [[RCTRootView alloc] initWithBridge:bridge
                                                         moduleName:@"MyAppName"
                                                  initialProperties:nil];
    
    
        ............................... (ignore) ..............................
        [LineLogin setupWithChannelID:@"OurLineID" universalLinkURL:nil];
        return YES;
    

}

//
// Handle redirection back to the app from Line
//

  • (BOOL)application:(UIApplication *)app openURL:(NSURL *)url options:(NSDictionary<UIApplicationOpenURLOptionsKey,id> *)options
    {
    return [LineLogin application:app open:url options:options];
    }

  • (BOOL)application:(UIApplication *)application continueUserActivity:(NSUserActivity *)userActivity restorationHandler:(void (^)(NSArray<id> * _Nullable))restorationHandler
    {
    BOOL handledLine = [LineLogin application:application continue:userActivity restorationHandler:restorationHandler];
    return handledLine;
    }

Could not find com.linecorp:linesdk:5.1.1.

Your environment

You can run (react-native -v) to obtain info and paste it below:

  • React: 17.0.2
  • React Native: 0.68.2
  • React Native Line: 2.0.1

Description

Screenshots

Capture

Cannot read property 'login' of undefined

This error persists when i try to login to LineLogin.login() . I can access LineLogin and have setup the SDK with podfile.

Podfile setup

pod 'LineSDK', '~> 5.0'

### Console Error

TypeError: Cannot read property 'login' of undefined
at LineLogin.login (LineLogin.js:10)
at onLineLogin$ (index.js:217)
at tryCatch (runtime.js:45)
at Generator.invoke [as _invoke] (runtime.js:271)
at Generator.prototype. [as next] (runtime.js:97)
at next (redux-saga-core.dev.cjs.js:1155)
at proc (redux-saga-core.dev.cjs.js:1106)
at redux-saga-core.dev.cjs.js:589
at immediately (redux-saga-core.dev.cjs.js:60)
at runForkEffect (redux-saga-core.dev.cjs.js:588)

'RNLine' not found error in AppDelegate.mm

Description

Similar to this issue #73, while I'm using AppDelegate.mm instead of AppDelegate.m.

I also use @import RNLine instead of #import "RNLine-Swift.h in reference to #58 (comment), but not found error still occurred at @import RNLine in AppDelegate.mm.

Later on, I changed the filename from "AppDelegate.mm" to "AppDelegate.m" in Xcode, and it worked! Not sure if this is the best solution, but it worked for me. Hope this information can help those who are struggling with the same issue, just like I was.

Package versions

  • React: 18.2.0
  • React Native: 0.71.5
  • React Native Line: 2.1.0
  • Xcode: 14.2
  • Apple Silicon Mac

Can't build in iOS

Versions

  • RN 0.51.0

Phenomenon

When I tried to build after done setting up, I got errors like bellow capture.

LineLoginManager.xcodeprj/LineLoginManager.h
2018-01-26 20 12 08

How can I fix this?

Expo support

We should update the codebase on android tu support expo to avoid issues like #6 .

'RNLine-Swift.h' file not found

Your environment

react-native:0.71.4
xcode:14.3

You can run (react-native -v) to obtain info and paste it below:

  • React:18.2.0
  • React Native:0.71.4
  • React Native Line: in package..json -> "@xmartlabs/react-native-line": "verybuy/react-native-line#8dcc99d",

Description

##Podfile

require_relative '../node_modules/react-native/scripts/react_native_pods'
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'

platform :ios, '12.4'
prepare_react_native_project!

use_frameworks!

If you are using a react-native-flipper your iOS build will fail when NO_FLIPPER=1 is set.

because react-native-flipper depends on (FlipperKit,...) that will be excluded

To fix this you can also exclude react-native-flipper using a react-native.config.js

```js

module.exports = {

dependencies: {

...(process.env.NO_FLIPPER ? { 'react-native-flipper': { platforms: { ios: null } } } : {}),

```

flipper_config = ENV['NO_FLIPPER'] == "1" ? FlipperConfiguration.disabled : FlipperConfiguration.enabled
permissions_path = '../node_modules/react-native-permissions/ios'
linkage = ENV['USE_FRAMEWORKS']
if linkage != nil
Pod::UI.puts "Configuring Pod with #{linkage}ally linked Frameworks".green
use_frameworks! :linkage => linkage.to_sym
end

pod 'Permission-Camera', :path => "#{permissions_path}/Camera"

pod 'Permission-PhotoLibrary', :path => "#{permissions_path}/PhotoLibrary"

pod 'Firebase', :modular_headers => true
pod 'GoogleUtilities', :modular_headers => true
pod 'FirebaseCore', :modular_headers => true
pod 'FirebaseCoreInternal', :modular_headers => true
pod 'FBSDKLoginKit'

pod 'LineSDKSwift', '~> 5.0'

    target 'RichestLife' do
      config = use_native_modules!
      pod 'LineSDKSwift', '~> 5.0'
      # project 'RichestLife',
      # 'Debug' => :debug,
      # 'Dev Debug' => :debug,
      # 'Alpha Debug' => :debug,
      # 'QA Debug' => :debug,
      # 'Release' => :release,
      # 'Dev Release' => :release,
      # 'Alpha Release' => :release,
      # 'QA Release' => :release

Flags change depending on the env values.

flags = get_default_flags()

use_react_native!(
:path => config[:reactNativePath],
# Hermes is now enabled by default. Disable by setting this flag to false.
# Upcoming versions of React Native may rely on get_default_flags(), but
# we make it explicit here to aid in the React Native upgrade process.
:hermes_enabled => flags[:hermes_enabled],
:fabric_enabled => flags[:fabric_enabled],
# Enables Flipper.
#
# Note that if you have use_frameworks! enabled, Flipper will not work and
# you should disable the next line.
:flipper_configuration => flipper_config,
# An absolute path to your application root.
:app_path => "#{Pod::Config.instance.installation_root}/.."
)

target 'RichestLifeTests' do
inherit! :complete
# Pods for testing
end

post_install do |installer|
react_native_post_install(
installer,
# Set mac_catalyst_enabled to true in order to apply patches
# necessary for Mac Catalyst builds
:mac_catalyst_enabled => false
)
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '12.0'
end
end
__apply_Xcode_12_5_M1_post_install_workaround(installer)
installer.pods_project.build_configurations.each do |config|
config.build_settings['CODE_SIGNING_ALLOWED'] = 'NO'
end
end
end

Screenshots

Steps To Reproduce

Expected behavior

Actual behavior

Snack or minimal code example

The SDK version is out of date

The latest iOS SDK version is 5.8.1, and the latest Android SDK version is 5.7.0.

Besides, the usage in react-native had some change.

I open a pull request for the upgrade, and also work on our project. #90

May the power be with the repo.

'RNLine-Swift.h' file not found

I am trying follow your example.

  1. First I try following the doc but I got this error:
    Use of undeclared identifier 'LineLogin'
  2. I follow your example then I import
    #import "RNLine-Swift.h" in AppDelegate.m
  3. Try to pod install but failed
    After google searching:
    replace platform :ios, '9.0' to platform :ios, '10.0'
    and add ENV['SWIFT_VERSION'] = '5' on top of my podfile
    --> pod success
    But I still get the error:
    'RNLine-Swift.h' file not found

Tks for your lib, pls help

[Android] Error while login

Your environment

You can run (react-native -v) to obtain info and paste it below:

  • React: 16.11.0
  • React Native: 0.61.5
  • React Native Line: 2.0.1

Description

While login android, but ios is fine.
Can you tell me how to debug your native module on android, many thks

Screenshots

image

image

Steps To Reproduce

  1. Already add

<resources> <string name="line_channel_id" translatable="false">1654402186</string> </resources>

  1. Set minSdkVersion to 17

Expected behavior

  • get token

Actual behavior

  • get unknow error

Snack or minimal code example

Ignore .idea folder

The .idea folder should be ignored, since is a Android Studio specific folder, created automatically with the IDE configuration. It would be better if the project is IDE agnostic.

Module 'RNLine' not found error in AppDelegate.m

Description

When I try to build in Xcode 12.4 - Apple Silicon Mac, "Module 'RNLine' not found" error occurred at @import RNLine in AppDelegate.m.

I use @import RNLine instead of #import "RNLine-Swift.h in reference to #58 (comment)

How can I resolve this error ... ?

image

Package versions

  • React: 16.13.1
  • React Native: 0.63.2
  • React Native Line: 2.1.0
  • Xcode: 12.4
  • Apple Silicon Mac

Customisation toast message for success login

Is there any way to change or disable the login success toast message instead of showing "Login successful!"?
Toast message during onlyWebLogin:true is disable.

Currently using:
"react-native": "0.63.3",
@xmartlabs/react-native-line": "^2.1.0"

Build IOS error Undefined symbols for architecture arm64

Your environment

  • React: 17.0.2
  • React Native: 0.64.4
  • React Native Line: 2.2.0

Description

It works fine in development environment, however when I do build the app. An error has occurred.

@property (nonatomic, strong) UIWindow *window;
                                 ^


β–Έ Linking mobile

❌  ld: symbol(s) not found for architecture arm64



❌  clang: error: linker command failed with exit code 1 (use -v to see invocation)
/Users/user/Library/Developer/Xcode/DerivedData/mobile-enlqcscemfhhjjfldsucnptaosmk/Build/Intermediates.noindex/ArchiveIntermediates/mobile/InstallationBuildProductsLocation/Applications/mobile.app/mobile
Undefined symbols for architecture arm64:
  "_swift_stdlib_isStackAllocationSafe", referenced from:
      _$ss10_NativeSetV6filteryAByxGSbxKXEKF7LineSDK15LoginPermissionV_Tg503$s7d95SDK19ShareViewControllerC41localAuthorizationStatusForSendingMessage11permissionsAA0gH0OSayAA15fG15VG_tFZSbAIXEfU_SayAGGTf1cn_nTf4ng_n in libLineSDKSwift.a(ShareViewController.o)
      _$ss10_NativeSetV6filteryAByxGSbxKXEKF7LineSDK15LoginPermissionV_Tg503$s7d92SDK26OpenChatCreatingControllerC027localAuthorizationStatusForcD011permissionsAA0hI0OSayAA15fG15VG_tFZSbAIXEfU_SayAGGTf1cn_nTf4ng_n in libLineSDKSwift.a(OpenChatCreatingController.o)
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

How to get raw id token string for iOS?

Hi,

I'm currently using

  • react native: 0.59.10
  • LineSDK for iOS (Objective C): 5.0.2
    by manually installation.

I can't find anywhere to get the raw id token in LineSDKJSONWebToken class.
But I do able to get my email from credential.IDToken.email

Is there a way to get the raw id token string in iOS?

Thank you guys.

LineSDK/LineSDK.h' file not found

Without Import that file, I can not build.

If Removed library from this then I can build my project

Screenshot 2019-08-05 at 5 21 27 PM

if I do this, then I can not use LineLoginManager from LineLogin.js file.
it says that LineLoginManager is undefined.

I tried manually Link LindSdk framework, LineSDK pod file also.

if I do Link with libraries libLinaManager.a file
then I get this error
Screenshot 2019-08-05 at 5 24 29 PM

The stale token of version 4 conflicts

Issue

When we upgrade this wrapper from 1.1.0 to 1.2.0. If there are v4 tokens of line, it won't work at getUserProfile function since the Line API server reject their v4 token on v5 sdk.

if ([shared isAuthorized])
{
[self getUserProfile:loginResolver
rejecter:loginRejecter];

There is no way to clear stale token. The only way is to receive new token from Line API server.

Workaround

So, I removed that code, when I got the new token from Line login process, stale token issue was resolved.

Suggest

We need to isolate getUserProfile from loginWithPermissions method.
I'll contribute this by pull request. Thank you.

App crashes after clicking on Line Sign-in Button

Hi, I'm using react-native on ios but when I click on sign in, the app crashes.
I think it has a problem with new versions of react-native maybe?

react-native-cli: 2.0.1
react-native: 0.68.2
and SDK is the latest version. Higher than 5

[iOS] Error: Use of undeclared identifier 'LineLogin'

Description

When building in Xcode, I keep getting the error "Use of undeclared identifier 'LineLogin'" in AppDelegate.m.

Code

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
  ...
  [LineLogin setupWithChannelID:@"....." universalLinkURL:nil];
  
  return YES;
}

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

- (BOOL)application:(UIApplication *)application continueUserActivity:(NSUserActivity *)userActivity restorationHandler:(void (^)(NSArray<id<UIUserActivityRestoring>> * _Nullable))restorationHandler
{
  BOOL handledLine = [LineLogin application:application continue:userActivity restorationHandler:restorationHandler];
  return handledLine;
}

Package versions

  • Xcode: 11.2.1
  • React Native: 0.61.4
  • React Native Line: 2.1.0

Any solution to work this lib without using use_framework!

Description

I am working both with react-native-line and react-native-maps. To install react-native-maps I must remove use_framework! in podfile. Any solution for this

Code

Package versions

  • React:
  • React Native:
  • React Native Line:

How can I get the user email?

I installed this package :
import LineLogin from '@xmartlabs/react-native-line'

  1. I have gotten the OC_EMAIL permission from Line channel.
  2. I request the email scope when login, and got grant from user.
    const loginResult = await LineLogin.login({scopes:['profile','openid','email']});
    I got displayName, pictureURL, userID, but no email address.
  3. Then, I call getProfile()
    const userProfile = await LineLogin.getProfile();
    Same as #2, no email address?

I was wondering how I can get the user email, thank you.

Build error in iOS : Use of undeclared identifier 'LineLogin'

Your environment

  • node : v14.17.3
  • React Native: 0.64.2
  • react-native-cli: 2.0.1
  • React Native Line: "@xmartlabs/react-native-line": "^2.1.0"
  • Platform : iOS

Description

Use of undeclared identifier 'LineLogin'

I have read some links as below and tried to fix it. But all of them do not work.
#58
https://github.com/xmartlabs/react-native-line#using-objective-c

Screenshots

Steps To Reproduce

  1. install

    yarn add @xmartlabs/react-native-line
    cd ios

  2. edit Podfile as below : ( I mask 'use_frameworks!'. It cause many compatible error. I tried 'use_frameworks! :linkage => :static'. It cause error too. )

require_relative '../node_modules/react-native/scripts/react_native_pods'
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'

platform :ios, '10.0'
#use_frameworks! :linkage => :static
#use_frameworks!

target 'CSApp3' do
config = use_native_modules!

use_react_native!(:path => config["reactNativePath"])

#Line Login --> I have tried both ways.
pod 'LineSDKSwift', '> 5.0'
#pod 'LineSDK', '
> 5.0'
end

  1. pod install :

    pod install
    cd ..

  2. edit AppDelegate.m to import header file : ( I have tried two ways )

#import "RNLine-Swift.h"
or
@import RNLine;

  1. edit method 'didFinishLaunchingWithOptions' in AppDelegate.m

add this line before return :

[LineLogin setupWithChannelID:@"1111111111" universalLinkURL:nil];

  1. build and get error :

Use of undeclared identifier 'LineLogin'

Expected behavior

I am looking forward to building success.

Actual behavior

Use of undeclared identifier 'LineLogin'

Snack or minimal code example

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.