• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Getting notification when Facetime call comes in
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Getting notification when Facetime call comes in


  • Subject: Re: Getting notification when Facetime call comes in
  • From: Jean-Daniel via Cocoa-dev <email@hidden>
  • Date: Tue, 24 Aug 2021 15:33:20 +0200

Not sure if that work, but at least, you should try to use the right
Notification Center.

NSWorkspace Notification Center is only used to broadcast NSWorkspace
notifications.

https://developer.apple.com/documentation/avfaudio/avaudiosession/responding_to_audio_session_interruptions

<https://developer.apple.com/documentation/avfaudio/avaudiosession/responding_to_audio_session_interruptions>




> Le 23 août 2021 à 22:30, Gabriel Zachmann via Cocoa-dev
> <email@hidden> a écrit :
>
> In my macOS app, I'd like to get notified if and when a FaceTime call comes
> in.
>
> I thought I could get these notifications with code like this:
>
> - (void) applicationDidFinishLaunching: (NSNotification *) aNotification
> {
>        NSNotificationCenter *nc = [[NSWorkspace sharedWorkspace]
> notificationCenter];
>        [nc addObserver: self
>               selector: @selector(interrupt:)
>                   name: AVAudioSessionInterruptionNotification object: NULL];
> ...
> }
>
> - (void) interrupt: (NSNotification*) notification
> {
> ...
> }
>
>
> I can get a NSWorkspaceWillSleepNotification (which I am also interested in),
> but I don't get the AVAudioSessionInterruptionNotification.
> My app doesn't do any sounds rendering, though. (just the occasional NSBeep).
>
> Is there any way I can get that notification in case of incoming Facetime
> call?
>
>
>
>
> _______________________________________________
>
> Cocoa-dev mailing list (email@hidden)
>
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
>
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Getting notification when Facetime call comes in
      • From: Gabriel Zachmann via Cocoa-dev <email@hidden>
References: 
 >Getting notification when Facetime call comes in (From: Gabriel Zachmann via Cocoa-dev <email@hidden>)

  • Prev by Date: Getting notification when Facetime call comes in
  • Next by Date: Re: Getting notification when Facetime call comes in
  • Previous by thread: Getting notification when Facetime call comes in
  • Next by thread: Re: Getting notification when Facetime call comes in
  • Index(es):
    • Date
    • Thread