iOS - AudioUnitInitialize returns error code 561017449 - ios

I have an app in the App Store which uses AudioUnit for recording audio.
About once a week or so I am seeing that for some users in the wild the call to AudioUnitInitialize fails with the error code 561017449 which is also 0x21707269 or "irp!".
What does this error code mean? I've been unable to find it documented. Also:
~$ macerror 561017449
Unknown error (561017449) at /usr/bin/macerror5.16 line 40, <DATA> line 1.
There have been few instances of this issue, but so far there appears to be no pattern of commonality as far as device and OS version goes.
I'm not including code as I don't think that will be helpful just yet. The code is working on variety of devices already. At this time I'm most interested in learning details about this specific error.
Thanks!

This is defined in AVAudioSession.h:
AVAudioSessionErrorInsufficientPriority = '!pri', /* 0x21707269, 561017449 */
and is described as "The app was not allowed to set the audio category because another app (Phone, etc.) is controlling it."

After wasting a lot of time I found that this issue is occurring in my device(iPad) just after debugging my current code in it without uninstalling the existing live app.
The record and play permission was creating the issue. So uninstalling then installing a fresh build magically does the job for me.

Related

Error with Universal Links on phone w/ iOS 13

I am seeing the below error in iOS 13 when trying to setup an app with universal links. Has anyone seen this or know what it means?
I am seeing this error in the device console for the swcd process.
Error getting enterprise-managed associated domains data. If this device is not enterprise-managed, this is normal:
Error Domain=SWCErrorDomain Code=1701 "Failed to get associated domain data from ManagedConfiguration framework." UserInfo={NSDebugDescription=Failed to get associated domain data from ManagedConfiguration framework., Line=250, Function=<private>}
When I install the same app on an iOS 12 device it works perfectly fine. Any thoughts would be appreciated
It seems that upgrading to iOS 13.2.2 solves the issue.
There is no official confirmation about this, but is seems resolved on iOS 13.2.2.
There may be some different places that cause this problem. Note that the format of AASA file seems to be changed recently. Please refer to this.
If the delegate isn't called, and there are some Google Analysis or Firebase features in the app, then it may be caused by method swizzling. If that's the case, please refer to my answer here.

Parse.com 1.6 crash analytics upload failure

I have a problem getting the new crash reporting in Parse 1.6 to work. The symptoms are the same as parse.com 1.6 crash analytics not working , but my reputation is too low to add my information.
1) I followed the quick start and guide to set up crash reporting and upload my symbols
https://parse.com/docs/ios_guide#crashreporting/iOS
https://parse.com/apps/quickstart#analytics/crashreporting/ios/existing
2) I'm following the instructions to generate a crash report by running the app directly in the simulator (iOS 7-8) and on the device (iOS 6) without a debugger attached. On the simulator I can actually see the minidump being created in Library/Parse/PFCrashReports.
3) When launching the app again I get the message "Breakpad Uploader: unable to determine minidump file length" and the crash dump disappears from the file system. So I assume Parse uses google breakpad under the hood, and the error is created by Uploader.mm because the call to stat() fails. I tried the same call in my own code and it succeeds there.
My gut feeling is that there is either a permission problems, or some other code locks the file while the uploader tries to access it. As the parse libraries are closed source it is hard to check anything, though. It is a bit suspicious that other people don't seem to have a problem with this, which may mean some other settings or configuration problem.

webrtcjingle disconnect crash on ios Lukeweber version

I just downloaded the lukeweber version of webrtcjingle, which I believe is just a branch of the google one.
I change the server and account setting on the demo and run it. It was able to log in and send/receive messages. However, When I tried to logout. The app crash.
I had a little debug on it, and found out the line of code that crash was in file txmppump.cc, function:
void TXmppPump::WakeTasks() {
talk_base::Thread::Current()->Post(this);
}
Does anyone have an idea what the problem is? I noticed that there is a fix on disconnecting problem issued caused by a race problem on the repo:
github bug list
However, I compared my code to the fixed version. They are the same. So I dont know if they are related or not.

Chromecast ios api.. Entity not found

Anyone encountered this already?. I downloaded the sample code for IOS from github. I replaced the app id with my own, that i got after whitelisting my device. I ran the app and selected the device and media to cast. Soon after I hit the cast button, I am getting the following error....
Failed to start application (com.google.GCKFramework.GCKApplicationSessionError); caused by: entity not found (com.google.GCKFramework.GCKNetworkRequestError).
Found solution for this one. Once I enabled the Chromecast to send it's serial number to Google, the error went away (for future reference). It can be done in settings.
Source: https://github.com/googlecast/cast-ios-demo-player/issues/5

Fresh SpeakHere example app has error when recording audio in Simulator/Xcode

I can't record audio using the SpeakHere example app from apple. When I run the app in Simulator from within Xcode, it starts up normally, but when I press the record button, the error "Thread 1: EXC_BREAKPOINT (code=EXC_I386_BPT, subcode=0x0)" occurs:
The log message about the missing root view controller at app startup is already there BEFORE the above error occurs and it is probably not connected to my problem.
I have downloaded the SpeakHere example project from the linked website (see top of this question), opened the fresh download in Xcode and directly started the app. I did not modify any setting and not any line of code. I've also searched on google and stackoverflow for this problem and didn't find a solution, although this problem must be very general.
I use Xcode Version 4.5.2 (4G2008a) and a MacBook Pro from late 2009 with Mac OS X 10.8.
I've also had a friend try this on his computer and he has the very same problem. He has the same OS and his XCode version is also 4.5.2.
I would now try older Xcode versions, but right now I don't like to download a few gigabytes for a trial'n'error approach on my connection.
Any help appreciated, including reports like "works for me with Xcode version ...". Thanks!
The problem occurs because in the method AQRecorder::StartRecord(CFStringRef inRecordFile), the function CFURLCreateWithString() fails and returns a pointer to nil. This is not detected and later on the code calls CFRelease() on this nil pointer, which causes the EXC_BREAKPOINT.
The purpose of the method CFURLCreateWithString() basically is to take a url string as input and return a pointer to a CFURL object as output. The problem here is that the input is not a url string. Instead, it's simply a path on the local file system without file:/ or the like as prefix. For this reason, this method fails.
The solution is to remove the not-working call to the method CFURLCreateWithString() and instead call a related method, namely CFURLCreateWithFileSystemPath(), which is prepared to take a local file system path and convert it to a CFURL:
In the method AQRecorder::StartRecord(CFStringRef inRecordFile), replace or comment out the line
url = CFURLCreateWithString(kCFAllocatorDefault, (CFStringRef)recordFile, NULL);
and insert
url = CFURLCreateWithFileSystemPath(kCFAllocatorDefault, (CFStringRef)recordFile, kCFURLPOSIXPathStyle, false);
at its place.
url = CFURLCreateWithFileSystemPath(kCFAllocatorDefault, (CFStringRef)recordFile, kCFURLPOSIXPathStyle, false);
The code above made my xcoce 4.6 compile and run in simulator, but it doesnot record my voice from my usb microphone, I test my microphone in the garash band application and sucessfully record and play my voice, and the dbmeter does not move at all, any way when I port it to the real device it work, it just can't record and play voice in my simulator.

Resources