2
我正在鎖定屏幕調整。在我的自定義鎖屏視圖中,有一個按鈕可以用來鎖定和打開本地手機應用程序。我使用的IDE是iOSOpenDev。如何在iOS中無URL地址打開手機應用程序
我曾嘗試這些方法:
地址方案:我不想錶盤顯示,所以放棄了。
SBSLaunchApplicationWithIdentifier。這是最常用的方法,如:
void* sbServices = dlopen("/System/Library/PrivateFrameworks/SpringBoardServices.framework/SpringBoardServices", RTLD_LAZY);
int (*SBSLaunchApplicationWithIdentifier)(CFStringRef identifier, Boolean suspended) =
dlsym(sbServices, "SBSLaunchApplicationWithIdentifier");
int result = SBSLaunchApplicationWithIdentifier((CFStringRef)bundleId, false);
dlclose(sbServices);
但在.xm文件,編譯器告訴我
無法初始化類型的變量「INT(*)(CFStringRef ,布爾型)」與類型的右值 '無效*'」。
我怎樣才能做到這一點? 感謝!
我使用xcode5.0 LLVM 5. – user2822881
我已經加入那些單詞「(int(*)(CFStringRef,Boolean))」,但iphone會是殭屍,你必須強制重啓。 – user2822881
該投影將修復您在問題中發佈的編譯器錯誤。如果你的設備崩潰了,那麼這是一個單獨的問題。 – Nate