I just received the following rejection when submitting an update to my game:
Your app contains non-public api usage. please review the errors, correct them, and resubmit your application.
The app references non-public symbols in MPMoviePlayerContentPreloadDidFinishNotification
How do I fix this problem? This is an update to an existing app; obviously previous builds submitted fine. I’m using Unity 4.2.2 with this app because it is really tricky to update the Unity version of this project (eg. incompatible asset bundles)
Poking around the MediaPlayer framework, I found
at the bottom of MPMoviePlayerController.h it says:
// This notification is superseded by MPMediaPlaybackIsPreparedToPlayDidChangeNotification.
MP_EXTERN NSString *const MPMoviePlayerContentPreloadDidFinishNotification NS_DEPRECATED_IOS(2_0, 3_2);
while at the bottom of MPMediaPlayback.h it says:
MP_EXTERN NSString *const MPMediaPlaybackIsPreparedToPlayDidChangeNotification NS_AVAILABLE_IOS(3_2);
Incidentally, my app is currently targeting ios 5; perhaps this deprecated api is only used in ios 5, and this problem will go away by switching the project to ios 6?
ADDITION: I also noticed in Unity’s VideoViewController.h it says:
@interface UnityVideoViewController : MPMoviePlayerViewController {}
So in other words Unity is extending the class with the deprecated function in it’s header. hm…
ADDITION2: Another bit of background that just came up, I’m using XCode 5.1.1 but it looks like the MediaPlayer framework is updated in XCode 6. Given that XCode 6 is a semi-private beta, it would be pretty stupid for Apple to require that to submit an app…
ADDITION3: nnn and now that I’ve tried to build in XCode 6 I’m seeing “Use of undeclared identifier ‘GL_BGRA_EXT’” in Classes/Unity/CMVideoSampling.mm
I found this thread with info about that last issue iOS8 / XCode6 compatibility - Unity Engine - Unity Discussions
ADDITION4: oh goody and now another wrinkle has come up, I found that API documented here MPMoviePlayerController | Apple Developer Documentation
When I click “Notifications” in the left-side menu there’s MPMoviePlayerContentPreloadDidFinishNotification listed. It’s deprecated but it public; perhaps the error from iTunes is simply incorrect…