【问题标题】:UIAutomation not enabled in Settings error message设置错误消息中未启用 UIAutomation
【发布时间】:2016-01-19 07:12:39
【问题描述】:

当我用 [[UIATarget localTarget].frontMostApp isVisible] 在 main.mm 主函数中,我得到异常说

* 异常 UIAutomation 在此设备上未启用。必须在“设置”中启用 UIAutomation。 *

但我已启用设置->开发人员->在设备中启用自动化 UI。 iOS 版本:8.1.2 和 8.0.1 越狱。

 int main(int argc, char **argv, char **envp)
{
    @autoreleasepool {

        @try
        {

            [[UIATarget localTarget].frontMostApp isVisible];

            if ([UIATarget localTarget].springboard.pid == nil)
            {
                return 0;
            }
        }
        @catch (NSException *exception)
        {
            NSLog(@"*** exception %@ ***",exception);
            return 0;
        }
    }
}

我已经看到了这个链接https://github.com/kif-framework/KIF/issues/707 和一些关于 UIATarget frontMostApp 的 Apple 参考文档,但到目前为止我还没有找到解决方案。

iOS版本有这个问题吗?我该如何解决这个问题?任何帮助表示赞赏。

【问题讨论】:

  • 什么是调整应用程序?请提供更多细节。
  • @satheeshwaran 基本上,此调整应用程序的目标是启动应用程序并重复在同一应用程序上执行的操作,从特定目录读取包含先前执行操作的详细信息的文件。
  • 请提供详细说明什么是调整应用程序的链接。
  • 你的意思是什么是tweak?我猜它是为了处理UIAutomation.framework
  • 嘿,基本上问题很简单,无论在设置中启用,当我调用 target.frontMostApp 时,我都会收到错误“UIAutomation not enabled in device”。

标签: ios ios-ui-automation tweak


【解决方案1】:

您的 UIAuomation 设置列表将为每个应用程序单独创建,以防发生调整。

在您的设备中启用 /private/var/mobile/Containers/Data/Application/XXXXXXXX-ACAB-4FC9-AE3E-XXXXXX/Library/Preferences/com.apple.UIAutomation.plistReboot 以消除此错误。

【讨论】:

    猜你喜欢
    • 2015-11-12
    • 2013-06-18
    • 2016-10-22
    • 2017-08-13
    • 1970-01-01
    • 1970-01-01
    • 2011-11-22
    • 2014-11-22
    相关资源
    最近更新 更多