본문 바로가기메인 메뉴 바로가기사이드 메뉴 바로가기

kakao developers

Related sites
  • Docs
  • iOS
  • Migrate v1 to v2

사이드 메뉴

Kakao Map

Search

iOS

Migrate v1 to v2

This document guides information to upgrade Kakao SDK for iOS("iOS SDK") from v1(lower version of 2.0.0) to v2(version 2.0.0 or higher).

Initialization

The Legacy iOS SDK requires configuring a project and importing the SDK to call APIs. On the other hand, the latest iOS SDK requires explicit initialization before calling an API.

Notice when using token-based APIs

The token-based APIs refer to the APIs that require Kakao Login, which provides an access token.

With the Legacy iOS SDK, use KOSessionTask to call an API that passes an access token issued through Kakao Login. When using the Legacy iOS SDK, the session changes according to a user's login status, and some APIs can be called only when a session is open.

APIs in the latest iOS SDK are separated by modules. However, for the API that passes an access token through Kakao Login, the Kakao Login module and implementing the login feature is required along with the desired module.

Considering the structural difference, check if the desired module is dependent on Kakao Login. For the token-based APIs that require Kakao Login, the development guide for each API describes the required modules and whether to implement Kakao Login.

API comparison by version

Common

  • Latest SDK: Call the initSDK() method that initializes the SDK through KakaoSDK.
NameLegacy SDKSDK
Initializing Kakao SDK-initSDK()
Name change

In iOS SDK 2.8.3, the class names, used for initialization, have been changed:

  • KakaoSDKCommon → KakaoSDK
  • RxKakaoSDKCommon → RxKakaoSDK

Kakao Login

  • Legacy SDK:
    • Call the Kakao Login APIs including the Getting consent to desired service terms API through KOSession.
    • Call the token-based APIs such as including the Retrieving shipping address and the Retrieving consent details for service terms APIs through KOSessionTask.
  • Latest SDK:
    • Call the Kakao Login APIs through UserApi in the KakaoSDKUser module.
    • Call the Checking token presence API through AuthApi in the KakaoSDKAuth module.
NameLegacy SDKSDK
Checking if Kakao Talk is installed-isKakaoTalkLoginAvailable()
Kakao LoginopenWithCompletionHandler-
Login with Kakao Talk-loginWithKakaoTalk()
Login with Kakao Account-loginWithKakaoAccount()
Checking token presenceisOpenhasToken()
LogoutlogoutAndCloseWithCompletionHandlerlogout()
UnlinkunlinkTaskWithCompletionHandlerunlink()
Retrieving token informationaccessTokenInfoTaskWithCompletionHandleraccessTokenInfo()
Retrieving user informationuserMeTaskWithCompletionme()
Retrieving shipping addressshippingAddressTaskshippingAddresses()
Storing user informationprofileUpdateTaskWithProperties:properties:updateProfile(properties:)
Requesting additional consentupdateScopes:needsAgreementScopes:loginWithKakaoTalk(scopes:)
loginWithKakaoAccount(scopes:)
Retrieving consent details for service termsserviceTermsTaskserviceTerms()
Getting consent to desired service termsopenloginWithKakaoTalk(serviceTerms:)
loginWithKakaoAccount(serviceTerms:)

Kakao Talk Social

  • Legacy SDK: Call the Kakao Talk Social APIs through KOSessionTask.
  • Latest SDK: Call the Kakao Talk Social APIs through TalkApi in the KakaoSDKTalk module.
NameLegacy SDKSDK
Retrieving Kakao Talk profiletalkProfileTaskWithCompletionHandlerprofile()
Retrieving list of friendsappFriendsWithContext:context:friends()

Message: Kakao Talk Share

  • Legacy SDK:
    • Call the Kakao Talk Share APIs through KLKTalkLinkCenter for Sending message API.
    • Call the Image API through KLKImageStorage.
    • If Kakao Talk is not installed on a user's device, a message is internally sent through a WebView.
  • Latest SDK:
    • Call the Kakao Talk Share APIs through ShareApi in the KakaoSDKShare module.
    • If Kakao Talk is not installed on a user's device, implement a process to share URI through a WebView or a default browser.
Note

In iOS SDK 2.11.0, the names of the module, classes, and methods related to Kakao Talk Share have been changed due to the change of its service name.

To see more detailed changes, see Version history.

NameLegacy SDKSDK
Checking if Kakao Talk is installed-isKakaoTalkSharingAvailable()
Sending with default templatesendDefaultWithTemplate:template:shareDefault(templatable:)
Sending with custom templatesendCustomWithTemplateId:templateId:templateArgs:shareCustom(templateId:templateArgs:)
Sending a scrap messagesendScrapWithURL: url:templateId:shareScrap(requestUrl:templateId:)
Uploading an imageuploadWithImage:sourceImage:imageUpload(image:)
Scraping an imagescrapWithImageURL:imageURL:imageScrap(imageUrl:)
Deleting an imagedeleteWithImageURL:imageURL:-

Message: Kakao Talk Message

  • Legacy SDK: Call the Kakao Talk APIs through KOSessionTask.
  • Latest SDK: Call the Kakao Talk APIs through TalkApi in the KakaoSDKTalk module.
NameLegacy SDKSDK
Sending me with default templatetalkMemoSendTaskWithTemplate:template:sendDefaultMemo(templatable:)
Sending me with custom templatetalkMemoSendTaskWithTemplateId:templateId:sendCustomMemo(templateId:)
Sending me a scrap messagetalkMemoSendTaskWithURL:url:templateId:sendScrapMemo(requestUrl:templateId:)
Sending friends with default templatesendMessageToFriendsWithTemplate:template:sendDefaultMessage(templatable:receiverUuids:)
Sending friends with custom templatesendMessageToFriendsTaskWithTemplateId:templateId:sendCustomMessage(templateId:receiverUuids:)
Sending friends a scrap messagesendMessageToFriendsTaskWithURL:url:templateId:sendScrapMessage(requestUrl:templateId:receiverUuids:)

Kakao Talk Channel

  • Legacy SDK:
    • Call the Adding Kakao Talk Channel and Kakao Talk Channel chat APIs through KPFPlusFriend.
    • Call the Checking Kakao Talk Channel relationship API through KOSessionTask.
  • Latest SDK:
    • Call the Kakao Talk Channel APIs through TalkApi in the KakaoSDKTalk module.
    • Call the Checking Kakao Talk Channel relationship API after implementing Kakao Login.
NameLegacy SDKSDK
Adding Kakao Talk ChanneladdFriend:plusFriendId:makeUrlForAddChannel(channelPublicId:)
Starting Kakao Talk Channel chatchat:plusFriendId:makeUrlForChannelChat(channelPublicId:)
Checking Kakao Talk Channel relationshiptalkPlusFriendsTaskchannels()

Kakao Navi

  • Legacy SDK:
    • Call the Navi APIs through KNVNaviLauncher.
    • Use a class builder to set parameters.
  • Latest SDK:
    • Call the Navi APIs through KakaoSDKNavi in the NaviApi module.
    • Define the constructor for each class to set parameters.
NameLegacy SDKSDK
NavigationnavigateWithParams:params:navigateUrl(destination:)
Sharing locationshareDestinationWithParams:params:shareUrl(destination:)
Setting conditions for navigationlocationWithNameNaviOption()
Setting conditions for destination informationparamsWithDestinationNaviLocation()
* webNavigateUrl(destination:): Web navigation service deprecated. See notice for details.

Push Notification

  • Legacy SDK: Call the Push Notification API through KOSessionTask.
  • Latest SDK: Not support Push Notification API. The push Notification is available using REST API.
NameLegacy SDKSDK
Register push tokenpushRegisterDeviceWithToken:deviceToken:-
Retrieve push tokenpushGetTokensTaskWithCompletionHandler-
Delete push tokenpushDeregisterDeviceWithToken:deviceToken:-

Was this helpful?