您的位置:首页 > 其它

破解xcode_3.2.6 免证书运行程序到iPhone4.2.1 真机联调 调试 发布ipa

2012-09-10 10:09 615 查看
破解xcode_3.2.5_and_ios_sdk_4.2_final.dmg 免证书运行程序到iPhone4.2.1或iPad上

或 xcode_3.2.6_and_ios_sdk_4.2_final.dmg 免证书运行程序到iPhone4.2.1或iPad上

开发环境:
Mac OS X 版本10.6.6

xcode_3.2.5_and_ios_sdk_4.2_final.dmg
How to create a simple(View-Based) iPhone Application?
Step 1:

open XCode(IDE), select File-->New project. select the template "View-Based Application" and click on "Choose".

Name this project for ex: “Hello World” in the required location and click “Save” button.

Step 2: An XCode window will be opened.

To Run the template:-click on "Build and Go" button (or) press Ctrl+R .

It will start the iPhone simulator and you can see a gray screen on that.

Click on "Home" button, it will show you a HelloWorld icon on the dash board of iPhone simulator.

Step 3:-Now, open Xcode project and select "HelloWorldViewController.h" file and type the following code inside interface:

IBOutlet UITextField *txtUserName;

IBOutlet UILabel *lblUserTypedName;

Also write this method before end of this class

- (IBAction) submitYourName;


Step 4:- So your HelloWorldViewController.h file will look like this:

#import <UIKit/UIKit.h>

@interface HelloWorldViewController : UIViewController {

IBOutlet UITextField *txtUserName;

IBOutlet UILabel *lblUserTypedName;

}

- (IBAction) submitYourName;

@end

Step 5:-Now, open HelloWorldViewController.m file and type this method before @end

- (IBAction) submitYourName;

{

lblUserTypedName.text = txtUserName.text;

}

Step 6:- We have to start the design on InterfaceBuilder(IB). For this, open XCode, at the left-side of the window,look at bottom of "Groups & Files",you can find "NIB files".Expand it ,u can find two files:

(a)MainWindow.xib -->main window or entry point to your application

(b)"HelloWorldViewController.xib" file which is mapped to your controller class .Double-click on this file,it will be opened in Interface builder.

Step 7:- click on Tools->select Library or Press "cmd+shift+L" then Dag the Label from Library to View.

As Label is selected, Press "cmd+1" or tools->select Inspector then change the label name as "Your name" in the Label type.

Step 8:Drag the TextField from Library to your view ,also drag another Label inside view.

Make sure Label is selected, and next

Click on Tools --> Size Inspector (cmd + 3) then

> change the width of this text field to 150.

>Go to tools --> Inspector, change the layout to center.

Step 9:-At last, drag a button to the view,press cmd+1. In Title, type “Submit”.

Step 10:-Now,we have to map IB to controller class variables & methods.for this,select File's Owner in IB and select tools-->Inspector(cmd+2).

We have two sections here:Class Actions & Class Outlets.

To perform any actions for the controls we go for Class Actions.

Step 11:-In the "Outlets" section,u can see that 2 new variables are added as: 'txtUserName' and 'lblUserTypedName' ;

Click-on 'txtUserName' radio button and drag it to text field in view.

Step 12:Do the same with lblUserTypedName, select its radio-button and drag it to below label.

Step 13:Now the last step is, click on 'submitYourName' radio and drag it to the button,Right-click and select "Touch Down" from the list.

Step 14:close the interface and open xcode. Either cmd + enter or simply press of “build and go” button to run this hello world application. It will open the iPhone Simulator and you can check for the required output.

All these steps should be fallowed for developing a basic application of displaying your name in a label.

iPhone开发入门(4)—应用程序开发的第一步
http://www.yifeiyang.net/iphone-development-introduction-4-the-first-step-in-application-development/

生成本机证书

应用程序->实用工具->钥匙串访问

菜单:钥匙串访问->证书助理->创建证书, 然后按以下图片顺序操作即可:

1.Xcode 3.2.5免证书开发调试_打开创建证书菜单

2.Xcode 3.2.5免证书开发调试_输入证书名称iPhone Developer并选择覆盖默认值

3.Xcode 3.2.5免证书开发调试_确定继续

4.Xcode 3.2.5免证书开发调试_输入序列号有效期,有效期不要超过365天

5.Xcode 3.2.5免证书开发调试_输入电子邮件地址

6.Xcode 3.2.5免证书开发调试_输入密钥对信息

7.Xcode 3.2.5免证书开发调试_密钥使用扩展扩展选择:签名

8.Xcode 3.2.5免证书开发调试_已扩展的密钥使用扩展选择:代码签名

9.Xcode 3.2.5免证书开发调试_基本约束扩展不选择

10.Xcode 3.2.5免证书开发调试_主题备用名称扩展输入RFC822名称,填入邮箱名即可

11.Xcode 3.2.5免证书开发调试_用于该证书的位置选择钥匙串类型为登录

Xcode破解:
保证Xcode处于关闭状态,应用程序->实用工具->终端,复制粘贴下面的代码:

#!/bin/bash

cd /Developer/Platforms/iPhoneOS.platform/Developer/Library/Xcode/Plug-ins/iPhoneOS\ Build\ System\ Support.xcplugin/Contents/MacOS/

dd if=iPhoneOS\ Build\ System\ Support of=working bs=500 count=255

printf "\x8f\x2a\x00\x00" >> working

dd if=iPhoneOS\ Build\ System\ Support of=working bs=1 skip=127504 seek=127504

/bin/mv -n iPhoneOS\ Build\ System\ Support iPhoneOS\ Build\ System\ Support.original

/bin/mv working iPhoneOS\ Build\ System\ Support

chmod a+x iPhoneOS\ Build\ System\ Support
然后复制粘贴下面的代码到命令行终端:

mkdir /Developer/iphoneentitlements30

cd /Developer/iphoneentitlements30

curl -O http://www.alexwhittemore.com/iphone/gen_entitlements.txt

mv gen_entitlements.txt gen_entitlements.py

chmod 777 gen_entitlements.py
执行完脚本后修改”/Developer/Platforms/iPhoneOS.platform/Info.plist”文件,做如下修改:

新增如下两项(告知项目编译无需证书):
1 PROVISIONING_PROFILE_ALLOWED = NO
2 PROVISIONING_PROFILE_REQUIRED = NO
然后用文本编辑器将该文件中所有的”XCiPhoneOSCodeSignContext”替换为”XCCodeSignContext”,即去掉中间的”iPhoneOS” 。如果不进行此步,编译Device Release版本时會报错:
1 Code Sign error: a valid provisioning profile matching the application's Identifier 'com.yourcompany.xxxx' could not be found
打开Xcode,打开你的项目,Project->>Edit Project Setting,选择”Build”页面,Configurations和Show都选择All,找到Code Signing Identity项,删除其子项,并将”Code Signing Identity”赋值为”iPhone Developer”(其实是个选项)
然后找到你项目的xxx-Info.plist文件,添加”SignerIdentity”项,其值为”Apple iPhone OS Application Signing”.保存。
Xcode破解完成,或者更准确的讲,是配置完成!

Xcode真机调试:

将 iPhone接入电脑,在Xcode的Window-&gt;Organizer中会侦测到你的iPhone.查看iPhone和你的Xcode识别正常后退出Organizer,选择编译环境为”iPhone Device-4.2|Release”,点击”Build and Go”,期间会出现让我们选择签名证书,点选”允许”后,等待你的iPad/iPhone屏幕点亮就ok了。
你的程序会自动下载到你的iPhone中,可以进行真机调试了(如果 不能真机调试的话 new file,选择Code Signing 中的Entitlements,添加后名称为Entitlements.plist。 添加一个Boolean类型,名称为get-task-allow的Key,状态为CHECKED
[b] 在project setting中的Code Signing Entitlements的值设为Entitlements.plist,重新Build即可解决

[/b]

打包ipa:

编译完了的程序是BargainSale.app文件(目录在文稿->BargainSale->build->Release-iphoneos),我们
需要制作成ipa安装包,方便安装在iPad或iPhone上。
第一步,新建一个文件夹,名字任意。找一个不大于500*500的jpg图片,改名为:iTunesArtwork,注意不能有后缀名。
第二步,建立一个文件夹,名为:Payload,把刚才编译的BargainSale.app拷贝到这个文件夹里面。
第三部,修改app里面的Info.plist文件,windows下可以用Pledit.exe编辑,在<dict></dict>节点里面加入:
<key>SignerIdentity</key>
<string>Apple iPhone OS Application Signing</string>
然后选中Payload和iTunesArtwork,右键生产压缩zip文件,比如:BargainSale.zip,把后缀名改为ipa就可以了。现在可以双击BargainSale.ipa文件,看看可以加入到iTunes了。


希望能对大家有帮助,没有图关于破解 网上有很多 ,但是真机单步联调基本都不能,有其他问题 请留言
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  ipa
相关文章推荐