diff --git a/CHANGELOG.md b/CHANGELOG.md index 1e84c13..10cf5c9 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,33 @@ +v.1.3.1 +------------- + +버그수정 : + 카메라를 통해 사진을 첨부하는 경우 글쓰기 실패하는 사항 수정 + + +v.1.3.0 +------------- +개선사항 : + 네이버 로그아웃 인터페이스 추가 + + +v.1.2.0 +------------- +개선사항 : + 글 쓰기 화면 인터페이스 추가 + 캡처 후 글 쓰기 기능 추가 + 게시판 선택 기능 추가 + 게임 아이디 연동 인터페이스 추가 + 네이버 3rd Party 로그인 지원 + 게시판 접근 권한 적용 + + +v.1.1.7 +------------- +버그수정 : + 네이버 로그인 화면에서 외부로 URL 이 연결되는 현상 수정 + + v.1.1.3 ------------- 버그수정 : @@ -40,4 +70,4 @@ v.1.1.0 v.1.0.0 ------------- - Naver Game SDK 오픈 \ No newline at end of file + Naver Game SDK 오픈 diff --git a/Plugins/android/com/navercorp/nng/cocos2dx/sample/NNGSdk.java b/Plugins/android/com/navercorp/nng/cocos2dx/sample/NNGSdk.java index b28738e..e978a13 100644 --- a/Plugins/android/com/navercorp/nng/cocos2dx/sample/NNGSdk.java +++ b/Plugins/android/com/navercorp/nng/cocos2dx/sample/NNGSdk.java @@ -1,5 +1,7 @@ package com.navercorp.nng.cocos2dx.sample; +import android.widget.Toast; + import com.navercorp.nng.android.sdk.NNGCallbackListener; import com.navercorp.nng.android.sdk.NNGLink; @@ -21,27 +23,39 @@ public static void init(String clientId, String clientSecret, String loungeId) { } private static void initListeners() { + NNGLink.setSdkLoadListener(new NNGCallbackListener() { @Override public void onSdkDidLoaded() { - onSdkStarted(); + } @Override public void onSdkDidUnloaded() { - onSdkStopped(); + + } + + @Override + public void onCallInGameMenuCode(String inGameMenuCode) { + Toast.makeText(getActivity(),"onCallInGameMenuCode [" + inGameMenuCode + "]",Toast.LENGTH_LONG).show(); } @Override - public void onNaverLoggedIn(boolean success) { } + public void onNaverLoggedIn() { + + } @Override - public void onCallInGameMenuCode(String moveTo) { - onSdkReceiveInGameMenuCode(moveTo); + public void onNaverLoggedOut() { + } }); } + public static String getCountryCode() { + return NNGLink.getCountryCode(getActivity()); + } + public static void startHomeBanner() { NNGLink.startHome(getActivity()); } @@ -54,8 +68,29 @@ public static void startBoard(int boardId) { NNGLink.startBoard(getActivity(), boardId); } - public static void startFeed(int feedId) { - NNGLink.startFeed(getActivity(), feedId); + public static void startFeed(int feedId, boolean isTempFeedId) { + NNGLink.startFeed(getActivity(), feedId, isTempFeedId); + } + public static void putGameId(String gameId) { + NNGLink.putGameId(getActivity(), gameId); + } + + public static void enableScreenShotDetector(Boolean enable) { + NNGLink.enableScreenShotDetector(enable); + } + + public static void logout() { + NNGLink.logout(getActivity()); + } + + public static void writeFeed(int boardId, + String title, + String content, + String imageUri) { + NNGLink.writeFeed(getActivity(), boardId,title,content,imageUri); + } + public static void writeFeed() { + NNGLink.writeFeed(getActivity()); } public static void stopSdk() { diff --git a/Plugins/android/navergame-sdk-gradle-1.1.3.aar b/Plugins/android/navergame-sdk-gradle-1.1.3.aar deleted file mode 100644 index 36219fd..0000000 Binary files a/Plugins/android/navergame-sdk-gradle-1.1.3.aar and /dev/null differ diff --git a/Plugins/android/navergame-sdk-gradle-1.3.1.aar b/Plugins/android/navergame-sdk-gradle-1.3.1.aar new file mode 100644 index 0000000..e483011 Binary files /dev/null and b/Plugins/android/navergame-sdk-gradle-1.3.1.aar differ diff --git a/Plugins/navergamesdk/NaverGameSDK.h b/Plugins/navergamesdk/NaverGameSDK.h index 0ce9c97..c4877ad 100644 --- a/Plugins/navergamesdk/NaverGameSDK.h +++ b/Plugins/navergamesdk/NaverGameSDK.h @@ -1,14 +1,17 @@ #ifndef _JNI_NAVER_GAME_SDK_H_ #define _JNI_NAVER_GAME_SDK_H_ - #include namespace nng { - class NaverGameSDKListener { public: + // Sdk 시작시에 이벤트. virtual void onSdkStarted() = 0; + + // Sdk 종료시에 이벤트. virtual void onSdkStopped() = 0; + + // Sdk 실행 중에 유저가 특정 액션을 하게되면 귀사에서 설정한 string을 파라미터로 받는 이벤트. virtual void onSdkReceiveInGameMenuCode(const std::string &inGameMenuCode) = 0; }; @@ -17,19 +20,31 @@ namespace nng { /* 네아로 정보와 라운지 아이디로 sdk 초기화 합니다. */ static void init(std::string clientId, std::string clientSecret, std::string loungeId); + // Sdk에서 보내오는 각종 이벤트를 받는 리스너를 등록합니다. static void setSdkListener(NaverGameSDKListener* listener); + // Sdk를 실행하는 기기의 국가코드를 가져옵니다. + static char* getCountryCode(); + + // Sdk의 홈배너를 실행합니다. static void startHomeBanner(); + // Sdk의 점검배너를 실행합니다. static void startSorryBanner(); + // Sdk의 라운지 boardId와 매핑되는 글목록을 실행합니다. static void startBoard(int boardId); - static void startFeed(int feedId); - - static void stopSdk(); + // Sdk의 라운지 FeedId와 매핑되는 글상세를 실행합니다. + static void startFeed(int feedId, bool isTempFeedId); + + static void setCanWriteFeedByScreenshot(bool Enabled); + static void setGameId(std::string GameId); + static void startFeedWriting(int BoardId, std::string Title, std::string Text, std::string ImageFilePath); + static void naverLogout(); + // Sdk를 종료시킵니다. + static void stopSdk(); }; } /* namespace nng */ - #endif /* _JNI_NAVER_GAME_SDK_H_ */ diff --git a/Plugins/navergamesdk/platform/android/NaverGameSDK.cpp b/Plugins/navergamesdk/platform/android/NaverGameSDK.cpp index b4b42ca..a3adab9 100644 --- a/Plugins/navergamesdk/platform/android/NaverGameSDK.cpp +++ b/Plugins/navergamesdk/platform/android/NaverGameSDK.cpp @@ -1,6 +1,3 @@ - - - #include "NaverGameSDK.h" #include "platform/android/jni/JniHelper.h" @@ -34,6 +31,20 @@ namespace nng { } } + char* NaverGameSDK::getCountryCode() { + JniMethodInfo t; + jstring countryCodeJstr = nullptr; + if (getStaticMethod(t, "getCountryCode", "()Ljava/lang/String;")) { + countryCodeJstr = (jstring)t.env->CallStaticObjectMethod(t.classID, t.methodID); + t.env->DeleteLocalRef(t.classID); + } + + auto countryCode = countryCodeJstr == nullptr? "" : JniHelper::jstring2string(countryCodeJstr); + CCLOG("countryCode = %s", (char*)countryCode.c_str()); + + return (char*)countryCode.c_str(); + } + void NaverGameSDK::startHomeBanner() { JniMethodInfo t; if (getStaticMethod(t, "startHomeBanner", "()V")) { @@ -58,10 +69,49 @@ namespace nng { } } - void NaverGameSDK::startFeed(int feedId) { + void NaverGameSDK::startFeed(int feedId, bool isTempFeedId) { + JniMethodInfo t; + if (getStaticMethod(t, "startFeed", "(IZ)V")) { + t.env->CallStaticVoidMethod(t.classID, t.methodID, feedId,isTempFeedId); + t.env->DeleteLocalRef(t.classID); + } + } + void NaverGameSDK::setCanWriteFeedByScreenshot(bool isTempFeedId) { JniMethodInfo t; - if (getStaticMethod(t, "startFeed", "(I)V")) { - t.env->CallStaticVoidMethod(t.classID, t.methodID, feedId); + if (getStaticMethod(t, "enableScreenShotDetector", "(Z)V")) { + t.env->CallStaticVoidMethod(t.classID, t.methodID, isTempFeedId); + t.env->DeleteLocalRef(t.classID); + } + } + void NaverGameSDK::setGameId(std::string gameId) { + JniMethodInfo t; + if (getStaticMethod(t, "putGameId","(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V")) { + jstring _gameId = t.env->NewStringUTF(gameId.c_str()); + t.env->CallStaticVoidMethod(t.classID, t.methodID, _gameId); + t.env->DeleteLocalRef(_gameId); + t.env->DeleteLocalRef(t.classID); + } + } + + void NaverGameSDK::startFeedWriting(int boardId, std::string title, std::string text, std::string imageFilePath) { + JniMethodInfo t; + if (getStaticMethod(t, "writeFeed","(ILjava/lang/String;Ljava/lang/String;Ljava/lang/String;)V")) { + jstring _title = t.env->NewStringUTF(title.c_str()); + jstring _text = t.env->NewStringUTF(text.c_str()); + jstring _imageFilePath = t.env->NewStringUTF(imageFilePath.c_str()); + + t.env->CallStaticVoidMethod(t.classID, t.methodID, boardId,_title, _text, _imageFilePath); + + t.env->DeleteLocalRef(_title); + t.env->DeleteLocalRef(_text); + t.env->DeleteLocalRef(_imageFilePath); + t.env->DeleteLocalRef(t.classID); + } + } + void NaverGameSDK::naverLogout() { + JniMethodInfo t; + if (getStaticMethod(t, "logout", "()V")) { + t.env->CallStaticVoidMethod(t.classID, t.methodID); t.env->DeleteLocalRef(t.classID); } } @@ -74,6 +124,7 @@ namespace nng { } } + extern "C" { JNIEXPORT void JNICALL Java_com_navercorp_nng_cocos2dx_sample_NNGSdk_onSdkStarted(JNIEnv* env, jclass thiz) { diff --git a/Plugins/navergamesdk/platform/ios/NNGSDK.bundle/Info.plist b/Plugins/navergamesdk/platform/ios/NNGSDK.bundle/Info.plist index 13356d6..2e1236f 100644 Binary files a/Plugins/navergamesdk/platform/ios/NNGSDK.bundle/Info.plist and b/Plugins/navergamesdk/platform/ios/NNGSDK.bundle/Info.plist differ diff --git a/Plugins/navergamesdk/platform/ios/NNGSDK.bundle/Info.plist.meta b/Plugins/navergamesdk/platform/ios/NNGSDK.bundle/Info.plist.meta deleted file mode 100644 index 836d76c..0000000 --- a/Plugins/navergamesdk/platform/ios/NNGSDK.bundle/Info.plist.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: b6e1f1820cc3e4f3d98802d76a4b15f5 -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Plugins/navergamesdk/platform/ios/NNGSDK.bundle/TimeZoneToCountryCode.plist.meta b/Plugins/navergamesdk/platform/ios/NNGSDK.bundle/TimeZoneToCountryCode.plist.meta deleted file mode 100644 index db48b83..0000000 --- a/Plugins/navergamesdk/platform/ios/NNGSDK.bundle/TimeZoneToCountryCode.plist.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: b0b5f160847c044d59a2d70fde1fd025 -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Plugins/navergamesdk/platform/ios/NNGSDK.bundle/_CodeSignature/CodeDirectory b/Plugins/navergamesdk/platform/ios/NNGSDK.bundle/_CodeSignature/CodeDirectory new file mode 100644 index 0000000..630ef2b Binary files /dev/null and b/Plugins/navergamesdk/platform/ios/NNGSDK.bundle/_CodeSignature/CodeDirectory differ diff --git a/Plugins/navergamesdk/platform/ios/NNGSDK.bundle/_CodeSignature/CodeEntitlements b/Plugins/navergamesdk/platform/ios/NNGSDK.bundle/_CodeSignature/CodeEntitlements new file mode 100644 index 0000000..163942c Binary files /dev/null and b/Plugins/navergamesdk/platform/ios/NNGSDK.bundle/_CodeSignature/CodeEntitlements differ diff --git a/Plugins/navergamesdk/platform/ios/NNGSDK.bundle/_CodeSignature/CodeRequirements b/Plugins/navergamesdk/platform/ios/NNGSDK.bundle/_CodeSignature/CodeRequirements new file mode 100644 index 0000000..3a13888 Binary files /dev/null and b/Plugins/navergamesdk/platform/ios/NNGSDK.bundle/_CodeSignature/CodeRequirements differ diff --git a/Plugins/navergamesdk/platform/ios/NNGSDK.bundle/_CodeSignature/CodeRequirements-1 b/Plugins/navergamesdk/platform/ios/NNGSDK.bundle/_CodeSignature/CodeRequirements-1 new file mode 100644 index 0000000..37212aa Binary files /dev/null and b/Plugins/navergamesdk/platform/ios/NNGSDK.bundle/_CodeSignature/CodeRequirements-1 differ diff --git a/Plugins/navergamesdk/platform/ios/NNGSDK.bundle/_CodeSignature/CodeResources b/Plugins/navergamesdk/platform/ios/NNGSDK.bundle/_CodeSignature/CodeResources new file mode 100644 index 0000000..9022ed5 --- /dev/null +++ b/Plugins/navergamesdk/platform/ios/NNGSDK.bundle/_CodeSignature/CodeResources @@ -0,0 +1,427 @@ + + + + + files + + TimeZoneToCountryCode.plist + + k8h8YLTxULf/+EOEMvV0f7vlxeY= + + btn_back@3x.png + + tkjXsX8/6LU1Ec22LQST3UR7y1Y= + + btn_img_delete@3x.png + + jyMqCZVXGosuT91RBzUA5fGr1tc= + + btn_photo@3x.png + + FYZhvF1X2ZOgUPtmn2pA9kMpDAU= + + btn_white@3x.png + + ai4yU1EeNQ18BASk8JBBJySJJFU= + + btn_write_default@3x.png + + P+F2LUEazqm8ao2rj4yZm7SIPT4= + + btn_write_pressed@3x.png + + zN1Lo4ZJ46pudWOhkUpt6hI2nX8= + + en.lproj/Localizable.strings + + hash + + ELthai64uN07PsTW8QoM2yMd4VE= + + optional + + + ico_bottom_sheet_close@3x.png + + yVNgdkAJYpMw6jW6AiZlTOw3fFc= + + ico_bottom_sheet_list@3x.png + + Mlr+EMR2rp1sE0A7zYZzhhY82zI= + + ico_bottom_sheet_list_vt@3x.png + + bbZpWp6DETK2aHqAIu47C2C8eTI= + + ico_feed_comment_15@3x.png + + dj+qfX6TCong3+lfMCTrZ06xyyY= + + ico_listbox_arrow@3x.png + + TePPW3pwvHcsizhVAMoFBiXN2yM= + + ico_outside_close@3x.png + + 25avXOn872H0J23UKf1MXa+2uGA= + + ico_profile_block@3x.png + + Ege7Wcv05/7AjuCXxLoJL5eiKFg= + + ico_title_arrow@3x.png + + jFd+RY+XiyRGABQlluTP/xVHLMk= + + icon_simple_buff@3x.png + + WTx6WWKVpLNqJbB7SnvaCIMp6GY= + + invalid_name@3x.png + + skvfGrLdbeBGEgUfBpZ03JGmVfw= + + ko.lproj/Localizable.strings + + hash + + BE/wEIvWCx7zfzSQkOD970qnSzI= + + optional + + + main_load_3X_light.gif + + ti+XmdZy76h6LAtuRhvEQ0BtAXg= + + video_h_17@3x.png + + kvnUWh99zLSq5PbGGwlZVubie24= + + + files2 + + TimeZoneToCountryCode.plist + + hash + + k8h8YLTxULf/+EOEMvV0f7vlxeY= + + hash2 + + 1aZxAY1xL+Yglbnf5Xlxdnoo6fA2thlRsMH3DFqBJ1o= + + + btn_back@3x.png + + hash + + tkjXsX8/6LU1Ec22LQST3UR7y1Y= + + hash2 + + uDQVq5Sx/7vAWJA0bXj7fMADyaZyx0/J+VXuzT7Q4fg= + + + btn_img_delete@3x.png + + hash + + jyMqCZVXGosuT91RBzUA5fGr1tc= + + hash2 + + drKMqTVFUnrkN5QoHP5G5lUnXRQ4gybjmDNMiqN5OHU= + + + btn_photo@3x.png + + hash + + FYZhvF1X2ZOgUPtmn2pA9kMpDAU= + + hash2 + + bTlNELnwytrQeD0Fme8mwRZJ4VOFWqVNysMwop3P19M= + + + btn_white@3x.png + + hash + + ai4yU1EeNQ18BASk8JBBJySJJFU= + + hash2 + + GamE8n6mNAEDOs9WReQ9aXIG466IQAgy3XONTf/bOz4= + + + btn_write_default@3x.png + + hash + + P+F2LUEazqm8ao2rj4yZm7SIPT4= + + hash2 + + 2HzhH3BNeWLTCWUuJivuyj+sHlpAjclJlmx0XzWH8zM= + + + btn_write_pressed@3x.png + + hash + + zN1Lo4ZJ46pudWOhkUpt6hI2nX8= + + hash2 + + t4vY9Yiir5gze5gCw7EM8H8c5dx3H8Qv5Io6fQKXzj4= + + + en.lproj/Localizable.strings + + hash + + ELthai64uN07PsTW8QoM2yMd4VE= + + hash2 + + b8r1NTxF3TEjNQmHfUuefYszpNxUVn4KYkXijcTBO9g= + + optional + + + ico_bottom_sheet_close@3x.png + + hash + + yVNgdkAJYpMw6jW6AiZlTOw3fFc= + + hash2 + + 69OsPuVnk8PyqcrNudLB+acOBw264J2dYNyK6EZPgew= + + + ico_bottom_sheet_list@3x.png + + hash + + Mlr+EMR2rp1sE0A7zYZzhhY82zI= + + hash2 + + 3qD577TqrEJgz3lGaJFLOyeMPpifFhzrZp+BeBX84a8= + + + ico_bottom_sheet_list_vt@3x.png + + hash + + bbZpWp6DETK2aHqAIu47C2C8eTI= + + hash2 + + hEef5j3wpoBfjK3Rw9n3zzS6ydTwKvrq6kMr//zyHPY= + + + ico_feed_comment_15@3x.png + + hash + + dj+qfX6TCong3+lfMCTrZ06xyyY= + + hash2 + + ayBXWMPPrxNIO+Z28L+4SUme5ua7vTCSID0v/69o4fI= + + + ico_listbox_arrow@3x.png + + hash + + TePPW3pwvHcsizhVAMoFBiXN2yM= + + hash2 + + B06MuJkUQ7VfO6Elz67jNypd412YeKYis0xrx5aM/lY= + + + ico_outside_close@3x.png + + hash + + 25avXOn872H0J23UKf1MXa+2uGA= + + hash2 + + GdSL3QP1btM2BwERv/i9XVzHL14DU23fBtDHWhzt8W0= + + + ico_profile_block@3x.png + + hash + + Ege7Wcv05/7AjuCXxLoJL5eiKFg= + + hash2 + + p6YI/ans+QJwAQhUJmC/xqN+WfP4E9FHuUXFsB++U/w= + + + ico_title_arrow@3x.png + + hash + + jFd+RY+XiyRGABQlluTP/xVHLMk= + + hash2 + + Q/XrxQjy1VpmIS3UXUrW7t3YN6FvVrT8ayfEX4AOCS4= + + + icon_simple_buff@3x.png + + hash + + WTx6WWKVpLNqJbB7SnvaCIMp6GY= + + hash2 + + YtwHwhCesc7uG2ATxK7cJRxgKlRbTC9IOyuJXpxGfls= + + + invalid_name@3x.png + + hash + + skvfGrLdbeBGEgUfBpZ03JGmVfw= + + hash2 + + yYMNSTWDdtZ6Iz8m7z5Ko4mwUW+tDDsPOWWubymrUJE= + + + ko.lproj/Localizable.strings + + hash + + BE/wEIvWCx7zfzSQkOD970qnSzI= + + hash2 + + 0fGfUFpw2d8fMhcaLsLU8ZOyEoXOHbkDcAi6Odl6ibg= + + optional + + + main_load_3X_light.gif + + hash + + ti+XmdZy76h6LAtuRhvEQ0BtAXg= + + hash2 + + WeA3Xca6CvemFnzxXYYhx/NVnfn+n2XHuGsnKZUf3bk= + + + video_h_17@3x.png + + hash + + kvnUWh99zLSq5PbGGwlZVubie24= + + hash2 + + CXZdy4KPlJWbc5JtOJWHV9CV72FrOMcVPQfpmErEKj0= + + + + rules + + ^.* + + ^.*\.lproj/ + + optional + + weight + 1000 + + ^.*\.lproj/locversion.plist$ + + omit + + weight + 1100 + + ^Base\.lproj/ + + weight + 1010 + + ^version.plist$ + + + rules2 + + .*\.dSYM($|/) + + weight + 11 + + ^(.*/)?\.DS_Store$ + + omit + + weight + 2000 + + ^.* + + ^.*\.lproj/ + + optional + + weight + 1000 + + ^.*\.lproj/locversion.plist$ + + omit + + weight + 1100 + + ^Base\.lproj/ + + weight + 1010 + + ^Info\.plist$ + + omit + + weight + 20 + + ^PkgInfo$ + + omit + + weight + 20 + + ^embedded\.provisionprofile$ + + weight + 20 + + ^version\.plist$ + + weight + 20 + + + + diff --git a/Plugins/navergamesdk/platform/ios/NNGSDK.bundle/_CodeSignature/CodeSignature b/Plugins/navergamesdk/platform/ios/NNGSDK.bundle/_CodeSignature/CodeSignature new file mode 100644 index 0000000..136e19f Binary files /dev/null and b/Plugins/navergamesdk/platform/ios/NNGSDK.bundle/_CodeSignature/CodeSignature differ diff --git a/Plugins/navergamesdk/platform/ios/NNGSDK.bundle/btn_back@3x.png.meta b/Plugins/navergamesdk/platform/ios/NNGSDK.bundle/btn_back@3x.png.meta deleted file mode 100644 index daf56c1..0000000 --- a/Plugins/navergamesdk/platform/ios/NNGSDK.bundle/btn_back@3x.png.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: 47cd5c82d833d4a13b0fab114a5fe6db -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Plugins/navergamesdk/platform/ios/NNGSDK.bundle/btn_img_delete@3x.png b/Plugins/navergamesdk/platform/ios/NNGSDK.bundle/btn_img_delete@3x.png new file mode 100644 index 0000000..f0445f0 Binary files /dev/null and b/Plugins/navergamesdk/platform/ios/NNGSDK.bundle/btn_img_delete@3x.png differ diff --git a/Plugins/navergamesdk/platform/ios/NNGSDK.bundle/btn_photo@3x.png b/Plugins/navergamesdk/platform/ios/NNGSDK.bundle/btn_photo@3x.png new file mode 100644 index 0000000..967c9f3 Binary files /dev/null and b/Plugins/navergamesdk/platform/ios/NNGSDK.bundle/btn_photo@3x.png differ diff --git a/Plugins/navergamesdk/platform/ios/NNGSDK.bundle/btn_white@3x.png b/Plugins/navergamesdk/platform/ios/NNGSDK.bundle/btn_white@3x.png new file mode 100644 index 0000000..53c537f Binary files /dev/null and b/Plugins/navergamesdk/platform/ios/NNGSDK.bundle/btn_white@3x.png differ diff --git a/Plugins/navergamesdk/platform/ios/NNGSDK.bundle/btn_write_default@3x.png b/Plugins/navergamesdk/platform/ios/NNGSDK.bundle/btn_write_default@3x.png new file mode 100644 index 0000000..80d12d5 Binary files /dev/null and b/Plugins/navergamesdk/platform/ios/NNGSDK.bundle/btn_write_default@3x.png differ diff --git a/Plugins/navergamesdk/platform/ios/NNGSDK.bundle/btn_write_pressed@3x.png b/Plugins/navergamesdk/platform/ios/NNGSDK.bundle/btn_write_pressed@3x.png new file mode 100644 index 0000000..b2dc1c0 Binary files /dev/null and b/Plugins/navergamesdk/platform/ios/NNGSDK.bundle/btn_write_pressed@3x.png differ diff --git a/Plugins/navergamesdk/platform/ios/NNGSDK.bundle/en.lproj.meta b/Plugins/navergamesdk/platform/ios/NNGSDK.bundle/en.lproj.meta deleted file mode 100644 index 7d89eeb..0000000 --- a/Plugins/navergamesdk/platform/ios/NNGSDK.bundle/en.lproj.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: a49a723d32a654583903b4ff59d4eb05 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Plugins/navergamesdk/platform/ios/NNGSDK.bundle/en.lproj/Localizable.strings b/Plugins/navergamesdk/platform/ios/NNGSDK.bundle/en.lproj/Localizable.strings index d828086..ab7c11d 100644 Binary files a/Plugins/navergamesdk/platform/ios/NNGSDK.bundle/en.lproj/Localizable.strings and b/Plugins/navergamesdk/platform/ios/NNGSDK.bundle/en.lproj/Localizable.strings differ diff --git a/Plugins/navergamesdk/platform/ios/NNGSDK.bundle/en.lproj/Localizable.strings.meta b/Plugins/navergamesdk/platform/ios/NNGSDK.bundle/en.lproj/Localizable.strings.meta deleted file mode 100644 index dfa0244..0000000 --- a/Plugins/navergamesdk/platform/ios/NNGSDK.bundle/en.lproj/Localizable.strings.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: 1e015c69d5fc94fe8a3a2f2e734e5288 -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Plugins/navergamesdk/platform/ios/NNGSDK.bundle/ico_bottom_sheet_close@3x.png b/Plugins/navergamesdk/platform/ios/NNGSDK.bundle/ico_bottom_sheet_close@3x.png new file mode 100644 index 0000000..629b097 Binary files /dev/null and b/Plugins/navergamesdk/platform/ios/NNGSDK.bundle/ico_bottom_sheet_close@3x.png differ diff --git a/Plugins/navergamesdk/platform/ios/NNGSDK.bundle/ico_bottom_sheet_list@3x.png b/Plugins/navergamesdk/platform/ios/NNGSDK.bundle/ico_bottom_sheet_list@3x.png new file mode 100644 index 0000000..cccf748 Binary files /dev/null and b/Plugins/navergamesdk/platform/ios/NNGSDK.bundle/ico_bottom_sheet_list@3x.png differ diff --git a/Plugins/navergamesdk/platform/ios/NNGSDK.bundle/ico_bottom_sheet_list_vt@3x.png b/Plugins/navergamesdk/platform/ios/NNGSDK.bundle/ico_bottom_sheet_list_vt@3x.png new file mode 100644 index 0000000..fbce512 Binary files /dev/null and b/Plugins/navergamesdk/platform/ios/NNGSDK.bundle/ico_bottom_sheet_list_vt@3x.png differ diff --git a/Plugins/navergamesdk/platform/ios/NNGSDK.bundle/ico_feed_comment_15@3x.png.meta b/Plugins/navergamesdk/platform/ios/NNGSDK.bundle/ico_feed_comment_15@3x.png.meta deleted file mode 100644 index 0257b34..0000000 --- a/Plugins/navergamesdk/platform/ios/NNGSDK.bundle/ico_feed_comment_15@3x.png.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: 6a769da03099545d6b27cc2e54f8a792 -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Plugins/navergamesdk/platform/ios/NNGSDK.bundle/ico_listbox_arrow@3x.png b/Plugins/navergamesdk/platform/ios/NNGSDK.bundle/ico_listbox_arrow@3x.png new file mode 100644 index 0000000..8c60ce3 Binary files /dev/null and b/Plugins/navergamesdk/platform/ios/NNGSDK.bundle/ico_listbox_arrow@3x.png differ diff --git a/Plugins/navergamesdk/platform/ios/NNGSDK.bundle/ico_outside_close@3x.png.meta b/Plugins/navergamesdk/platform/ios/NNGSDK.bundle/ico_outside_close@3x.png.meta deleted file mode 100644 index c31b056..0000000 --- a/Plugins/navergamesdk/platform/ios/NNGSDK.bundle/ico_outside_close@3x.png.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: 679cbb4cf623d4c7d860b7a39ab2dcd9 -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Plugins/navergamesdk/platform/ios/NNGSDK.bundle/ico_profile_block@3x.png b/Plugins/navergamesdk/platform/ios/NNGSDK.bundle/ico_profile_block@3x.png new file mode 100644 index 0000000..c3fea60 Binary files /dev/null and b/Plugins/navergamesdk/platform/ios/NNGSDK.bundle/ico_profile_block@3x.png differ diff --git a/Plugins/navergamesdk/platform/ios/NNGSDK.bundle/ico_title_arrow@3x.png b/Plugins/navergamesdk/platform/ios/NNGSDK.bundle/ico_title_arrow@3x.png new file mode 100644 index 0000000..2e377d3 Binary files /dev/null and b/Plugins/navergamesdk/platform/ios/NNGSDK.bundle/ico_title_arrow@3x.png differ diff --git a/Plugins/navergamesdk/platform/ios/NNGSDK.bundle/icon_simple_buff@3x.png.meta b/Plugins/navergamesdk/platform/ios/NNGSDK.bundle/icon_simple_buff@3x.png.meta deleted file mode 100644 index 43fff56..0000000 --- a/Plugins/navergamesdk/platform/ios/NNGSDK.bundle/icon_simple_buff@3x.png.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: 30747508bab4c4c42a305410ddc0568d -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Plugins/navergamesdk/platform/ios/NNGSDK.bundle/invalid_name@3x.png.meta b/Plugins/navergamesdk/platform/ios/NNGSDK.bundle/invalid_name@3x.png.meta deleted file mode 100644 index 24b7d40..0000000 --- a/Plugins/navergamesdk/platform/ios/NNGSDK.bundle/invalid_name@3x.png.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: bbddb1bbb3e1c4dc6acb03e1da97af27 -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Plugins/navergamesdk/platform/ios/NNGSDK.bundle/ko.lproj.meta b/Plugins/navergamesdk/platform/ios/NNGSDK.bundle/ko.lproj.meta deleted file mode 100644 index 92992de..0000000 --- a/Plugins/navergamesdk/platform/ios/NNGSDK.bundle/ko.lproj.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 99e847dea22ea41848b4de552954b5bc -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Plugins/navergamesdk/platform/ios/NNGSDK.bundle/ko.lproj/Localizable.strings b/Plugins/navergamesdk/platform/ios/NNGSDK.bundle/ko.lproj/Localizable.strings index 9ecac69..14e5a21 100644 Binary files a/Plugins/navergamesdk/platform/ios/NNGSDK.bundle/ko.lproj/Localizable.strings and b/Plugins/navergamesdk/platform/ios/NNGSDK.bundle/ko.lproj/Localizable.strings differ diff --git a/Plugins/navergamesdk/platform/ios/NNGSDK.bundle/ko.lproj/Localizable.strings.meta b/Plugins/navergamesdk/platform/ios/NNGSDK.bundle/ko.lproj/Localizable.strings.meta deleted file mode 100644 index 89b5d6e..0000000 --- a/Plugins/navergamesdk/platform/ios/NNGSDK.bundle/ko.lproj/Localizable.strings.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: 1b623226d1efd48a286a27ba5310986f -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Plugins/navergamesdk/platform/ios/NNGSDK.bundle/main_load_3X_light.gif.meta b/Plugins/navergamesdk/platform/ios/NNGSDK.bundle/main_load_3X_light.gif.meta deleted file mode 100644 index 44012ae..0000000 --- a/Plugins/navergamesdk/platform/ios/NNGSDK.bundle/main_load_3X_light.gif.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: dc5269833c21b47b483455527906e668 -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Plugins/navergamesdk/platform/ios/NNGSDK.bundle/video_h_17@3x.png.meta b/Plugins/navergamesdk/platform/ios/NNGSDK.bundle/video_h_17@3x.png.meta deleted file mode 100644 index c9a2427..0000000 --- a/Plugins/navergamesdk/platform/ios/NNGSDK.bundle/video_h_17@3x.png.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: 78af6083c34b1498e8d0f0a4b8457827 -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Plugins/navergamesdk/platform/ios/NNGSDK.framework/Headers.meta b/Plugins/navergamesdk/platform/ios/NNGSDK.framework/Headers.meta deleted file mode 100644 index 0f38966..0000000 --- a/Plugins/navergamesdk/platform/ios/NNGSDK.framework/Headers.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: e6005ea7c683e481a875dcaf81c6b9f4 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Plugins/navergamesdk/platform/ios/NNGSDK.framework/NNGSDK.meta b/Plugins/navergamesdk/platform/ios/NNGSDK.framework/NNGSDK.meta deleted file mode 100644 index dd3eafe..0000000 --- a/Plugins/navergamesdk/platform/ios/NNGSDK.framework/NNGSDK.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: 845d2cea1b9ea4578a5aee98c327233f -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Plugins/navergamesdk/platform/ios/NNGSDK.framework/Versions.meta b/Plugins/navergamesdk/platform/ios/NNGSDK.framework/Versions.meta deleted file mode 100644 index 7a9438e..0000000 --- a/Plugins/navergamesdk/platform/ios/NNGSDK.framework/Versions.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: c7b9cd72ecc7e4fb4a514c63affe40cf -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Plugins/navergamesdk/platform/ios/NNGSDK.framework/Versions/A.meta b/Plugins/navergamesdk/platform/ios/NNGSDK.framework/Versions/A.meta deleted file mode 100644 index b2b0a8a..0000000 --- a/Plugins/navergamesdk/platform/ios/NNGSDK.framework/Versions/A.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: c74b2007176fc4b0d8a125f6338b9c65 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Plugins/navergamesdk/platform/ios/NNGSDK.framework/Versions/A/Headers.meta b/Plugins/navergamesdk/platform/ios/NNGSDK.framework/Versions/A/Headers.meta deleted file mode 100644 index 80aa4ca..0000000 --- a/Plugins/navergamesdk/platform/ios/NNGSDK.framework/Versions/A/Headers.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 47bae9210c6a145da998fda4514e568b -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Plugins/navergamesdk/platform/ios/NNGSDK.framework/Versions/A/Headers/NNGSDKManager.h b/Plugins/navergamesdk/platform/ios/NNGSDK.framework/Versions/A/Headers/NNGSDKManager.h index 148cc99..a04b3e7 100644 --- a/Plugins/navergamesdk/platform/ios/NNGSDK.framework/Versions/A/Headers/NNGSDKManager.h +++ b/Plugins/navergamesdk/platform/ios/NNGSDK.framework/Versions/A/Headers/NNGSDKManager.h @@ -10,56 +10,133 @@ @protocol NNGSDKDelegate; -@class UIViewController; +@class UIViewController, UIImage; @interface NNGSDKManager : NSObject -// The singleton instance of SDK manager. +/** + * The singleton instance of SDK manager. + */ @property (class, nonatomic, readonly) NNGSDKManager *shared; -// Your client ID. +/** + * Your client ID. + */ @property (strong, nonatomic, readonly) NSString *clientId; -// Your client Secret. +/** + * Your client Secret. + */ @property (strong, nonatomic, readonly) NSString *clientSecret; -// Your lounge ID. +/** + * Your lounge ID. + */ @property (strong, nonatomic, readonly) NSString *loungeId; -// The ISO_3166-1 alpha-2 country code of each device. +/** + * The ISO_3166-1 alpha-2 country code of each device. + */ @property (strong, nonatomic, readonly) NSString *countryCode; -// The version of the SDK. +/** + * The version of the SDK. + */ @property (strong, nonatomic, readonly) NSString *version; -// Your App Scheme. +/** + * Your App Scheme. It is set automatically. + */ @property (strong, nonatomic) NSString *appScheme; -// The delegate for SDK manager. +/** + * The flag which determines whether the shortcut to write feed is presented after capturing screen or not. YES as default. + */ +@property (assign, nonatomic) BOOL canWriteFeedByScreenshot; + +/** + * The delegate for SDK manager. + */ @property (weak, nonatomic) id delegate; -// Set client ID, client secret, and lounge ID for SDK. + +/** + * Set client ID, client secret, and lounge ID for SDK. + * + * @param clientId Client ID. (Required) + * @param clientSecret Client secret. (Required) + * @param loungeId Lounge ID. (Required) + */ - (void)setClientId:(NSString *)clientId clientSecret:(NSString *)clientSecret loungeId:(NSString *)loungeId; -// Set the root view and the delegate for SDK. +/** + * Set the root view for SDK. + * + * @param parent Parent view controller for SDK views. (Required) + */ - (void)setParentViewController:(UIViewController *)parent; -// Present the banner list. +/** + * Register the game ID of current member. + * + * @param memberGameId Game ID of current member. (Required) + */ +- (void)registerMemberGameId:(NSString *)memberGameId; + +/** + * Present banners. + */ - (void)presentBannerViewController; -// Present a notice while your game is not on service. +/** + * Present a notice while your game is not on service. + */ - (void)presentSorryViewController; -// Present the list of feeds identified by a predefined board ID which represents a board. +/** + * Present the a board. + * + * @param boardId Board ID. You can find it in the webpage URL of a board of the form https://game.naver.com/lounge/{loungeId}/board/{boardId}. If it is null or 0, the board of all feed will present. (Optional) + */ - (void)presentBoardViewControllerWith:(NSNumber *)boardId; -// Present the feed identified by a feed ID. +/** + * Present a feed. + * + * @param feedId Feed ID. You can find it in the webpage URL of a feed of the form https://game.naver.com/lounge/{loungeId}/board/detail/{feedId}. (Required) + * @param scheduled Flag which determines whether the feed to present is scheduled of not. (Required) + */ - (void)presentFeedViewControllerWith:(NSNumber *)feedId scheduled:(BOOL)scheduled; -// Dismiss all SDK-related views. +/** + * Present the feed writing view. + * Every parameter is just predefined value for feed writing view to present, so each one is optional. + * + * @param boardId Predefined board ID of the board to contain new feed. You can find it in the webpage URL of a board of the form https://game.naver.com/lounge/{loungeId}/board/{boardId}. (Optional) + * @param title Predefined title of new feed. (Optional) + * @param text Predefined text content of new feed. (Optional) + * @param imageFilePath File path for predefined attached image of new feed. Only 1 image can be attached on feed written by using SDK. (Optional) + */ +- (void)presentFeedWritingWithBoardId:(NSNumber *)boardId title:(NSString *)title text:(NSString *)text imageFilePath:(NSString *)imageFilePath; + +/** + * Dismiss all SDK-related views. + */ - (void)dismiss; +/** + * Logout + */ +- (void)logout; + +/** + * Handle callback urls for the Naver login. + * + * @param url Callback URL from Naver login service. + */ +- (BOOL)handleCallbackUrl:(NSURL *)url; + @end @@ -67,13 +144,19 @@ @optional -// The delegate method called when SDK starts. +/** + * The delegate method called when SDK starts. + */ - (void)nngSDKDidLoad; -// The delegate method called when SDK ends. +/** + * The delegate method called when SDK ends. + */ - (void)nngSDKDidUnload; -// The delegate method called when a predefined in-game board code is received. +/** + * The delegate method called when a predefined in-game board code is received. + */ - (void)nngSDKDidReceiveInGameMenuCode:(NSString *)inGameMenuCode; @end diff --git a/Plugins/navergamesdk/platform/ios/NNGSDK.framework/Versions/A/Headers/NNGSDKManager.h.meta b/Plugins/navergamesdk/platform/ios/NNGSDK.framework/Versions/A/Headers/NNGSDKManager.h.meta deleted file mode 100644 index 9018bf7..0000000 --- a/Plugins/navergamesdk/platform/ios/NNGSDK.framework/Versions/A/Headers/NNGSDKManager.h.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: 41211f904ed124b59a815fe4975b99ff -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Plugins/navergamesdk/platform/ios/NNGSDK.framework/Versions/A/NNGSDK b/Plugins/navergamesdk/platform/ios/NNGSDK.framework/Versions/A/NNGSDK index 06af810..a7ab6e1 100644 Binary files a/Plugins/navergamesdk/platform/ios/NNGSDK.framework/Versions/A/NNGSDK and b/Plugins/navergamesdk/platform/ios/NNGSDK.framework/Versions/A/NNGSDK differ diff --git a/Plugins/navergamesdk/platform/ios/NNGSDK.framework/Versions/A/NNGSDK.meta b/Plugins/navergamesdk/platform/ios/NNGSDK.framework/Versions/A/NNGSDK.meta deleted file mode 100644 index 91ad750..0000000 --- a/Plugins/navergamesdk/platform/ios/NNGSDK.framework/Versions/A/NNGSDK.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: be22d185edf1546c5b695fe80b0e78dc -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Plugins/navergamesdk/platform/ios/NNGSDK.framework/Versions/Current.meta b/Plugins/navergamesdk/platform/ios/NNGSDK.framework/Versions/Current.meta deleted file mode 100644 index 38379a0..0000000 --- a/Plugins/navergamesdk/platform/ios/NNGSDK.framework/Versions/Current.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 8af8a179edebe45b3811bc412c19ff2b -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Plugins/navergamesdk/platform/ios/NaverGameSDK.mm b/Plugins/navergamesdk/platform/ios/NaverGameSDK.mm index 8872c0a..7fa8306 100644 --- a/Plugins/navergamesdk/platform/ios/NaverGameSDK.mm +++ b/Plugins/navergamesdk/platform/ios/NaverGameSDK.mm @@ -33,18 +33,15 @@ @interface NaverGameSDKDelegateProxy: NSObject void setParentViewController() { UIWindow *window = UIApplication.sharedApplication.keyWindow; [NNGSDKManager.shared setParentViewController:window.rootViewController]; - NNGSDKManager.shared.delegate = delegate; + NNGSDKManager.shared.delegate = [[NaverGameSDKDelegateProxy alloc] init]; } // Set client ID, client secret, and lounge ID for SDK void NaverGameSDK::init(std::string clientId, std::string clientSecret, std::string loungeId) { - delegate = [[NaverGameSDKDelegateProxy alloc] init]; - NSString *cId = [NSString stringWithUTF8String:clientId.c_str()]; NSString *cSec = [NSString stringWithUTF8String:clientSecret.c_str()]; NSString *lId = [NSString stringWithUTF8String:loungeId.c_str()]; - [NNGSDKManager.shared setClientId:cId clientSecret:cSec loungeId:lId]; } @@ -61,6 +58,24 @@ void setParentViewController() { } +// The version of the SDK. +char* NaverGameSDK::getVersion() { + return (char *)NNGSDKManager.shared.version.UTF8String; +} + + +// Set the flag which determines whether the shortcut to write feed is presented after capturing screen or not. YES as default. +void NaverGameSDK::setCanWriteFeedByScreenshot(bool canWriteFeedByScreenshot) { + NNGSDKManager.shared.canWriteFeedByScreenshot = canWriteFeedByScreenshot; +} + + +// Set the game ID of current member. +void NaverGameSDK::setGameId(std::string gameId) { + [NNGSDKManager.shared registerMemberGameId:[NSString stringWithUTF8String:gameId.c_str()]]; +} + + // Present the banner list. void NaverGameSDK::startHomeBanner() { setParentViewController(); @@ -89,11 +104,25 @@ void setParentViewController() { } +// Present the feed writing view. Every parameter is just predefined value for feed writing view to present, so each one is optional. +void NaverGameSDK::startFeedWriting(int boardId, std::string title, std::string text, std::string imageFilePath) { + NSString *ttl = [NSString stringWithUTF8String:title.c_str()]; + NSString *txt = [NSString stringWithUTF8String:text.c_str()]; + NSString *ifp = [NSString stringWithUTF8String:imageFilePath.c_str()]; + [NNGSDKManager.shared presentFeedWritingWithBoardId:@(boardId) title:ttl text:txt imageFilePath:ifp]; +} + + // Dismiss all SDK-related views. void NaverGameSDK::stopSdk() { [NNGSDKManager.shared dismiss]; } +// Logout for Naver ID. +void NaverGameSDK::naverLogout() { + [NNGSDKManager.shared logout]; +} + } /* namespace nng */ diff --git a/Plugins/navergamesdk/platform/ios/NaverLogin.framework/Headers/NaverThirdPartyConstantsForApp.h b/Plugins/navergamesdk/platform/ios/NaverLogin.framework/Headers/NaverThirdPartyConstantsForApp.h new file mode 100644 index 0000000..f5512b5 --- /dev/null +++ b/Plugins/navergamesdk/platform/ios/NaverLogin.framework/Headers/NaverThirdPartyConstantsForApp.h @@ -0,0 +1,39 @@ +// +// NaverThirdPartyConstantsForApp.h +// NaverOAuthSample +// +// Created by min sujin on 12. 3. 28.. +// Modified by TY Kim on 14. 8. 20.. +// Copyright 2014 Naver Corp. All rights reserved. +// + +#define kCheckResultPage @"thirdPartyLoginResult" +#define kThirdParty_IS_IPAD ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPad) + +typedef enum { + SUCCESS = 0, + PARAMETERNOTSET = 1, + CANCELBYUSER = 2, + NAVERAPPNOTINSTALLED = 3 , + NAVERAPPVERSIONINVALID = 4, + OAUTHMETHODNOTSET = 5, + INVALIDREQUEST = 6, + CLIENTNETWORKPROBLEM = 7, + UNAUTHORIZEDCLIENT = 8, + UNSUPPORTEDRESPONSETYPE = 9, + NETWORKERROR = 10, + UNKNOWNERROR = 11 +} THIRDPARTYLOGIN_RECEIVE_TYPE; + +typedef enum { + NEED_INIT = 0, + NEED_LOGIN, + NEED_REFRESH_ACCESS_TOKEN, + OK +} OAuthLoginState; + +#define kServiceAppUrlScheme @"thirdparty20samplegame" + +#define kConsumerKey @"jyvqXeaVOVmV" +#define kConsumerSecret @"527300A0_COq1_XV33cf" +#define kServiceAppName @"네이버 아이디로 로그인" diff --git a/Plugins/navergamesdk/platform/ios/NaverLogin.framework/Headers/NaverThirdPartyLoginConnection.h b/Plugins/navergamesdk/platform/ios/NaverLogin.framework/Headers/NaverThirdPartyLoginConnection.h new file mode 100644 index 0000000..d144caa --- /dev/null +++ b/Plugins/navergamesdk/platform/ios/NaverLogin.framework/Headers/NaverThirdPartyLoginConnection.h @@ -0,0 +1,69 @@ +// +// NaverThirdPartyLoginConnection.h +// NaverOAuthSample +// +// Created by TY Kim on 2014. 2. 3.. +// Copyright 2014 Naver Corp. All rights reserved. +// + +#import +#import +#import "NaverThirdPartyConstantsForApp.h" + +@protocol NaverThirdPartyLoginConnectionDelegate; +@interface NaverThirdPartyLoginConnection : NSObject +@property (nonatomic, weak) id delegate; + +@property (nonatomic) BOOL isNaverAppOauthEnable; +@property (nonatomic) BOOL isInAppOauthEnable; + +@property (nonatomic, strong) NSString *consumerKey; +@property (nonatomic, strong) NSString *consumerSecret; +@property (nonatomic, strong) NSString *appName; +@property (nonatomic, strong) NSString *serviceUrlScheme; + +@property (nonatomic, strong) NSString *accessToken; +@property (nonatomic, strong) NSDate *accessTokenExpireDate; +@property (nonatomic, strong) NSString *refreshToken; +@property (nonatomic, strong) NSString *tokenType; + ++ (NaverThirdPartyLoginConnection *)getSharedInstance; + +- (NSString *)getVersion; + +- (OAuthLoginState)state; + +- (void)requestThirdPartyLogin; +- (void)requestAccessTokenWithRefreshToken; +- (void)requestDeleteToken; + +- (BOOL)isValidAccessTokenExpireTimeNow; + +- (THIRDPARTYLOGIN_RECEIVE_TYPE)receiveAccessToken:(NSURL *)url; +- (void)resetToken; + +- (void)setOnlyPortraitSupportInIphone:(BOOL)flag; + +- (BOOL)isOnlyPortraitSupportedInIphone; + +- (NSString *)userAgentForThirdPartyLogin; + +- (void)removeNaverLoginCookie; + +- (BOOL)isPossibleToOpenNaverApp; +- (void)openAppStoreForNaverApp; + ++ (CGSize)sizeWithText:(NSString *)originText withFont:(UIFont *)textFont; + +@end + +@protocol NaverThirdPartyLoginConnectionDelegate +- (void)oauth20ConnectionDidFinishRequestACTokenWithAuthCode; +- (void)oauth20ConnectionDidFinishRequestACTokenWithRefreshToken; +- (void)oauth20ConnectionDidFinishDeleteToken; +- (void)oauth20Connection:(NaverThirdPartyLoginConnection *)oauthConnection didFailWithError:(NSError *)error; +@optional +- (void)oauth20Connection:(NaverThirdPartyLoginConnection *)oauthConnection didFailAuthorizationWithRecieveType:(THIRDPARTYLOGIN_RECEIVE_TYPE)recieveType; +- (void)oauth20Connection:(NaverThirdPartyLoginConnection *)oauthConnection didFinishAuthorizationWithResult:(THIRDPARTYLOGIN_RECEIVE_TYPE)recieveType; +@end + diff --git a/Plugins/navergamesdk/platform/ios/NaverLogin.framework/NaverLogin b/Plugins/navergamesdk/platform/ios/NaverLogin.framework/NaverLogin new file mode 100644 index 0000000..c6c356b Binary files /dev/null and b/Plugins/navergamesdk/platform/ios/NaverLogin.framework/NaverLogin differ diff --git a/sample/.idea/workspace.xml b/sample/.idea/workspace.xml index 90430d6..56d22a8 100644 --- a/sample/.idea/workspace.xml +++ b/sample/.idea/workspace.xml @@ -1,13 +1,31 @@ + + - + + + + + + + + + + + + + + +