iOS app rejected due to use of non-public API: MetalTools.framework

I had an app rejected in an App Store Review for iOS due to the following:

Your app uses or references the following non-public APIs:

PrivateFrameworks/MetalTools.framework (MTLDebugDevice)

This was for an update to an already published project; the app was published using 4.18, but not with the latest 4.18.3 release. It’s possible the bug was introduced there.

This was first reported on AnswerHub in this post, but it was tagged as Blueprint Scripting and not in Bug Reports; so I am reposting in Bug Reports: [iOS] Rejected "non-public APIs: PrivateFrameworks/MetalTools.framework" - Programming & Scripting - Epic Developer Community Forums

My project rejected too. Is there any solution?

There appears to be a fix by wrapping the offending code with an #if !UE_BUILD_SHIPPING flag; this involves building a custom version of the Unreal Engine from source. I haven’t confirmed the fix works though. There’s more info at the pull request I mentioned in my earlier comment.

I’ve found a pending pull request that appears to have fixed this issue by wrapping the offending code in a #if !UE_BUILD_SHIPPING flag:

Thanks for pointing out the pull request. It appears that the fix in it has resolved the issue for the time being. We’re working on getting this fix available soon, but for now you’ll have to make the necessary change yourself.

No problem. Happy to help. And thanks for the update! Is there a timeline for when this fix will be available in the binary download of the engine? Will it be in a 4.18 hot fix, or in the 4.19 release?

If anyone happens across this issue, and can’t update to 4.19 and/or doesn’t want to/can’t create a custom engine version, there is a QFE (Quick Fix Engineering) fix for the binary version of 4.18.3; basically a hot fix patch in a downloadable format. Here’s the forum page for all QFE’s: https://forums.unrealengine.com/unreal-engine/announcements-and-releases/3303-current-available-quick-fix-solutions

Here are the links to download the 4.18.3 QFE for the MetalTools.framework Private API issue:

8/09/2018 - Version 4.18.3 - Engine -
Removed usage of MTLDebugDevice
private API in shipping builds

Windows QFE
http://cdn.unrealengine.com/qfe/QFE-4.18-MTLDebugDevice-CL-3916875-PF-3914857-Job-8307360.exe

Mac QFE
http://cdn.unrealengine.com/qfe/QFE-4.18-MTLDebugDevice-CL-3916875-PF-3914857-Job-8307360.zip

Oh My God !
Thank you!
It’s just what I wanted!

I haven’t had a chance to check that the QFE works. There was an indication on the forums that it didn’t work. If not, the way to fix it in 4.18.3 is to compile a custom version of the Engine using the bug fix in this Pull Request:

The fix is literally two lines of code; so if you are able to compile a custom version of the Engine, it’s not a super involved fix.

I tried the quick fix from Epic, and it turns out it’s absolutely useless. My app was rejected yet again! I’ve never compiled an engine before, but should I go down that route: how can I test if the output really is void of any private APIs? I don’t want to risk another rejection by Apple. With the quick fix, I had scanned the IPA file using the command line tools otools and nm, and they didn’t mention the DebugDevice anywhere. But since that didn’t help, it seems to me I can’t rely on those tools.

The two options I know about are to either create a custom engine version (based on the UE4 version you’re currently working with on your project) with the bug fix mentioned in the Pull Request, or move your project to 4.19. The issue is fixed in 4.19.

It’s up to you if it’s more conducive to spend the time making a custom engine build, versus updating your project to 4.19.

Thanks for the reply. I tried upgrading my project to 4.19 before, but during the process, Unreal Engine keeps on freezing with no indication whatsoever of what’s going on every single time. So that feels like a dead-end as well.

Are you using the upgrade dialog to move your project to a different UE4 version? I’ve had trouble with that before. What I do instead is open the .uproject file in a text editor, and change the engine version number to whatever is needed (this case to 4.19). Then the project is forced to open in the version specified in the uproject file.

If you have C++ in your project, before opening the modified uproject file, I recommend deleting the Intermediate folder and the code project file (VS project or Xcode workspace), then regenerate project files and recompile the project.

Otherwise, it should open and let you know of any issues along the way (such as incompatible plugins, etc.).

I had an app rejected in an App Store Review for iOS due to the following:

Guideline 2.5.1 - Performance - Software Requirements

Your app uses or references the following non-public APIs:

_feedbackSupportLevel

The use of non-public APIs is not permitted on the App Store because it can lead to a poor user experience should these APIs change.

Continuing to use or conceal non-public APIs in future submissions of this app may result in the termination of your Apple Developer account, as well as removal of all associated apps from the App Store.

how can i fix it?