1

Let say If I want to check if the facebook or any other application is currently running on device ?

Dávid Pásztor
  • 51,403
  • 9
  • 85
  • 116
Ahsan
  • 503
  • 4
  • 12

3 Answers3

2

The answer is simply "No", this is absolutely not possible in 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".)

Fattie
  • 27,874
  • 70
  • 431
  • 719
2

Simply your answer is NO

The reason behind this, in case of iOS, every app is running like on own sandbox. So there is no connection between one sandbox to another.

Ankur Lahiry
  • 2,253
  • 1
  • 15
  • 25
1

Update 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.

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. 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

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.

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. For more information on Feedback Assistant, please visit 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.

Perhaps my colleague mistook Android version of the app for iOS.

Update:

After reading some more about this it could be related to Automatic Assessment Configuration and AEAssessmentSession.

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:

  • ...
  • Other apps, except those that you selectively allow

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

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

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

Sample code here:

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. According to Apple Developer Forums it is not possible either:

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. Not just installed but running in the background.

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.

I'm not an iOS developer but I have done some experiments with disabling or bypassing SSL Pinning/Certificate Pinning on Android. In this case developers often used checks in the native layer as well as the Java layer to make it difficult to bypass. 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://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

For Android you can check it like this:

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

Ogglas
  • 62,132
  • 37
  • 328
  • 418