你能說我在這段代碼中是錯誤的嗎?我喜歡檢查每次啓動時是否安裝了cydia.app,並且如果安裝了Cydia,Lable應該更改,並且應該啓用一個按鈕,但沒有任何反應。ViewDidLoad什麼是假
下面是代碼:
NSString *filePath = @"/Applications/Cydia.app";
if ([[NSFileManager defaultManager] fileExistsAtPath:filePath]){
Lable.text = @"You are jailbroken";
Button.enabled = YES;
}
抱歉,我把假的越獄檢測,但在您的幫助是和以前一樣:( – user1658674
@ user1658674我更新了帖子 – 2012-09-10 00:11:50
我發現代碼在我自己,如果([[UIApplication的sharedApplication] canOpenURL:[NSURL URLWithString:@「cydia://」]]){ lablered.text = @「」; } if([[UIApplication sharedApplication] canOpenURL:[NSURL URLWithString:@「cydia://」]] NO ){ lablered.text = @ 「你是不是越獄」; Button.enabled = NO; rebootbutton.enabled = NO; actionbutton.enabled = NO; } – user1658674