title: how to get device token?
body: <p>I am posting values of username,password and devicetoken to .net webservice. But It didn't get any  device token value. I am using below code.</p>
  
  <pre><code>- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 
  { 
      [[UIApplication sharedApplication] setApplicationIconBadgeNumber:0]; 
      [[UIApplication sharedApplication] registerForRemoteNotificationTypes:UIRemoteNotificationTypeBadge|UIRemoteNotificationTypeAlert ]; 
  }
  
  - (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken 
  {    
     NSLog(@"didRegisterForRemoteNotificationsWithDeviceToken: %@", deviceToken); 
     NSString *dt = [[deviceToken description] stringByTrimmingCharactersInSet:[NSCharacterSet characterSetWithCharactersInString:@"&lt;&gt;"]]; 
     dt = [dt stringByReplacingOccurrencesOfString:@" " withString:@""]; 
     self.DeviceToken=dt; 
     NSLog(@"~~~~devToken(dv)=%@",deviceToken);
  }
  
  - (void)application:(UIApplication*)application didFailToRegisterForRemoteNotificationsWithError:(NSError*)error
  {      
      NSLog(@"Failed to get token, error: %@", error);
  }
  </code></pre>
  
  <p>But in console it shows </p>
  
  <blockquote>
    <p>Failed to get token, error: Error Domain=NSCocoaErrorDomain Code=3000 "no valid 'aps-environment' entitlement string found for application" UserInfo=0x1a0810 {NSLocalizedDescription=no valid 'aps-environment' entitlement string found for application</p>
  </blockquote>
  
  <p>Any idea? Thanks in advance!</p>