Framework imported properly but still getting _OBJC_CLASS_ compiler error

101 Views Asked by At

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.

1

There are 1 best solutions below

0
On

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