Forum Libraries, Components, and Plugins

Apple rejected my app for use of non-public APIs

  1. 5 Performance: Software Requirements
    Guideline 2.5.1 - Performance - Software Requirements

Your app uses or references the following non-public APIs:

  • LinkPresentation.framework
  • QuickLookThumbnailing.framework

The use of non-public APIs is not permitted on the App Store because it can lead to a poor user experience should these APIs change.

Continuing to use or conceal non-public APIs in future submissions of this app may result in the termination of your Apple Developer account, as well as removal of all associated apps from the App Store.

I don't reference these in my solution at all. I've used the otool and strings tools to try and figure out where these frameworks are being used, but I can't seem to pinpoint them.

I've tested with an IPA file compiled with Don't Link and I got
Binary file MyApp.iOS matches
Binary file Xamarin.iOS.dll matches
while with an IPA compiled with Link Framework SDKs Only I got
Binary file MyApp.iOS matches
So I have a feeling it has something to do with the way the Xamarin.Forms package is compiled.

I've also updated all the packages just in case. The app has been in store for a while now and I've never encountered this issue before.

Am I missing something? Has anyone hit this roadblock before?

Included Packages:

My Project Options:

Tagged:

Best Answer

  • HijackalHijackal US ✭✭
    Accepted Answer

    @LandLu Thanks for the link.

    I uploaded a new build today and it got accepted by Apple. What I ended up doing:

    • removed all the packages and re-added the essential ones one by one (there were some dependencies added as separate packages that were no longer needed)
    • made sure all packages had the latest stable version
    • kept --linksdkonly as an mtouch argument (I found a reported bug that said that the dropdown was being ignored in some VS builds so I added the linker behavior as an mtouch argument just in case). Removed any other argument that was added in the hopes of solving this issue.
    • deleted the bin and obj folders before rebuilding the solution
    • archived and uploaded to the App Store
    • added a note to the release request stating the initial issue, and mentioning that it's a Xamarin Forms app, that all third-party libraries have been updated, and that the app does not use LinkPresentation, nor QuickLookThumbnailing.

    In case this helps anyone :smile:

Answers

  • AndyFlisherAndyFlisher GBBeta, University ✭✭✭✭
    Have a look at this thread, exact same issue which turned out to be a Xamarin Essentials linker issue - https://forums.xamarin.com/discussion/174921/problems-in-app-review
  • HijackalHijackal USMember ✭✭

    @AndyFlisher Thanks for the quick reply. I tried the solution in that thread and it didn't work for me.

    I tried to reproduce the issue in a new app with --linksdkonly and I got 0 matches for
    grep -R 'LinkPresentation' *
    grep -R 'QuickLookThumbnailing' *
    grep -R 'LPLinkMetadata' *
    grep -R 'generateRepresentations:' *
    grep -R 'activityViewControllerLinkMetadata:' *
    grep -R 'LPMetadataProvider' *
    grep -R 'generateBestRepresentation:' *
    grep -R 'saveBestRepresentation:' *

    But with my current app I'm still getting matches in MyApp.iOS for
    grep -R 'LPLinkMetadata' *
    grep -R 'activityViewControllerLinkMetadata:' *
    with --linksdkonly and with --linksdkonly --linkskip=Xamarin.Essentials

  • HijackalHijackal USMember ✭✭

    Forgot to mention: I was able to find a match in my app for the searches above before updating all the packages to their latest versions. Now I'm left only with LPLinkMetadata and activityViewControllerLinkMetadata.

  • LandLuLandLu Member, Xamarin Team Xamurai

    If it is still there after setting the linker behavior to link frameworks only it may exist in some third party libraries you referenced.
    Here is an issue talking about a similar topic:
    https://github.com/xamarin/xamarin-macios/issues/7170
    I think you could upload your logs there to help us do more investigation.

  • HijackalHijackal USMember ✭✭
    Accepted Answer

    @LandLu Thanks for the link.

    I uploaded a new build today and it got accepted by Apple. What I ended up doing:

    • removed all the packages and re-added the essential ones one by one (there were some dependencies added as separate packages that were no longer needed)
    • made sure all packages had the latest stable version
    • kept --linksdkonly as an mtouch argument (I found a reported bug that said that the dropdown was being ignored in some VS builds so I added the linker behavior as an mtouch argument just in case). Removed any other argument that was added in the hopes of solving this issue.
    • deleted the bin and obj folders before rebuilding the solution
    • archived and uploaded to the App Store
    • added a note to the release request stating the initial issue, and mentioning that it's a Xamarin Forms app, that all third-party libraries have been updated, and that the app does not use LinkPresentation, nor QuickLookThumbnailing.

    In case this helps anyone :smile:

  • LandLuLandLu Member, Xamarin Team Xamurai

    Thank you for sharing this.
    Please mark it so that other community members could get the correct direction from this.

Sign In or Register to comment.