Reputation: 524
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.
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.
Upvotes: 2
Views: 90
Reputation: 524
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
Upvotes: 1