简体   繁体   English

如何在关机或用户在iOS中输入错误密码时运行代码

[英]How to run code on shutdown or when user enters wrong passcode in iOS

I tried looking for this for some time with no luck yet, I'm trying to build a security app where I need to know when the phone is going to shutdown or the user enters the wrong passcode at the lock screen. 我试图在一段时间内没有运气,但我正在尝试构建一个安全应用程序,我需要在该应用程序中知道手机何时关机或用户在锁定屏幕上输入错误的密码。

I know apps like Prey, and older apps like iGotYa, would snap a picture using the front facing camera when the user enters the wrong pass on the lock screen. 我知道Prey等应用程序以及iGotYa等较旧的应用程序会在用户在锁定屏幕上输入错误的通行证时使用前置摄像头拍摄照片。 I was looking to do something similar with my app, is this something that requires special access from apple? 我一直在寻找与我的应用类似的功能,这是否需要苹果的特殊访问权限? or is this available to everyday developer? 还是每天的开发人员都可以使用? If thats the case, how would approach this problem or where could I find this information? 如果是这样,该如何解决这个问题,或者我在哪里可以找到此信息?

Thank you in advanced!!! 谢谢高级!!!

Due to security reasons Apple doesn't give this level of access to the device. 出于安全原因,Apple不允许对设备进行这种级别的访问。 Apple limits the APIs and features applications can take advantage of to protect users and keep devices secure. Apple限制了应用程序可以利用的API和功能来保护用户并确保设备安全。

There might be a way to do this using some form of jailbreak but nothing that Apple would support officially. 也许有一种方法可以使用某种形式的越狱来完成,但Apple不会正式支持。

Edit great additional point made in the comments. 编辑评论中提出的其他要点。 Every app is forced to operate in its own "sandbox", so it can only access things within that applications domain. 每个应用程序都被迫在其自己的“沙盒”中运行,因此它只能访问该应用程序域内的内容。 There are certain cases which applications are allowed to interact with the OS itself through extensions. 在某些情况下,允许应用程序通过扩展与操作系统本身进行交互。 But these are very limited and highly controlled by Apple. 但是这些功能非常有限,并且受到Apple的严格控制。

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

相关问题 iOS,钥匙串:错误的密码输出 - iOS, Keychain: Wrong passcode output 如果用户禁用密码,如何应对iOS数据保护? - How to react with iOS Data Protection if a user disables their passcode? 当用户进入/退出iOS中的位置区域时,在后台执行任务(代码执行/网络调用) - Perform task (code execution/ network call) in background when user enters/exits a location region in iOS 如果尚未启用用户密码锁,我如何使用iOS磁盘加密保护数据? - How can I protect data using iOS on-disk encryption when the user passcode lock has not been enabled? 当用户进入提供ios的特定区域时,如何获得本地通知 - How to get local notification when user enters into specific region provided ios 如何在用户进入CLLocation时通知用户? - How to notify user when he enters a CLLocation? 强制用户在iOS中设置密码和屏幕超时 - Force user to Set Passcode and Screen Timeout in iOS iOS“数据保护”是否取决于用户密码设置? - iOS “Data Protection” depends on user passcode set or not? 在iOS上使用密码锁定时,无法访问粘贴板 - Pasteboard not accessible when locked with passcode on iOS 是否可以检测 iOS 设备上的密码何时被修改? - Is it possible to detect when the passcode on an iOS device is modified?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM