无法在 iOS 模拟器中将通行证添加到钱包,但未记录任何内容

Can't add pass to Wallet in iOS Simulator, but nothing is logged

我使用 Apple 提供的 signpass 应用程序创建了一个静态 pkpass 文件。根据 Apple 的 documentation,我应该能够将通行证拖入 iOS 模拟器 window 并且应该添加通行证或

errors are logged to the system log, which you can view with the Console app.

当通行证在Finder中双击时出现文件,将其拖到模拟器会打开钱包应用程序但不会添加它;此外,控制台中没有任何内容显示错误。有什么方法可以找出我的通行证有什么问题吗?

我发现为什么控制台中没有任何记录……显然 Apple 只说了一半的真相。模拟器的系统日志实际上是与电脑的系统日志分开的,位于/Users/[Your username]/Library/Logs/CoreSimulator/[Simulator UUID]/system.log,可以通过选择Debug > Open System Log找到模拟器(或按 ⌘/)。那里会出现错误(在我的例子中,signpass 向 zip 添加了一个 .DS_Store,即使目录没有)。