小编Hea*_*ers的帖子

停止"开发人员工具访问需要控制另一个进程以进行调试以继续"警报

我最近升级到10.7.3,当我在登录后第一次尝试在模拟器中调试我的iOS项目时,我会提示以下两个警告:

Developer Tools Access需要控制另一个进程以便继续调试. 输入您的密码以允许此操作.

gdb-i386-apple-darwin需要控制另一个进程才能继续调试. 输入您的密码以允许此操作.

我的用户是管理员用户.我之前从未见过这些警报.我怎么让他们停下来?

编辑

我已经确认我是该_developer小组成员之一id -a.

ios ios-simulator osx-lion

109
推荐指数
7
解决办法
7万
查看次数

Mac OS X 10.8 Mountain Lion上安装了Oracle(Sun)的JDK/JRE在哪里?

Oracle(Sun)在Mac OS X 10.8 Mountain Lion上安装JDK/JRE的位置是什么?

java macos

47
推荐指数
5
解决办法
6万
查看次数

UIViewController不保留其以编程方式创建的UISearchDisplayController

在有关属性1UIViewController 文档中,它说:searchDisplayController

如果以编程方式创建搜索显示控制器,则在初始化时,搜索显示控制器会自动设置此属性.

当我这样创建我的UISearchDisplayController时:

[[[UISearchDisplayController alloc] initWithSearchBar:searchBar contentsController:self] autorelease];
Run Code Online (Sandbox Code Playgroud)

-[UIViewController searchDisplayController]不是nil.但是,它在事件循环结束后被填写,这会导致搜索显示控制器在我触摸搜索栏时不显示.什么都没有崩溃.这很奇怪.如果我省略了呼叫autorelease,一切正常:

[[UISearchDisplayController alloc] initWithSearchBar:searchBar contentsController:self];
Run Code Online (Sandbox Code Playgroud)

然而,泄漏UISearchDisplayController(我用仪器验证了这一点).由于该searchDisplayController 属性被标记为(nonatomic, retain, readonly)我希望UISearchDisplayController它在设置后保留它.

此stackoverflow文章是相关的.

uiviewcontroller uisearchdisplaycontroller ios automatic-ref-counting

30
推荐指数
1
解决办法
6303
查看次数

如何在mac os x 10.8.2上重置postgresql 9.2默认用户(通常是'postgres')密码?

我刚安装了PostgreSQL 9.2EnterpriseDB的Mac OS X 10.8.2.我输错了postgres用户密码,所以无法连接.如何重置密码?

postgresql macos

30
推荐指数
1
解决办法
4万
查看次数

Android Studio 正在使用这个 JDK 位置......这与 Gradle 默认使用的不同

在 Android Studio 同步我的 gradle 项目后,我在事件日志中看到以下消息:

Android Studio 正在使用此 JDK 位置: /path/to/my/project/specific/jdk 这与 Gradle 默认/path/to/android/studio/embedded/jdk 使用的位置不同: 如果在使用 Android Studio 时从命令行运行 Gradle 任务,则使用不同的位置可能会产生多个 Gradle 守护进程。设置 Android Studio 使用与 Gradle 相同的 JDK 并同步项目

我已经/path/to/my/project/specific/jdk设置了Project Structure-> SDK Location-> JDK Location->Other 项目结构 -> SDK 位置 -> JDK 位置 -> 其他

我有以下内容.bash_profile

export JAVA_HOME=/path/to/my/project/specific/jdk
Run Code Online (Sandbox Code Playgroud)

并且STUDIO_JDK文档说:

设置用于运行 Studio 的 JDK 的位置。当你推出Android Studio中,它会检查STUDIO_JDKJDK_HOME以及JAVA_HOME 依次环境变量。

所以我希望 Android Studio 会找到/path/to/my/project/specific/jdk,但它不会。是否有专门针对 gradle 的特殊 JDK 设置?

jvm gradle android-studio

26
推荐指数
3
解决办法
4万
查看次数

如何过滤maven中的测试资源?

我有以下内容pom.xml.当我运行时mvn clean resources:testResources,我的测试资源没有被过滤(在将资源中的占位符以其修改后的形式放入输出文件夹之前替换它们).为什么?

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <groupId>com.example</groupId>
    <artifactId>foo</artifactId>
    <version>0.0.1</version>
    <packaging>jar</packaging>
    <name>foo</name>

    <dependencies>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.11</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <resources>
            <resource>
                <directory>src/test/resources</directory>
                <filtering>true</filtering>
            </resource>
        </resources>
    </build>
</project>
Run Code Online (Sandbox Code Playgroud)

maven maven-resources-plugin

24
推荐指数
1
解决办法
1万
查看次数

带有截断文本的多行NSAttributedString

我需要一个带有多行属性文本的UILabel subcass,支持链接,粗体样式等.我还需要带有省略号的尾部截断.支持内部UILabels属性文本开放源代码的无(TTTAttributedLabel,OHAttributedLabel,TTStyledTextLabel)似乎支持为多行文本尾截断.有一个简单的方法来获得这个吗?

core-text ios

23
推荐指数
4
解决办法
2万
查看次数

Android:EditText在重新启用后无法获得焦点

我有一个带有三个标签的TabHost.第一个选项卡的内容是自定义活动的意图,其内容视图是包含两个EditTexts和两个CheckBox(以及一个按钮)的相对布局.

检查后,每个checbox启用/禁用一个EditText和另一个复选框.我这样做了:

chkPolaziste.setOnCheckedChangeListener(new OnCheckedChangeListener()
    {
        public void onCheckedChanged(CompoundButton buttonView, boolean isChecked)
        {
            if ( isChecked )
            {
                entryPolaziste.setFocusable(false);
                entryPolaziste.setEnabled(false);
                chkOdrediste.setFocusable(false);
                chkOdrediste.setEnabled(false);
            }
            else
            {
                entryPolaziste.setEnabled(true);
                entryPolaziste.setFocusable(true);
                chkOdrediste.setEnabled(true);
                chkOdrediste.setFocusable(true);
            }
        }
    });
Run Code Online (Sandbox Code Playgroud)

这很有效.当选中一个复选框时,它会禁用另一个复选框和他的EditText,当我取消选中它时,会启用EditText和另一个复选框.但是,在启用后,我无法在EditText中输入任何内容.当我点击它时,它只是轻弹一下,然后将焦点切换到另一个视图.它看起来好像控件没有完全启用.

我也尝试使用requestFocus()强制重新启用重新启用的EditText,并尝试使用setFocusableInTouchMode(),但两者都没有工作.

我没有Android设备,所以我只在模拟器中测试它(Min SDK是1.6).

android focus android-widget android-edittext

21
推荐指数
1
解决办法
5819
查看次数

我什么时候可以使用带有通用链接的SFSafariViewController,WKWebView或UIWebView?

iOS App Search Programming GuideUniversal Links部分中,Apple说:

如果您实例化SFSafariViewController,WKWebView或UIWebView对象以处理通用链接,iOS将在Safari中打开您的网站,而不是打开您的应用程序.但是,如果用户从嵌入式SFSafariViewController,WKWebView或UIWebView对象中点击通用链接,iOS将打开您的应用程序.

"处理通用链接"是什么意思?我不能永远打开给定的URL与SFSafariViewController,WKWebViewUIWebView?它是否仅适用于期间-[UIApplicationDelegate application:continueUserActivity:restorationHandler:],或是否存在超时?这是否意味着在我们永远不能打开的URL SFSafariViewController,WKWebViewUIWebView

uiwebview ios applinks wkwebview sfsafariviewcontroller

21
推荐指数
1
解决办法
3749
查看次数

CocoaPods文件引用是多个组的成员

我有一个分享扩展的应用程序.我的应用程序取决于CocoaLumberjack/Default,我的共享扩展依赖于CocoaLumberjack/Core.当我构建时use_frameworks!,我收到以下错误:

$ rm -rf Pods Podfile.lock; pod install
Updating local specs repositories
Analyzing dependencies
Downloading dependencies
Installing CocoaLumberjack (2.0.3)
Generating Pods project
Run Code Online (Sandbox Code Playgroud)

2015-10-28 10:46:04.015 ruby​​ [53095:3440989]警告:"CocoaLumberjack.framework"的文件引用是多个组的成员("Products"和"Products"); 这表明项目格式错误.只保留其中一个组的成员资格(但目标成员资格不受影响).如果要在多个组中引用同一文件,请在同一路径中添加另一个引用.

Integrating client project
Sending stats
Sending stats
Pod installation complete! There are 2 dependencies from the Podfile and 1 total
pod installed.

[!] [Xcodeproj] Generated duplicate UUIDs:
Run Code Online (Sandbox Code Playgroud)

PBXFileReference - /mainGroup/children/children:displayName:CocoaLumberjack.framework,explicitFileType:wrapper.framework,includeInIndex:0,isa:PBXFileReference,name:CocoaLumberjack.framework,path:CocoaLumberjack.framework,sourceTree:BUILT_PRODUCTS_DIR,,displayName:CocoaLumberjack .framework,explicitFileType:wrapper.framework,includeInIndex:0,赛:PBXFileReference,名称:CocoaLumberjack.framework,道:CocoaLumberjack.framework,sourceTree:BUILT_PRODUCTS_DIR ,,显示名:Pods_MyProject.framework,explicitFileType:wrapper.framework,includeInIndex:0,赛:PBXFileReference,名称:Pods_MyProject.framework,道:Pods_MyProject.framework,sourceTree:BUILT_PRODUCTS_DIR ,,显示名:Pods_MyShare.framework,explicitFileType:wrapper.framework,includeInIndex:0,赛:PBXFileReference,名称:Pods_MyShare.framework,道:Pods_MyShare .framework,sourceTree:BUILT_PRODUCTS_DIR ,,显示名:产品,赛:PBXGroup,名称:产品,sourceTree:,/产品/儿童/显示名:CocoaLumberjack.framework,explicitFileType:wrapper.frame 工作,includeInIndex:0,赛:PBXFileReference,名称:CocoaLumberjack.framework,道:CocoaLumberjack.framework,sourceTree:BUILT_PRODUCTS_DIR,/产品/ CocoaLumberjack.framework

这是我的Podfile:

workspace 'MyWorkspace'
xcodeproj 'MyProject/MyProject.xcodeproj'

use_frameworks!

source 'https://github.com/CocoaPods/Specs.git' …
Run Code Online (Sandbox Code Playgroud)

ios-frameworks cocoapods

20
推荐指数
3
解决办法
5530
查看次数