Apple rejected my Xamarin.Forms iOS App for usage of non-public API which I don't use

engmsalehengmsaleh Member ✭✭

I have an App that is under development using Xamarin. Forms and I have submitted more than 40 beta until now and it works fine, randomly in the last week I have started getting rejected from App with the following error

The app references non-public selectors in Appname.iOS: addTemporaryAttribute:value:forCharacterRange:, addTemporaryAttributes:forCharacterRange:, behaviorWithType:, defaultBaselineOffsetForFont:, defaultLineHeightForFont:, finished, greekingThreshold, horizontalCornerRadius, initWithSource:convolutionState:weights:, initWithType:, postSession:didAddPlayer:, postSession:didReceiveData:fromPlayer:, postSession:didReceiveMessage:withData:fromPlayer:, postSession:didRemovePlayer:, postSession:player:didChangeConnectionState:, postSession:player:didSaveData:, preferredMetalContext, removeData:, removeTemporaryAttribute:forCharacterRange:, setGreekingThreshold:, setHorizontalCornerRadius:, setIsPrimary:, setShouldAntiAlias:, setUUID:, setVerticalCornerRadius:, shouldAntiAlias, temporaryAttribute:atCharacterIndex:effectiveRange:, temporaryAttribute:atCharacterIndex:longestEffectiveRange:inRange:, temporaryAttributesAtCharacterIndex:effectiveRange:, temporaryAttributesAtCharacterIndex:longestEffectiveRange:inRange:, textContainerChangedTextView:, toolTip, usesBackgroundSession, verticalCornerRadius

Also, I have seen a lot of issues since the last VS2019 for mac 2 weeks ago

I have found that several ppl got the same issue as the ones here, but neither solution solved my issue
Which I don't and don't understand the problem, I have already submitted an email without a reply until now, does anyone encounter the same issue?

Best Answer

  • engmsalehengmsaleh ✭✭
    Accepted Answer

    After filling an internal issue with the Xamarin team, they advised doing the following

    adding --linksdkonly to the Additional mtouch arguments on the iOS Build settings page

    As it seems that Visual Studio ignores the settings in GUI

    I have tested it and now get my build accepted by Apple without the above error
    Please @amirvenus try the above suggestion and confirm if it solved yours also

Answers

  • LandLuLandLu Member, Xamarin Team Xamurai
    edited April 16

    Have you added some new packages which may call some private API comparing to the version you submitted last week?
    Have you tried to fix that by setting iOS-Build from Don't Link to Link Framework SDK's Only?
    We are now collecting the related issues cases so more information will be appreciated.

  • EpicDkEpicDk Member

    Im having the same issue. Using Link Framework SDK's Only make my app crash, Im using a webkit view.
    Also disabling 32-bit float operations as 64 bit, doesn't change the panorama. Using Deployment Target 9.0 and 11 with the same problem.

  • EpicDkEpicDk Member
    edited April 16

    From Apple: "We identified one or more issues with a recent delivery for your app, "XXXX". Please correct the following issues, then upload again.
    Non-public API usage"

    I had to add --linkskip=HealthKit in the mtouch arguments, because the app have been Rejected because I was using HealthKit, which I didn't use it, looks like it comes from Xamarin.

    Im using the latest nugets packages and visual studio 2019.

  • amirvenusamirvenus USMember ✭✭✭

    I am having the same problem.

    Seems to be an issue with Xamarin

  • engmsalehengmsaleh Member ✭✭

    @LandLu I'm already using the flag as Link Framework SDK's Only
    No, I haven't done any new packages and I'm having the build sent to Apple on Beta for 2 months with over 45 builds without a problem, the problem started to happen to me in the last week only.

  • amirvenusamirvenus USMember ✭✭✭
    I have tried Don’t Link, Link Assemblies and Framework and Link Framework only but the result is all the same:

    The app references non-public selectors in App.iOS: addTemporaryAttribute:value:forCharacterRange:, addTemporaryAttributes:forCharacterRange:, behaviorWithType:, defaultBaselineOffsetForFont:, defaultLineHeightForFont:, finished, greekingThreshold, horizontalCornerRadius, initWithSource:convolutionState:weights:, initWithType:, postSession:didAddPlayer:, postSession:didReceiveData:fromPlayer:, postSession:didReceiveMessage:withData:fromPlayer:, postSession:didRemovePlayer:, postSession:player:didChangeConnectionState:, postSession:player:didSaveData:, preferredMetalContext, removeData:, removeTemporaryAttribute:forCharacterRange:, setGreekingThreshold:, setHorizontalCornerRadius:, setIsPrimary:, setShouldAntiAlias:, setUUID:, setVerticalCornerRadius:, shouldAntiAlias, temporaryAttribute:atCharacterIndex:effectiveRange:, temporaryAttribute:atCharacterIndex:longestEffectiveRange:inRange:, temporaryAttributesAtCharacterIndex:effectiveRange:, temporaryAttributesAtCharacterIndex:longestEffectiveRange:inRange:, textContainerChangedTextView:, toolTip, usesBackgroundSession, verticalCornerRadius
  • engmsalehengmsaleh Member ✭✭

    @EpicDk I have tried your suggestion, but still same problem

    I had to add --linkskip=HealthKit in the mtouch arguments, because the app have been Rejected because I was using HealthKit, which I didn't use it, looks like it comes from Xamarin.

  • engmsalehengmsaleh Member ✭✭
    Accepted Answer

    After filling an internal issue with the Xamarin team, they advised doing the following

    adding --linksdkonly to the Additional mtouch arguments on the iOS Build settings page

    As it seems that Visual Studio ignores the settings in GUI

    I have tested it and now get my build accepted by Apple without the above error
    Please @amirvenus try the above suggestion and confirm if it solved yours also

Sign In or Register to comment.