crossplatformkorea / react-native-kakao-login Goto Github PK
View Code? Open in Web Editor NEWreact-native native module for Kakao sign in.
License: MIT License
react-native native module for Kakao sign in.
License: MIT License
좋은 라이브러리 감사합니다.
질문이 하나 있어 남겨드립니다.
RNKakaoLogins.login() 호출 시 해당 기능은 잘 작동하지만 (기존 카카오 로그인, 다른 계정으로 로그인 등 modal 표시)
로그인 성공 시 이후 코드가 실행되지 않고 위 제목의 에러가 발생합니다.
Value for message cannot be cast from ReadableNativeMap to string
감사합니다.
한번 카카오 로그인 후
다른 카카오계정 로그인 호출 시 계정입력 하는 창이 나오지 않고
토큰값을 바로 리턴해버리네요..
뭐가 문제인가요?
Expokit을 사용하면 MainApplication.java에서는
public class MainApplication extends ExpoApplication
와 같이 ExpoApplication를 이미 상속 받아서 사용합니다.
안드로이드에서 com.dooboolab.kakaologins.GlobalApplication를 MainApplication이 상속받을 수가 없는데 어떻게 해야할까요?
안녕하세요~
카카오 로그인 모듈 샘플 예제 실행시 ios 와 안드로이드 동일하게
undefined is not an object (evaluating '_reactNativeKakaoLogins2.default.login.default.login')
에러가 나는데요
올려주신 샘플소스 확인 가능하실지 문의드립니다.
카카오 오그인 라이브러리: 1.20.0, 1.21.1 (둘다 해봤는데 같은 오류..)
리엑트네이티브: sdk-36.0.1
expo 사용: 36.0.0
expo-kit : 36.0.1
문제 platform: iOS
현재 xcode에서 빌드 자체가 안되고 있습니다.
앞서 오류를 찾아보았지만 딱히 답이 없어보이네요.
제가 어디서 잘 못한건지 알기가 어렵네요..
'React/RCTBridgeModule.h' file not found
이 에러가 뜹니다..
iOS install은 pods을 사용했습니다.
또한 RNKakaoLogins.xcodeproj 추가j는 react-native(프로젝트 최상위 루트)에서 node_modules폴더로 이동후 yarn으로 다운 받은 react-native-kakao-login(해당 모듈) =>react-native-seoul/kakao-login => iOS => RNKakaoLogins.xcodeproj 에서 추가 하였습니다.
한가지 더 궁금한 점은 ReadMe.md에 post installation 에서
Project => Targets 아래 앱 선택 => General 탭으로 이동해서 Bundle Identifier가 본인의 카카오 앱과 동일한지 확인해주세요.
여기서 project는 어떤걸 의미 하나요? react-native에서 나온 ios의 project가 맞는지요?
조언을 부탁드립니다.
react-native link react-native-kakao-logins 명령으로 링크를 하면
react-native run-ios 명령으로 시뮬레이터 구동 시, 아래와 같은 에러가 발생합니다.
/Users/pbh/project/react/KakaoLoginTest2/node_modules/react-native-kakao-logins/ios/RNKakaoLogins.m:4:9: fatal error: 'KakaoOpenSDK/KakaoOpenSDK.h' file not found
#import <KakaoOpenSDK/KakaoOpenSDK.h>
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
제 프로젝트에 적용하다가 해결이 안되서
기본 프로젝트로 본 패키지만 설치해봤는데
링크 후 동일한 에러가 발생합니다.
어떤게 문제일까요?
카카오 네이티브 로그인 시,
카톡 어플로 전환되고 다시 제 어플로 돌아와서 토큰을 리턴할 줄 알았는데
iOS 는 RNKakaoLogins.login 콜백 함수가 동작하지 않는 것 같습니다.
아래처럼 알람을 찍어도 동작하지 않습니다.
// 카카오 로그인
kakaoLogin() {
console.log(' kakaoLogin ');
RNKakaoLogins.login((err, result) => {
if (err) {
Alert.alert('kakao Login err', err)
console.log(err);
return;
}
// var access_token = result.slice(8, -1)
Alert.alert('kakao Login run')
Alert.alert('kakao Login result', result)
// console.log('get access_token: ', access_token);
// this.kakaoLoginService(access_token)
// this.getProfile()
});
}
안드로이드에서 확인한 것 인데요. (iOS는 기기가 없어서 정확한 동작은 모르겠네요.)
복수 타입 선택이 가능한 경우 팝업을 띄워주고 있는데요. 이 때 나가기 버튼을 누르거나 배경을 눌러서 팝업을 닫으면 콜백 함수 호출 없이 팝업만 닫히고 있습니다.
로그인 요청을 하고 콜백을 받아서 처리를 하는데 콜백 전달이 되지 않아 처리를 못하고 있는데요.
사용자가 팝업을 닫는 경우에는 에러 콜백 전달이 가능할까요?
ios 에서 로그인은 잘되는데 로그아웃 할 때 err값은 나오는데 result 값이 안나옵니다.
왜 그러는지 알 수 있을까요?
안녕하세요
최근에 kakao sdk version을 1.15.X로 올리셨던데
혹시 https://devtalk.kakao.com/t/topic/61304/2
이 문제로 인한 버전업인가요~?
1.3.8
59.9
both
설치되어야 함
package.json
{
...
"react-native-kakao-logins": "^1.3.8
...
}
$ npm install
npm ERR! code EISGIT
npm ERR! path /Users/choong/dev/cojam-rn/node_modules/react-native-kakao-logins
npm ERR! git /Users/choong/dev/cojam-rn/node_modules/react-native-kakao-logins: Appears to be a git repo or submodule.
npm ERR! git /Users/choong/dev/cojam-rn/node_modules/react-native-kakao-logins
npm ERR! git Refusing to remove it. Update manually,
npm ERR! git or move it out of the way first.
60버전으로 올릴 수 없습니다. 1.3.8 버전을 사용해야 합니다.
git repository 자체가 없어졌습니까?
아니면 1.3.8 버전을 어디서 다운받을 수 있습니까?
OSX both
readme 파일과 KakaoLoginExample 폴더를 참고해서 설치를 진행했습니다.
그런데 위 단계까지 진행하면, 빌드 중 아래와 같은 에러가 발생합니다.
> Task :react-native-kakao-logins:compileDebugJavaWithJavac
/Users/pbh/project/react/luxlabUser/node_modules/react-native-kakao-logins/android/src/main/java/com/dooboolab/kakaologins/RNKakaoLoginsModule.java:37: error: cannot find symbol
import com.kakao.usermgmt.callback.MeV2ResponseCallback;
^
symbol: class MeV2ResponseCallback
location: package com.kakao.usermgmt.callback
/Users/pbh/project/react/luxlabUser/node_modules/react-native-kakao-logins/android/src/main/java/com/dooboolab/kakaologins/RNKakaoLoginsModule.java:38: error: cannot find symbol
import com.kakao.usermgmt.response.MeV2Response;
^
symbol: class MeV2Response
location: package com.kakao.usermgmt.response
/Users/pbh/project/react/luxlabUser/node_modules/react-native-kakao-logins/android/src/main/java/com/dooboolab/kakaologins/RNKakaoLoginsModule.java:125: error: incompatible types: View cannot be converted to ImageView
ImageView imageView = convertView.findViewById(com.kakao.usermgmt.R.id.login_method_icon);
^
/Users/pbh/project/react/luxlabUser/node_modules/react-native-kakao-logins/android/src/main/java/com/dooboolab/kakaologins/RNKakaoLoginsModule.java:131: error: incompatible types: View cannot be converted to TextView
TextView textView = convertView.findViewById(com.kakao.usermgmt.R.id.login_method_text);
^
/Users/pbh/project/react/luxlabUser/node_modules/react-native-kakao-logins/android/src/main/java/com/dooboolab/kakaologins/RNKakaoLoginsModule.java:158: error: incompatible types: View cannot be converted to ListView
ListView listView = dialog.findViewById(com.kakao.usermgmt.R.id.login_list_view);
^
/Users/pbh/project/react/luxlabUser/node_modules/react-native-kakao-logins/android/src/main/java/com/dooboolab/kakaologins/RNKakaoLoginsModule.java:171: error: incompatible types: View cannot be converted to Button
Button closeButton = dialog.findViewById(com.kakao.usermgmt.R.id.login_close_button);
^
/Users/pbh/project/react/luxlabUser/node_modules/react-native-kakao-logins/android/src/main/java/com/dooboolab/kakaologins/RNKakaoLoginsModule.java:216: error: cannot find symbol
UserManagement.getInstance().requestLogout(new LogoutResponseCallback() {
^
symbol: method getInstance()
location: class UserManagement
/Users/pbh/project/react/luxlabUser/node_modules/react-native-kakao-logins/android/src/main/java/com/dooboolab/kakaologins/RNKakaoLoginsModule.java:242: error: cannot find symbol
UserManagement.getInstance().me(new MeV2ResponseCallback() {
^
symbol: class MeV2ResponseCallback
location: class RNKakaoLoginsModule
/Users/pbh/project/react/luxlabUser/node_modules/react-native-kakao-logins/android/src/main/java/com/dooboolab/kakaologins/RNKakaoLoginsModule.java:242: error: cannot find symbol
UserManagement.getInstance().me(new MeV2ResponseCallback() {
^
symbol: method getInstance()
location: class UserManagement
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
9 errors
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':react-native-kakao-logins:compileDebugJavaWithJavac'.
> Compilation failed; see the compiler error output for details.
"@react-native-seoul/kakao-login": "^2.1.0",
"react-native": "0.61.2",
Android
정상 빌드
react-native run-android시 아래와 같은 에러가 발생합니다.
ERROR: The project name '@react-native-seoul/kakao-login' must not contain any of the following characters: [/, , :, <, >, ", ?, *, |]. Set the 'rootProject.name' or adjust the 'include' statement (see https://docs.gradle.org/5.5/dsl/org.gradle.api.initialization.Settings.html#org.gradle.api.initialization.Settings:include(java.lang.String[]) for more details).
에뮬레이터
예시대로 카카오 로그인을 하는데
카카오톡이 깔려있는데도 간편로그인은 안되고
다른계정으로 로그인만 뜨는데 원래 이런건가요
아래에 있는 이슈보면 간편로그인창이 뜨는거 같긴한데 혹시 저만이런건가요
ios입니다
When using this library and uploading an apk to the Google Play Console there is an alert that the app includes a WebView that is vulnerable to cross app scripting. More info can be found under https://support.google.com/faqs/answer/9084685
The vulnerable class is:
com.kakao.auth.authorization.authcode.KakaoWebViewActivity->initUi
2.2.0
0.61.5
Android
컴파일 됨
Android Q Pixel 3 API 29 에서 발생합니다. ReadMe의 Android 인스톨 설명 부분에서 MainApplication.java 부분의 packages.add(new RNKakaoLoginsPackage());
를 지우니까 해결 되었습니다. import com.dooboolab.kakaologins.RNKakaoLoginsPackage;
와 중복처리나는것 같습니다.
문제를 아래와 같이 해결했습니다.
SDK version은 1.15.1입니다.
<activity
android:name="com.kakao.auth.authorization.authcode.KakaoWebViewActivity"
android:launchMode="singleTop"
+ android:exported="false"
android:windowSoftInputMode="adjustResize">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.DEFAULT"/>
</intent-filter>
</activity>
교차 앱 스크립팅에 취약한 WebView가 앱에 포함되어 있습니다. 자세한 내용은 Google 고객센터 도움말을 확인하세요.
취약한 클래스:
com.kakao.auth.authorization.authcode.KakaoWebViewActivity->initUi
로그인 팝업이 영문으로 나오는데 혹시 이건 제가 앱 설정을 잘못한걸까요?
안녕하세요~
카카오 로그인 모듈 샘플 예제 실행시 ios에서
undefined is not an object (evaluating 'RNKakaoLogins.login')
에러가 나는데요
올려주신 샘플소스 확인 가능하실지 문의드립니다.
master 브랜치의 내용이 아직 npm 으로 publishing되지는 않은 것 같은데요 publishing부탁 드립니다~ 🙏 ㅎㅎ
1.In XCode, in the project navigator, right click Libraries ➜ Add Files to [your project's name]
=> Xcode를 열고 project navigator에서 오른쪽 클릭하여 Add Files to project name해서 여기서 다운 받은 파일 추가
2.Go to node_modules ➜ react-native-kakao-logins and add RNKakaoLogins.xcodeproj
=>react-native 내의 node_modules에 react-native-kakao-logins와 RNKakaoLogins.xcodeproj 복사 붙여넣기
3.In XCode, in the project navigator, select your project. Add libRNKakaoLogins.a to your project's
=>add libRNKakaoLogins.a라는게, libRNKaKaoLogins.a 파일을 새로 만들어서 넣어라는건가요? 올려주신 파일중에는 다음과 같은 명의 파일이 없어서요
4.Build Phases ➜ Link Binary With Libraries
5.Run your project (Cmd+R)<
카카오 오그인 라이브러리: 1.21.1 (이 번에는, 수동으로 framework에 넣었습니다. 그러나 pods를 사용하여 설치해도 마찬가지의 오류가 나타납니다.)
리엑트네이티브: sdk-36.0.1
expo 사용: 36.0.0
expo-kit : 36.0.1
platform: iOS, android
TypeError: null is not an object (evaluating 'RNKakaoLogins.login')
이라는 에러가 발생합니다. 안드로이드에서도 문제인데요.
sample code로 작성하였습니다.
plist.info, url types도 설정해 주었습니다.
callback 으로 리턴된 에러는 다음과 같습니다.
{"line":815, "column": 271, "sourceURL": "index.android.bundle"}
RN version : 0.59.10
react-native-kakao-logins version : 1.3.7
debug 모드에서는 잘 동작하며, key 해시는 debug, release 둘 다 잘 등록하였습니다
1.3.0
0.60.4
android
Emulator에 실배포용 apk를 설치 후 카카오톡 로그인후 callback 와서 로그인이 되야 합니다,
Emulator에 실배포용 apk를 설치 후 카카오톡 로그인인 안됩니다.
Emulator
카카오톡 SDK의 연결해제 기능은 개발 예정에 없으신지 궁금합니다.
android 디바이스에 카카오톡이 설치되어 있지 않은 웹뷰 로그인 시에는 정상 작동합니다.
하지만 디바이스에 카카오톡이 설치 되어있는 네이티브 로그인시에는 아래와 같은 에러를 발생합니다.
(참고로 ios도 네이티브 로그인이 정상 작동하지 않아 강제 웹뷰 동작으로 쓰고 있습니다)
호출한 함수는 아래 로그인 함수입니다.
// 카카오 로그인
kakaoLogin() {
console.log(' kakaoLogin ');
RNKakaoLogins.login((err, result) => {
if (err) {
console.log(err);
return;
}
var access_token = result.slice(8, -1)
console.log('get access_token: ', access_token);
this.kakaoLoginService(access_token)
});
}
^2.1.0
android
안드로이드 빌드가 정상적으로 되어야함
gradle 빌드시 illegar character... 오류가 발생
실제기기: galaxy s7
as-is:
maven { url 'http://devrepo.kakao.com:8088/ +nexus/content/groups/public/' }
to-be:
maven { url 'http://devrepo.kakao.com:8088/nexus/content/groups/public/' }
iOS의 경우 NSNull을 그냥 callback에 주고있는것으로 보입니다.
if ([session isOpen]) {
NSString* token = session.token.accessToken;
NSString* result = [NSString stringWithFormat:@"{\"token\": \"%@\"}", token];
callback(@[[NSNull null], result]);
} else {
RCTLogInfo(@"Error=%@", error);
callback(@[@"SignIn failed.\n", [NSNull null]]);
}
안드로이드는 그나마 ErrorCallback이 있긴하지만.. json에 대한 exception으로만 되어있네요..
if (loginCallback != null) {
JSONObject response = new JSONObject();
String token = Session.getCurrentSession().getAccessToken();
try {
response.put("token",token);
loginCallback.invoke(null,response.toString());
loginCallback = null;
} catch (JSONException e) {
loginCallback.invoke(e.toString(), null);
}
}
}
@Override
public void onSessionOpenFailed(KakaoException exception) {
if(exception != null) {
if (loginCallback != null) {
loginCallback.invoke(null, exception.toString());
loginCallback = null;
}
Log.e(TAG, "Logged in!\nSessionOpenFailed");
Logger.e(exception);
}
}
해당 라이브러리를 사용해서 kakao login cancel이나 error들에 대한 처리는 할 수 없나요?
좋은 라이브러리를 만들어 주셔서 감사합니다.
리액트 네이티브로 해당 라이브러리를 사용해 카카오 로그인을 제공하고 있는데,
appdelegate 의 메소드가 충돌하여 카카오 간편 로그인이 지원이 되지 않는 것 같습니다.(웹뷰 로그인만 가능)
- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url
options:(NSDictionary<NSString *,id> *)options {
if ([KOSession isKakaoAccountLoginCallback:url]) {
return [KOSession handleOpenURL:url] && [[RNFirebaseLinks instance] application:application openURL:url options:options];
}
return false;
}
*/
- (BOOL)application:(UIApplication *)application
openURL:(NSURL *)url
options:(NSDictionary<UIApplicationOpenURLOptionsKey,id> *)options
{
return [RCTLinkingManager application:application openURL:url options:options];
}
현재 앱링크를 받는 구문, rn파이어베이스, 카카오 로그인이 같은 구문을 사용하고 있어
사용을 중지한 상태입니다.
ios개발이 처음인터라 질문을 드립니다. 어떻게 이 구문들을 합쳐서 리턴할 수 있을까요?
감사합니다.
When I open the project on AndroidStudio. Gradle has occurred a problem. like this below the image.
corymsmith/react-native-fabric#200
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.2'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
(...)
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.2'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
(...)
I read the README.md about this project, but this example code follows a legacy version.
So, This example can't resolve the class that name 'GlobalApplication' at android.
I think you'd better maintain this example. kind regards.
age_range,
birthday,
gender 등 추가적인 프로퍼티는 가져오지못하는건가요?
Undefined symbols for architecture x86_64:
"_OBJC_CLASS_$_KOSession", referenced from:
objc-class-ref in libRNKakaoLogins.a(RNKakaoLogins.o)
"_OBJC_CLASS_$_KOSessionTask", referenced from:
objc-class-ref in libRNKakaoLogins.a(RNKakaoLogins.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
해당 이슈가 발생합니다.
패키지 설치 후 링크만 한 상태에서
react-native run-android 구동시 아래와 같은 에러가 발생합니다
매뉴얼로 링크 시켜도 동일한 에러가 발생합니다.
FAILURE: Build failed with an exception.
* What went wrong:
Could not resolve all files for configuration ':app:debugCompileClasspath'.
> Could not find com.kakao.sdk:usermgmt:1.7.0.
Searched in the following locations:
file:/Users/pbh/Library/Android/sdk/extras/m2repository/com/kakao/sdk/usermgmt/1.7.0/usermgmt-1.7.0.pom
file:/Users/pbh/Library/Android/sdk/extras/m2repository/com/kakao/sdk/usermgmt/1.7.0/usermgmt-1.7.0.jar
file:/Users/pbh/Library/Android/sdk/extras/google/m2repository/com/kakao/sdk/usermgmt/1.7.0/usermgmt-1.7.0.pom
file:/Users/pbh/Library/Android/sdk/extras/google/m2repository/com/kakao/sdk/usermgmt/1.7.0/usermgmt-1.7.0.jar
file:/Users/pbh/Library/Android/sdk/extras/android/m2repository/com/kakao/sdk/usermgmt/1.7.0/usermgmt-1.7.0.pom
file:/Users/pbh/Library/Android/sdk/extras/android/m2repository/com/kakao/sdk/usermgmt/1.7.0/usermgmt-1.7.0.jar
file:/Users/pbh/.m2/repository/com/kakao/sdk/usermgmt/1.7.0/usermgmt-1.7.0.pom
file:/Users/pbh/.m2/repository/com/kakao/sdk/usermgmt/1.7.0/usermgmt-1.7.0.jar
https://jcenter.bintray.com/com/kakao/sdk/usermgmt/1.7.0/usermgmt-1.7.0.pom
https://jcenter.bintray.com/com/kakao/sdk/usermgmt/1.7.0/usermgmt-1.7.0.jar
https://dl.google.com/dl/android/maven2/com/kakao/sdk/usermgmt/1.7.0/usermgmt-1.7.0.pom
https://dl.google.com/dl/android/maven2/com/kakao/sdk/usermgmt/1.7.0/usermgmt-1.7.0.jar
file:/Users/pbh/project/react/luxlabUser_20180703/luxlabUser/node_modules/react-native/android/com/kakao/sdk/usermgmt/1.7.0/usermgmt-1.7.0.pom
file:/Users/pbh/project/react/luxlabUser_20180703/luxlabUser/node_modules/react-native/android/com/kakao/sdk/usermgmt/1.7.0/usermgmt-1.7.0.jar
Required by:
project :app > project :react-native-kakao-logins
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
* Get more help at https://help.gradle.org
BUILD FAILED in 5s
19 actionable tasks: 1 executed, 18 up-to-date
Could not install the app on the device, read the error above for details.
Make sure you have an Android emulator running or a device connected and have
set up your Android development environment:
https://facebook.github.io/react-native/docs/android-setup.html
2.2.0
0.60.5
both
유저 핸드폰번호를 획득합니다.
유저 핸드폰 번호가 넘어올 수 있는지 궁금합니다.
n / a
안녕하세요 @bang9 님 전에 PR을 주실때(https://github.com/react-native-seoul/react-native-kakao-login#params-in-result-when-getprofile), 유저 동의하에 phone_number를 가져올 수 있도록 수정 해주신거같은데, 제가 카카오 문서를 찾아보니 유저의 핸드폰 번호를 얻을 수 있는 방법은 딱히 없어보이네요...
혹시 실제로 유저 핸드폰 번호를 받아서 사용중이신가요?
n/a
n/a
n/a
RN 모든 버전에서 최신 버전의 모듈을 사용 할 수 있도록 지원
RN 0.60 미만 사용자를 위한 버전이 따로 분리 되어 있어 설치 방법이 번잡스럽고,
불필요하게 deprecated
된 패키지를 다운 받아야 하는 문제가 있음
n/a
I keep getting this error, seems like there's a problem with the support library used in this library
ERROR: In <declare-styleable> FontFamilyFont, unable to find attribute android:font
ERROR: In <declare-styleable> FontFamilyFont, unable to find attribute android:fontStyle
ERROR: In <declare-styleable> FontFamilyFont, unable to find attribute android:fontWeight
2.0.6
0.61.4
ios에서는 잘되는데 안드로이드에 설치시
ERROR: The modules ['@react-native-seoul_kakao-login', 'react-native-seoul-kakao-login'] point to the same directory in the file system.
이렇게 나옵니다. .iml 파일 지우고 다시 import 했는데도 계속이러네요.
2.4.1
0.61.1
iOS
Xocde에서 빌드 시 에러가 나지 않아야 함.
오토 링크 사용 중에 있으며,
Xcode에서 빌드 시 에러가 납니다.
가이드의 npm 설치, pod install 까지 한 뒤 Xcode에서 빌드했습니다.
기존에 설치하다 좀 헤매서, Post installation 부분은 따라한 상태입니다.
Undefined symbols for architecture arm64:
"___isPlatformVersionAtLeast", referenced from:
___33-[KLKTalkLinkCenter _callLinkAPI]_block_invoke_2 in KakaoLink(KLKTalkLinkCenter.o)
-[KNVNaviLauncher initWithConfiguration:] in KakaoNavi(KNVNaviLauncher.o)
-[KOTalkAuthorizeTask startWithCompletion:] in KakaoOpenSDK(KOAuthorizeTask.o)
-[KOStoryAuthorizeTask startWithCompletion:] in KakaoOpenSDK(KOAuthorizeTask.o)
-[KOSession initWithAppKey:redirectUri:] in KakaoOpenSDK(KOSession.o)
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
iPhone XR, Generic iOS Device 둘 다 동일하게 발생합니다.
ios로 연결중인데, login이후 들어오는 액세스토큰의 값이 Json타입이 아닌 String객체로 들어옵니다.
"{"token":"abcdefg"}" 형태가 아니라 "{token :abcdefg}" 다음과 같이 들어와서 parse해서 바로 쓰지 못합니다.
2.1.2 에 Kakao SDK 1.25.0 버전을 사용합니다.
0.61.4
Android
앱 실행 후 스플래쉬 화면 진입
항상 그런 건 아니지만 너무나 자주 앱 실행 시 아래와 같은 예외가 발생합니다.
Fatal Exception: java.lang.RuntimeException: Unable to resume activity {com....MainActivity}: java.lang.IllegalStateException: Session is not initialized. Call KakaoSDK#init first.
at android.app.ActivityThread.performResumeActivity(ActivityThread.java:4016)
at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:4048)
at android.app.servertransaction.ResumeActivityItem.execute(ResumeActivityItem.java:51)
at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:145)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:70)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1950)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:214)
at android.app.ActivityThread.main(ActivityThread.java:7073)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:494)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:965)
Caused by java.lang.IllegalStateException: Session is not initialized. Call KakaoSDK#init first.
at com.kakao.auth.Session.getCurrentSession(Session.java:111)
at com.kakao.auth.KakaoSDK$1.onActivityResumed(KakaoSDK.java:69)
at android.app.Application.dispatchActivityResumed(Application.java:264)
at android.app.Activity.onResume(Activity.java:1403)
at androidx.fragment.app.FragmentActivity.onResume(FragmentActivity.java:514)
at com.facebook.react.ReactActivity.onResume(ReactActivity.java:55)
at android.app.Instrumentation.callActivityOnResume(Instrumentation.java:1412)
Real device 이며 갤 S8, 갤노트8 등 다양한 기종에서 발생하고 있습니다.
getProfile 함수를 아래와 같이 하여 state에 프로필사진의 경로를 저장하는 방식 등으로 라이브러리를 사용하고자 합니다. async/await 등의 방법으로 시도를 하였지만 로그인을 실행하는 이벤트와 getProfile을 실행하는 이벤트를 따로 onPress 등에 넣지 않고 한번의 이벤트로 비동기방식으로 두가지를 실행 시키는 방법을 찾지 못하고 있습니다. 혹시 이에 관해 답해주시면 감사하겠습니다. (kakaoLogin()으로 로그인 이후에 getProfile()로 state에 getProfile의 result의 json 값들을 저장시키는 방법을 묻습니다ㅠ)
getProfile() {
RNKakaoLogins.getProfile((err, result) => {
if (err) {
Alert.alert("error profile", JSON.stringify(err));
return;
}
this.setState({ isLoggedIn: true, image: result.profile_image_path });
});
}
같은 문제가 발생하는데, 다른 분들 괜찮으신가요?
CANCELED_OPERATION: App restarted during Kakao login procedure. Restarting from the start.
첫 시도시, 화면 순간 깜빡거리고 위에러 이후에는 반응이 없습니다. 웹으로 로그인을 시도하여 성공하면, 이후 네이티브에서는 성공합니다.
Originally posted by @tedkimzikto in #9 (comment)
@2.3.0
@0.61.5
IOS...
react-native run-ios로 simulator를 돌리고 카카오톡 로그인을 했을 때 정상 로그인이 되어야 합니다.
react-native run-ios 시 카카오 로그인을 했을 때, 안드로이드에서 키 해쉬를 등록하지 않았을 때에 대한 에러인
Error: invalid android_key_hash or ios_bundle_id or web_site_url
가 발생합니다.
안드로이드일 때와 ios일의 key-hash는
터미널에서 keytool -exportcert -alias androiddebugkey -keystore ~/.android/debug.keystore -storepass android -keypass android | openssl sha1 -binary | openssl base64
를 통해서 둘 다 등록해 두었습니다.
Simulator에서 에러가 발생합니다.
RN version: 0.60.5
Xcode version : 11(latest)
OS: IOS
Simulator: Iphone X
react-native-kakao-logins 모듈 자체에 문제는 없습니다!
다만 작업 중 새로운 패키지 npm install 시 다음과 같은 에러가 계속 생겨서 메뉴얼로 rm -rf node-modules/react-native-kakao-logins 이후 다시 npm install 를 하고 있는데,
이를 없앨 수 있는 원인을 알고 싶네요..
에러는 다음과 같습니다.
Markui-MacBookPro:drsalary_app mj$ npm install react-native-calendars
npm ERR! path /Users/mj/Desktop/projects/drsalary_app/node_modules/react-native-kakao-logins
npm ERR! code EISGIT
npm ERR! git /Users/mj/Desktop/projects/drsalary_app/node_modules/react-native-kakao-logins: Appears to be a git repo or submodule.
npm ERR! git /Users/mj/Desktop/projects/drsalary_app/node_modules/react-native-kakao-logins
npm ERR! git Refusing to remove it. Update manually,
npm ERR! git or move it out of the way first.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/mj/.npm/_logs/2019-09-25T03_13_18_643Z-debug.log
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.