2011年6月16日 星期四

Create an IPA file

Creating an IPA is done along the same way as creating an .xcarchive: Product -> Archive. After the Archive operation completes, go to the Organizer, select your archive, select Share and in the "Select the content and options for sharing:" pane set Contents to "iOS App Store Package (.ipa) and Identity to iPhone Distribution (which should match your ad hoc/app store provisioning profile for the project).

Chances are the "iOS App Store Package (.ipa)" option may be disabled. This happens when your build produces more than a single target: say, an app and a library. All of them end up in the build products folder and Xcode gets naïvely confused about how to package them both into an .ipa file, so it merely disables the option.

A way to solve this is as follows: go through build settings for each of the targets, except the application target, and set Skip Install flag to YES. Then do the Product -> Archive tango once again and go to the Organizer to select your new archive. Now, when clicking on the Share button, the .ipa option should be enabled.

制作IPA安装包

随着最近AppStore的破解游戏和软件数量逐渐增加,安装成了一个麻烦的问题,有些玩家不方便连接Wi-Fi,这样就不能使用WinSCP来赋予权限,很不方便,所以我们可将下载到的软件先制成IPA安装包,再使用iTunes安装,这样不仅省去了手动上传的时间,也不用再为权限问题担心了。

  下面小编以Pool这个台球游戏为例,给大家示范一下如何制作IPA安装包:

  1.首先找一张任意的JPG格式图片文件,裁剪成正方形,最好不要大于500×500,改好以后,把这个xxx.JPG文件直接改名为iTunesArtwork(注意大小写),注意去掉后缀,这张图片是用于在iTunes的应用程序栏目里所看到的图标。

  2.建立一个临时文件夹,进入这个新建的文件夹后,再建一个文件夹并命名为Payload(注意大小写),最后应该得到如图1所示的两个文件。

图1

点击查看大图

  3.把破解以后准备要打包的Pool.app文件夹复制到Payload里,使用plist文件编辑工具(例如pledit.exe)打开Pool.app文件夹里的Info.plist文件,打开后拉到最底下结尾处,在</dict></plist>(图2)之前添加两段语句(图3):

  <key>SignerIdentity</key>

  <string>Apple iPhone OS Application Signing</string>

图2

点击查看大图

图3

点击查看大图

  添加完毕后原路径保存,到此为止,需要的准备工作都已经完成了,下面就要开始打包了。



4.使用WinRAR把第一步中制作好的iTunesArtwork文件和Payload文件夹一起压缩成Pool.zip文件(图4),然后把这个zip文件直接改名为Pool.ipa(图5),然后双击Pool.ipa文件就可以将其导入iTunes了(图6)。

  注意安装前需要对系统文件做些修改:iPa破解软件安装补丁

图4

点击查看大图

图5

点击查看大图

图6





5.使用数据线连上iPhone,在应用程序中将Pool打勾,按同步(图7),iTunes会逐一显示“正在同步”、“正在安装”和“同步已完成”(图8、9、10),结束后这个程序就安装到你的iPhone里了(图11),这种安装方法既不用手工传文件又不用连接WinSCP改权限,非常简便。

图7

点击查看大图

图8

点击查看大图

图9

点击查看大图

图10

点击查看大图

图11

点击查看大图

  要点总结:

  -Payload和iTunesArtwork这两项一定要注意大小写;

  -生成的压缩包里应该是2个文件,一个iTunesArtwork文件,另一个是Payload文件夹,Payload文件夹里边是xxx.app文件夹,xxx.app文件夹里边是程序;

  -正确修改Info.plist文件,这几点都没错的话就没问题了。

How to create an IPA file

Taken from another site

What you need:
1: An app
2: A patched MobileInstallation file installed on your iPhone or iPod Touch.
3: Lastly, you need to know that when I say "ProgName", substitute the name of the program you're working with
Getting the iTunesArtwork file
The iTunesArtwork file is simply a jpeg image with the extension taken off, and is included in application's install folder on your device for every app downloaded from the app store. This image is what appears in the Applications section of iTunes as the icon for the app, and is definitely nice to have -- if you don't have it, you get a generic, black icon that no one wants to see. If you have the iTunesArtwork file, skip all this and go down to the next red headline! Otherwise, read on:
1: Open iTunes on your computer and find your application in the iTunes Music Store. On the application's page, find the app icon at the top-left corner of the page and right-click it. Now choose "Copy iTunes Store URL". Your clipboard now contains something like this:
Code:
http://phobos.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=284962368&mt=8
2: Paste that somewhere (in your browser or a text editor) and replace the section that says
Code:
phobos.apple.com
with this:
Code:
ax.phobos.apple.com.edgesuite.net
Go to the resulting URL in your browser.
3: Do a search on that page for the text:
Code:
100x100-75
Safari users will have to right-click the page and select "View Source" before searching for the above text.
Once the text is found, copy the entire URL it's in to your clipboard. For example, this is the URL I ended up with:
Code:
http://a1.phobos.apple.com/us/r30/Purple/fe/c1/bc/mzl.gpjkgpje.100x100-75.jpg
4: Paste the URL from the last step into your browser again, but change the "100x100" to "512x512". The image that loads will be the official, Apple-provided iTunesArtwork file. Save this to your desktop.
5: Rename the file to "iTunesArtwork" with NO extension. Note that doing this from the GUI on Mac will simply hide the extension, not remove it. If this is the case, open Terminal (found in /Applications/Utilities) and paste this line into it:
Code:
mv ~/Desktop/iTunesArtwork.jpg ~/Desktop/iTunesArtwork
Mac and Linux users should then execute this line in Terminal to apply the appropriate permissions to the file:
Code:
chmod 665 ~/Desktop/iTunesArtwork
Windows users will need to enable the "Show known file extensions" option in their folder options in order to remove the extension properly.
6: Pat yourself on the back! You've just gotten your iTunesArtwork file.
Bundling the .IPA
1: Create a folder on your desktop called "working". Open that, and create another folder inside of it called "Payload". Case-sensitive.
2: Move your iTunesArtwork file into the "working" folder, and your .app into the Payload folder.
3: Mac and Linux users only: Open Terminal and run the following command:
Code:
chmod -R 775 ~/Desktop/working/Payload
4: Go into your ProgName.app folder within Payload (Mac users, right-click ProgName.app and choose Show Package Contents).
5 (For Mac users with Dev Tools installed ONLY): Double-click the Info.plist file. The Property List Editor will open and show a simple table. Click the last row of the table, then press the + button that appears to create a new row at the bottom. In the first new cell enter
Code:
SignerIdentity
and in the second new cell, enter
Code:
Apple iPhone OS Application Signing
Save this file.
5 (For Windows, Linux, and other Macs): Visit the following site: https://brokolice.drsny.net/iphone/plutil/ (You may have to Approve the security certificate -- don't worry, it's safe)
Browse for your Info.plist file, and press the "Convert" button. Save the resulting file to your computer. Windows users, open this file in WordPad. Mac and Linux users can use any text editor.
scroll to the bottom of the file and make a new line just before
Code:
</dict>
And paste the following in that spot:
Code:
<key>SignerIdentity</key>
<string>Apple iPhone OS Application Signing</string>
The end of the file should now look like this:
Code:
<key>SignerIdentity</key>
<string>Apple iPhone OS Application Signing</string>
</dict>
</plist>
Save the file (Make sure the name is Info.plist -- case sensitive!) and replace the Info.plist in ProgName.app with it.
6: Time to zip it up. Use your favorite method to zip the iTunesArtwork file and Payload folder together in one .zip file. Mac users can select both, right-click, and choose "Compress 2 Items". Windows users can select both, right-click, and choose "Add to Archive" (remember to select ZIP, not RAR if that option is available).
If you unzip the file, you should see this structure:
Code:

iTunesArtwork
+Payload
AppName.app
7: Rename the zip file to ProgName.ipa
8: All done! Congratulations!

How to install IPA file

Official Developer Program
For a standard iPhone you'll need to pay the US$99/yr to be a member of the developer program. You can then use the adhoc system to install your application onto up to 100 devices. The developer program has the details but it involves adding UUIDs for each of the devices to your application package. UUIDs can be easiest retrieved using Ad Hoc Helper available from the App Store. For further details on this method, see Craig Hockenberry's Beta testing on iPhone 2.0 article


Jailbroken iPhone
For jailbroken iPhones, you can use the following method which I have personally tested using the AccelerometerGraph sample app on iPhone OS 3.0.

Create Self-Signed Certificate
First you'll need to create a self signed certificate and patch your iPhone SDK to allow the use of this certificate:

1.Launch Keychain Access.app. With no items selected, from the Keychain menu select Certificate Assistant, then Create a Certificate.

Name: iPhone Developer
Certificate Type: Code Signing
Let me override defaults: Yes

2.Click Continue

Validity: 3650 days

3.Click Continue

4.Blank out the Email address field.

5.Click Continue until complete.

You should see "This root certificate is not trusted". This is expected.

6.Set the iPhone SDK to allow the self-signed certificate to be used:

sudo /usr/bin/sed -i .bak 's/XCiPhoneOSCodeSignContext/XCCodeSignContext/' /Developer/Platforms/iPhoneOS.platform/Info.plist

If you have Xcode open, restart it for this change to take effect.

Manual Deployment over WiFi
The following steps require openssh, and uikittools to be installed first. Replace jasoniphone.local with the hostname of the target device. Be sure to set your own password on both the mobile and root users after installing SSH.

To manually compile and install your application on the phone as a system app (bypassing Apple's installation system):

1.Project, Set Active SDK, Device and Set Active Build Configuration, Release.

2.Compile your project normally (using Build, not Build & Go).

3.In the build/Release-iphoneos directory you will have an app bundle. Use your preferred method to transfer this to /Applications on the device.

scp -r AccelerometerGraph.app root@jasoniphone:/Applications/

4.Let SpringBoard know the new application has been installed:

ssh mobile@jasoniphone.local uicache

This only has to be done when you add or remove applications. Updated applications just need to be relaunched.

To make life easier for yourself during development, you can setup SSH key authentication and add these extra steps as a custom build step in your project.

Note that if you wish to remove the application later you cannot do so via the standard SpringBoard interface and you'll need to use SSH and update the SpringBoard:

ssh root@jasoniphone.local rm -r /Applications/AccelerometerGraph.app && ssh mobile@jasoniphone.local uicache

2011年1月8日 星期六

iPhone 4 wallpaper - Spider Man

2010年12月5日 星期日

iPhone 4 wallpaper - Sweet?

iPhone 4 wallpaper - Grass Bookshelf