底辺SE奮闘記

年収300万SEブログ

【Xamarin・iOS】App Store Connect に" ITMS-90338: Non-public API usage"と怒られアップロードできない

Xamarin.iOSApp Store Connectにアプリをアップロードしようとする際


ITMS-90338: Non-public API usage - The app references non-public selectors in XXXXXXX.iOS: applicationWillTerminate, ddSetLogLevel:, localTarget, newSocketQueueForConnectionFromAddress:onSocket:, setOrientation:animated:, socket:didConnectToHost:port:, socket:didReadPartialDataOfLength:tag:, socket:didReceiveTrust:completionHandler:, socket:didWritePartialDataOfLength:tag:, socket:shouldTimeoutReadWithTag:elapsed:bytesDone:, socket:shouldTimeoutWriteWithTag:elapsed:bytesDone:, socketDidCloseReadStream:, socketDidSecure:, terminateWithSuccess, webSocket:didReceiveMessage:, webSocketDidOpen:. 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/


と怒られアップロードできないことがあります。

要するに、

使用してはいけないAPIを使用している

ということです。

解法は恐らく様々ですが、

私の場合はAppDelegate.csの

public override bool FinishedLaunching(UIApplication app, NSDictionary options)
{
    Xamarin.Calabash.Start();
    // 中略...
}

を下記のように変更

public override bool FinishedLaunching(UIApplication app, NSDictionary options)
{
#if DEBUG
    Xamarin.Calabash.Start();
#endif
    // 中略...
}

以上で問題は解消されました。