title: I want to trigger iOS7 to ask users permission to use Bluetooth and Twitter account
body: <p>This is somewhat backward to what most people ask.
  I want to purposely trigger the dialog asking for the users permission to:</p>
  
  <ul>
  <li>Connect to bluetooth devices, even when offline.</li>
  <li>Access there iOS-based Twitter account.</li>
  </ul>
  
  <p>I already have a similar dialog for location working fine.
  I'm doing this because I want to make the process of asking permission a bit more gentle, like Heyday, by showing a welcome screen explaining why the app needs this service then when the user taps OK, initiating the request and triggering the dialog.</p>
  
  <p>I have tried some things already.
  For Twitter I have tried the following:</p>
  
  <pre><code>- (void)triggerTwitterApprovalWithCompletion:(void (^)(BOOL, NSError *))completion  {
    self.accountStore = [[ACAccountStore alloc] init]; //setup as a property.
    ACAccountType *twitterAccountType = [self.accountStore accountTypeWithAccountTypeIdentifier:ACAccountTypeIdentifierTwitter];
    [self.accountStore requestAccessToAccountsWithType:twitterAccountType  options:nil completion:^(BOOL granted, NSError *error) { //completion handling is on indeterminate queue so I force main queue inside
      dispatch_async(dispatch_get_main_queue(), ^{
        completion(granted, error); //triggers displaying the next screen, working
      });
    }];
  }
  </code></pre>
  
  <p>But although the permission is given, it is automatic and not a result of the user being presented with a dialog and approving it.</p>
  
  <p>With the Bluetooth version I am yet to find some code that would trigger it. Both the docs and programming guides are relatively quiet on the issue of asking for permissions. The only one reference I can find is that by having a plist key for <code>bluetooth-peripheral</code> the user will be prompted automagically on app launch. This is too early in the flow to be useful.</p>