模拟“添加到主屏幕"较旧的iPod touch上的功能 [英] simulate "Add to Home Screen" feature on older iPod touch

查看:67
本文介绍了模拟“添加到主屏幕"较旧的iPod touch上的功能的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个越狱的iPod Touch 1.1.4,并且想尝试通过编写脚本来创建简约的应用程序",然后将Safari启动到"webapp".但是1.1.4没有添加到主屏幕"快捷方式选项.有没有一种方法可以通过脚本来模拟?我尝试编辑HelloPython Bash脚本,将其更改为:

I have a jailbroken iPod Touch 1.1.4, and want to experiment with creating minimalistic "apps" just by scripting, launching Safari to a "webapp". But 1.1.4 does not have the "Add to Home Screen" shortcut option. Is there a way to simulate this just by scripting? I've tried editing the HelloPython Bash script, changing it to:

#!/bin/bash
/Applications/MobileSafari.app/MobileSafari http://gnixl.com/

我得到了错误:

ABORT: Unable to register "com.apple.mobilesafari" port, 1103 unknown error code.

我删除了网址 http://gnixl.com/,同样的错误.

I removed the URL http://gnixl.com/, same error.

是否有一种无需使用Python或Objective-C就能做到这一点的方法?并不是说我不愿意使用"/"或"/",而是我在寻找最准系统的方法,该方法首先会执行某事.

Is there a way to do this without using Python or Objective-C? Not that I'm not willing to use either/or, but I'm looking for the most barebones approach that will do something first.

如果拥有更新的iPod touch的人可以添加到主屏幕"中的任何内容并分析将其放入应用程序"文件夹中的内容,那可能仅仅是我所需要的信息.或者,如果有人用ziphone越狱了他们的设备并将链接保留在主屏幕上,那么除非链接"实际上是可执行文件,否则该链接也将起作用.

If someone with a newer iPod touch could "add to home screen" anything and analyze what it puts into the Applications folder, that might be just the info I need. Or if someone jailbroke their device with ziphone and left the link on the homescreen, that would work too unless the "link" is actually an executable.

[2016年1月25日更新:2个github项目现在使用troutinator的答案作为模板: https://github .com/jcomeauictx/conwaylife https://github.com/jcomeauictx/taillight]

[update 2016-01-25: 2 github projects now up using troutinator's answer as template: https://github.com/jcomeauictx/conwaylife and https://github.com/jcomeauictx/taillight]

推荐答案

好的,我有一部iPhone 3G.我使用添加到主屏幕"按钮从Safari创建了一个链接.它在/private/var/mobile/Library/WebClips/内创建了一个名为54C86B09482D4560BAB46091CC75825A.webclip的目录.该目录包含两个文件,icon.pngInfo.plist. icon.png只是在查看应用程序屏幕时显示的图标.

Okay, I have an iPhone 3G. I created an link from Safari using the "Add To Home Screen" button. It created a directory called 54C86B09482D4560BAB46091CC75825A.webclip inside of /private/var/mobile/Library/WebClips/. That directory contains two files, icon.pngand Info.plist. icon.png is simply the icon that gets shown when looking at the apps screen.

Info.plist的内容是真实信息所在的地方

The contents of Info.plist are where the real information is:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
        <key>ClassicMode</key>
        <false/>
        <key>FullScreen</key>
        <false/>
        <key>IconIsPrecomposed</key>
        <false/>
        <key>IconIsScreenShotBased</key>
        <true/>
        <key>Scale</key>
        <real>0.32653060555458069</real>
        <key>ScrollPoint</key>
        <dict>
                <key>x</key>
                <real>0.0</real>
                <key>y</key>
                <real>-183</real>
        </dict>
        <key>Title</key>
        <string>The Daily WTF</string>
        <key>UIStatusBarStyle</key>
        <string>UIStatusBarStyleGray</string>
        <key>URL</key>
        <string>http://thedailywtf.com/</string>
</dict>
</plist>

修复了一些语法,做了一些澄清,并在下面添加了测试/示例:

因此,为了测试这一点,我创建了一个名为C28C8FDC2F184AAD84F77B511442548F.webclip的新文件夹,并将Info.plist文件从另一个目录复制过来,将URL编辑为http://google.com.然后,我重新弹起电话,然后像其他任何webclip一样出现.文件夹名称只是一个十六进制编码的GUID,我使用http://www.somacon.com/p113.php并选择了0x之后的内容进行此简单测试

So, to test this out I created a new folder called C28C8FDC2F184AAD84F77B511442548F.webclip and copied the Info.plist file over from the other directory, edited the url to http://google.com. I then re-sprung the phone and it showed up just like any other webclip. The folder name is simply a hex encoded GUID, I used http://www.somacon.com/p113.php and just selected what was after 0x for this simple test

这篇关于模拟“添加到主屏幕"较旧的iPod touch上的功能的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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