Apple no longer accepts submissions of apps that use QuickTime or QTKit APIs

Xam_DeveloperXam_Developer INMember ✭✭

We have created the PKG and uploaded to the AppStore. It is however failing to get uploaded and is giving the following error:

Dear developer,
We have discovered one or more issues with your recent delivery for "VoiceNote". To process your delivery, the following issues must be corrected:
Deprecated API Usage - Apple no longer accepts submissions of apps that use QuickTime or QTKit APIs.
Once these issues have been corrected, you can then redeliver the corrected binary.
Regards,
The App Store team

We were able to successfully upload a version of the same pkg without any issues but this issue started all of a sudden. We did only minor changes in the code and did not do any changes in Settings/ core functionality.

Any thoughts? Please help and advise.
Mathews

Tagged:

Answers

  • ChrisHamonsChrisHamons USXamarin Team Xamurai

    The short answer:

    • Add: --linkplatform to your Additional MMP arguments (Project Options, Mac Build) if your code does not do a lot of reflection related to calls to Xamarin.Mac and you are using a modern Xamarin.Mac
    • Else add --registrat:dynamic which works everywhere, but removes a launch speed optimization

    The long answer (written before --linkplatform but references it)

    https://medium.com/@donblas/how-a-default-behavior-change-broke-mac-app-store-submissions-bb92314065a0

  • harshitgindraharshitgindra USMember ✭✭

    @Chris Hamons

    I'm using iTextSharp library in my Xamarin mac app. If I use --linkplatform, I get the following error,

    Error MM2001: Could not link assemblies. Reason: Error processing method: 'System.Void iTextSharp.text.BaseColor::.ctor(System.Drawing.Color)' in assembly: 'itextsharp.dll' (MM2001)

    and if I use --registrar:dynamic, I don't get any build errors but my app submission gets rejected due to use of Deprecated API usage (QuickTime or QTkit)

    I'm using Xamarin.mac v3.8.0.49

    Is there any way around to this as I've to make a critical publish as soon as possible ?

    Thank you in advance

  • ChrisHamonsChrisHamons USXamarin Team Xamurai

    @harshitgindra - It sounds like itextsharp.dll is not loadable by reflection, and you have a dependency on it.

    One strange and non-intuitive thing about JIT C# is that you can technically depend on something, and as long as you don't look at it to hard or try to use it, you can get away with it not being loadable.

    The linker, static registrar, and AOT require you to be "more honest" and force everything into memory, since they require a full picture to do their job safely.

    So, I would try to following:

    • Can you remove or fix up itextsharp.dll to be loadable? Maybe it has a dependency that you can't load on macOS? Do you need to recompile it? Remove the dependency? This is the happy case, because in the end your code is actually better.
    • Ok, you can't fix the library to be loadable. What do you need it for? Can you dynamically load it and invoke it, or the thing that it depends on, to hide it from the tooling? This is often reflection unsafe, but if you are linking just Xamarin.Mac.dll if those items don't call XM functions you are ok.

    The root problem is that Xamairn.Mac.dll contains bindings for items such as QTKit, which are deprecated by Apple and they refuse to allow references to. However we can't remove them without breaking API compatibility. Thus you need linking in some form to strip them out. This linking requires a full call graph.

  • harshitgindraharshitgindra USMember ✭✭

    @ChrisHamons

    I tried to load the dll using reflection and it worked. I didn't get any build errors on release configuration. But there are many references to that dll in my project. Updating each reference will take some time.

    Do you think any future Xamarin.Mac update will fix this issue automatically ?

    Thanks for the advice Chris. That was helpful.

  • ChrisHamonsChrisHamons USXamarin Team Xamurai

    I'm uncertain there is a solution to your problem outside either using reflection or fixing the library to be loadable.

    • Fundamentally you are in a broken position, one of your dependencies is not fully loadable.
    • The nature of the JIT is letting you get away with that, but it breaks all forms of linking.
    • Xamarin.Mac has bindings to QTKit that we can't remove until the next API break (if it occurs)
    • Linking is the way to remove the bindings you don't use
    • Until you fix the dependency, either by recompiling it, removing it, or hiding it's usage, you can't link.

    I would consider recompiling iTextSharp to be loadable (https://github.com/itext/itextsharp) or contacting the author to request better support.

    You could custom compile Xamarin.Mac.dll and remove QTKit bindings yourself, but then you'd be stuck forever recompiling a custom version just for yourself. I'd work on fixing the fundamental issue.

Sign In or Register to comment.