[Swift iOS] iOS에서 카카오로그인 구현하기 (feat.SNS로그인) (2편)

JB
Mar 23, 2021

--

카카오톡 로그인 1편에 이은 2편입니다~

1편 링크는 ↓ ↓ ↓

자 이제 카카오 로그인을 위한 외부 디펜던시 라이브러리를 설치해줍니다

pod 'KakaoSDKCommon'
pod 'KakaoSDKAuth'
pod 'KakaoSDKUser'

설치후에

import KakaoSDKCommon 
import KakaoSDKAuth
import KakaoSDKUser

를 각각 import 합니다.

앱에서 카카오톡을 실행시키기 위해 앱 실행 허용 목록(Allowlist)에 카카오톡을 등록했으니, 이제 서비스 앱으로 돌아올 때 쓰일 커스텀 스킴값을 설정해야해요.

AppDelegate 을 사용한다면,

iOS 13.0 버전이상이어서 SceneDelegate 를 사용한다면

을 사용해주세요
그리고 각각

AppDelegate

또는

SceneDelegate

KakaoSDKCommon.initSDK(appKey: "앱 네이티브 키")

설정을 해줍니다!

카카오 로그인 토큰 발행하기

유저정보 받아오기

와 같이 받아오면 됩니다

마무리 .gif 첨부하며 포스팅 마치겠습니다

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

--

--

JB
JB

Written by JB

iOS engineer @kakaobank

Responses (2)

Write a response