MPRemoteMediaPickerController timed out waiting for fence barrier from com.apple.MusicUIService - ios

MPRemoteMediaPickerController timed out waiting for fence barrier from com.apple.MusicUIService
I get this error on iOS7... only.
I saw another post regarding this error, but no one responded to it.
Cant find any solution on google either

I just started receiving this when I first ran my app on iOS7.1. I'm not even using MPRemoteMediaPickerController (directly). I'm using MPMediaPickerController, but I'm purposefully reusing the object so the user goes back to the same place that they left the next time they choose a song.
In 7.1 I'm getting this warning and the picker displays a useless (can't cancel out) white view.
Solution was to toss the MPMediaPickerController after each use. The error does not seem to happen if I have a fresh one each time.

Related

An Objective-C message was sent to a deallocated 'UIActivityIndicatorView' object

When running my app on device, it crashes right when I initiate my AvPlayer to stream an mp3. However, it works fine on simulator.
I have tried to run it through Zombie and I get the following error message when it crashes : "An Objective-C message was sent to a deallocated 'UIActivityIndicatorView' object (zombie) at address: 0x108c020e0"
I am using an Activity indicator in previous scenes but I have tried to remove it completely, leaving no line of code mentioning any UIActivityIndicatorView and I still get the same error.
Any idea of how to deal with this? Can it be linked to the system activity indicator displayed the status bar?
Many thanks for your help
It's a crash because of abusing appearance API not as documenting (setting a property not marked with UI_APPEARANCE_SELECTOR).
For reference, see here.

GameKit Error says player not authenticated but .authenticated property = true

I have an turn-based game using GameKit in iOS. Generally, my authentication with Game Center works. My game works and I can for periods of time send moves back and forth. However, relatively frequently but not constantly, when I try to perform an action (e.g., finding a new match) over Game Center it fails with the error:
Error Domain=GKErrorDomain Code=6 "The requested operation could not be completed because local player has not been authenticated." UserInfo={NSLocalizedDescription=The requested operation could not be completed because local player has not been authenticated.}
Yet, the GKLocalPlayer.localPlayer().authenticated = true, both immediately before getting the error and after. After getting this error, the authentication viewController does not get presented and GameKit methods that rely on authentication cease to function (they don't come back to life ). Then, if I send the app to the background and then bring it back to the foreground, the error does not return when I retry the action (without requiring new login and password entry).
According to this similar observation:
GKLocalPlayer authentication not working, but isAuthenticated returns YES (Game Center sandbox)
"1.Game Center fails to complete authentication if your device has incorrect dates. So, go ahead and check the current date.
You might have done this. I trust you - iOS Simulator >> Reset Content and Settings"
I am getting this problem on the device, not the simulator, ruling out #2. Could someone help me with #1? I may be naive here, but my iPhone and iPad have the right time and date. Is there something or somewhere else I should be checking and setting?
Then, if this is not the issue, what else could be the problem? I am running iOS9.
I've seen this too, and have an open bug with Apple. In my case, I'm testing with multiple physical devices, and only one of those devices ever encounters this. On that particular device, I'm logged into iTunes using a personal account, but logged into game center using a test account.
From what I can see, when the device is using the same login for iTunes, iCloud and game Center, there are no problems. But, when I try to mix-and-match the accounts for whatever testing I need to do, then I randomly get error 6.
There doesn't seem to be anyway to recover from this, except to have the user re-login into game center. Of course, there's no way to present the login view controller again, so the only option is for the user to leave the game, kill it off, and star up again (which re-starts the game center authentication process). I trap the error now, give the user a message saying Game Center has logged them out, and explain what they need to do about it.
But as I said, when I stopped mixing up credentials on the device, the problem went away.
BTW, on a slightly related topic, I've come to view the .authenticated property as completely unreliable. It will be TRUE in conditions where you do not actually have connection to Game Center. I opened a bug on this, too. Apple closed it saying this was working as intended by using "cached" data. Thus, it will report authenticated when it's not authenticated and give you access only to outdated match and leaderboard data which had previously been saved locally.

Box iOS SDK Issue: [BoxAPIMultipartToJSONOperation respondsToSelector:]: message sent to deallocated instance 0x1707a32c0

I get this error from the box sdk when I try to upload a file. It never occurs on the first upload. Always on the second upload. (I upload 25 files, I upload 25 again and this memory error pops up)
I tracked the problem down to box code with NSZombies. Basically the NSStream Delegate in the "BoxAPIMultiPartToJSONOperation.m" file is sending a message/calling a method on the object at this address after it gets deallocated.
My guess is that it's this line [self performSelector:#selector(retryWrite:) withObject:theStream afterDelay:0.1];
There was a github issue about this a while ago: https://github.com/box/box-ios-sdk-v2/issues/76
The issue there was that the NSStream delegate was calling a method on something after it was supposed to be cancelled. Was resolved by making sure to shut off the stream once the thing finished.
My latest idea is to try and kill the Box API threads (yeah I'm that desperate.)
If anyone has faced this specific issue I'd love to hear how you resolved it.
Thanks.

com.google.GCKError Code=2 when connecting to ChromeCast device

I'm working on an iOS app where I now want to integrate ChromeCast support. I use the HelloGoogleVideoCast example to test my hardware setup and get inspiration for my app.
I have now stumbled on a problem that is present both in my app and in HelloGoogleVideoCast. When I connect to a device (connectToDevice method in HelloGoogleVideoCast) I get error "The operation couldn’t be completed. (com.google.GCKError error 2.)". I have power-cycled the device with no change in behavior. I never get to the callback deviceManagerDidConnect, instead deviceManager:didFailToConnectWithError is called with this error. Still, I can connect with the iOS YouTube app.
I can't find anything with substance if I google it and I can't find any good ChromeCast developer forums.
Is there anybody who has an inroad to how to solve this?
I m not sure it will help but u can try:
Download the Chromecast app from app store:
chromecast link
After u see your chromecast -> select your chromecast -> General -> make sure both check box are selected (I know the text is nothing to do with your problem).
Try now.
If the error still occur, try to reboot your chromecast.
If your error still occur, try to reset your chromecast, and then check the boxes again (don't forget!).
Make sure that you initialize the Receiver Manager in your receiver app as soon as possible. Don't wait for the window.onload. If the receiver takes too long to load and initialize the receiver manager, the connection is automatically torn down.
I had the same problem as you did and making the following changes on receiver worked for me:
I've put the script src="//www.gstatic.com/cast/sdk/libs/receiver/2.0.0/cast_receiver.js" inside head tag and before title tag;
I've put my script file which managed all cast functions after
body tag (actually I've put all script declarations, except for cast_receiver, after body tag, including jQuery);
I hope it can help you yet :)

how to get audio session initialization error status since AudioSessionInitialize was deprecated?

On start app i called AudioSessionInitialize and check result value.
If it was kAudioSessionInitializationError then i informed user that application can not work properly cause audio does not work.
But since iOS 7 this function was deprecated.
It was similar question before: A fix for AudioSessionInitialize Deprecated? but... it has no any mention about how to get initialization error status.
And of course, i know how to initialize audio session without this function: Just calling [AVAudioSession sharedInstance] cause hidden call of AudioSessionInitialize. But it returns non zero value anyway. So new interface does not allow to get initialization error status.
upd: I'm not sure it's important but i receive message to stdout (which i redirected to log file) while call with error happens:
ERROR: [7971] 146: Unable to talk to server: error 0x10000003
(268435459)
explaination why i need this:
It happens very rarely (less then 0,1% of case) but it happens for any firmware. Last case registered for iOS 7.0.3 - so it's actual return value still (btw, first case registered for first firmware my app supported: iOS 2.2). It's important feature (cause i develop alarm clock) - it allows to know user about issues in the evening and not in the morning (cause in the morning this issue will cause oversleep).

Resources