檢查iphone是否安裝某app

2021-06-07 12:49:31 字數 833 閱讀 3105

對於這個問題:有3個技術點:

1、產品b是否已安裝的檢測。

解決方案1:(經驗證:該方案真機ios5無效,模擬器可以)

// declaration

// implementation

bool isdir = no;

if ([[nsfilemanager defaultmanager] fileexistsatpath: path isdirectory: &isdir] && !isdir) // ensure that file exists

cachedict = [nsdictionary dictionarywithcontentsoffile: path];

if (cachedict) // if cache is loaded, then break the loop. if the loop is not "broken," it will return no later (default: case)

break;

}if ([system objectforkey: bundleidentifier]) return yes;

if ([user objectforkey: bundleidentifier]) return yes;

// if nothing returned yes already, we'll return no now

return no;

}

解決方案2:參考:

解決方案3:

if (i***sit)

else

方案3需要知道b的開啟位址。可用。最終方案確定為3

Linux下檢查是否安裝過某軟體包

1 rpm包安裝的,可以用rpm qa看到,如果要查詢某軟體包是否安裝,用 rpm qa grep 軟體或者包的名字 1 rpm qa grepruby 2 以deb包安裝的,可以用dpkg l能看到。如果是查詢指定軟體包,用dpkg l grep 軟體或者包的名字 1 dpkg l greprub...

linux下檢查是否安裝過某軟體包

1 rpm包安裝的,可以用 rpm qa 看到,如果要查詢某軟體包是否安裝,用 rpm qa grep 軟體或者包的名字 2 以deb包安裝的,可以用 dpkg l 看到。如果是查詢指定軟體包,用 dpkg l grep 軟體或者包的名字 3 yum方法安裝的,可以用 yum list instal...

PPC中檢查某程式是否執行

有時候經常需要檢查某個程式是否正在執行,在windows mobile 5.0系統開發中我經常用到以下幾種方法 第一種 handle hmutex createmutexw null,true,l 程式名 dword dwerror getlasterror if dwerror error alr...