daily pastebin goal
3%
SHARE
TWEET

Untitled

a guest Feb 20th, 2019 66 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. - (void)locationManager:(CLLocationManager *)manager didEnterRegion:(CLRegion *)region
  2. {
  3.     NSLog(@"MapViewController - didEnterRegion");
  4.     NSLog(@"MVC - didEnterRegion - region.radius = %f", region.radius);
  5.  
  6.     // code to get the url (removed for simplicity)
  7.  
  8.     AVAudioSession *audioSession = [AVAudioSession sharedInstance];
  9.  
  10.     [audioSession setCategory:AVAudioSessionCategoryPlayback error:nil];
  11.     [audioSession setActive: YES error: nil];
  12.     [[UIApplication sharedApplication] beginReceivingRemoteControlEvents];
  13.  
  14.     self.regionPlayer = [[AVAudioPlayer alloc] initWithContentsOfURL:url error:&error];
  15.     NSLog(@"self.regionPlayer.url = %@",self.regionPlayer.url);
  16.     [self.regionPlayer play];  
  17. }
  18.    
  19. Sep 12 22:33:47 unknown MLTM[4995] <Warning>: MVC - didEnterRegion - region.radius = 250.000000
  20. Sep 12 22:33:47 unknown MLTM[4995] <Warning>: url = file://localhost/var/mobile/Applications/EFD6A583-5685-4D7C-BF8E-C8CFEA9E0D03/MLTM.app/party%20mix%207.caf
  21. Sep 12 22:33:47 unknown MLTM[4995] <Warning>: self.regionPlayer.url = file://localhost/var/mobile/Applications/EFD6A583-5685-4D7C-BF8E-C8CFEA9E0D03/MLTM.app/party%20mix%207.caf
  22. Sep 12 22:33:48 unknown Console[4179] <Notice>: TestFlight: Team Token is recognized
  23. Sep 12 22:33:48 unknown mediaserverd[44] <Error>: 22:33:48.087 <AudioQueueServer> AudioQueue: Error -12985 from AudioSessionSetClientPlayState(4995)
  24.    
  25. register **UIBackgroundModes** in info.plist for background playing
  26.  [[AVAudioSession sharedInstance] setDelegate: self];
  27.  [[AVAudioSession sharedInstance] setCategory: AVAudioSessionCategoryAmbient error: nil];
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top