zoho / react-native-zohodesk-portal-sdk

8 stars 4 forks source link

Build failed while using react-native-zohodesk-portal-sdk in iOS #14

Closed selvamariappant2s closed 1 year ago

selvamariappant2s commented 1 year ago

Build Failed while using react-native-zohodesk-portal-sdk

Syntax error in RNZohoDeskPortalSDK.m

COMPILATION ISSUE

/Users/runner/work/1/s/node_modules/react-native-zohodesk-portal-sdk/ios/RNZohoDeskPortalSDK.m:68:37: error: expected ')' isJWTToken: (BOOL isSuccess)) ^ /Users/runner/work/1/s/node_modules/react-native-zohodesk-portal-sdk/ios/RNZohoDeskPortalSDK.m:68:31: note: to match this '(' isJWTToken: (BOOL isSuccess)) ^

selvamariappant2s commented 1 year ago

In Recent Update Following method changed cause build issue

RCT_EXPORT_METHOD(setUserToken:(NSString *)userToken successCallback:(RCTResponseSenderBlock)successCallback errorCallback:(RCTResponseSenderBlock)errorCallback) {

[ZohoDeskPortalSDK loginWithUserToken:userToken onCompletion:^(BOOL isSuccess) { if (isSuccess){ successCallback(@[[NSString stringWithFormat:@"User set Success"], @"User set Success"]); }else{ errorCallback(@[[NSString stringWithFormat:@"User set Failure"], @"User set Failure"]); } }]; }

Change to

RNZohoDeskPortalSDK.m

RCT_EXPORT_METHOD(setUserToken:(NSString *)userToken successCallback:(RCTResponseSenderBlock)successCallback errorCallback:(RCTResponseSenderBlock)errorCallback isJWTToken: (BOOL isSuccess)) { [ZohoDeskPortalSDK loginWithUserToken:userToken onCompletion:^(BOOL isSuccess) { if (isSuccess){ successCallback(@[[NSString stringWithFormat:@"User set Success"], @"User set Success"]); }else{ errorCallback(@[[NSString stringWithFormat:@"User set Failure"], @"User set Failure"]); } }]; }

Please Fix this

selvamariappant2s commented 1 year ago

Temp Soultion

using patch-package npm to slove below patch

react-native-zohodesk-portal-sdk+1.2.2.patch react-native-zohodesk-portal-sdk+1.2.2.patch

Bala-Karunakaran commented 1 year ago

Hi @selvamariappant2s ,

We have fixed the issue in version-1.2.3. Please check it out.