Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
アプリからプログラムでデバイスのホーム画面をロックしたい。IOSで可能ですか?
私のアプリでは、ユーザーが 1 分間アイドル状態の場合、デバイスをロックしたいと考えています。これがシナリオです。
ありがとうジテン
次のコードを使用して電話をロックできます
[UIApplication sharedApplication].idleTimerDisabled = YES;
Appdelegate のウィンドウにブロック ビューを追加することで、独自のアプリをロックできます。ただし、デバイスのロックは OS の責任です。何らかの方法でこれを実装しても、aplle はアプリを拒否する可能性があると思います。