3

We're publishing a MacOS app to the app store, which uses Xamarin.Mac and Xamarin Forms. During the review process in App Store Connect, our app binary has been rejected for the following reason:

Your app app links against the following non-public framework(s): Frameworks: /System/Library/PrivateFrameworks/Network.framework/Versions/A/Network

How can we find where this framework is used in our app, so that we can remove it?

Our app is published by posting the .apk file to the app store, but I think we may have to search inside either the .apk, or one of the .dll files - is there any advice for how we can find where in our app this reference is coming from?

We've been recommended to use "strings" or "otool" to help - is there an example of how to use these in our case to find and remove the usage?

Charles Roddie
  • 952
  • 5
  • 16
Kevin C
  • 324
  • 1
  • 14

1 Answers1

1

Posting the answer here, as we managed to work out how to detect the referenced frameworks. with thanks to this Xamarin thread too:

https://forums.xamarin.com/discussion/94838/xamarin-mac-linker-behavior-appstore-rejection

As part of the build, we produce a .pkg file, but also a .app file (e.g. OurApplication.app and OurApplication-1.0.pkg).

It's possible to open the *.app file to view the file structure inside, by selecting the file in the Finder, and under options choosing "Show Package Contents". This means that opening in a terminal, we can navigate to the location:

OurApplication.app/Contents/MacOS

which contains a single Unix executable file: OurApplication.

This is the file we need to run otool on, with the following command:

otool -L OurApplication | grep "PrivateFrameworks"

where we can finally see the framework above that we were referencing. (Note that ignoring the grep part of the command would show all the frameworks, so it was useful to apply the filter).

This allowed us to test different build settings to remove the framework, without needing to submit to Apple each time.

We removed the reference (and so fixed the problem) by setting our "Linker behaviour" to "Framework SDKs Only" and turning on "Ahead-of-time (AOT) compile assemblies" in our project settings.

Kevin C
  • 324
  • 1
  • 14