The application contains or inherits from non-public classes in the payload /XXX.APP/XXX: UIKeyboard

I get this error in the App Store when I submit the application. I was able to submit the same application a month ago, and I did not have this problem. the last time I introduced it, it gave me errors, but it would still accept the binary at least. Now it does not even accept the binary. I use the code as follows.

valueTextField.keyboardType = UIKeyboardTypeNumbersAndPunctuation; 

I'm not sure my library is not up to expectations. Is there any other workaround for this?

If I need to send an email to Apple, should I also send the binary to them? enter image description here

EDIT: Brian, I made both nm and lines in the .app file. Below is the result. Can you suggest what to do next?

enter image description here

+5
source share
2 answers

Your error is not related to this particular line of code. When compiling, this line boils down to an efficient call:

 objc_msgSend(valueTextField, SEL(setKeyboardType:), (NSInteger)2); 

Your binary will not mention UIKeyboard.

You can also make sure your code does not reference UIKeyboard by running nm and strings in binary format:

 nm MyApp.app/MyApp | grep UIKeyboard strings MyApp.app/MyApp | grep UIKeyboard 

This will show you any string or character reference that may be on the UIKeyboard. If you don’t have them, the commands should be empty, otherwise nm will produce something like:

 U _OBJC_CLASS_$_UIKeyboard 

Based on the fact that others have come across this, it looks like there is a problem with the Apple submission process right now. If the problem does not go away on its own, you can try three different feed channels:

  • Download via iTunes Connect Web UI
  • Submitting your archive from Xcode. Window → Organizer → Archive → Send ...
  • Submitting an application through Application Loader.

Update

Looking at your editing, your application really refers to UIKeyboard. Since it looks like your code is not using UIKeyboard, a third-party library may be to blame. You have several options:

Track the commit where the change was made:

Since you have a previous release in the application store, you can check this version of the application from your SCM, build it, run nm MyApp.app/MyApp | grep UIKeyboard nm MyApp.app/MyApp | grep UIKeyboard and make sure you are not referring to the class. If this is not the case, everything will be more complicated, and you should move on to the next sentence.

Now you can track the commit that made the addiction, deactivating your fixations between good and bad. If git is used, git bisect is your friend:

  • git bisect master SHA_OR_TAG_OF_PREVIOUS_RELEASE
  • Create an application.
  • nm MyApp.app/MyApp | grep UIKeyboard
  • If it's good, git bisect good , otherwise git bisect bad .
  • Repeat steps 2 through 4 until you find the commit that introduced the problem.

Once you discover a bad commit, it should be, we hope, that it will be clear which library you updated to introduce the problem. You can check for new updates, return them, or whatever is needed to fix the problem. If you cannot understand which of them caused this immediately, you can perform the next step.

Run nm in the frameworks and libraries used by your application:

Since you cannot find a link to UIKeyboard in your code, you are most likely linking to a library that references it. You want to run nm in each of these libraries to track the culprit.

You can find all the frameworks referenced by your applications in the "Phase Assembly" section in the "Link Binary Files to Libraries" section. You can ignore system frameworks and libraries from other projects in the workspace and just focus on any third-party .a files or infrastructures.

If you use Cocoapods for everything you can do, check out libPods-*.a to quickly see if any modules are referencing code. If you hit a match, restart nm piping to less and keep clicking until you see the path and object file name that points you to the responsible library.

Otherwise, run nm for each .a file and binary in each .framework directory.

 nm myLibrary.a | grep UIKeyboard nm SomeComponent.framework/SomeComponent | grep UIKeyboard 

Once you get a match, you can check if there is a new version of the framework or report a problem. If you find it in a library that you should not have referenced during production, find a way to remove it.

+3
source

The problem was inside the “LOOKBACK” framework that I recently added. This is a .framework file, and I was not sure how to make nm in a .framework file. I tried the following. Both gave me the error "cannot match file"

nm Lookback.framework | grep UIKeyboard

Lookback.framework strings | grep UIKeyboard

As Brian said, I did nm, the strings on all the other static libraries (.a files) that I used that didn't find anything specific.

+1
source

Source: https://habr.com/ru/post/1206013/


All Articles