Quellcode durchsuchen

카카오 로그인 기본 설정 작업

goodboy vor 6 Jahren
Ursprung
Commit
444efaf028
3 geänderte Dateien mit 51 neuen und 3 gelöschten Zeilen
  1. 2 2
      ios/emptyApp.xcodeproj/project.pbxproj
  2. 26 0
      ios/emptyApp/AppDelegate.m
  3. 23 1
      ios/emptyApp/Info.plist

+ 2 - 2
ios/emptyApp.xcodeproj/project.pbxproj

@@ -785,7 +785,7 @@
 					"-ObjC",
 					"-lc++",
 				);
-				PRODUCT_BUNDLE_IDENTIFIER = kr.co.plusonnet.empty;
+				PRODUCT_BUNDLE_IDENTIFIER = org.seonsujoa.emptyapp;
 				PRODUCT_NAME = emptyapp;
 				VERSIONING_SYSTEM = "apple-generic";
 			};
@@ -804,7 +804,7 @@
 					"-ObjC",
 					"-lc++",
 				);
-				PRODUCT_BUNDLE_IDENTIFIER = kr.co.plusonnet.empty;
+				PRODUCT_BUNDLE_IDENTIFIER = org.seonsujoa.emptyapp;
 				PRODUCT_NAME = emptyapp;
 				VERSIONING_SYSTEM = "apple-generic";
 			};

+ 26 - 0
ios/emptyApp/AppDelegate.m

@@ -10,6 +10,7 @@
 #import <React/RCTBridge.h>
 #import <React/RCTBundleURLProvider.h>
 #import <React/RCTRootView.h>
+#import <KakaoOpenSDK/KakaoOpenSDK.h>
 
 @implementation AppDelegate
 
@@ -28,6 +29,31 @@
   self.window.rootViewController = rootViewController;
   [self.window makeKeyAndVisible];
   return YES;
+
+}
+
+- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url
+                                      sourceApplication:(NSString *)sourceApplication
+                                              annotation:(id)annotation {
+    if ([KOSession isKakaoAccountLoginCallback:url]) {
+        return [KOSession handleOpenURL:url];
+    }
+
+    return false;
+}
+
+- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url
+                                                options:(NSDictionary<NSString *,id> *)options {
+    if ([KOSession isKakaoAccountLoginCallback:url]) {
+        return [KOSession handleOpenURL:url];
+    }
+
+    return false;
+}
+
+- (void)applicationDidBecomeActive:(UIApplication *)application
+{
+    [KOSession handleDidBecomeActive];
 }
 
 - (NSURL *)sourceURLForBridge:(RCTBridge *)bridge

+ 23 - 1
ios/emptyApp/Info.plist

@@ -5,7 +5,7 @@
 	<key>CFBundleDevelopmentRegion</key>
 	<string>en</string>
 	<key>CFBundleDisplayName</key>
-	<string>emptyApp</string>
+	<string>emptyapp</string>
 	<key>CFBundleExecutable</key>
 	<string>$(EXECUTABLE_NAME)</string>
 	<key>CFBundleIdentifier</key>
@@ -20,8 +20,30 @@
 	<string>1.0</string>
 	<key>CFBundleSignature</key>
 	<string>????</string>
+	<key>CFBundleURLTypes</key>
+	<array>
+		<dict>
+			<key>CFBundleTypeRole</key>
+			<string>Editor</string>
+			<key>CFBundleURLSchemes</key>
+			<array>
+				<string>kakao0318752c8f3bb6903f850d59b7bb500b</string>
+			</array>
+		</dict>
+	</array>
 	<key>CFBundleVersion</key>
 	<string>1</string>
+	<key>KAKAO_APP_KEY</key>
+	<string>0318752c8f3bb6903f850d59b7bb500b</string>
+	<key>LSApplicationQueriesSchemes</key>
+	<array>
+		<string>kakao0318752c8f3bb6903f850d59b7bb500b</string>
+		<string>kakaokompassauth</string>
+		<string>storykompassauth</string>
+		<string>kakaolink</string>
+		<string>kakaotalk-5.9.7</string>
+		<string>storylink</string>
+	</array>
 	<key>LSRequiresIPhoneOS</key>
 	<true/>
 	<key>NSAppTransportSecurity</key>