The application we are testing has the GoogleAnalytics pod install. When running Cedar spec, I was getting a BAD_ACCESS at the line below:
BOOL CDRClassHasClassMethod(Class class, SEL selector) {
const char *className = class_getName(class);
if (strcmp("UIAccessibilitySafeCategory__NSObject", className) &&
strcmp("SCRCException", className)) {
return !!class_getClassMethod(class, selector);
}
return NO;
}
I noticed that the model in question at the time of the BAD_ACCESS was GAITrackerModel, which belongs to Google Analytics
I created a work around for the issue as follow
BOOL CDRClassHasClassMethod(Class class, SEL selector) {
const char *className = class_getName(class);
if (strcmp("UIAccessibilitySafeCategory__NSObject", className) &&
strcmp("SCRCException", className)) {
if (strcmp("GAITrackerModel", className) == 0){
return NO;
}
return !!class_getClassMethod(class, selector);
}
return NO;
}
This works for the time being, but I'm wondering if there's a more elegant solution. Any thoughts/suggestions?
Thanks!
-Danny