Cannot figure out which private API I am using for macOS ap

Apple rejected my app with below reference. I searched my entire app and are not using any of the below NSErrorWithFilePath. I am not using any 3rd Party Libs. Is there a way to find out what they mean?


I am using Core Data and I found this reference to Foundation: lazy var applicationDocumentsDirectory: Foundation.URL


Your app uses or references the following non-public API(s):


'/System/Library/Frameworks/Foundation.framework/Versions/C/Foundation'

: _NSErrorWithFilePath

: _NSErrorWithFilePathAndErrno



Any ideas?

Thank you

I just had the exact same thing happen to me today also. I got: "

Your app still uses or references the following non-public API(s):


framework: '/System/Library/Frameworks/Foundation.framework/Versions/C/Foundation'

: _NSErrorWithFilePath

: _NSErrorWithFilePathAndErrno) NOT corrected"


I searched every single library in my app and nowhere can I find _NSErrorWithFilePath. What is going on? I am baffled.

My app was rejected for the same reason ~1h ago.

One of my apps was rejected a couple of weeks ago for the same reason but another framework. Back then it was a false alarm and I am 100% certain that is now.


I am asking Apple to check my app again.


Keep in mind that you do not have to use the private api in order to get the rejection. It is enough if the signature is the roughly same.

My app was rejected because it said that I was using the "CFHashByte" constructor which has the following signature:


CFHashBytes(uint8_t *bytes, CFIndex length)


My app had a function called "getBytes(UInt8 bytes, index: Int, length: Int)". The signature was similiar, especially the naming and the types. So maybe that's why the auto check detected this private API call.


So maybe check your app for a similiar signature. Otherwise, just write a message to Apple in iTunes Connect section where you received your error report.


Regards,

Sascha

Thanks. I checked and couldn't find any naming similarities but did send a technical question to the Apple Engineers about this. It is very unusual indeed. If they are that ambiguous in checking for similary named functions, there should at least be a compiler option in Xcode one could set to flag these so they could be avoided.

You are right. This would be good feature for the XCode Validation that is performed before an app is submitted to the App Store. The validation is always successful, then I submit the app for review and two days later it gets rejected.


A lot of wasted time on my end and on Apples end as well.

At first, I thought maybe the submitted binary was corrupt. But when I resubmitted it, it got rejected again for the same reason. I only started getting it rejected after updating to macOS 10.12.3. Usually they release an incremental update of Xcode when they update macOS but that didn't happen this time. I can fix a bug when there is one but not when it is a nonexistent bug.

Same error. I'm still on 10.12.2. Submitted like 4 macOS apps last week and didn't get this error.


I had some other errors and will be fixing those and resubmitting without trying to find this error. I'll update if it goes through.

It is definitely a baffling error. I'm wondering why this would occur if I am just using the standard Swift libraries. I'm still waiting to hear back from Apple on it.

Same error. The only file that contains that non-public API is libswiftFoundation.dylib, framework used in Swift Apps. Xcode uses it automatically.😕

Are people building with a beta version of Xcode? My swift dylib on Xcode 7.3 does not have this symbol, but the swift from the latest Xcode beta does have it.

I'm using Xcode 8.2.1 which is the current public release from December 19, 2016. I'm assuming the majority of Swift apps would use the same Foundation framework. I'm hoping it is just a bug because there is no visible way to solve this because AppKit includes Foundation and I need to use AppKit.

I have the same issue.


I got rejected the 25th January saying:

Your app uses or references the following non-public API(s):

'/System/Library/Frameworks/Foundation.framework/Versions/C/Foundation'

_NSErrorWithFilePath

_NSErrorWithFilePathAndErrno


Since i'm using swift, i don't see how I can call a non-public api.

I try resubmitting the app with some minor changes.

Today (28 January), i got rejected again with the same reason.


I really don't know what to do.


If someone has some news from apple about this issue, please report it here


Good luck


Vincent

I forgot to ask you all if your are using Alamofire Framework with cocopoad.

I was wondering if it is not some methods in Alamofire that trigger this error.


Vincent

This is a problem with the Mac App Store Review Team API Checker. This calls are embeded in the libswiftFoundation.dylib dyncamic library an have been there at least for a year (probably since its existance):


$ nm ~/Library/Developer/Xcode/Archives/2016-12-26/OverPicture\ 26-12-16\ 21.36.xcarchive/Products/Applications/OverPicture.app/Contents/Frameworks/libswiftFoundation.dylib | grep -i NSErrorWithFilePath

U __NSErrorWithFilePath

U __NSErrorWithFilePathAndErrno


And as always the App Store Team seems a robot so I only receive automated responses which is really frustating...

Hi,

same here.


I've used with all the tools suggested (strings, nm -u, otool -ov) but found nothing.

My app uses only stantard frameworks and these 5:

  • EonilFileSystemEvents
  • HockeySDK
  • LetsMove
  • MASShortcut
  • ObjectiveGit

I'm currently waiting for a reply from the review team.

Same here. My app was rejected twice in a row for those same APIs. Scanning for them returned nothing. And I'm just using the standard Swift libraries. I can see of no way to fix the issue except just leaving the last version of my app up and not resubmitting until the issue is resolved by Apple which would be unfortunate.

Cannot figure out which private API I am using for macOS ap
 
 
Q