xmartlabs / react-native-line

Line SDK wrapper for React Native 🚀
MIT License
121 stars 86 forks source link

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

Closed edem closed 3 years ago

edem commented 3 years ago

Your environment

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. https://github.com/xmartlabs/react-native-line/issues/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

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. You may also mark this issue as a "discussion" and I will leave this open.

stale[bot] commented 3 years ago

Closing this issue after a prolonged period of inactivity. Fell free to reopen this issue, if this still affecting you.

raj-xcerpt commented 2 years ago

Moving #import "RNLine-Swift.h" to top in AppDelegate.m solved the issue for me.

phuocantd commented 2 years ago

same issue