iPhone .deb 应用程序安装问题
我遇到了一个非常奇怪的问题。我为自己开发了一个应用程序,其中包含以下三个文件
- MyApp.app
- MyAppDaemon.app
- LaunchDaemon.plist
当我使用 ssh 将每个文件复制到特定文件夹时,我的应用程序运行完美。
- MyApp.app 进入 /Applications
- MyAppDaemon.app 进入 /private/var/mobile/
- LaunchDaemon.plist 进入 /System/Library/LaunchDaemons/
如果我使用 cyberduck 进行 ssh 并将每个文件放入上面指定的文件夹中,应用程序效果很好。
现在的问题是,当我尝试将文件打包到 .deb 文件中,然后传输到 iPhone,然后使用终端安装它 [dpkg -i MyApp.deb] 时,文件会很好地复制到我之前指定的文件夹中,但我的应用程序不会工作。我已经检查了所有权限,仍然无法工作。
这有点奇怪,一切都以与我使用 ssh 相同的方式完成,但在 .deb 文件的情况下它不起作用,但是如果我单独复制文件,它会很好用
对此有什么建议吗?
I am into a very strange problem. I have developed an app for myself, which has following three files
- MyApp.app
- MyAppDaemon.app
- LaunchDaemon.plist
When i copy each file into specific folder using ssh , my app works perfect.
- MyApp.app into /Applications
- MyAppDaemon.app into /private/var/mobile/
- LaunchDaemon.plist into /System/Library/LaunchDaemons/
App works great if i ssh using cyberduck and puts each file in above specified folders.
Now the problem is when i try to pack the files in .deb file and then transfer to iPhone and then using Terminal i install it [dpkg -i MyApp.deb] the files get copied fine in the folders i specified earlier but my app doesnt work. I have checked all the permissions, still not working.
Its kinda strange, everything is done in the same way as i do using ssh but in case of .deb file its not working, however it works great if i copy the files individually
Any Advice on this??
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
感谢各位的回复,我已经找到了解决问题的方法,尽管我仍然不知道为什么会出现问题。这就是我所做的,
我将 AppDaemon 打包到 xcode 中的 MyApp 资源文件夹中,在 DEBIAN 的 postinst 文件中,我将该文件夹移动到 /private/var/mobile ,这实际上导致了问题。该文件夹已复制到 /private/var/mobile,但可能不具有所有权限和所有权。所以我所做的是,在将其打包到 .deb 文件之前,我从 xcode 中 MyApp 的资源文件夹中删除了 AppDaemon,并将其设为独立应用程序。然后我制作了这个文件架构以打包到 .deb
然后我用 .deb 命令打包该文件夹,就像 saurik 在他的网站中指示的那样。
一切顺利,问题解决了。但我仍然不知道为什么会出现这个问题?
Thanks for the replies guys, i have found the solution to my problem, although i still dont know why the problem was occurring. Here is what i did
I had packed my AppDaemon in MyApp resources folder in xcode and in DEBIAN's postinst file i was moving that folder to /private/var/mobile which was causing problem actually. The folder was getting copied to /private/var/mobile but may be not with all the permissions and ownership. So what i did is, before packing it into .deb file, i deleted the AppDaemon from resources folder of MyApp in xcode and made it a standalone app. Then i made this file architecture for packing into .deb
Then i packed the folder with .deb commands like this saurik instructed in his site.
All went well, problem solved. However i still dont know why the problem was taking place?
也许 .deb 安装正在将文件推送给不同的所有者?
Maybe the .deb installation is pushing the files out with a different owner?
您的问题很可能出在 .deb 创建过程中。您是否遵循 saurik 网站上的说明或其他方法? http://www.saurik.com/id/7
Your problem is most likely in your .deb creation process. Did you follow the instructions on saurik's site or a different method? http://www.saurik.com/id/7
我在创建 deb 方面没有太多经验,但像 jessecurry 一样,我认为权限可能是问题所在,如果您可以尝试从终端运行应用程序并看看会得到什么。
I don't have much experience with creating debs but like jessecurry I think permissions might be the problem, if you can try running the app from the terminal and see what you get.
大胆猜测(我没有处理过越狱开发),但当您打包为 .deb 文件时,符号链接可能会被取消引用?
已签名的 iPhone 应用程序在捆绑包内的 CodeSignature 文件夹中具有符号链接。如果您不小心地压缩和解压缩捆绑包(例如,为
zip
提供-y
选项),符号链接将被替换为文件的副本,从而破坏签名。这会导致应用程序神秘损坏。即使您不进行代码签名,也请尝试解压您的 deb 文件并将输出与原始应用程序包进行比较,看看是否存在差异。
Wild guess (I have not dealt with jailbroken development) but perhaps a symlink is being dereferenced when you pack as a .deb file?
iPhone apps that are signed have a symlink in the CodeSignature folder inside the bundle. If you zip and unzip the bundle without being careful (e.g., providing the
-y
option tozip
), the symlink will be replaced with a copy of the file, which breaks the signature. This leads to mysteriously broken apps.Even if you're not code signing, try unpacking your deb file and comparing the output to the original app bundle, to see if there's a difference.