2

I have imported CCAvenue Framework correctly and trying call the InitialViewController class from CCAvenue framework to launch the paymentgateway service but I am getting the _OBJC_CLASS_ error. enter image description here

I have tried in many ways by adding the CCAvenue framework in embedded binaries and Linked Frameworks in project build settings, modifying in build phases but of no use.

Scenario 1:

#import "BillingViewController.m"
@implementation BillingViewController{
    InitialViewController *initial;
}

Compiler is not throwing any error.

Scenario 2:

    #import "BillingViewController.m"
    @implementation BillingViewController{
     InitialViewController *initial;
    }
- (void)loadPaymentGateWayFunction {

    initial = [[InitialViewController alloc]initWithOrderId:@"" merchantId:@"" accessCode:@"" custId:@"" amount:@"" currency:@"" rsaKeyUrl:@"" redirectUrl:@"" cancelUrl:@"" showAddress:@"" billingName:@"" billingAddress:@"" billingCity:@"" billingState:@"" billingCountry:@"" billingTel:@"" billingEmail:@"" deliveryName:@"" deliveryAddress:@"" deliveryCity:@"" deliveryState:@"" deliveryCountry:@"" deliveryTel:@"" promoCode:@"" merchant_param1:@"" merchant_param2:@"" merchant_param3:@"" merchant_param4:@"" merchant_param5:@"" useCCPromo:@""];

}

Here when I'm trying to call the API the compiler issue is raising. What might be the reason, how to resolve it? can anybody please explain the reason.

Smart guy
  • 494
  • 6
  • 9
  • add BillingViewController on your target or remove BillingViewController then add to your project. – ikbal Nov 06 '18 at 04:21
  • @ikbal it did not worked :( – Smart guy Nov 06 '18 at 08:11
  • I think this library just doesn't support simulator or have separate binary for it. – Cy-4AH Nov 06 '18 at 09:22
  • Yes @Cy-4AH already tried that both but no use. That library is having simulator support it provided a sample app that is working in both simulator and device. I will try to explain the situation in other way. I have created a salesforce ios Xcode project by using forceios tool. in that project when I use this library It worked fine didnot throw any errors. later when I include dependencies to that project and did "podinstall" then I'm screwed up, I guess there might be an issue in the podfile i dont know how to resolve it – Smart guy Nov 08 '18 at 14:09

1 Answers1

1

remove -ObjC flag from projectSettings- Other Linker Flags. If you have pods installed to your project then $(inherited) flag will be automatically added in the projectSettings- Other Linker Flags. So you need to remove -ObjC from two other files.

1.Pods-YourProjectName.debug.xcconfig
2.Pods-YourProjectName.release.xcconfig

delete -ObjC from OTHER_LDFLAGS then everything will set right

Smart guy
  • 494
  • 6
  • 9