Skip to content

Commit

Permalink
style(ios): objc formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
mym0404 committed Oct 30, 2024
1 parent 8aececc commit bd74b7a
Show file tree
Hide file tree
Showing 6 changed files with 55 additions and 97 deletions.
48 changes: 16 additions & 32 deletions packages/channel/ios/RNCKakaoChannel.mm
Original file line number Diff line number Diff line change
Expand Up @@ -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];
}

Expand Down
5 changes: 2 additions & 3 deletions packages/core/ios/RNCKakaoCore.mm
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down
13 changes: 5 additions & 8 deletions packages/navi/ios/RNCKakaoNavi.mm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
18 changes: 7 additions & 11 deletions packages/share/ios/RNCKakaoShare.mm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
20 changes: 7 additions & 13 deletions packages/social/ios/RNCKakaoSocial.mm
Original file line number Diff line number Diff line change
Expand Up @@ -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];
}

Expand Down
48 changes: 18 additions & 30 deletions packages/user/ios/RNCKakaoUser.mm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -41,45 +37,37 @@ - (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];
}

RCT_EXPORT_METHOD(me : (RCTPromiseResolveBlock)resolve reject : (RCTPromiseRejectBlock)reject) {
[[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];
}

Expand Down

0 comments on commit bd74b7a

Please sign in to comment.