libPods.a, +[BlockAlertView initialize] and logic tests #46

boecko opened this Issue Apr 22, 2013 · 1 comment


None yet

1 participant


My unit-test gets a __HALT signal, because of the UIFont-Loading in +[BlockAlertView initialize].
NOTE: I'm not using any UIKIT-Classes in my unit-tests. This happens because i'm linking with libPods.a.

My ugly workarround is:

+ (void)initialize
        BOOL senTestingKit = NO;
        NSArray *callStack = [NSThread callStackSymbols];
        for (NSString *call in callStack) {
            NSRange range = [call rangeOfString:@"SenTestingKit"];
            if(range.location != NSNotFound) {
                senTestingKit = YES;
        if(!senTestingKit) {
            titleFont = [kAlertViewTitleFont retain];
            messageFont = [kAlertViewMessageFont retain];
            buttonFont = [kAlertViewButtonFont retain];

My bad ...
should have made a

target :test, :exclusive => true do
    ... pods required for test ...

entry, without 'BlockAlertsAnd-ActionSheets'.

Anyway .. this entry is good for documention purposes, if someone has the same problem ;)

@boecko boecko closed this Apr 25, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment