關于ios越獄開發的那些事
iosopendev的安裝和使用
人們總是尋求著簡便的方法,來追求工作的效率,這樣很多的工具就出來了。在前篇Theos的介紹中,我們需要編寫makefile文件,還有很多工作自己需要去做。有沒有一種簡便的方法能夠快捷如模板一樣的東西,幫我們完成很多的工作吧,這個工具就是iOSOpenDev。
IOS OpenDev下載與安裝
1.下載地址 http://iosopendev.com/download/
2. 安裝的過程中,如果出現錯誤的話,可以參考:https://github.com/kokoabim/iOSOpenDev/wiki/Troubleshoot
當然有時候出現的提示不知道是什么問題的話,可以將以上的問題都FIX下,FIX一個再安裝一下看看,
正如本人在安裝的過程中,出現如下的錯誤:
Jan 28 14:20:30 xxxmatoMacBookinstalld[2020]: PackageKit: Install Failed: Error Domain=PKInstallErrorDomain Code=112 "An error occurred while running scripts from the package “iOSOpenDev-1.5.pkg”." UserInfo=0x7fc17a5291f0 {NSFilePath=./postinstall, NSURL=file://localhost/Users/xxxx/Downloads/iOSOpenDev-1.5.pkg#iodsetup.pkg, PKInstallPackageIdentifier=com.iosopendev.iosopendev15.iod-setup.pkg, NSLocalizedDescription=An error occurred while running scripts from the package “iOSOpenDev-1.5.pkg”.} {
NSFilePath = "./postinstall";
NSLocalizedDescription = "An error occurred while running scripts from the package \U201ciOSOpenDev-1.5.pkg\U201d.";
NSURL = "file://localhost/Users/xxxx/Downloads/iOSOpenDev-1.5.pkg#iodsetup.pkg";
PKInstallPackageIdentifier = "com.iosopendev.iosopendev15.iod-setup.pkg";
}
按照 https://github.com/kokoabim/iOSOpenDev/wiki/Troubleshoot
中的Xcode License 問題,FIX下,
1. Download https://github.com/downloads/kokoabim/iOSOpenDev/xcode-license.tar.gz
and extract xcode-license out of it.2. Open Terminal,
go to the directory where the file was extracted
to and run: ./xcode-license
2.然后重新安裝就可以了。
3.所有方案都試過了,還是有問題的話:
可以給 dev@iosopendev.com 發郵件,別忘了帶上日志(command + L, 調出日志)
4.如果編譯的時候出現如下的錯誤:
target specifies product type ‘com.apple.product-type.library.dynamic’, but there’s no such product type for the ‘iphoneos’ platform
可以重啟下機器看看。一般是因為剛安裝完IOS Open-DEV還沒有重啟的緣故。
好了,基本上的搭建已經完成了。我們來完成前面一篇文章的helloworld的程序吧。
打開xcode,建立一個logos tweak工程:

生成了如下的工程:
編寫helloworld_1.xm文件,跟上次的代碼一模樣。
#import<UIKit/UIKit.h>
%hookSpringBoard
-(void)applicationDidFinishLaunching:(id)application {
%orig;
UIAlertView *alert = [[UIAlertViewalloc] initWithTitle:@"Welcome"
message:@"Welcome to 漂漂 iPhone!"
delegate:nil
cancelButtonTitle:@"Thanks"
otherButtonTitles:nil];
[alert show];
[alert release];
}
%end
添加必須的庫文件:如圖
編譯文件,生成deb文件
在當前目錄下的Packages下生成了deb文件
總體看上來iosopendev簡化了之前的很多東西,使得ios的越獄開發規范話了很多。關于hook的東西就介紹到這邊,還有很多的東西需要學習才能達到所謂的入門。
posted on 2013-11-18 10:34
漂漂 閱讀(7326)
評論(0) 編輯 收藏 引用