Fix extension check code to be iOS 6/7 compatible

This commit is contained in:
Andreas Linde 2014-09-25 10:15:15 +02:00
parent 2040206101
commit 4f05060adb

View File

@ -265,7 +265,7 @@ BOOL bit_isRunningInAppExtension(void) {
static dispatch_once_t checkAppExtension;
dispatch_once(&checkAppExtension, ^{
isRunningInAppExtension = [[[NSBundle mainBundle] executablePath] containsString:@".appex/"];
isRunningInAppExtension = ([[[NSBundle mainBundle] executablePath] rangeOfString:@".appex/"].location != NSNotFound);
});
return isRunningInAppExtension;