简体   繁体   English

是否可以检测 iOS 中是否有任何其他特定应用程序当前正在运行?

[英]Is it possible to detect if any other certain app is Currently running or not in iOS?

Let say If I want to check if the facebook or any other application is currently running on device?假设我想检查 facebook 或任何其他应用程序当前是否在设备上运行?

The answer is simply "No", this is absolutely not possible in iOS.答案很简单,“否”,这在 iOS 中绝对不可能。

(Note that you can easily "open" another app - it's just like opening a web link - but you can not "check if it is already open".) (请注意,您可以轻松“打开”另一个应用程序 - 就像打开 web 链接一样 - 但您不能“检查它是否已经打开”。)

Simply your answer is NO简单地说,你的答案是否定

The reason behind this, in case of iOS, every app is running like on own sandbox.这背后的原因是,在 iOS 的情况下,每个应用程序都像在自己的沙箱上一样运行。 So there is no connection between one sandbox to another.因此,一个沙箱与另一个沙箱之间没有联系。

Update 2:更新 2:

Decided to use Code-Level Support.决定使用代码级支持。

Included with your paid membership are two Technical Support Incidents (TSIs) for code-level support from Apple support engineers.您的付费会员资格包括两个技术支持事件 (TSI),用于 Apple 支持工程师的代码级支持。

Reply from Apple:苹果回复:

Automatic Assessment Configuration limits what features of the system are available while in a testing environment.自动评估配置限制了系统在测试环境中可用的功能。 It locks the device to a single app.它将设备锁定到单个应用程序。 It does not provide oversight, such as identifying which apps are running.它不提供监督,例如识别哪些应用程序正在运行。

Classroom is an app targeting K-12 classrooms. Classroom 是一款针对 K-12 教室的应用程序。 It provides teacher oversight of student activities during lessons, including viewing student screens.它让教师在课堂上监督学生的活动,包括查看学生屏幕。

https://www.apple.com/education/k12/teaching-tools/ https://support.apple.com/guide/classroom/welcome/ipados https://www.apple.com/education/k12/teaching-tools/ https://support.apple.com/guide/classroom/welcome/ipados

I'm not aware of any functionality associated with either of these that provides for notification of apps running in the background.我不知道与其中任何一个相关的任何功能都可以通知后台运行的应用程序。

While I cannot say how any given app is implementing apparent functionality, I'm pretty confident in saying that the app you mention earlier is not using either Automatic Assessment Configuration or integrating with Classroom.虽然我不能说任何给定的应用程序是如何实现明显的功能的,但我很有信心地说你前面提到的应用程序没有使用自动评估配置或与 Classroom 集成。

You may want to contact the developer of the app in question.您可能需要联系相关应用的开发者。

Of course, it's also possible your colleague misunderstood and the app is not in fact doing any such reporting.当然,您的同事也可能误解了该应用程序实际上并没有进行任何此类报告。

I would also encourage you to file feedback requesting such a feature.我还鼓励您提交反馈以请求此类功能。 Please submit your suggestion via Feedback Assistant https://feedbackassistant.apple.com .请通过反馈助手https://feedbackassistant.apple.com提交您的建议。 For more information on Feedback Assistant, please visit https://developer.apple.com/bug-reporting/ .有关反馈助手的更多信息,请访问https://developer.apple.com/bug-reporting/

While you were initially charged a technical support incident for this request, we have assigned a replacement incident back to your Apple Developer Program account.虽然您最初为此请求支付了技术支持事件,但我们已将替换事件分配回您的 Apple Developer Program 帐户。

Perhaps my colleague mistook Android version of the app for iOS.也许我的同事将应用程序的 Android 版本误认为是 iOS。

Update:更新:

After reading some more about this it could be related to Automatic Assessment Configuration and AEAssessmentSession .在阅读了更多关于此的内容后,它可能与Automatic Assessment ConfigurationAEAssessmentSession相关。

This allows an app to:这允许应用程序:

Enter single-app mode and prevent students from accessing specific system features while taking an exam.进入单应用模式,防止学生在考试时访问特定的系统功能。

and

A session provides protections by preventing access to desktop elements like: session 通过防止访问桌面元素来提供保护,例如:

  • ... ...
  • Other apps, except those that you selectively allow其他应用程序,您有选择地允许的应用程序除外

https://developer.apple.com/documentation/automaticassessmentconfiguration https://developer.apple.com/documentation/automaticassessmentconfiguration

https://developer.apple.com/documentation/bundleresources/entitlements/com_apple_developer_automatic-assessment-configuration https://developer.apple.com/documentation/bundleresources/entitlements/com_apple_developer_automatic-assessment-configuration

https://developer.apple.com/documentation/automaticassessmentconfiguration/aeassessmentsession https://developer.apple.com/documentation/automaticassessmentconfiguration/aeassessmentsession

Sample code here:示例代码在这里:

https://developer.apple.com/documentation/automaticassessmentconfiguration/build_an_educational_assessment_app https://developer.apple.com/documentation/automaticassessmentconfiguration/build_an_educational_assessment_app

Original:原来的:

I agree with @AnkurLahiry and @Fattie that it should not be possible due to sandbox environment.我同意@AnkurLahiry 和@Fattie 的观点,由于沙盒环境,这应该是不可能的。 According to Apple Developer Forums it is not possible either:根据 Apple Developer Forums 的说法,这也不可能:

https://developer.apple.com/forums/thread/48374 https://developer.apple.com/forums/thread/48374

However a colleague took his hunting degree and they used an app for examination.然而,一位同事获得了他的狩猎学位,他们使用了一个应用程序进行考试。 This app could detect other apps running in the background.此应用程序可以检测到在后台运行的其他应用程序。 For example one person had Teams app running and the examinators could then tell that he had that exact app running on his phone.例如,一个人运行了 Teams 应用程序,然后考官可以告诉他在他的手机上运行了该应用程序。 Not just installed but running in the background.不仅安装,而且在后台运行。

https://apps.apple.com/se/app/teoriprov-f%C3%B6r-j%C3%A4garexamen/id1548547811 https://apps.apple.com/se/app/teoriprov-f%C3%B6r-j%C3%A4garexamen/id1548547811

He took the test 2022-04-29 and was using the app version 1.0.8.他于 2022 年 4 月 29 日参加了测试,并使用了 1.0.8 版的应用程序。

I'm not an iOS developer but I have done some experiments with disabling or bypassing SSL Pinning/Certificate Pinning on Android.我不是 iOS 开发人员,但我已经做了一些实验,禁用或绕过 SSL 固定/证书固定在 Android 上。 In this case developers often used checks in the native layer as well as the Java layer to make it difficult to bypass.在这种情况下,开发人员经常在本机层以及 Java 层中使用检查,以使其难以绕过。 My guess is that they use low-level access to detect if a process is running or not.我的猜测是他们使用低级访问来检测进程是否正在运行。

https://security.stackexchange.com/questions/149325/disable-or-bypass-ssl-pinning-certificate-pinning-on-android-6-0-1 https://security.stackexchange.com/questions/149325/disable-or-bypass-ssl-pinning-certificate-pinning-on-android-6-0-1

https://developer.apple.com/documentation/objectivec https://developer.apple.com/documentation/objectivec

Unfortunately I don't have more information than that.不幸的是,我没有比这更多的信息。 Next step could be contacting them and see if they are willing to share how they did it.下一步可能是联系他们,看看他们是否愿意分享他们是如何做到的。

You could also read up on examination apps and classroom:您还可以阅读考试应用程序和课堂:

https://apps.apple.com/us/app/classroom/id1085319084 https://apps.apple.com/us/app/classroom/id1085319084

For Android you can check it like this:对于 Android 你可以这样检查:

https://stackoverflow.com/a/22503513/3850405 https://stackoverflow.com/a/22503513/3850405

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM