与.ipa相比,从XCode运行时,应用程序的行为有所不同 [英] App behaves different when run from XCode compared to .ipa

查看:57
本文介绍了与.ipa相比,从XCode运行时,应用程序的行为有所不同的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个非常令人困惑的问题. 我的应用程序使用了几个自定义按钮,这些自定义按钮使用手势识别器来确定轻击或长按.

I have a very puzzling problem. My app uses several custom buttons that use gesture recognizers to determine a tap or a long press.

当我从设备上的XCode运行应用程序时,一切正常.但是,当我将应用程序打包为.ipa文件并将其安装在同一设备上时,按钮将不再起作用!当按下任何手势时,都不会识别任何手势,也不会改变状态.其他一切似乎都正常...

When I run the app from XCode on my device everything works as it should. However, when I package the app in an .ipa file and install that on the same device the buttons no longer work! None of the gestures are recognized nor do they change state when pressed. Everything else seems to work fine...

我测试的设备是iPhone 5(运行iOS 6.1.4)和iPhone 4& 4S(均运行iOS 6.1.3).我在Max OSX 1.8.3上使用XCode 4.6.2.

The devices I tested are an iPhone 5 (running iOS 6.1.4) and iPhone 4 & 4S (both running iOS 6.1.3). And I'm using XCode 4.6.2 on Max OSX 1.8.3.

有什么想法会导致这种非常奇怪的行为?

Any ideas what might be causing this very strange behavior?

PS:从XCode断开连接后,"Xcode生成"代码仍可继续工作.

PS: The "Xcode generated" code keeps on working after I've disconnected it from XCode.

推荐答案

通常,您存档到IPA文件中的代码将使用与从XCode运行它时不同的配置.我无法在没有查看项目文件或没有更多信息的情况下确切猜测出什么问题,但是我要尝试的第一件事是对正在使用的方案进行编辑方案并比较用于运行的构建配置操作和存档操作.

Typically the code you archive into an IPA file would use a different configuration than from when you run it from XCode. I can't guess what's wrong specifically without looking at your project file or having some more information, but the first thing I would try would be to do an Edit Scheme on the scheme you're using and compare the build configuration used for the Run action and the Archive action.

这篇关于与.ipa相比,从XCode运行时,应用程序的行为有所不同的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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