ITMS-90300: Deprecated API Usage

Hi all,

I try to upload this application to mac store and i receive this error :

ITMS-90300: Deprecated API Usage - Apple will stop accepting submissions of apps that use QuickTime or QTKit APIs .

the app is very simple , it  play an audio file .

below the unit declarations.

unit main;

interface

uses
  System.SysUtils, System.Types, System.UITypes, System.Classes, System.Variants, System.AnsiStrings,
  FMX.Types, FMX.Controls, FMX.Forms, FMX.Graphics, FMX.Dialogs,
  FMX.Controls.Presentation, FMX.StdCtrls, FMX.Edit, FMX.Objects,
  FMX.Media, FMX.Menus,System.IniFiles, FMX.ListBox, System.IOUtils
  {$IFDEF MACOS}
 , Posix.Stdlib, MacAPI.AppKit, MacAPI.Foundation
  {$ENDIF}
  {$IFDEF MSWINDOWS}
   , MMSystem, WinAPI.ShellApi, WinAPI.Windows
  {$ENDIF}
   ;
thanks in advance
Beppe
Parents
  • Many components in Delphi use deprecated macOS APIs; get over it. Instead of waiting for a fix (which might never come), write your own code, especially if all you need is playing a sound file. Something like:

    var
     Player: AVAudioPlayer;
    
    procedure TForm1.Button1Click(Sender: TObject);
    var
      aURL: NSURL;
    begin
      aURL := TNSURL.Wrap(TNSURL.OCClass.URLWithString(StrToNSStr('/PathToYour/File.wav')));
      Player := TAVAudioPlayer.Wrap(TAVAudioPlayer.Alloc.initWithContentsOfURL(aURL, nil));
      Player.play;
    end;

    You'll find many other useful methods at https://developer.apple.com/documentation/avfoundation/avaudioplayer?language=objc

Reply Children