2

有没有办法在 iOS 上以编程方式阻止对某些应用程序的访问?就我而言,使用私有 API 或变通方法不是问题。

提前致谢!

4

2 回答 2

2

This tutorial does basically what you want to do, assuming your second sentence means you're working with jailbroken iOS.

Basically you write a hook for the SBApplicationIcon class that looks something like this (code not mine):

%hook SBApplicationIcon
-(void)launch
{
    NSString *appName = [self displayName];
    if ([appName isEqualToString:@"blah"]) {
        // react accordingly
    }
    %orig; // Call this if you want to proceed with launching the app in question.
}
%end

You'll need to link against UIKit, I believe.

EDIT: to clarify, the above code is using Logos. I'm sure it's also possible using the Objective-C runtime directly, but I'm not familiar with that.

于 2013-04-03T14:45:42.427 回答
0

有些应用程序会阻止访问,迫使您输入密码。例如,您可以在这里查看https://apple.stackexchange.com/questions/31154/how-do-i-password-protect-access-to-specific-apps-in-ios以找到一些想法。希望这有帮助!

于 2013-04-03T14:25:28.680 回答