The error “unrecognized selector sent to instance 0x...” is occurring when an AXA SDK is deployed in an IOS application. This error is causing many application crashes.
Any version of the AXA SDK used with Xcode 9.3+.
The AXA SDK has few libraries that require the -ObjC linker argument to build the project. Due to a bug introduced in Xcode 9.3, the -ObjC argument is ignored during linking. This causes application crashes at run time with an "unrecognized selector" exception.
To address this issue, please update the "OTHER_LDFLAGS" option in ca-maa-ios-sdk.xcconfig file and append the following configuration.
OTHER_LDFLAGS=<options> -Wl -force_load $(PRODUCT_NAME)/CAMobileAppAnalytics/libCAMobileAppAnalytics.a -Wl -force_load $(PRODUCT_NAME)/CAMobileAppAnalytics/libCAMobileAppAnalytics-simulator.a
This change will force load AXA libraries. Note: Be aware that this change assumes all AXA SDK files are placed in their default locations. If they are not, you will see build errors such as "Linker command failed" and "warning directory not found for option...". In this situation, the OTHER_LDFLAGS option needs to be updated with a correct path for your project.
OTHER_LDFLAGS=<options> -Wl -force_load <Path to>/CAMobileAppAnalytics/libCAMobileAppAnalytics.a -Wl -force_load <Path to>/CAMobileAppAnalytics/libCAMobileAppAnalytics-simulator.a
Please make sure you also use the latest sdk version available while testing.
As always, contact CA Support if you have further questions.