【问题标题】:Xcode Error Message: "could not inspect application package"Xcode 错误消息:“无法检查应用程序包”
【发布时间】:2012-11-19 12:16:34
【问题描述】:

我正在尝试在设备上运行我的应用程序,但收到以下错误消息“无法检查应用程序包”, 该应用程序已在设备上成功运行,但随后停止,它仍然可以成功构建。 其他应用运行良好。

这是来自控制台的错误。

Dec 1 14:08:13 Marafeti kernel[0] : lockbot[567] Builtin profile: gputoolsd (sandbox) 12 月 1 日 14:08:28 Marafeti installd[31] : 0x2ff7c000 handle_install: 安装 mobile_installation_proxy 请求的“/var/mobile/Media/PublicStaging/demoMus.app” 12 月 1 日 14:08:28 Marafeti installd[31] : 0x2ff7c000 peruse_package: 从“/var/tmp/install_staging.44DhXc/demoMus.app”加载的应用程序信息字典没有包标识符 12 月 1 日 14:08:28 Marafeti installd[31] : 0x2ff7c000 stage_package: 无法在 /var/tmp/install_staging.44DhXc/demoMus.app 仔细阅读包 12 月 1 日 14:08:28 Marafeti installd[31]:0x2ff7c000 MobileInstallationInstall_Server:无法暂存包 12 月 1 日 14:08:28 Marafeti mobile_installation_proxy[572]:0x39dbeb88 MobileInstallationInstall:失败并显示 -1 12 月 1 日 14:08:28 Marafeti mobile_installation_proxy[572]:handle_install:安装失败 12 月 1 日 14:08:29 Marafeti installd [31] : 0x2ff7c000 handle_install: API 失败 12 月 1 日 14:11:50 Marafeti dataaccessd[83] : 0x1dd6c3b0|DA|Note |AccountID: E1B4940D-E02C-4ECF-B6AC-7B0DB8BAAA52 ("iCloud") (Legacy) 统计数据 DAStatusReport 0x1e8e9d80:{ DASRAccountType = IMAPNotes; DASRPersistentUUID = "E1B4940D-E02C-4ECF-B6AC-7B0DB8BAAA52"; DASRTimeSpan = "37.06999397277832"; } =======

AccountID: ABEE9E0F-D30B-488C-AE35-0A67FFC9D0A8 ("Gmail") (Legacy)
Stats DAStatusReport 0x1ddc6af0: {
    DASRAccountType = IMAPNotes;
    DASRPersistentUUID = "ABEE9E0F-D30B-488C-AE35-0A67FFC9D0A8";
    DASRTimeSpan = "36.95116698741913";
}
=======

AccountID: 00D54212-0B42-4D2E-A7CF-517815381FCC ("iCloud") (Legacy)
Stats DAStatusReport 0x1e8e5e30: {
    DASRAccountType = CalDAV;
    DASRFailedNetworkRequests = 3;
    DASRPersistentUUID = "00D54212-0B42-4D2E-A7CF-517815381FCC";
    DASRSuccessfulRequests = 1;
    DASRTimeInNetworking = "0.1138659119606018";
    DASRTimeSpan = "36.83354198932648";
}
DATaskManager <DACoreDAVTaskManager: 0x1e889060> state:Nominal
Active exclusive task: (null)
Queued exclusive tasks: (null)
Independent tasks: (null)
Held independent tasks: (null)
Modal-held independent tasks: (null)
Active queued task: (null)
Queued tasks: (null)
Active modal task: (null)
Queued modal tasks: (null)

Associated with account: <MobileCalDAVMobileMeChildDaemonAccount: 0x1ddc7740>: accountID 00D54212-0B42-4D2E-A7CF-517815381FCC persistentUUID 00D54212-0B42-4D2E-A7CF-517815381FCC
=======

AccountID: 939CC513-0027-4F6E-821B-CC14022CA49A ("Oxinai") (Legacy)
Stats DAStatusReport 0x1e8ece00: {
    DASRAccountType = CalDAV;
    DASRFailedNetworkRequests = 3;
    DASRPersistentUUID = "939CC513-0027-4F6E-821B-CC14022CA49A";
    DASRSuccessfulRequests = 1;
    DASRTimeInNetworking = "0.06468302011489868";
    DASRTimeSpan = "36.41551601886749";
}
DATaskManager <DACoreDAVTaskManager: 0x1ddfb950> state:Nominal
Active exclusive task: (null)
Queued exclusive tasks: (null)
Independent tasks: (null)
Held independent tasks: (null)
Modal-held independent tasks: (null)
Active queued task: (null)
Queued tasks: (null)
Active modal task: (null)
Queued modal tasks: (null)

Associated with account: <MobileCalDAVChildDaemonAccount: 0x1e8e41f0>: accountID 939CC513-0027-4F6E-821B-CC14022CA49A persistentUUID 939CC513-0027-4F6E-821B-CC14022CA49A
=======

AccountID: C82E01E9-8299-49F2-8501-B0C31E05C8FC ("Gmail") (Legacy)
Stats DAStatusReport 0x1e8ef610: {
    DASRAccountType = CalDAV;
    DASRFailedNetworkRequests = 3;
    DASRPersistentUUID = "C82E01E9-8299-49F2-8501-B0C31E05C8FC";
    DASRSuccessfulRequests = 1;
    DASRTimeInNetworking = "0.04899799823760986";
    DASRTimeSpan = "36.41232699155807";
}
DATaskManager <DACoreDAVTaskManager: 0x1dd7b060> state:Nominal
Active exclusive task: (null)
Queued exclusive tasks: (null)
Independent tasks: (null)
Held independent tasks: (null)
Modal-held independent tasks: (null)
Active queued task: (null)
Queued tasks: (null)
Active modal task: (null)
Queued modal tasks: (null)

Associated with account: <MobileCalDAVChildDaemonAccount: 0x1e8eea60>: accountID C82E01E9-8299-49F2-8501-B0C31E05C8FC persistentUUID C82E01E9-8299-49F2-8501-B0C31E05C8FC
=======

AccountID: 915C5A43-FE6D-4EEE-A157-A7D26671DDAA ("iCloud") (Legacy)
Stats DAStatusReport 0x1ddda4a0: {
    DASRAccountType = CardDAV;
    DASRPersistentUUID = "915C5A43-FE6D-4EEE-A157-A7D26671DDAA";
    DASRTimeSpan = "36.39721202850342";
}
DATaskManager <DACoreDAVTaskManager: 0x1e83be40> state:Nominal
Active exclusive task: (null)
Queued exclusive tasks: (null)
Independent tasks: (null)
Held independent tasks: (null)
Modal-held independent tasks: (null)
Active queued task: (null)
Queued tasks: (null)
Active modal task: (null)
Queued modal tasks: (null)

Associated with account: <CardDAVMobileMeChildDaemonAccount: 0x1ddda0e0>: accountID 915C5A43-FE6D-4EEE-A157-A7D26671DDAA persistentUUID 915C5A43-FE6D-4EEE-A157-A7D26671DDAA
=======

AccountID: 2F8D6492-EB6D-4C65-BB6D-29DB9B9D5FDD ("iCloud") (Legacy)
Stats DAStatusReport 0x1dddcb00: {
    DASRAccountType = BookmarkDAV;
    DASRPersistentUUID = "2F8D6492-EB6D-4C65-BB6D-29DB9B9D5FDD";
    DASRTimeSpan = "36.25405502319336";
}
DATaskManager <DACoreDAVTaskManager: 0x1ddcf400> state:Nominal
Active exclusive task: (null)
Queued exclusive tasks: (null)
Independent tasks: (null)
Held independent tasks: (null)
Modal-held independent tasks: (null)
Active queued task: (null)
Queued tasks: (
)
Active modal task: (null)
Queued modal tasks: (null)

Associated with account: <BookmarkDAVMobileMeChildDaemonAccount: 0x1e8f1670>: accountID 2F8D6492-EB6D-4C65-BB6D-29DB9B9D5FDD persistentUUID 2F8D6492-EB6D-4C65-BB6D-29DB9B9D5FDD
=======

AccountID: A7FA469A-9A67-4C93-8FF7-D60BC81AB75C ("Facebook") (Accountsd)
Stats DAStatusReport 0x1e8a8d40: {
    DASRDisplayName = Facebook;
    DASRPersistentUUID = "A7FA469A-9A67-4C93-8FF7-D60BC81AB75C";
    DASRTimeSpan = "36.18959897756577";
}
No Task Manager initted yet=======

AccountID: 34DBB43F-29EB-4B7A-B8EC-6DBAD3CE87BE ("Facebook") (Accountsd)
Stats DAStatusReport 0x1ddc1710: {
    DASRDisplayName = Facebook;
    DASRPersistentUUID = "34DBB43F-29EB-4B7A-B8EC-6DBAD3CE87BE";
    DASRTimeSpan = "36.06168901920319";
}
No Task Manager initted yet=======

_contactsLockHolder (null)
_contactsWaiters (
)
_waiterIDsExpectingContactsLock {(
)}
_eventsLockHolder (null)
_eventsWaiters (
)
_waiterIDsExpectingEventsLock {(
)}
_notesLockHolder (null)
_notesWaiters (
)
_waiterIDsExpectingNotesLock {(
)}
_bookmarksLockHolder (null)
_bookmarksWaiters (
)
_waiterIDsExpectingBookmarksLock {(
)}
Shared DAPowerAssertionManager object <DADaemonPowerAssertionManager: 0x1dd637c0>:
Contexts asserting power: <NSCountedSet: 0x1ddf9fd0> ()
Contexts held aside: <NSCountedSet: 0x1ddf68f0> ()
Active Assertions: {
}

DARefreshManager enabled wrappers:
Topic "com.me.cal" {
    <DARefreshWrapper 0x1ddc14c0 for delegate <MobileCalDAVMobileMeChildDaemonAccount: 0x1ddc7740>: accountID 00D54212-0B42-4D2E-A7CF-517815381FCC persistentUUID 00D54212-0B42-4D2E-A7CF-517815381FCC: Push state 0, style Poll, last registration: (null)>
}
DARefreshManager wrappers:
    <DARefreshWrapper 0x1e889c90 for delegate <MobileCalDAVChildDaemonAccount: 0x1e8e41f0>: accountID 939CC513-0027-4F6E-821B-CC14022CA49A persistentUUID 939CC513-0027-4F6E-821B-CC14022CA49A: Push state 0, style Poll, last registration: (null)>
    <DARefreshWrapper 0x1dd28170 for delegate <CardDAVAgent: 0x1e8af410>: Push state 0, style Poll, last registration: (null)>
    <DARefreshWrapper 0x1e829ae0 for delegate <BookmarkDAVAgent: 0x1e8af570>: Push state 0, style Poll, last registration: (null)>
    <DARefreshWrapper 0x1ddeeac0 for delegate <MobileCalDAVChildDaemonAccount: 0x1e8eea60>: accountID C82E01E9-8299-49F2-8501-B0C31E05C8FC persistentUUID C82E01E9-8299-49F2-8501-B0C31E05C8FC: Push state 0, style Poll, last registration: (null)>

有什么建议吗?

感谢您的宝贵时间。

【问题讨论】:

  • 不确定...但这看起来很可疑:“demoMus.app”没有捆绑标识符。您的信息 plist 文件中是否有捆绑标识符键?
  • @PhillipMills 是的,我没有修改它。
  • 奇怪的东西...当我向我的应用程序添加一个名为“资源”的文件夹时,我收到警报通知“无法检查应用程序包”。即使我删除了这个文件夹(在我创建它之后),这个错误仍然存​​在。我的控制台中没有出现任何内容。也很想知道为什么会这样。
  • 尝试删除设备上的应用并重新安装?
  • 只是猜测-删除所有派生文件夹或至少删除这个-您可以使用管理器找到位置。关闭 Xcode 并重新启动它。删除设备上的应用程序,然后重启(重新启动)未连接到 Mac 的设备。现在再试一次。

标签: iphone ios xcode device


【解决方案1】:

取消选中 .plist 中的 Target Membership

【讨论】:

    【解决方案2】:

    Swift 框架

    对我来说,问题在于使用了一个自定义的 Swift 框架,其文件结构类似于以下内容:

    取自: https://developer.apple.com/library/mac/documentation/MacOSX/Conceptual/BPFrameworks/Concepts/FrameworkAnatomy.html

    事实证明,使用 Swift 的正确框架结构如下所示:

    在我将目录结构更改为后者之后 - 一切都按预期工作

    【讨论】:

      【解决方案3】:

      我有两个问题为我解决了这个问题。 首先,我在 XCodes 复制文件部分进行了配置以复制 ResourceRules.plist,另一方面,在复制文件部分(在我的例子中为 Storekit)还添加了一个非第三方 ios 框架。删除后问题就解决了。

      【讨论】:

        【解决方案4】:

        我遇到了同样的问题,使用无线企业应用程序,该应用程序在更新到 XCode 6.1 之前可以正常工作。

        我遇到了通常的嫌疑人(捆绑标识符、名为“资源”的文件或目录、清理和构建等)。没有骰子。

        这解决了我的问题 - 我重命名了我的应用程序的 .plist 文件,并从 XCode 更新后运行良好的项目复制到 .plist 文件中。

        重新编译。工作。

        我没有逐行比较来查看发生了什么变化……因为我已经在这上面浪费了一天的时间。也许以后。但不是今天。

        希望这可以帮助其他人不要浪费一个下午。

        【讨论】:

          【解决方案5】:

          对我来说,我将一个名为“Resources”的文件夹复制到 Xcode 4.6.2 中。当 Xcode 询问时,我为任何添加的文件夹创建了文件夹引用。

          每次我这样做时,我都必须转到派生应用程序目录,并删除我的项目的构建目录以使其再次运行。

          解决方案:不要通过引用将文件夹复制到名为“Resources”的 Xcode 中。将其重命名为 Resources 以外的其他名称。

          非常烦人的错误。

          【讨论】:

          • 我发现如果文件夹甚至包含“资源”这个词=(
          【解决方案6】:

          我已经创建了一个名为“Resources”的组,然后选择资源文件夹下的所有资源并选择“为任何添加的文件夹创建文件夹引用”

          【讨论】:

            【解决方案7】:

            当我替换 xcode 上的“资源”文件夹时,错误地选择了以下选项。

            为任何添加的文件夹创建文件夹引用

            但正确的选择应该是,

            为任何添加的文件夹创建组

            注意上述选项对于节省时间广告解决上述问题很重要。 (这是出现此错误的可能性之一)。

            【讨论】:

            • 使用“为任何添加的文件夹创建组”为我解决了这个问题。我还选择了“将项目复制到目标组的文件夹”。这两个选项让一切变得不同!
            【解决方案8】:

            问题在于您的捆绑包名称。确保为项目、目标和 info.plist 分配一个包 ID。我有同样的问题,添加捆绑ID后它修复了:)

            【讨论】:

              【解决方案9】:

              也尝试做一个产品->清洁

              【讨论】:

              • 我有/现在有同样的问题。清洁没有为我修复它。对我来说,它是在我添加一个文件夹(不使用文件夹引用)之后出现的,然后删除它并使用文件夹引用重新添加它。重新启动 Xcode 也没有帮助。
              猜你喜欢
              • 1970-01-01
              • 2014-11-18
              • 2013-01-15
              • 1970-01-01
              • 2014-11-14
              • 2012-06-12
              • 2022-01-04
              • 1970-01-01
              相关资源
              最近更新 更多