Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8715855
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T05:56:45+00:00 2026-06-13T05:56:45+00:00

Starting in iOS 5, users are able to create custom vibration patterns for alerts

  • 0

Starting in iOS 5, users are able to create custom vibration patterns for alerts and rings. The following screenshot shows the UI for creating one (Contacts app in iOS 6):

Screenshot of UI for creating custom vibrations in iOS 6

I’ve been searching around, including the documentation, and I cannot find any public APIs that expose the creation or playback of custom vibrations. The closest thing is to use the AudioToolbox framework to play a short, constant vibration:

AudioServicesPlaySystemSound(kSystemSoundID_Vibrate);

Does anyone know if there are APIs for custom vibrations? It doesn’t necessarily have to be public APIs. I’m curious to know what the Contacts app uses. Does anyone know?

P.S. Others have suggested _CTServerConnectionCreate in CoreTelephony (example). I tried it, but couldn’t get any vibration going for some reason.

October 2015 Update:

There are new private APIs in iOS 9 to interact with the Taptic Engine in compatible devices. See Taptic in iOS 9 for more.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T05:56:46+00:00Added an answer on June 13, 2026 at 5:56 am

    After serval hours’ digging in the Contact App, I have figured out how it works.

    ABNewPersonViewControlle invoke some class in ToneLibrary framework to do this.

    The call stack looks like this:

    0   CoreFoundation                  0x3359a1d4 CFGetTypeID + 0
    1   CoreFoundation                  0x33596396 __CFPropertyListIsValidAux + 46
    2   CoreFoundation                  0x33517090 CFPropertyListCreateData + 124
    3   AudioToolbox                    0x38ac255a AudioServicesPlaySystemSoundWithVibration + 158
    5   ToneLibrary                     0x35a7811a -[TLVibrationRecorderView vibrationComponentDidStartForVibrationRecorderTouchSurface:] + 38
    6   ToneLibrary                     0x35a772b2 -[TLVibrationRecorderTouchSurface touchesBegan:withEvent:] + 342
    7   UIKit                           0x3610f526 -[UIWindow _sendTouchesForEvent:] + 314
    8   UIKit                           0x360fc804 -[UIApplication sendEvent:] + 376
    

    After search “AudioServicesPlaySystemSoundWithVibration” on the web , I found nothing.

    So I decide to look into it myself. It’s a private function in AudioToolbox framework.

    the declaration of the function is like

    void AudioServicesPlaySystemSoundWithVibration(SystemSoundID inSystemSoundID,id arg,NSDictionary* vibratePattern)
    

    “inSystemSoundID” is SystemSoundID .just like “AudioServicesPlaySystemSound”, pass “kSystemSoundID_Vibrate”.

    “arg” is not important, pass nil to it , everything will still work fine.

    “vibratePattern” is a pointer of “NSDictionary”, the Contact App pass into
    {
    Intensity = 1;
    OffDuration = 1;
    OnDuration = 10;
    } for recording user input.

    But only call this function will make a vibration never stop. So I have to found some function to stop it.

    The answer is “AudioServicesStopSystemSound”. It’s also a private function in AudioToolbox framework.

    the declaration of the function is like

    void AudioServicesStopSystemSound(SystemSoundID inSystemSoundID)
    

    I guess the Contact App use AudioServicesPlaySystemSoundWithVibration in touchesBegan method, and AudioServicesStopSystemSound in touchEnd method to reach this effect.

    TLVibrationController will manager a vibrate pattern object to record the process you input.

    At last it generate a dictionary to pass into AudioServicesPlaySystemSoundWithVibration to replay the whole process like below:

    NSMutableDictionary* dict = [NSMutableDictionary dictionary];
    NSMutableArray* arr = [NSMutableArray array ];
    
    [arr addObject:[NSNumber numberWithBool:YES]]; //vibrate for 2000ms
    [arr addObject:[NSNumber numberWithInt:2000]];
    
    [arr addObject:[NSNumber numberWithBool:NO]];  //stop for 1000ms
    [arr addObject:[NSNumber numberWithInt:1000]];
    
    [arr addObject:[NSNumber numberWithBool:YES]];  //vibrate for 1000ms
    [arr addObject:[NSNumber numberWithInt:1000]];
    
    [arr addObject:[NSNumber numberWithBool:NO]];    //stop for 500ms
    [arr addObject:[NSNumber numberWithInt:500]];
    
    [dict setObject:arr forKey:@"VibePattern"];
    [dict setObject:[NSNumber numberWithInt:1] forKey:@"Intensity"];
    
    
    AudioServicesPlaySystemSoundWithVibration(4095,nil,dict);
    

    So if you want a custom vibrations in iOS. Use AudioServicesPlaySystemSoundWithVibration and AudioServicesStopSystemSound.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm starting with iOS development and I want to implement the following behavior in
I am coming from iOS background and starting to learn Cocoa. On iOS unless
I just starting to play around with iOS and web services. I'm writing a
am just starting off with restkit for ios. I have a very simple json
I have developed a ios game with 20 levels. I have menu at starting
Starting to learn Canvas and have two classes so far (main one to call
I'm starting to apply the iOS 4 Data Protection to the files my app
I'm fairly new to iOS development, and I'm starting work on an App that
I'm starting out with iOS Development. Currently, I've implemented a TabBarController that nests 2
I'm just starting out with iOS programming. I'm wondering why view is an outlet

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.