Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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 protected]. For further information, visit the

While i am validate build before upload its success:

enter image description here

While i am uploading app i get following success:

enter image description here

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

like image 253
Nitin Gohel Avatar asked Jan 29 '18 12:01

Nitin Gohel


2 Answers

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.

enter image description here

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.

like image 124
Nitin Gohel Avatar answered Oct 10 '22 01:10

Nitin Gohel


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!

like image 40
Andrei Neag Avatar answered Oct 10 '22 01:10

Andrei Neag