はい、これは過去にAppStoreの拒否を引き起こしたものであり、おそらく再びそうなるでしょう...つまり、それはまだ可能です。
私自身の質問に答えて、これを行う方法は次のとおりです。
ビルドフェーズでフレームワークCoreTelephonyを追加します。
宣言する:
extern void * _CTServerConnectionCreate(CFAllocatorRef, int (*)(void *, CFStringRef, CFDictionaryRef, void *), int *);
extern int _CTServerConnectionSetVibratorState(int *, void *, int, int, float, float, float);
static void* connection = nil;
static int x = 0;
初期化:
connection = _CTServerConnectionCreate(kCFAllocatorDefault, &vibratecallback, &x);
バイブレーションを開始します。
_CTServerConnectionSetVibratorState(&x, connection, 3, intensity, 0, 0, 0);
バイブレーションを停止します。
_CTServerConnectionSetVibratorState(&x, connection, 0, 0, 0, 0, 0);
このコードは、HapticKeyboardからのものです。これは、入力時に電話をブーンという音を立てるダウンロード可能なアプリケーションです。Cydiaのジェイルブレイクされた電話で利用できます。私の脱獄経験も参照してください)
他の良い参考文献はありますか?