I've updated the code as follows and it all works fine. Interestingly even though I haven't specified to mixWithOthers, it still does.
Please note that for anyone trying to find options to set on the session.activate options parameter, there aren't any! All you can use is []
if #available(watchOS 10.0, *) {
try session.setCategory(AVAudioSession.Category.playback,
mode: .default,
policy: .longFormAudio,
options: [])
session.activate(options:[]){ success, error in
if (error != nil) {
print ("Error in activating audio session")
} else {
if success {
print ("Audio session successfully activated")
} else {
print ("Audio session not activated")
}
}
}
Post
Replies
Boosts
Views
Activity
Many thanks for the reply.
So with longFormAudio, it can't now mix with other system audio, for instance Siri? This seems like a backward step.
I will try and see if it mixes anyway :-)
Thanks
Rich
Even with the options set to [] (which does not error), when I call
try AVAudioSession.sharedInstance().setActive(true)
It throws another error - Error Domain=NSOSStatusErrorDomain Code=561145203 "Session activation failed".
Thanks
Rich
I had a related problem - same line of AVAudioSession_iOS but with an error of "res!" - resource not avaiable.
It was happening because I had already set the category on the shared instance of the AVAudioSession and called setActive(true) on it.
Before iOS16 (well, watchOS9 in my case) it worked fine. Code had not changed for 2 years.
Hope it helps.
Had the problem with Xcode 14.0 but it seems resolved with 14.1 RC 2.
I just tried again and got the same error - but then I clicked off the new version to the old version, then came back to the new version and it appears that it actually did submit for review. I also got a notification on my phone (and an email) that the app status had changed to "waiting for review".
This binary had issues yesterday, the screenshots disappeared and now this - I don't hold out much hope! 🤣🤣
I'm getting this too.
In the new version it failed to copy over the screenshots from the previous version so I had to re-upload all.
Probably a knock on effect from yesterday.
Same here. Unchecking "Upload your app's symbols to receive symbolicated reports from Apple" didn't solve the problem.
Apple have clearly changed something as I successfully submitted yesterday.
I'm having the same problem still. Anyone tried Xcode 12?
Same here.
Or you wait for ages with this message then suddenly it springs to life before ultimately showing a dialog saying "Unable to Install ... WatchKit App".
Oh for a cable to the watch, or at least the option to prefer WiFi over Bluetooth when both available, but that's another story.