From bd74b7a7db67eca7c6b8a547078d3ec086f99389 Mon Sep 17 00:00:00 2001 From: Mystic Date: Wed, 30 Oct 2024 17:58:22 +0900 Subject: [PATCH] style(ios): objc formatting --- packages/channel/ios/RNCKakaoChannel.mm | 48 +++++++++---------------- packages/core/ios/RNCKakaoCore.mm | 5 ++- packages/navi/ios/RNCKakaoNavi.mm | 13 +++---- packages/share/ios/RNCKakaoShare.mm | 18 ++++------ packages/social/ios/RNCKakaoSocial.mm | 20 ++++------- packages/user/ios/RNCKakaoUser.mm | 48 ++++++++++--------------- 6 files changed, 55 insertions(+), 97 deletions(-) diff --git a/packages/channel/ios/RNCKakaoChannel.mm b/packages/channel/ios/RNCKakaoChannel.mm index 19f5dbf..20dbf8f 100644 --- a/packages/channel/ios/RNCKakaoChannel.mm +++ b/packages/channel/ios/RNCKakaoChannel.mm @@ -13,59 +13,43 @@ - (RNCKakaoChannelManager*)manager { RCT_EXPORT_MODULE() -RCT_EXPORT_METHOD(followChannel - : (NSString*)channelPublicId resolve - : (RCTPromiseResolveBlock)resolve reject - : (RCTPromiseRejectBlock)reject) { +RCT_EXPORT_METHOD(followChannel : (NSString*)channelPublicId resolve : (RCTPromiseResolveBlock) + resolve reject : (RCTPromiseRejectBlock)reject) { [[self manager] followChannel:channelPublicId resolve:resolve reject:reject]; } -RCT_EXPORT_METHOD(addChannel - : (NSString*)channelPublicId resolve - : (RCTPromiseResolveBlock)resolve reject - : (RCTPromiseRejectBlock)reject) { +RCT_EXPORT_METHOD(addChannel : (NSString*)channelPublicId resolve : (RCTPromiseResolveBlock) + resolve reject : (RCTPromiseRejectBlock)reject) { [[self manager] addChannel:channelPublicId resolve:resolve reject:reject]; } -RCT_EXPORT_METHOD(getAddChannelUrl - : (NSString*)channelPublicId resolve - : (RCTPromiseResolveBlock)resolve reject - : (RCTPromiseRejectBlock)reject) { +RCT_EXPORT_METHOD(getAddChannelUrl : (NSString*)channelPublicId resolve : (RCTPromiseResolveBlock) + resolve reject : (RCTPromiseRejectBlock)reject) { [[self manager] getAddChannelUrl:channelPublicId resolve:resolve reject:reject]; } -RCT_EXPORT_METHOD(openAddChannelUrl - : (NSString*)channelPublicId resolve - : (RCTPromiseResolveBlock)resolve reject - : (RCTPromiseRejectBlock)reject) { +RCT_EXPORT_METHOD(openAddChannelUrl : (NSString*)channelPublicId resolve : (RCTPromiseResolveBlock) + resolve reject : (RCTPromiseRejectBlock)reject) { [[self manager] openAddChannelUrl:channelPublicId resolve:resolve reject:reject]; } -RCT_EXPORT_METHOD(chatChannel - : (NSString*)channelPublicId resolve - : (RCTPromiseResolveBlock)resolve reject - : (RCTPromiseRejectBlock)reject) { +RCT_EXPORT_METHOD(chatChannel : (NSString*)channelPublicId resolve : (RCTPromiseResolveBlock) + resolve reject : (RCTPromiseRejectBlock)reject) { [[self manager] chatChannel:channelPublicId resolve:resolve reject:reject]; } -RCT_EXPORT_METHOD(getChatChannelUrl - : (NSString*)channelPublicId resolve - : (RCTPromiseResolveBlock)resolve reject - : (RCTPromiseRejectBlock)reject) { +RCT_EXPORT_METHOD(getChatChannelUrl : (NSString*)channelPublicId resolve : (RCTPromiseResolveBlock) + resolve reject : (RCTPromiseRejectBlock)reject) { [[self manager] getChatChannelUrl:channelPublicId resolve:resolve reject:reject]; } -RCT_EXPORT_METHOD(openChatChannelUrl - : (NSString*)channelPublicId resolve - : (RCTPromiseResolveBlock)resolve reject - : (RCTPromiseRejectBlock)reject) { +RCT_EXPORT_METHOD(openChatChannelUrl : (NSString*)channelPublicId resolve : (RCTPromiseResolveBlock) + resolve reject : (RCTPromiseRejectBlock)reject) { [[self manager] openChatChannelUrl:channelPublicId resolve:resolve reject:reject]; } -RCT_EXPORT_METHOD(channels - : (nullable NSArray*)channelPublicIds resolve - : (RCTPromiseResolveBlock)resolve reject - : (RCTPromiseRejectBlock)reject) { +RCT_EXPORT_METHOD(channels : (nullable NSArray*)channelPublicIds resolve : (RCTPromiseResolveBlock) + resolve reject : (RCTPromiseRejectBlock)reject) { [[self manager] channels:channelPublicIds resolve:resolve reject:reject]; } diff --git a/packages/core/ios/RNCKakaoCore.mm b/packages/core/ios/RNCKakaoCore.mm index 09b1967..5d138b4 100644 --- a/packages/core/ios/RNCKakaoCore.mm +++ b/packages/core/ios/RNCKakaoCore.mm @@ -17,9 +17,8 @@ - (RNCKakaoCoreManager*)manager { [[self manager] initializeKakaoSDK:appKey]; } -RCT_EXPORT_METHOD(getKeyHashAndroid - : (RCTPromiseResolveBlock)resolve reject - : (RCTPromiseRejectBlock)reject) { +RCT_EXPORT_METHOD(getKeyHashAndroid : (RCTPromiseResolveBlock) + resolve reject : (RCTPromiseRejectBlock)reject) { resolve(nil); } diff --git a/packages/navi/ios/RNCKakaoNavi.mm b/packages/navi/ios/RNCKakaoNavi.mm index 334e36c..d7f615f 100644 --- a/packages/navi/ios/RNCKakaoNavi.mm +++ b/packages/navi/ios/RNCKakaoNavi.mm @@ -12,14 +12,11 @@ - (RNCKakaoNaviManager*)manager { RCT_EXPORT_MODULE() -RCT_EXPORT_METHOD(navigateOrShareTo - : (NSDictionary*)destination option - : (NSDictionary*)option viaList - : (NSArray*)viaList openWebInstallUrlIfNaviAppNotAvailable - : (NSNumber*)openWebInstallUrlIfNaviAppNotAvailable isShare - : (NSNumber*)isShare resolve - : (RCTPromiseResolveBlock)resolve reject - : (RCTPromiseRejectBlock)reject) { +RCT_EXPORT_METHOD(navigateOrShareTo : (NSDictionary*)destination option : (NSDictionary*) + option viaList : (NSArray*)viaList openWebInstallUrlIfNaviAppNotAvailable : ( + NSNumber*)openWebInstallUrlIfNaviAppNotAvailable isShare : (NSNumber*) + isShare resolve : (RCTPromiseResolveBlock) + resolve reject : (RCTPromiseRejectBlock)reject) { [[self manager] navigateOrShareTo:destination option:option viaList:viaList diff --git a/packages/share/ios/RNCKakaoShare.mm b/packages/share/ios/RNCKakaoShare.mm index 5007491..f98d733 100644 --- a/packages/share/ios/RNCKakaoShare.mm +++ b/packages/share/ios/RNCKakaoShare.mm @@ -20,17 +20,13 @@ - (RNCKakaoShareManager*)manager { // RNC_KAKAO_SHARE_EXPORT_DEFAULT_TEMPLATE(shareTextTemplate, text) // RNC_KAKAO_SHARE_EXPORT_DEFAULT_TEMPLATE(shareCalendarTemplate, calendar) -RCT_EXPORT_METHOD(shareOrSendMeOrSendFriendOrWhatever - : (NSString*)sendType templateType - : (NSString*)templateType templateId - : (double)templateId templateJson - : (NSDictionary*)templateJson receiverUuids - : (NSArray*)receiverUuids useWebBrowserIfKakaoTalkNotAvailable - : (BOOL)useWebBrowserIfKakaoTalkNotAvailable templateArgs - : (NSDictionary*)templateArgs serverCallbackArgs - : (NSDictionary*)serverCallbackArgs resolve - : (RCTPromiseResolveBlock)resolve reject - : (RCTPromiseRejectBlock)reject) { +RCT_EXPORT_METHOD( + shareOrSendMeOrSendFriendOrWhatever : (NSString*)sendType templateType : (NSString*) + templateType templateId : (double)templateId templateJson : (NSDictionary*)templateJson + receiverUuids : (NSArray*)receiverUuids useWebBrowserIfKakaoTalkNotAvailable : (BOOL) + useWebBrowserIfKakaoTalkNotAvailable templateArgs : (NSDictionary*) + templateArgs serverCallbackArgs : (NSDictionary*)serverCallbackArgs resolve : ( + RCTPromiseResolveBlock)resolve reject : (RCTPromiseRejectBlock)reject) { [[self manager] shareOrSendMeOrSendFriendOrWhatever:sendType templateType:templateType templateId:templateId diff --git a/packages/social/ios/RNCKakaoSocial.mm b/packages/social/ios/RNCKakaoSocial.mm index 71d906b..9282fa4 100644 --- a/packages/social/ios/RNCKakaoSocial.mm +++ b/packages/social/ios/RNCKakaoSocial.mm @@ -14,25 +14,19 @@ - (RNCKakaoSocialManager*)manager { RCT_EXPORT_MODULE() -RCT_EXPORT_METHOD(getProfile - : (RCTPromiseResolveBlock)resolve reject - : (RCTPromiseRejectBlock)reject) { +RCT_EXPORT_METHOD(getProfile : (RCTPromiseResolveBlock)resolve reject : (RCTPromiseRejectBlock) + reject) { [[self manager] getProfile:resolve reject:reject]; } -RCT_EXPORT_METHOD(selectFriends - : (BOOL)multiple mode - : (NSString*)mode options - : (NSDictionary*)options resolve - : (RCTPromiseResolveBlock)resolve reject - : (RCTPromiseRejectBlock)reject) { +RCT_EXPORT_METHOD(selectFriends : (BOOL)multiple mode : (NSString*)mode options : (NSDictionary*) + options resolve : (RCTPromiseResolveBlock) + resolve reject : (RCTPromiseRejectBlock)reject) { [[self manager] selectFriends:multiple mode:mode options:options resolve:resolve reject:reject]; } -RCT_EXPORT_METHOD(getFriends - : (NSDictionary*)options resolve - : (RCTPromiseResolveBlock)resolve reject - : (RCTPromiseRejectBlock)reject) { +RCT_EXPORT_METHOD(getFriends : (NSDictionary*)options resolve : (RCTPromiseResolveBlock) + resolve reject : (RCTPromiseRejectBlock)reject) { [[self manager] getFriendsWithOptions:options resolve:resolve reject:reject]; } diff --git a/packages/user/ios/RNCKakaoUser.mm b/packages/user/ios/RNCKakaoUser.mm index fa80c5f..46e33d2 100644 --- a/packages/user/ios/RNCKakaoUser.mm +++ b/packages/user/ios/RNCKakaoUser.mm @@ -13,18 +13,14 @@ - (RNCKakaoUserManager*)manager { RCT_EXPORT_MODULE() -RCT_EXPORT_METHOD(isKakaoTalkLoginAvailable - : (RCTPromiseResolveBlock)resolve reject - : (RCTPromiseRejectBlock)reject) { +RCT_EXPORT_METHOD(isKakaoTalkLoginAvailable : (RCTPromiseResolveBlock) + resolve reject : (RCTPromiseRejectBlock)reject) { [[self manager] isKakaoTalkLoginAvailable:resolve reject:reject]; } -RCT_EXPORT_METHOD(login - : (NSArray*)serviceTerms prompts - : (NSArray*)prompts useKakaoAccountLogin - : (BOOL)useKakaoAccountLogin scopes - : (NSArray*)scopes resolve - : (RCTPromiseResolveBlock)resolve reject - : (RCTPromiseRejectBlock)reject) { +RCT_EXPORT_METHOD(login : (NSArray*)serviceTerms prompts : (NSArray*) + prompts useKakaoAccountLogin : (BOOL)useKakaoAccountLogin scopes : (NSArray*) + scopes resolve : (RCTPromiseResolveBlock) + resolve reject : (RCTPromiseRejectBlock)reject) { [[self manager] login:serviceTerms prompts:prompts useKakaoAccountLogin:useKakaoAccountLogin @@ -41,35 +37,28 @@ - (RNCKakaoUserManager*)manager { [[self manager] unlink:resolve reject:reject]; } -RCT_EXPORT_METHOD(isLogined - : (RCTPromiseResolveBlock)resolve reject - : (RCTPromiseRejectBlock)reject) { +RCT_EXPORT_METHOD(isLogined : (RCTPromiseResolveBlock)resolve reject : (RCTPromiseRejectBlock) + reject) { [[self manager] isLogined:resolve reject:reject]; } -RCT_EXPORT_METHOD(scopes - : (NSArray*)scopes resolve - : (RCTPromiseResolveBlock)resolve reject - : (RCTPromiseRejectBlock)reject) { +RCT_EXPORT_METHOD(scopes : (NSArray*)scopes resolve : (RCTPromiseResolveBlock) + resolve reject : (RCTPromiseRejectBlock)reject) { [[self manager] scopes:scopes resolve:resolve reject:reject]; } -RCT_EXPORT_METHOD(revokeScopes - : (NSArray*)scopes resolve - : (RCTPromiseResolveBlock)resolve reject - : (RCTPromiseRejectBlock)reject) { +RCT_EXPORT_METHOD(revokeScopes : (NSArray*)scopes resolve : (RCTPromiseResolveBlock) + resolve reject : (RCTPromiseRejectBlock)reject) { [[self manager] revokeScopes:scopes resolve:resolve reject:reject]; } -RCT_EXPORT_METHOD(serviceTerms - : (RCTPromiseResolveBlock)resolve reject - : (RCTPromiseRejectBlock)reject) { +RCT_EXPORT_METHOD(serviceTerms : (RCTPromiseResolveBlock)resolve reject : (RCTPromiseRejectBlock) + reject) { [[self manager] serviceTerms:resolve reject:reject]; } -RCT_EXPORT_METHOD(shippingAddresses - : (RCTPromiseResolveBlock)resolve reject - : (RCTPromiseRejectBlock)reject) { +RCT_EXPORT_METHOD(shippingAddresses : (RCTPromiseResolveBlock) + resolve reject : (RCTPromiseRejectBlock)reject) { [[self manager] shippingAddresses:resolve reject:reject]; } @@ -77,9 +66,8 @@ - (RNCKakaoUserManager*)manager { [[self manager] me:resolve reject:reject]; } -RCT_EXPORT_METHOD(getAccessToken - : (RCTPromiseResolveBlock)resolve reject - : (RCTPromiseRejectBlock)reject) { +RCT_EXPORT_METHOD(getAccessToken : (RCTPromiseResolveBlock)resolve reject : (RCTPromiseRejectBlock) + reject) { [[self manager] getAccessToken:resolve reject:reject]; }