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

5

13

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

Cheju answered 29/1, 2018 at 12:58 Comment(7)
are you using any third party libraries? Is it possible they have referred some of the libraries as mentioned in this link - developer.apple.com/library/content/documentation/Cocoa/…Unaccountedfor
Open technical ticket with apple to support as they have not mentioned exact method TSI link - developer.apple.com/support/technical . I think 2 TSI are supported with your itunesconnect developer profileUnaccountedfor
Possible duplicate: #48478643Dextrorotation
I'm having this same issue. Not sure what is going on. My app has barely changed between submissions.Linalool
I'm having this same issue. I cannot enable-Bitcode due to some framework dependency. Using Xcode 8.3.2, and using 'Swift 3.0'. And yes, I am using Pods having Objc code, and used via Bridging. All was accepting before last week of Jan, 2018, and then it all started. Any help please ??Nino
As i have mention in my answer. you need to check if you are using direct swift class in your project then you need to convert to swift 4 and use @objc in swift methods. or if you are using cocopods only then check their frameword are updated with xcode9 and swift-4Cheju
@NitinGohel , I am using Xcode 8.3.2 which does not need Swift-4. It works with Swift 3 only, and don't support Swift-4. So, I think conversion to Swift-4 will not work in my case. Any saying on this ?Nino
C
4

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.

Cheju answered 30/1, 2018 at 5:7 Comment(0)
I
5

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!

Intwine answered 2/2, 2018 at 8:58 Comment(5)
but in my case there is support of arv7 as well as desable bitcode as i mention in my answer that working for meCheju
Found that CommonCrypto was the root problem. It seems like they use some un-documented API usage. If you remove this from your project, the submission will work fine.Intwine
but in my code there is no libraray use about commonCrypto i mean is ther eis also other swift code need to be updateCheju
CommonCrypto is Apple's library. If that is really the issue contact Tech Support with an incident and get that resolved.Overarm
After several tried, we found now apple tightent the police, if your application contains both 32bits and 64bits, you have to enable bitcode now. Maybe apple is trying to optimise the app size now, since there is not many 32bits device now, so apple is trying to push to use 64bits.Chifley
C
4

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.

Cheju answered 30/1, 2018 at 5:7 Comment(0)
T
2

In Target -> Build Settings -> Other Linker Flags, remove -interposable. Rebuild app solved the problem.

Twinflower answered 15/6, 2022 at 14:31 Comment(1)
This does not provide an answer to the question. Once you have sufficient reputation you will be able to comment on any post; instead, provide answers that don't require clarification from the asker. - From ReviewDishtowel
P
1

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.

Peripatetic answered 20/11, 2019 at 5:39 Comment(0)
L
0

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).

Larkins answered 8/2, 2018 at 19:15 Comment(1)
It is best to avoid using CryptoSwift, amoung other things it is 500 to 1000 times slower than Common Crypto based implementations. Apple's Common Crypto is FIPS certified and as such has been well vetted, using CryptoSwift is taking a chance on correctness and security such as timing and power attacks.Overarm

© 2022 - 2024 — McMap. All rights reserved.