简体   繁体   中英

Xamarin iOS app not able to upload to app store

I am trying to upload my iOS app to App Store and receiving this error message in an email.

ITMS-90338: Non-public API usage - The app references non-public selectors in MyApp.iOS: accessibilityBrailleMapRenderRegion, accessibilityBrailleMapRenderer, activePlayer, beginAuthorizationWithRequest:, cancelAuthorizationWithRequest:, checkFocusGroupTreeForEnvironment:, commissioningComplete:, connectionTypesMask, determineAppInstallationAttributionWithCompletionHandler:, errorForCHIPErrorCode:, errorToCHIPErrorCode:, lookupAdConversionDetails:, pairDevice:address:port:discriminator:setupPINCode:error:, playerId, serviceExtensionWillTerminate, session:didReceiveData:fromPlayer:, session:didReceiveMessage:withData:fromPlayer:, session:player:didChangeConnectionState:, session:player:didSaveData:, setAccessibilityBrailleMapRenderRegion:, setAccessibilityBrailleMapRenderer:, setConnectionTypesMask:, setListenPort:, sha redController, sleep:, test:, toggle:. If method names in your source code match the private Apple APIs listed above, altering your method names will help prevent this app from being flagged in future submissions. In addition, note that one or more of the above APIs may be located in a static library that was included with your app. If so, they must be removed. For further information, visit the Technical Support Information at http://developer.apple.com/support/technical/

To resolve this, I searched all method names in the solution.

The only match I found is didReceiveMessage in AppDelegate.cs in the iOS project. FirebasePushNotificationManager.DidReceiveMessage(userInfo);

full function is here.

public override void DidReceiveRemoteNotification(UIApplication application, NSDictionary userInfo, Action<UIBackgroundFetchResult> completionHandler)
        {
            // If you are receiving a notification message while your app is in the background,
            // this callback will not be fired 'till the user taps on the notification launching the application.

            // If you disable method swizzling, you'll need to call this method. 
            // This lets FCM track message delivery and analytics, which is performed
            // automatically with method swizzling enabled.
            FirebasePushNotificationManager.DidReceiveMessage(userInfo);
            // Do your magic to handle the notification data
            System.Console.WriteLine(userInfo);

            completionHandler(UIBackgroundFetchResult.NewData);
        }

I have no idea how I can resolve this issue.

One solution was to change the Linker Behavior: settings to Link All But then App Code is breaking.

Has someone faced this issue?

You haven't provided a reproducible problem which limits the capabilities for you to receive the proper answer, so this answer is only to my best knowledge.

As far as I am aware, this can happen only if some package that you use call those methods. As such the solution is to remove that package and recreate your project without it.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM