ITMS-90338: Non-public API usage-_cJSON_Delete

Hi,

I created a new app for customers, test on local was all ok, but when submit to App Store I received a notification mail:

ITMS-90338: Non-public API usage - The app references non-public symbols in Caiseyu: _cJSON_Delete, _cJSON_GetArrayItem, _cJSON_GetArraySize, _cJSON_Parse. 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.

I searched the internet whole day, can't find any information about the _cJSON_XX APIs are the Non-public API. Can you help me.

Thanks for the post, I would recommend to search the 3rd party libraries you include in the project to see what framework included those methods and replace them for better solutions.

You can find references to those API in your app by using the command-line to check the app and the libraries it links against. You can do so by running the grep command in Terminal. First build and archive your app. Then

  1. Open /Applications/Utilities/Terminal
  2. Type the following on the command-line to change to the directory where the application binary is:

cd ~/Library/Developer/Xcode/Archives/<date of your archive>/<your archive>

For example,

cd ~/Library/Developer/Xcode/Archives/2020-03-09/SampleApp 3-9-20, 11.47 AM.xcarchive

  1. To search for _cJSON_Delete, _cJSON_GetArrayItem, _cJSON_GetArraySize, _cJSON_Parse, type the following on the command-line:

grep -R _cJSON_Delete * grep -R _cJSON_GetArrayItem * grep -R _cJSON_GetArraySize * grep -R _cJSON_Parse *

If there are references to cJSON_Delete, _cJSON_GetArrayItem, _cJSON_GetArraySize, _cJSON_Parse, you will get a list of files that contain the reference. You may find references in your app’s nib files, dSYM file, or even a ReadMe or other documentation. For example,

% grep -R _cJSON_Delete * Binary file Products/Applications/SampleApp.app/Base.lproj/Main.storyboardc/BYZ-38-t0r-view-8bC-Xf-vdC.nib matches Binary file dSYMs/SampleApp.app.dSYM/Contents/Resources/DWARF/SampleApp matches

Once you’ve identified where the references to cJSON_Delete, _cJSON_GetArrayItem, _cJSON_GetArraySize, _cJSON_Parse are, you can start the process of removing those references. You can start by searching the project for where the occurrences of the _cJSON_Delete, _cJSON_GetArrayItem, _cJSON_GetArraySize, _cJSON_Parse exist.

Albert Pascual
  Worldwide Developer Relations.

ITMS-90338: Non-public API usage-_cJSON_Delete
 
 
Q