【问题标题】:IOS application works on the simulator but not on the deviceIOS 应用程序在模拟器上工作,但在设备上不工作
【发布时间】:2013-08-31 09:54:50
【问题描述】:

我用解析后端制作了一个简单的注册应用程序。一切正常。我没有警告或错误代码,当我创建它时,我还可以在解析仪表板中看到用户。但该应用程序仅适用于模拟器。当我将它放在设备上时,它会启动应用程序但显示黑屏。我尝试了另一个示例项目,只是为了确保我的代码签名有效并且其他应用程序在设备上运行良好。所以我检查了控制台日志,但我不太了解。那么有人可以帮助我吗?谢谢。

这是控制台日志

Aug 30 18:16:13 Bla-Bla mobile_house_arrest[1179] <Error>: Max open files: 125
��Aug 30 18:16:15 Bla-Bla installd[54] <Error>: 0x2fe93000 handle_install: Install of "/var/mobile/Media/PublicStaging/Blast.app" requested by mobile_installation_proxy
��Aug 30 18:16:15 Bla-Bla installd[54] <Error>: 0x2fe93000 MobileInstallationInstall_Server: Installing app com.BlaBla.Blast
��Aug 30 18:16:15 Bla-Bla installd[54] <Error>: Aug 30 18:16:15  SecTrustEvaluate  [leaf CriticalExtensions IssuerCommonName]
��Aug 30 18:16:16 Bla-Bla SpringBoard[66] <Warning>: Killing com.BlaBla.Blast for termination assertion
��Aug 30 18:16:16 Bla-Bla lsd[89] <Warning>: updating identifier store
��Aug 30 18:16:16 Bla-Bla kernel[0] <Debug>: launchd[1182] Builtin profile: syncdefaultsd (sandbox)
��Aug 30 18:16:16 Bla-Bla installd[54] <Error>: 0x2fe93000 MobileInstallationInstall_Server: Staging: 0.22s; Waiting: 0.00s; Installation: 0.75s; LS Sync: 0.32s; Overall: 1.55s
��Aug 30 18:16:16 Bla-Bla lsd[89] <Warning>: Attempting to store identifiers file
��Aug 30 18:16:23 Bla-Bla CommCenter[37] <Error>: kDataAttachStatusNotification sent, wasAttached: 1 isAttached: 1
��Aug 30 18:16:24 Bla-Bla installd[54] <Error>: 0x201000 filter_attributes: Info.plist keys requested via MobileInstallationLookup/Browse in client Xcode (via mobile_installation_proxy) were not found in MobileInstallation's cache. Please file a bug requesting that these keys be added: <CFBasicHash 0x1cd928e0 [0x3a978100]>{type = mutable set, count = 18,
    entries =>
        0 : <CFString 0x3a9649f4 [0x3a978100]>{contents = "CFBundlePackageType"}
        1 : <CFString 0x1cd73e10 [0x3a978100]>{contents = "BuildMachineOSBuild"}
        2 : <CFString 0x3a965a44 [0x3a978100]>{contents = "CFBundleResourceSpecification"}
        3 : <CFString 0x1cd897a0 [0x3a978100]>{contents = "DTPlatformBuild"}
        4 : <CFString 0x3a962794 [0x3a978100]>{contents = "DTCompiler"}
        5 : <CFString 0x3a964564 [0x3a978100]>{contents = "CFBundleSignature"}
        6 : <CFString 0x3a965224 [0x3a978100]>{contents = "DTSDKName"}
        7 : <CFString 0x1cd6e800 [0x3a978100]>{contents = "NSBundleResolvedPath"}
        8 : <CFString 0x3a961eb4 [0x3a978100]>{contents = "UISupportedInterfaceOrientations"}
        10 : <CFString 0x3a969e84 [0x3a978100]>{contents = "DTXcode"}
        13 : <CFString 0x3a969eb4 [0x3a978100]>{contents = "CFBundleInfoDictionaryVersion"}
        16 : <CFString 0x3a967304 [0x3a978100]>{contents = "CFBundleSupportedPlatforms"}
        17 : <CFString 0x1cd81c40 [0x3a978100]>{contents = "DTXcodeBuild"}
        18 : <CFString 0x1cd6e850 [0x3a978100]>{contents = "UIStatusBarTintParameters"}
        19 : <CFString 0x3a965e54 [0x3a978100]>{contents = "DTPlatformVersion"}
        20 : <CFString 0x3a968bf4 [0x3a978100]>{contents = "DTPlatformName"}
        21 : <CFString 0x3a969c84 [0x3a978100]>{contents = "CFBundleDevelopmentRegion"}
        22 : <CFString 0x1cd7f3a0 [0x3a978100]>{contents = "DTSDKBuild"}
    }
��Aug 30 18:16:26 Bla-Bla installd[54] <Error>: 0x201000 filter_attributes: Info.plist keys requested via MobileInstallationLookup/Browse in client Xcode (via mobile_installation_proxy) were not found in MobileInstallation's cache. Please file a bug requesting that these keys be added: <CFBasicHash 0x1cd8c720 [0x3a978100]>{type = mutable set, count = 18,
    entries =>
        0 : <CFString 0x3a9649f4 [0x3a978100]>{contents = "CFBundlePackageType"}
        1 : <CFString 0x1cd8ee10 [0x3a978100]>{contents = "BuildMachineOSBuild"}
        2 : <CFString 0x3a965a44 [0x3a978100]>{contents = "CFBundleResourceSpecification"}
        3 : <CFString 0x1cd8c020 [0x3a978100]>{contents = "DTPlatformBuild"}
        4 : <CFString 0x3a962794 [0x3a978100]>{contents = "DTCompiler"}
        5 : <CFString 0x3a964564 [0x3a978100]>{contents = "CFBundleSignature"}
        6 : <CFString 0x3a965224 [0x3a978100]>{contents = "DTSDKName"}
        7 : <CFString 0x1cd7f2d0 [0x3a978100]>{contents = "NSBundleResolvedPath"}
        8 : <CFString 0x3a961eb4 [0x3a978100]>{contents = "UISupportedInterfaceOrientations"}
        10 : <CFString 0x3a969e84 [0x3a978100]>{contents = "DTXcode"}
        13 : <CFString 0x3a969eb4 [0x3a978100]>{contents = "CFBundleInfoDictionaryVersion"}
        16 : <CFString 0x3a967304 [0x3a978100]>{contents = "CFBundleSupportedPlatforms"}
        17 : <CFString 0x1cd90d80 [0x3a978100]>{contents = "DTXcodeBuild"}
        18 : <CFString 0x1cd99040 [0x3a978100]>{contents = "UIStatusBarTintParameters"}
        19 : <CFString 0x3a965e54 [0x3a978100]>{contents = "DTPlatformVersion"}
        20 : <CFString 0x3a968bf4 [0x3a978100]>{contents = "DTPlatformName"}
        21 : <CFString 0x3a969c84 [0x3a978100]>{contents = "CFBundleDevelopmentRegion"}
        22 : <CFString 0x1cd7ea20 [0x3a978100]>{contents = "DTSDKBuild"}
    }
��Aug 30 18:16:26 Bla-Bla com.apple.debugserver-199[1186] <Warning>: debugserver-199 for armv7.
��Aug 30 18:16:26 Bla-Bla com.apple.debugserver-199[1186] <Warning>: Connecting to com.apple.debugserver service...
��Aug 30 18:16:26 Bla-Bla com.apple.debugserver-199[1186] <Warning>: Got a connection, waiting for process information for launching or attaching.
��Aug 30 18:16:27 Bla-Bla kernel[0] <Debug>: lockbot[1177] Builtin profile: debugserver (sandbox)
��Aug 30 18:16:27 Bla-Bla kernel[0] <Debug>: set_crc_notification_state 0
Aug 30 18:16:27 Bla-Bla backboardd[26] <Notice>: Posting 'com.apple.iokit.hid.displayStatus' notifyState=1
Aug 30 18:16:27 Bla-Bla backboardd[26] <Notice>: MultitouchHID: detection mode: 255->0 (deferring until bootloaded)
��Aug 30 18:16:27 Bla-Bla backboardd[26] <Notice>: MultitouchHID: device bootloaded
��Aug 30 18:16:27 Bla-Bla backboardd[26] <Notice>: MultitouchHID: detection mode: 0->0
��Aug 30 18:16:27 Bla-Bla com.apple.launchd[1] (UIKitApplication:com.BlaBla.Blast[0xa7df][1189]) <Warning>: (UIKitApplication:com.BlaBla.Blast[0xa7df]) Spawned and waiting for the debugger to attach before continuing...
��Aug 30 18:16:27 Bla-Bla kernel[0] <Debug>: ALS: AppleARMBacklight::handleMessageGated - framebufferState -> 1
��Aug 30 18:16:27 Bla-Bla kernel[0] <Debug>: ALS: AppleARMBacklight::setBacklightEnableGated 1 (set level to 0x67a)
��Aug 30 18:16:27 Bla-Bla kernel[0] <Debug>: launchd[1189] Builtin profile: container (sandbox)
��Aug 30 18:16:27 Bla-Bla kernel[0] <Debug>: launchd[1189] Container: /private/var/mobile/Applications/FCCA5177-208D-45C7-A66A-C11372F14E72 (sandbox)
��Aug 30 18:16:27 Bla-Bla com.apple.debugserver-199[1186] <Warning>: Got a connection, waiting for debugger instructions.
��Aug 30 18:16:28 Bla-Bla locationd[46] <Warning>: Launch Services: Registering unknown app identifier com.apple.PassKit failed
��Aug 30 18:16:28 Bla-Bla locationd[46] <Warning>: Launch Services: Unable to find app identifier com.apple.PassKit
��

【问题讨论】:

  • 欢迎来到SimulatorsEmulators 的世界。只是一个快速启动建议,您是否尝试过清理项目? Command + Shift + K我相信。
  • 是的,我清理了项目,也将其从设备中删除,以便再次构建。在玩了一会儿之后,我发现我有一个 sigabirt,因为 [.. make keyvisable] 所以现在我没有错误,但问题仍然存在。我阅读了相关问题,他的问题是代码签名。我尝试了另一个应用程序,只是为了测试它是否是代码签名,但另一个工作正常。所以……还是不知道……
  • @mett 你好,mett 你能告诉我们你在你的 iDevice 上使用的是哪个 iOS,因为解析平台支持 iOS 5 及更高版本,所以请确保你使用的是高于 5 的 iOS。
  • @mett,是的,这是很常见的场景,但第一条规则是:我们从不开发模拟器环境的应用程序,而只开发真实设备。真实设备和模拟器完全不同,大多数功能在模拟器上无法正常工作,例如文件管理、GPS、音频、摄像头、加速度计、陀螺仪、电子邮件、消息......等等,等等,等等......如果您只想在真实设备上测试 RC/FC 版本,这可能会给您带来非常糟糕的时间。跨度>

标签: iphone ios xcode


【解决方案1】:

这是我注意到的一件事,我不会假装对此了解很多,但这就是我得到的:

��Aug 30 18:16:24 Bla-Bla installd[54] <Error>: 0x201000 filter_attributes: Info.plist keys requested via MobileInstallationLookup/Browse in client Xcode (via mobile_installation_proxy) were not found in MobileInstallation's cache. Please file a bug requesting that these keys be added: <CFBasicHash 0x1cd928e0 [0x3a978100]>{type = mutable set, count = 18,
    entries =>

我相信这段代码表明您缺少 Info.Plist 键,所有红色文本都是您缺少的键。下面是尝试向苹果发送错误报告。

Aug 30 18:16:13 Bla-Bla mobile_house_arrest[1179] <Error>: Max open files: 125

这行在我看来你打开的文件太多了。我不知道如何解决它,但它可能会给你一些搜索结果。

【讨论】:

  • 感谢您的帮助。我也注意到了,但是,这两个错误也发生在我尝试测试的其他应用程序中。另一个工作得很好。所以我仍然不知道是什么导致了这个问题。
  • 我也不知道。我对编程很陌生。
  • 更新*** 好的,我能够解决黑屏问题,但不是我希望的方式。我仍然有问题,但与设备无关。显然,它与其中一个视图控制器有关(尽管我仍然没有错误或警告)。
  • 这真的很烦人。不知道该告诉你什么。你可以在你的帖子中更新它。
猜你喜欢
  • 2014-06-18
  • 2014-02-13
  • 2018-01-29
  • 2017-11-14
  • 2012-08-19
  • 2023-03-23
  • 2022-08-10
  • 1970-01-01
  • 2019-11-23
相关资源
最近更新 更多