# \[IOS\] Package rejected - App uses or references non-public API

**URL:** <https://forums.unrealengine.com/t/ios-package-rejected-app-uses-or-references-non-public-api/417056>\
**Category:** Mobile\
**Tags:** unreal-engine, iOS, question\
**Created:** [February 11, 2018, 10:25pm UTC](https://forums.unrealengine.com/t/ios-package-rejected-app-uses-or-references-non-public-api/417056 "2018-02-11T22:25:24Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Saltylike](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/saltylike/32/875361_2.png) [@Saltylike](https://forums.unrealengine.com/u/Saltylike)\
**Post date:** [February 11, 2018, 10:25pm UTC](https://forums.unrealengine.com/t/ios-package-rejected-app-uses-or-references-non-public-api/417056/1 "2018-02-11T22:25:24Z")

</div>

Hi guys, after a while we’re finally launching our project in IOS, the package passes the test flight requirements, but the launch submission was rejected due the use or reference of a non public api, it supoust to be:

**PrivateFrameworks/MetalTools.framework**

I tried finding an answer in the hub with no luck, ¿any idea about that?, im pretty worried because we still submitting trying to fix de issue and the violation persist they can shutdown our itunes account.

We’re using:

- UE 4.18.1 from github
- XCode 8.3.3 since we have trouble with XCode 9 ([the related thread is here](https://answers.unrealengine.com/questions/723844/packaging-for-ios-app-icons-arent-included-in-the.html))
- macOS Sierra 10.12.6

There is the full apple response:

> Guideline 2.5.1 - Performance -  
> Software Requirements
> 
> Your app uses or references the  
> following non-public APIs:  
> PrivateFrameworks/MetalTools.framework  
> 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.&nbsp; 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. Next Steps If you are  
> using third-party libraries, please  
> update to the most recent version of  
> those libraries. If you do not have  
> access to the libraries’ source, you  
> may be able to search the compiled  
> binary using the “strings” or “otool”  
> command line tools. The “strings” tool  
> can output a list of the methods that  
> the library calls and “otool -ov” will  
> output the Objective-C class  
> structures and their defined methods.  
> These tools can help you narrow down  
> where the problematic code resides.  
> You could also use the “nm” tool to  
> verify if any third-party libraries  
> are calling these APIs. Resources For  
> information on the “nm” tool, please  
> review the&nbsp;“nm tool” Xcode manual  
> page. If there are no alternatives for  
> providing the functionality your app  
> requires, you can file an&nbsp;enhancement  
> request.

---

<div class="post-metadata">

**Author:** ![Sean\_Flint](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Sean\_Flint](https://forums.unrealengine.com/u/Sean_Flint)\
**Post date:** [February 12, 2018, 12:37pm UTC](https://forums.unrealengine.com/t/ios-package-rejected-app-uses-or-references-non-public-api/417056/2 "2018-02-12T12:37:11Z")

</div>

Hello,

We’ve recently made a switch to a new bug reporting method using a more structured form. Please visit the link below for more details and report the issue using the new Bug Submission Form. Feel free to continue to use this thread for community discussion around the issue.

[https://forums.unrealengine.com/unreal-engine/announcements-and-releases/1410408-unreal-engine-bug-submission-form](https://forums.unrealengine.com/unreal-engine/announcements-and-releases/1410408-unreal-engine-bug-submission-form)

Thanks

---

<div class="post-metadata">

**Author:** ![Saltylike](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/saltylike/32/875361_2.png) [@Saltylike](https://forums.unrealengine.com/u/Saltylike)\
**Post date:** [February 12, 2018, 5:07pm UTC](https://forums.unrealengine.com/t/ios-package-rejected-app-uses-or-references-non-public-api/417056/3 "2018-02-12T17:07:29Z")

</div>

Great news!, thanks so much.

---

<div class="post-metadata">

**Author:** ![titoro](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@titoro](https://forums.unrealengine.com/u/titoro)\
**Post date:** [February 14, 2018, 12:30am UTC](https://forums.unrealengine.com/t/ios-package-rejected-app-uses-or-references-non-public-api/417056/4 "2018-02-14T00:30:58Z")

</div>

My project rejected too. Is there any solution?

---

<div class="post-metadata">

**Author:** ![Ravlek](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Ravlek](https://forums.unrealengine.com/u/Ravlek)\
**Post date:** [February 15, 2018, 7:02pm UTC](https://forums.unrealengine.com/t/ios-package-rejected-app-uses-or-references-non-public-api/417056/5 "2018-02-15T19:02:04Z")

</div>

This has been fixed in 4.19. However, if you need the fix right now, it is in the Release-4.19 stream. This should also already be mirrored in the 4.19 GitHUB branch. That being said the fix is:

```
#if !UE_BUILD_SHIPPING
	Class MTLDebugDevice = NSClassFromString(@"MTLDebugDevice");
	if ([Device isKindOfClass:MTLDebugDevice])
	{
		Features |= EMetalFeaturesValidation;
	}
#endif

```

That ifdef code should be added around line 135 in MetalCommandQueue.cpp to make it look like the above snippet.

-Pete

---

<div class="post-metadata">

**Author:** ![titoro](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@titoro](https://forums.unrealengine.com/u/titoro)\
**Post date:** [February 18, 2018, 11:19pm UTC](https://forums.unrealengine.com/t/ios-package-rejected-app-uses-or-references-non-public-api/417056/6 "2018-02-18T23:19:34Z")

</div>

Is there a chance for update to 4.18 ? Or I must use 4.19 preview.

---

<div class="post-metadata">

**Author:** ![Saltylike](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/saltylike/32/875361_2.png) [@Saltylike](https://forums.unrealengine.com/u/Saltylike)\
**Post date:** [March 1, 2018, 9:36pm UTC](https://forums.unrealengine.com/t/ios-package-rejected-app-uses-or-references-non-public-api/417056/7 "2018-03-01T21:36:40Z")

</div>

Editing the engine source fixed the problem. Thanks!

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_3b393dfb](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_3b393dfb](https://forums.unrealengine.com/u/anonymous_user_3b393dfb)\
**Post date:** [March 18, 2019, 9:17am UTC](https://forums.unrealengine.com/t/ios-package-rejected-app-uses-or-references-non-public-api/417056/8 "2019-03-18T09:17:07Z")

</div>

How to edit the source file, I also encountered this problem in version 4.20.

---

<div class="post-metadata">

**Author:** ![RamsesThe3](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@RamsesThe3](https://forums.unrealengine.com/u/RamsesThe3)\
**Post date:** [July 4, 2024, 2:31pm UTC](https://forums.unrealengine.com/t/ios-package-rejected-app-uses-or-references-non-public-api/417056/9 "2024-07-04T14:31:59Z")

</div>

Same here wiht 5.4. Would be great to hear how you edited the engine source:)

Yours, Ramses
