Closed praeclarum closed 4 years ago
Rejection because APIs used to be private
🤔
I'm going to be blunt here, but this makes no sense (from Apple).
When you use the static registrar, we generate Objective-C code to bridge between your managed code and iOS' Objective-C code. This Objective-C code is just like Objective-C code any Objective-C developer would write in Xcode. There's no actual difference. They're effectively saying that you can't write Objective-C code that uses any classes that were once private...
They're even contradicting themselves in the rejection:
Specifically, several classes which the app invokes dynamically were at one point non-public APIs, and the app’s strong linking [...]
It's either "dynamically" or "strong linking", both doesn't make sense.
Could you share the complete rejection email you got from Apple? Maybe that will give us any clues as to what they didn't like.
@praeclarum can you also give us a copy of the
.ipa
you submitted to Apple
Thanks!FWIW we ran our submission tests yesterday (like every week) which includes a un-linked app (with every symbols) and the binary was validated. I does not mean there can't be bugs, but it should not be a general one.
I’m sorry but that was the complete message from them.
Yeah they misspoke. I think they meant to say static linking in some parts. The message I got was that you should only dynamically link to those APIs. But as you say, it’s not 100% clear.
I will send you the IPA on Slack.
@spouliot yeah I have submitted this app unlinked several times before. What can I say other than some App Reviewers let things slide.
Hi, just an update. I used linker XML files to remove the above classes.
Upon resubmission, I was rejected again for:
Your app uses or references the following non-public APIs:
- LinkPresentation.framework
Which is baffling given that it's very much a public API now: https://developer.apple.com/documentation/linkpresentation?language=objc
Are you really getting apps approved that reference that framework?
LinkPresentation.framework
is iOS 13 and up, what is your minimum supported iOS listed in your info.plist? IIRC that framework used to be private before iOS 13
On a side note looks like you are not alone with that LinkPresentation framework... https://github.com/xamarin/xamarin-macios/issues/7170
Thanks Alex, but I'm happy to just remove it but can't. Monotouch keeps including it in the registrar :-( Any thoughts on how to remove it?
11:40 AM fak@tau-1278 ~/D/P/Upsight|master⚡* 〉grep -r LinkPresentation Upsight.iOS/bin/iPhone/Release/
Binary file Upsight.iOS/bin/iPhone/Release//Continuous.app.dSYM/Contents/Resources/DWARF/Continuous matches
Binary file Upsight.iOS/bin/iPhone/Release//Continuous.app.mSYM/ee350f30043a4112b610859689d3396b/Xamarin.iOS.dll matches
Binary file Upsight.iOS/bin/iPhone/Release//Continuous.app/Xamarin.iOS.dll matches
Binary file Upsight.iOS/bin/iPhone/Release//Continuous.app/Continuous matches
11:41 AM fak@tau-1278 ~/D/P/Upsight|master⚡* 〉grep -r LinkPresentation Upsight.iOS/obj/iPhone/Release/
Upsight.iOS/obj/iPhone/Release//mtouch-cache/registrar.m: { NULL, 0xEE04 /* #164 'LPLinkMetadata' => 'LinkPresentation.LPLinkMetadata, Xamarin.iOS' */, (MTTypeFlags) (0) /* None */ },
Binary file Upsight.iOS/obj/iPhone/Release//mtouch-cache/1-Link/Xamarin.iOS.dll matches
Upsight.iOS/obj/iPhone/Release//mtouch-cache/registrar.h:#import <LinkPresentation/LinkPresentation.h>
Binary file Upsight.iOS/obj/iPhone/Release//mtouch-cache/3-Build/Msym/Msym/tmp/Xamarin.iOS.dll matches
Binary file Upsight.iOS/obj/iPhone/Release//mtouch-cache/3-Build/Xamarin.iOS.dll matches
Upsight.iOS/obj/iPhone/Release//mtouch-cache/arm64/Xamarin.iOS.dll.s: .no_dead_strip _LinkPresentation_LPLinkMetadata_get_ClassHandle
Upsight.iOS/obj/iPhone/Release//mtouch-cache/arm64/Xamarin.iOS.dll.s:_LinkPresentation_LPLinkMetadata_get_ClassHandle:
Upsight.iOS/obj/iPhone/Release//mtouch-cache/arm64/Xamarin.iOS.dll.s: .no_dead_strip _LinkPresentation_LPLinkMetadata__ctor_intptr
Upsight.iOS/obj/iPhone/Release//mtouch-cache/arm64/Xamarin.iOS.dll.s:_LinkPresentation_LPLinkMetadata__ctor_intptr:
Upsight.iOS/obj/iPhone/Release//mtouch-cache/arm64/Xamarin.iOS.dll.s: .no_dead_strip _LinkPresentation_LPLinkMetadata_Copy_Foundation_NSZone
Upsight.iOS/obj/iPhone/Release//mtouch-cache/arm64/Xamarin.iOS.dll.s:_LinkPresentation_LPLinkMetadata_Copy_Foundation_NSZone:
Upsight.iOS/obj/iPhone/Release//mtouch-cache/arm64/Xamarin.iOS.dll.s: .no_dead_strip _LinkPresentation_LPLinkMetadata_EncodeTo_Foundation_NSCoder
Upsight.iOS/obj/iPhone/Release//mtouch-cache/arm64/Xamarin.iOS.dll.s:_LinkPresentation_LPLinkMetadata_EncodeTo_Foundation_NSCoder:
Upsight.iOS/obj/iPhone/Release//mtouch-cache/arm64/Xamarin.iOS.dll.s: .no_dead_strip _LinkPresentation_LPLinkMetadata__cctor
Upsight.iOS/obj/iPhone/Release//mtouch-cache/arm64/Xamarin.iOS.dll.s:_LinkPresentation_LPLinkMetadata__cctor:
Upsight.iOS/obj/iPhone/Release//mtouch-cache/arm64/Xamarin.iOS.dll.s: .no_dead_strip ObjCRuntime_Libraries_LinkPresentation__cctor
Upsight.iOS/obj/iPhone/Release//mtouch-cache/arm64/Xamarin.iOS.dll.s:ObjCRuntime_Libraries_LinkPresentation__cctor:
Upsight.iOS/obj/iPhone/Release//mtouch-cache/arm64/Xamarin.iOS.dll.s: .no_dead_strip ObjCRuntime_Trampolines_NIDActionArity2V85_Invoke_LinkPresentation_LPLinkMetadata_Foundation_NSError
Upsight.iOS/obj/iPhone/Release//mtouch-cache/arm64/Xamarin.iOS.dll.s:ObjCRuntime_Trampolines_NIDActionArity2V85_Invoke_LinkPresentation_LPLinkMetadata_Foundation_NSError:
Upsight.iOS/obj/iPhone/Release//mtouch-cache/arm64/Xamarin.iOS.dll.s: .no_dead_strip wrapper_delegate_invoke_System_Action_2_LinkPresentation_LPLinkMetadata_Foundation_NSError_invoke_void_T1_T2_LinkPresentation_LPLinkMetadata_Foundation_NSError
Upsight.iOS/obj/iPhone/Release//mtouch-cache/arm64/Xamarin.iOS.dll.s:wrapper_delegate_invoke_System_Action_2_LinkPresentation_LPLinkMetadata_Foundation_NSError_invoke_void_T1_T2_LinkPresentation_LPLinkMetadata_Foundation_NSError:
Upsight.iOS/obj/iPhone/Release//mtouch-cache/arm64/Xamarin.iOS.dll.s:bl _LinkPresentation_LPLinkMetadata_get_ClassHandle
Upsight.iOS/obj/iPhone/Release//mtouch-cache/arm64/Xamarin.iOS.dll.s:bl _LinkPresentation_LPLinkMetadata__ctor_intptr
Upsight.iOS/obj/iPhone/Release//mtouch-cache/arm64/Xamarin.iOS.dll.s:bl _LinkPresentation_LPLinkMetadata_Copy_Foundation_NSZone
Upsight.iOS/obj/iPhone/Release//mtouch-cache/arm64/Xamarin.iOS.dll.s:bl _LinkPresentation_LPLinkMetadata_EncodeTo_Foundation_NSCoder
Upsight.iOS/obj/iPhone/Release//mtouch-cache/arm64/Xamarin.iOS.dll.s:bl _LinkPresentation_LPLinkMetadata__cctor
Upsight.iOS/obj/iPhone/Release//mtouch-cache/arm64/Xamarin.iOS.dll.s:bl ObjCRuntime_Libraries_LinkPresentation__cctor
Upsight.iOS/obj/iPhone/Release//mtouch-cache/arm64/Xamarin.iOS.dll.s:bl ObjCRuntime_Trampolines_NIDActionArity2V85_Invoke_LinkPresentation_LPLinkMetadata_Foundation_NSError
Upsight.iOS/obj/iPhone/Release//mtouch-cache/arm64/Xamarin.iOS.dll.s:bl wrapper_delegate_invoke_System_Action_2_LinkPresentation_LPLinkMetadata_Foundation_NSError_invoke_void_T1_T2_LinkPresentation_LPLinkMetadata_Foundation_NSError
Upsight.iOS/obj/iPhone/Release//mtouch-cache/arm64/Xamarin.iOS.dll.s: .no_dead_strip plt_ObjCRuntime_Runtime_GetNSObject_LinkPresentation_LPLinkMetadata_intptr
Upsight.iOS/obj/iPhone/Release//mtouch-cache/arm64/Xamarin.iOS.dll.s:plt_ObjCRuntime_Runtime_GetNSObject_LinkPresentation_LPLinkMetadata_intptr:
Upsight.iOS/obj/iPhone/Release//mtouch-cache/arm64/Xamarin.iOS.dll.s: .asciz "LinkPresentation_LPLinkMetadata"
Upsight.iOS/obj/iPhone/Release//mtouch-cache/arm64/Xamarin.iOS.dll.s: .asciz "LinkPresentation_LPLinkMetadata"
Upsight.iOS/obj/iPhone/Release//mtouch-cache/arm64/Xamarin.iOS.dll.s: .asciz "LinkPresentation.LPLinkMetadata:get_ClassHandle"
Upsight.iOS/obj/iPhone/Release//mtouch-cache/arm64/Xamarin.iOS.dll.s: .asciz "_LinkPresentation_LPLinkMetadata_get_ClassHandle"
Upsight.iOS/obj/iPhone/Release//mtouch-cache/arm64/Xamarin.iOS.dll.s: .quad _LinkPresentation_LPLinkMetadata_get_ClassHandle
Upsight.iOS/obj/iPhone/Release//mtouch-cache/arm64/Xamarin.iOS.dll.s: .quad _LinkPresentation_LPLinkMetadata_get_ClassHandle
Upsight.iOS/obj/iPhone/Release//mtouch-cache/arm64/Xamarin.iOS.dll.s:LDIFF_SYM6242=Lme_4f8 - _LinkPresentation_LPLinkMetadata_get_ClassHandle
Upsight.iOS/obj/iPhone/Release//mtouch-cache/arm64/Xamarin.iOS.dll.s: .asciz "LinkPresentation.LPLinkMetadata:.ctor"
Upsight.iOS/obj/iPhone/Release//mtouch-cache/arm64/Xamarin.iOS.dll.s: .asciz "_LinkPresentation_LPLinkMetadata__ctor_intptr"
Upsight.iOS/obj/iPhone/Release//mtouch-cache/arm64/Xamarin.iOS.dll.s: .quad _LinkPresentation_LPLinkMetadata__ctor_intptr
Upsight.iOS/obj/iPhone/Release//mtouch-cache/arm64/Xamarin.iOS.dll.s: .quad _LinkPresentation_LPLinkMetadata__ctor_intptr
Upsight.iOS/obj/iPhone/Release//mtouch-cache/arm64/Xamarin.iOS.dll.s:LDIFF_SYM6246=Lme_4f9 - _LinkPresentation_LPLinkMetadata__ctor_intptr
Upsight.iOS/obj/iPhone/Release//mtouch-cache/arm64/Xamarin.iOS.dll.s: .asciz "LinkPresentation.LPLinkMetadata:Copy"
Upsight.iOS/obj/iPhone/Release//mtouch-cache/arm64/Xamarin.iOS.dll.s: .asciz "_LinkPresentation_LPLinkMetadata_Copy_Foundation_NSZone"
Upsight.iOS/obj/iPhone/Release//mtouch-cache/arm64/Xamarin.iOS.dll.s: .quad _LinkPresentation_LPLinkMetadata_Copy_Foundation_NSZone
Upsight.iOS/obj/iPhone/Release//mtouch-cache/arm64/Xamarin.iOS.dll.s: .quad _LinkPresentation_LPLinkMetadata_Copy_Foundation_NSZone
Upsight.iOS/obj/iPhone/Release//mtouch-cache/arm64/Xamarin.iOS.dll.s:LDIFF_SYM6251=Lme_4fa - _LinkPresentation_LPLinkMetadata_Copy_Foundation_NSZone
Upsight.iOS/obj/iPhone/Release//mtouch-cache/arm64/Xamarin.iOS.dll.s: .asciz "LinkPresentation.LPLinkMetadata:EncodeTo"
Upsight.iOS/obj/iPhone/Release//mtouch-cache/arm64/Xamarin.iOS.dll.s: .asciz "_LinkPresentation_LPLinkMetadata_EncodeTo_Foundation_NSCoder"
Upsight.iOS/obj/iPhone/Release//mtouch-cache/arm64/Xamarin.iOS.dll.s: .quad _LinkPresentation_LPLinkMetadata_EncodeTo_Foundation_NSCoder
Upsight.iOS/obj/iPhone/Release//mtouch-cache/arm64/Xamarin.iOS.dll.s: .quad _LinkPresentation_LPLinkMetadata_EncodeTo_Foundation_NSCoder
Upsight.iOS/obj/iPhone/Release//mtouch-cache/arm64/Xamarin.iOS.dll.s:LDIFF_SYM6255=Lme_4fb - _LinkPresentation_LPLinkMetadata_EncodeTo_Foundation_NSCoder
Upsight.iOS/obj/iPhone/Release//mtouch-cache/arm64/Xamarin.iOS.dll.s: .asciz "LinkPresentation.LPLinkMetadata:.cctor"
Upsight.iOS/obj/iPhone/Release//mtouch-cache/arm64/Xamarin.iOS.dll.s: .asciz "_LinkPresentation_LPLinkMetadata__cctor"
Upsight.iOS/obj/iPhone/Release//mtouch-cache/arm64/Xamarin.iOS.dll.s: .quad _LinkPresentation_LPLinkMetadata__cctor
Upsight.iOS/obj/iPhone/Release//mtouch-cache/arm64/Xamarin.iOS.dll.s: .quad _LinkPresentation_LPLinkMetadata__cctor
Upsight.iOS/obj/iPhone/Release//mtouch-cache/arm64/Xamarin.iOS.dll.s:LDIFF_SYM6257=Lme_4fc - _LinkPresentation_LPLinkMetadata__cctor
Upsight.iOS/obj/iPhone/Release//mtouch-cache/arm64/Xamarin.iOS.dll.s: .asciz "ObjCRuntime.Libraries/LinkPresentation:.cctor"
Upsight.iOS/obj/iPhone/Release//mtouch-cache/arm64/Xamarin.iOS.dll.s: .asciz "ObjCRuntime_Libraries_LinkPresentation__cctor"
Upsight.iOS/obj/iPhone/Release//mtouch-cache/arm64/Xamarin.iOS.dll.s: .quad ObjCRuntime_Libraries_LinkPresentation__cctor
Upsight.iOS/obj/iPhone/Release//mtouch-cache/arm64/Xamarin.iOS.dll.s: .quad ObjCRuntime_Libraries_LinkPresentation__cctor
Upsight.iOS/obj/iPhone/Release//mtouch-cache/arm64/Xamarin.iOS.dll.s:LDIFF_SYM27926=Lme_16e2 - ObjCRuntime_Libraries_LinkPresentation__cctor
Upsight.iOS/obj/iPhone/Release//mtouch-cache/arm64/Xamarin.iOS.dll.s: .asciz "ObjCRuntime_Trampolines_NIDActionArity2V85_Invoke_LinkPresentation_LPLinkMetadata_Foundation_NSError"
Upsight.iOS/obj/iPhone/Release//mtouch-cache/arm64/Xamarin.iOS.dll.s: .quad ObjCRuntime_Trampolines_NIDActionArity2V85_Invoke_LinkPresentation_LPLinkMetadata_Foundation_NSError
Upsight.iOS/obj/iPhone/Release//mtouch-cache/arm64/Xamarin.iOS.dll.s: .quad ObjCRuntime_Trampolines_NIDActionArity2V85_Invoke_LinkPresentation_LPLinkMetadata_Foundation_NSError
Upsight.iOS/obj/iPhone/Release//mtouch-cache/arm64/Xamarin.iOS.dll.s:LDIFF_SYM50663=Lme_3d01 - ObjCRuntime_Trampolines_NIDActionArity2V85_Invoke_LinkPresentation_LPLinkMetadata_Foundation_NSError
Upsight.iOS/obj/iPhone/Release//mtouch-cache/arm64/Xamarin.iOS.dll.s: .asciz "(wrapper_delegate-invoke)_System.Action`2<LinkPresentation.LPLinkMetadata,_Foundation.NSError>:invoke_void_T1_T2"
Upsight.iOS/obj/iPhone/Release//mtouch-cache/arm64/Xamarin.iOS.dll.s: .asciz "wrapper_delegate_invoke_System_Action_2_LinkPresentation_LPLinkMetadata_Foundation_NSError_invoke_void_T1_T2_LinkPresentation_LPLinkMetadata_Foundation_NSError"
Upsight.iOS/obj/iPhone/Release//mtouch-cache/arm64/Xamarin.iOS.dll.s: .quad wrapper_delegate_invoke_System_Action_2_LinkPresentation_LPLinkMetadata_Foundation_NSError_invoke_void_T1_T2_LinkPresentation_LPLinkMetadata_Foundation_NSError
Upsight.iOS/obj/iPhone/Release//mtouch-cache/arm64/Xamarin.iOS.dll.s: .quad wrapper_delegate_invoke_System_Action_2_LinkPresentation_LPLinkMetadata_Foundation_NSError_invoke_void_T1_T2_LinkPresentation_LPLinkMetadata_Foundation_NSError
Upsight.iOS/obj/iPhone/Release//mtouch-cache/arm64/Xamarin.iOS.dll.s:LDIFF_SYM407375=Lme_19034 - wrapper_delegate_invoke_System_Action_2_LinkPresentation_LPLinkMetadata_Foundation_NSError_invoke_void_T1_T2_LinkPresentation_LPLinkMetadata_Foundation_NSError
Binary file Upsight.iOS/obj/iPhone/Release//mtouch-cache/arm64/Xamarin.iOS.dll.o matches
Binary file Upsight.iOS/obj/iPhone/Release//mtouch-cache/arm64/Continuous matches
Binary file Upsight.iOS/obj/iPhone/Release//mtouch-cache/2-PreBuild/Xamarin.iOS.dll matches
Here is my linker.xml
Closing this bug thanks to the help of everyone.
I chose to link out LinkPresentation. Though, I may switch to require iOS 13 in the future. I'm hoping all this "private API" business would go away then.
Some tips to get rid of LinkPresentation:
Link out UIKit types In the end, removing this framework meant also not preserving some UIKit types:
"IUIActivityItemSource"
"UIActivityItemSource"
"UIActivityItemProvider"
"IUIActivityItemProvider"
"UIActivityItemSource_Extensions"
Link out generated trampolines ObjC bodies have trampolines generated for them. Therefore you cannot preserve all of ObjcRuntime
Apple rejected my app for using the static registrar with some types.
In their own words,
It would seem that the dynamic registrar is needed for the following types.
Is it possible to use a mixed mode registrar?
QuickLookThumbnailing
LinkPresentation
PencilKit
Others
Steps to Reproduce
Expected Behavior
Actual Behavior
Environment