错误:目标无法运行:调试 com.apple.Preferences 的权限被拒绝 [英] Error : Target failed to run: Permission to debug com.apple.Preferences was denied

查看:23
本文介绍了错误:目标无法运行:调试 com.apple.Preferences 的权限被拒绝的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在 Appium 上运行第一个测试,我在日志中收到一个错误.

Run first test on Appium and I got a error in the logs.

Appium version 1.4.13
xcode version 7.2

带有 appium 的 iOS 设置:http://screenpresso.com/=nD2Cf.这是我的java代码:

iOS settings with appium: http://screenpresso.com/=nD2Cf. Here is my java code:

import io.appium.java_client.AppiumDriver;
import io.appium.java_client.MobileElement;
import io.appium.java_client.ios.IOSDriver;
import io.appium.java_client.remote.MobileCapabilityType;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.remote.DesiredCapabilities;
import org.openqa.selenium.remote.RemoteWebDriver;

import java.net.MalformedURLException;
import java.net.URL;
import java.util.concurrent.TimeUnit;

/**
 * Created by betbull on 1/29/16.
 */
public class Runing {
    public static AppiumDriver wd;

    public static void main(String[] args) throws MalformedURLException {
        DesiredCapabilities capabilities = new DesiredCapabilities();
        capabilities.setCapability("appium-version", "1.4.13");
        capabilities.setCapability("platformName", "IOS");
        capabilities.setCapability("platformVersion", "9.2");
        capabilities.setCapability("deviceName", "iPhone6");
        capabilities.setCapability("app", "settings");
        wd = new IOSDriver(new URL("http://127.0.0.1:4723/wd/hub"), capabilities);
        wd.manage().timeouts().implicitlyWait(60, TimeUnit.SECONDS);
    }

}

使用 appium 的日志:

logs with appium:

info: [debug] [INST STDERR] 2016-02-01 21:26:16.580 instruments[63237:1021849] WebKit Threading Violation - initial use of WebKit from a secondary thread.

info: [debug] [INST STDERR] 2016-02-01 21:26:21.158 instruments[63237:1021937] Attempting to change event horizon while disengage

info: [debug] [INST STDERR] 2016-02-01 21:26:21.159 instruments[63237:1021938] Attempting to change event horizon while disengage

info: [debug] [INST STDERR] Instruments *****Trace Error***** : Target failed to run: Permission to debug com.apple.Preferences was denied. The app must be signed with a development identity (e.g. iOS Developer).

info: [debug] [INSTSERVER] Instruments exited with code 253
info: [debug] Killall instruments

info: [debug] Instruments crashed on startup
info: [debug] Attempting to retry launching instruments, this is retry #1
info: [debug] Killall iOS Simulator

推荐答案

如果将构建配置更改为调试不起作用,请关闭所有应用程序并尝试重新启动系统.这为我解决了问题.

If changing the build configuration to debug doesn't work, close all the applications and try restarting the the system. This solved the problem for me.

这篇关于错误:目标无法运行:调试 com.apple.Preferences 的权限被拒绝的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆