2013-02-08 24 views
1

我正在學習如何製作移動基板調整,當我遇到一個源代碼的教程。爲了進一步瞭解它,我決定測試一下.dylib移動基板調整不起作用

的代碼:

%hook SBApplicationIcon 
    -(void)launch 
    { 
    NSString *appName = [self displayName]; 
    NSString *message = [NSString stringWithFormat:@"The app %@ has been launched, lol", appName, nil]; 
    UIAlertView *alert = [[UIAlertView alloc] initWithTitle:appName message:message delegate:self cancelButtonTitle:@"OK" otherButtonTitles:nil]; 
    [alert show]; 
    [alert release]; 
    %orig; 
    } 
    %end 

我用我的IOS的手機上狄奧,並提出了修改並這段代碼粘貼到「tweak.xm」
我去「Makefile文件」,並增加

test_FRAMEWORKS = UIKit 

如果妳有沒有想過什麼是我test.plist,這裏是它

com.apple.springboard 

接下來,我去移動終端,這樣做,

su 
alpine 
cd test 
make 

則u複製的名爲.dylib和THEOS作出的 「test.plist」 文件,並在/ Library/MobileSubstrate有/ DynamicLibraries

後粘貼它我呼籲我的設備,並嘗試啓動一個應用程序,但沒有發生。一切正常啓動。請幫我在這裏

回答

1

Google上搜尋了很久之後,我終於做到了工作

我去移動終端......並登錄。從那以後,我這樣做

installsdk3 

然後我去了我的Makefile文件,並把它改成這個

SDKVERSION = 3 

include theos/makefiles/common.mk 

TWEAK_NAME = test 
test_FILES = Tweak.xm 
test_FRAMEWORKS = UIKit Foundation 

include $(THEOS_MAKE_PATH)/tweak.mk 

我又重拍的調整,它的工作!