Non-public API usage : The app contains one or more corrupted binaries

孤街浪徒 提交于 2019-12-08 16:34:59

问题


I am really frustrate whats going on with iOS application new version uploads. Here are the story.

On the date of 25th Jan 2018 we have uploaded new version 3.3.27 build number 1.0. That successfully process and available on test-flight for testing. After that we found some issue and on 26th Jan 2018 we fix it and uploading new build 1.1 and we get email from iTunes Connect said:

Dear developer,

We have discovered one or more issues with your recent delivery for "appname". To process your delivery, the following issues must be corrected:

Non-public API usage:

The app contains one or more corrupted binaries. Rebuild the app and resubmit.

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.

If you think this message was sent in error and that you have only used Apple-published APIs in accordance with the guidelines, send the app's nine-digit Apple ID, along with detailed information about why you believe the above APIs were incorrectly flagged, to email@apple.com. For further information, visit the

While i am validate build before upload its success:

While i am uploading app i get following success:

In mail i did not get proper information what's the name of corrupted binary or framework. What is the method we used that non-public we have uploaded 100s update build of that application before 25th Jan everything is good and acceptable.

Then i have try following changes:

  1. Rebuild app and submit again get same email.
  2. Uninstall Xcode9.2 and Install again get same email.
  3. Remove changes and upload build number 1.0 again get same email.
  4. Change Mac and try to upload new build again same email.
  5. Try to upload old version that live before and again same emai

We sent an email to iTunes Connect Review but since 3 days we did not get any reply from them side. I do research and from 26th Jan many user face that kind of issue while submit application.

If any one know that solution who face that kind of issue in past or recently Please help us


回答1:


After a LOT of investigations on this part we finally found the problem for this issue: It seems like Apple gives this error for applications that suport both 32 and 64 bits.

Apple gave this reminder for Mac Appstore, but it seems that iOS applications are affected as well.

So a solution for this is to support bitcode OR to drop support for 32 bit devices by removing support for ARMV7 and ARMV7S or bellow from Valid Architectures from build settings. This will mean your application will work only on iPhone 5S and above. I hope this helps someone.

Thank you and happy coding!




回答2:


There is not one solution for this issue Apple not mention anything now a days about that errors or invalid binary related news on their official account or forums or their official Developer site. Even they are not reply of your email.

Some of get that issue solved by BitCode enable, Some of solve that issue for update PODFILE, Some of Solve that issue by remove some old swift framework used in project.

But finally I get solution by my self that works for me. When i build the project i found some warning at left side panel of Xcode like following.

I think apple now removed old swift support so in case your project use any swift class or podfile we need to update to swift 4.

Once i conversion to swift 4 i get following warning:

The use of Swift 3 @objc inference in Swift 4 mode is deprecated. Please address deprecated @objc inference warnings, test your code with “Use of deprecated Swift 3 @objc inference” logging enabled, and then disable inference by changing the "Swift 3 @objc Inference" build setting to "Default" for the "appname" target.

For fix this warning i use following link The use of Swift 3 @objc inference in Swift 4 mode is deprecated? and in swift class i used @objc before public declaration.

Also i review all the source code and remove unused library of podfile and class from project.

by above way i fix that issue and after uploading 13th of build finally that accepted.




回答3:


The non-public API refers to Apple API methods that are not documented and offered to the programmer. Apple does not guarantee that this part of the API will work in future upgrades. They can freely change this part. They forbid usage, so that your app won't break in iOS updates, and so protect your future users/buyers of your app! The webservice is external, hence does not fall under non-public. This part you need to guarantee, not Apple.




回答4:


We found 2 solutions for the issue. Remove 32 bit support, which was referred above. And remove CommonCrypto usage. We replaced CommonCrypto by CryptoSwift (https://github.com/krzyzanowskim/CryptoSwift).

We chose to replace CommonCrypto as we didn't want to loose our 32 bit users (iPhone4S, 5 and 5C).



来源:https://stackoverflow.com/questions/48501857/non-public-api-usage-the-app-contains-one-or-more-corrupted-binaries

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!