Home > Mobile >  How to control often IOS shaking
How to control often IOS shaking

Time:10-08

How to control often IOS shaking

CodePudding user response:


Blogger, ask if you are the app developers, the following steps to be able to control your vibration more often than not, but this is my private is to call API, use it for an online audit may have a certain direction, the hope can help you, thank you
Introduced the header file

# import & lt; AudioToolbox/AudioToolbox. H>


The public API (pure vibration)

Method statement

Void AudioServicesStopSystemSound (int);


Use the

AudioServicesStopSystemSound (kSystemSoundID_Vibrate);


Private API (can customize the mode and intensity)

Method statement

Void AudioServicesPlaySystemSoundWithVibration (int, id, NSDictionary *);


Use the

NSMutableDictionary * dictionary=[NSMutableDictionary dictionary];

//can set your own vibration interval and often (ms)
//whether effective, length, whether to take effect, length...
NSArray * pattern=@ [@ YES, 30, @ @ NO, @ 1];

The dictionary [@ "VibePattern"]=pattern;//mode
Dictionary [@ "Intensity"]=@. 9.//intensity (test range from 0.3 to 1.0)

AudioServicesPlaySystemSoundWithVibration (kSystemSoundID_Vibrate, nil, a dictionary);

CodePudding user response:

reference 1/f, jiangsu small bailong reply:
blogger, ask if you are the app developers, the following steps to be able to control your vibration more often than not, but this is my private is to call API, use it for an online audit may have a certain direction, the hope can help you, thank you
Introduced the header file

# import & lt; AudioToolbox/AudioToolbox. H>


The public API (pure vibration)

Method statement

Void AudioServicesStopSystemSound (int);


Use the

AudioServicesStopSystemSound (kSystemSoundID_Vibrate);


Private API (can customize the mode and intensity)

Method statement

Void AudioServicesPlaySystemSoundWithVibration (int, id, NSDictionary *);


Use the

NSMutableDictionary * dictionary=[NSMutableDictionary dictionary];

//can set your own vibration interval and often (ms)
//whether effective, length, whether to take effect, length...
NSArray * pattern=@ [@ YES, 30, @ @ NO, @ 1];

The dictionary [@ "VibePattern"]=pattern;//mode
Dictionary [@ "Intensity"]=@. 9.//intensity (test range from 0.3 to 1.0)

AudioServicesPlaySystemSoundWithVibration (kSystemSoundID_Vibrate, nil, a dictionary);
is the Unity and development, private API this I also find it, just want to ask if there is any other way more security,

CodePudding user response:

You can try try code confusion, private API for developers to invoke apple keep turning a blind eye, sometimes being rejected by sometimes,
  •  Tags:  
  • iOS
  • Related