Appleのドキュメントにある通り、3D TouchはXcode 7.0のシミュレータではサポートされていません。
しかし、ホームスクリーン上のクイックアクションについてはSBShortcutMenuSimulatorで疑似的に再現できます。
AppleのUIApplicationShortcutItemのサンプルだと次のようになります。
ビルド
1 2 3 | git clone https: //github .com /DeskConnect/SBShortcutMenuSimulator .git cd SBShortcutMenuSimulator make |
使いかた
シミュレータが起動した状態で、SBShortcutMenuSimulatorの直下で次のコマンドを実行します。
1 2 | xcrun simctl spawn booted launchctl debug system /com .apple.SpringBoard --environment DYLD_INSERT_LIBRARIES=$PWD /SBShortcutMenuSimulator .dylib xcrun simctl spawn booted launchctl stop com.apple.SpringBoard |
これで、TCPポート8000にアプリのバンドルIDを送信すれば、それに対応したアプリのクイックアクションが表示されます。
1 | echo 'com.apple.mobilecal' | nc 127.0.0.1 8000 |
0 件のコメント:
コメントを投稿
注: コメントを投稿できるのは、このブログのメンバーだけです。