Post

Replies

Boosts

Views

Activity

RemoteMediaSession device add/remove
Are there plans to extend the session or MediaDevice capabilities to be able to add and remove speakers via the Lock Screen and Control Center? For example, user may have multiple speakers, they start playback on a subset of them and would like to add other speakers or remove some from the session through Control Center.
1
0
121
1w
Can't reload widgets when app is in background and having an active AVAudioSession background audio playing.
As per WidgetKit TimelineProvider documentation: "When your app is in the foreground, has an active media session, or is using the standard location service, refreshes don’t count against the widget’s daily limit. For more information about media sessions and location services, see AVAudioSession and Configuring your app to use location services." That suggests that I should be able to reload my widget from the background with the most up to date details of the active media session. However, that doesn't appear to be working either when trying to reload all timelines or just a specific one. All other background processing is working fine in the app otherwise, including the media playback. Media session is started by the following code: do { try AVAudioSession.sharedInstance().setCategory(.playback, options: .mixWithOthers) print("AVAudioSession Category Playback OK") try AVAudioSession.sharedInstance().setActive(true) print("AVAudioSession is Active") print(AVAudioSession.sharedInstance()) } catch let error as NSError { print(error.localizedDescription) } let item = AVPlayerItem(url: URL(string: "https://cdn.smartersoft-group.com/various/pull-bell-short.mp3")!) self.queuePlayer = AVQueuePlayer(playerItem: item) self.queuePlayer?.volume = 0.0 self.playerLooper = AVPlayerLooper(player: self.queuePlayer!, templateItem: item) self.queuePlayer?.playImmediately(atRate: 1.0) self.queuePlayer?.volume = 2.0 Wondering if I am misunderstanding the documentation and it's not a supported use case or a bug. FB12782013 has been submitted.
0
0
702
Jul ’23
NWListener stops receiving incoming connections after a minute
I am listening to DLNA notifications over TCP and for about a minute, my NWListener instance keeps receiving new notifications but after about a minute, it stops getting the notifications. NWListener is still alive at that point and the DLNA subscription is valid as well. No such issues when listening using GCDWebserver. Am I missing something obvious with NWListener?
3
0
815
Jun ’23
Post gamepad HID events to the system
Wondering if it possible to post HID Gamepad events to the system similar to keyboard and mouse NSEvent or CGEvent. I am able to monitor gamepad events and get the usage value via IOHIDElementGetUsage (48 and 49 for the axis) and the value via IOHIDValueGetIntegerValue. I would like to generate these same events from code to simulate them without any actual controller attached to the system.
0
1
963
Jan ’22
RemoteMediaSession device add/remove
Are there plans to extend the session or MediaDevice capabilities to be able to add and remove speakers via the Lock Screen and Control Center? For example, user may have multiple speakers, they start playback on a subset of them and would like to add other speakers or remove some from the session through Control Center.
Replies
1
Boosts
0
Views
121
Activity
1w
Integrating Siri with AppIntent that doesn't fit a pre-defined schema/domain
I have an app that controls speakers. Among others it has an action to change various settings. The intent has three parameters, setting, value (dependent on the setting selected) and speaker. Is it possible for Siri to understand phrases such as 'Turn On Night Mode in Bedroom' or 'Set Bass to 2 in Bedroom'?
Replies
1
Boosts
0
Views
90
Activity
1w
Can't reload widgets when app is in background and having an active AVAudioSession background audio playing.
As per WidgetKit TimelineProvider documentation: "When your app is in the foreground, has an active media session, or is using the standard location service, refreshes don’t count against the widget’s daily limit. For more information about media sessions and location services, see AVAudioSession and Configuring your app to use location services." That suggests that I should be able to reload my widget from the background with the most up to date details of the active media session. However, that doesn't appear to be working either when trying to reload all timelines or just a specific one. All other background processing is working fine in the app otherwise, including the media playback. Media session is started by the following code: do { try AVAudioSession.sharedInstance().setCategory(.playback, options: .mixWithOthers) print("AVAudioSession Category Playback OK") try AVAudioSession.sharedInstance().setActive(true) print("AVAudioSession is Active") print(AVAudioSession.sharedInstance()) } catch let error as NSError { print(error.localizedDescription) } let item = AVPlayerItem(url: URL(string: "https://cdn.smartersoft-group.com/various/pull-bell-short.mp3")!) self.queuePlayer = AVQueuePlayer(playerItem: item) self.queuePlayer?.volume = 0.0 self.playerLooper = AVPlayerLooper(player: self.queuePlayer!, templateItem: item) self.queuePlayer?.playImmediately(atRate: 1.0) self.queuePlayer?.volume = 2.0 Wondering if I am misunderstanding the documentation and it's not a supported use case or a bug. FB12782013 has been submitted.
Replies
0
Boosts
0
Views
702
Activity
Jul ’23
NWListener stops receiving incoming connections after a minute
I am listening to DLNA notifications over TCP and for about a minute, my NWListener instance keeps receiving new notifications but after about a minute, it stops getting the notifications. NWListener is still alive at that point and the DLNA subscription is valid as well. No such issues when listening using GCDWebserver. Am I missing something obvious with NWListener?
Replies
3
Boosts
0
Views
815
Activity
Jun ’23
Post gamepad HID events to the system
Wondering if it possible to post HID Gamepad events to the system similar to keyboard and mouse NSEvent or CGEvent. I am able to monitor gamepad events and get the usage value via IOHIDElementGetUsage (48 and 49 for the axis) and the value via IOHIDValueGetIntegerValue. I would like to generate these same events from code to simulate them without any actual controller attached to the system.
Replies
0
Boosts
1
Views
963
Activity
Jan ’22