![](/img/trans.png)
[英]How can I determine programmatically that my app is running on an iPhone, iPad or iPhone 4?
[英]Is there a way for an app[iphone] to determine programmatically if another specific app is running?
我可以編寫一個應用程序來檢查另一個應用程序是否正在運行嗎?
例如,這將是app1的代碼
app1.m檢查{如果(app2.running){做某事...}
在iPhone上,您無法執行此操作。 每個應用程序都是“沙盒式”,基本上將其與系統上的其他每個應用程序完全分開。
抱歉。
您可以使用下面鏈接中定義的類別來獲取正在運行的進程的列表,並尋找目標進程的名稱。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.