2018년 1월 20일 토요일

IOS11 Private api - exist specific application

- (BOOL)existAppContainer: (NSString*)bundleID
{
    if ([[UIDevice currentDevice].systemVersion floatValue] >= 11.0)
    {
        NSBundle *container = [NSBundle bundleWithPath:@"/System/Library/PrivateFrameworks/MobileContainerManager.framework"];
        if ([container load])
        {
            Class appContainer = NSClassFromString(@"MCMAppContainer");
            id test = [appContainer performSelector:@selector(containerWithIdentifier:error:) withObject:bundleID withObject:nil];
            NSLog(@"%@",test);
            
            if (test)
            {
                return YES;
            }
        }
    }
    
    return NO;

}

댓글 없음:

댓글 쓰기