AVKit in OSX 10.8
Asked Answered
A

1

5

We're developing an OSX app that have to be supported by OSX 10.7 to 10.9. We're currently using QTKit and QTMovieView to show videos, but when trying to upload a new version recently we got this error message:

Deprecated API usage. Apple no longer accepts submissions of apps that use QuickTime APIs.

We have also tested to set the Base SDK to 10.8, but same result there.

And changing to AVKit and AVPlayerView does not work for version prior to 10.9.

So is there a way to use AVKit for versions prior to 10.9 or some way to publish an app with QTKit?

Anticipation answered 30/3, 2014 at 15:17 Comment(0)
C
8

You can't use AVKit on OS X versions prior to Mavericks.

But AVKit is a very small framework that only consists of a player view that has some advanced features out of the box (e.g. chapter navigation, selection & trimming, ... - similar to QTMovieView).
If your app doesn't require those features, you can easily implement a view with simple playback functionality with AVFoundation-only classes (AVFoundation was introduced with OS X 10.7).

Instead of AVPlayerView, you can use a combination of AVPlayer & AVPlayerLayer.
There is some Apple sample code that shows how to build a DIY player view here: https://developer.apple.com/library/mac/samplecode/AVSimplePlayerOSX/Introduction/Intro.html#//apple_ref/doc/uid/DTS40011060

This custom player view supports:

  • Play/Pause
  • Rewind
  • Playback progress
  • Fast forward
  • Volume control
Cirenaica answered 3/4, 2014 at 13:20 Comment(4)
hello there, do you know why I cannot open this example you have linked to your answer?Contribute
Hi, I just checked the sample and it still seems to work fine. I am on OS X 10.11.5 and Xcode 7.3.1. Do you get any error message?Cirenaica
I am able to download it and run it using xcode, but when the application runs I cannot see the appContribute
You have to open a movie file (e.g .mp4 or .mov) via the File->Open menu.Cirenaica

© 2022 - 2024 — McMap. All rights reserved.