Post

Replies

Boosts

Views

Activity

Reply to Select the audio device for AVAudioInputNode
I'm having similar issue, solved it by creating an aggregate device using the following code, AudioDevice is a custom struct.    func createAggregateDevice(with devices: [AudioDevice]) {     guard let firstDevice = devices.first else {       throw MacOSAudioDevicesManagerError.unableToCreateAggregateDevice     }           let subDevicesList: [[String: Any]] = devices.map { device in       [kAudioSubDeviceUIDKey: device.uid as CFString]     }           let desc: [String: Any] = [       kAudioAggregateDeviceNameKey: "YourDeviceName",       kAudioAggregateDeviceUIDKey: "YourDeviceUID",       kAudioAggregateDeviceSubDeviceListKey: subDevicesList,       kAudioAggregateDeviceMasterSubDeviceKey: firstDevice.uid,       kAudioAggregateDeviceClockDeviceKey: firstDevice.uid     ]     var aggregateDeviceId: AudioDeviceID = 0     let status = AudioHardwareCreateAggregateDevice(desc as CFDictionary, &aggregateDeviceId)     guard status == 0 else {       throw MacOSAudioDevicesManagerError.unableToCreateAggregateDevice     } // aggregateDeviceId will be the id of new aggregate device   } Then I'm trying to set default input device to this new device, and use AVAudioEngine to stream the microphone input.       var deviceId = device.id       var address = AudioObjectPropertyAddress(         mSelector: kAudioHardwarePropertyDefaultInputDevice,         mScope: kAudioObjectPropertyScopeGlobal,         mElement: kAudioObjectPropertyElementMaster)       let statusCode = AudioObjectSetPropertyData(         AudioObjectID(kAudioObjectSystemObject),         &address,         0,         nil,         UInt32(MemoryLayout<AudioDeviceID>.size),         &deviceId       )
Sep ’20
Reply to AppClipCodeGenerator - Compressed URL too large
I played around the encoder tool a little bit and starting to notice the interesting behavior of the AppClipCodeGenerator. For example: My url is too long: ht tps://foodiesocial.net/qr?p=8923001&p1=23, In comparison Apple's own example ht tps://appclip.example.com/qr?p=8923001&p1=23 can compress successfully. Mine url is even shorter. Also this makes me hard to predict what base url we should use since different query parameter value change may break it as well.
Dec ’20
Reply to iOS deep linking with Xcode UI testing
@Developer Tools Engineer I'm having some trouble to use https://developer.apple.com/documentation/xctest/xcuisystem/4108234-open A system dialog "Open in MyApp?" will always show for the first time calling this method, and I couldn't find a way in XCUI to get over this dialog, which basically makes this API not usable. The specific thread for this problem - https://developer.apple.com/forums/thread/730962
Jun ’23