# Can we use Objective-C code and iOS framework in UE4?

**URL:** <https://forums.unrealengine.com/t/can-we-use-objective-c-code-and-ios-framework-in-ue4/292192>\
**Category:** Mobile\
**Tags:** billing, unreal-engine, question\
**Created:** [August 27, 2014, 7:28pm UTC](https://forums.unrealengine.com/t/can-we-use-objective-c-code-and-ios-framework-in-ue4/292192 "2014-08-27T19:28:51Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![sbk89](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@sbk89](https://forums.unrealengine.com/u/sbk89)\
**Post date:** [August 27, 2014, 7:28pm UTC](https://forums.unrealengine.com/t/can-we-use-objective-c-code-and-ios-framework-in-ue4/292192/1 "2014-08-27T19:28:51Z")

</div>

Hi guys,

I’m new in Unreal Engine and am just in the investigation way but I have very important questions about UE functionality.  
I would like to clarify if UE(4, or eralier) has In-App purchases support (iOS, Android, etc.)  
Or, the most important - is there way to use 3d party libraries (C++, Objective-C, Java, etc?)  
Can we use Objective-C code and iOS framework if we use Unreal Engine for iOS purposes?  
Any answers or references will be appreciated.

Best Wishes,  
Serhii

---

<div class="post-metadata">

**Author:** ![Shadowriver](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Shadowriver](https://forums.unrealengine.com/u/Shadowriver)\
**Post date:** [August 27, 2014, 8:29pm UTC](https://forums.unrealengine.com/t/can-we-use-objective-c-code-and-ios-framework-in-ue4/292192/2 "2014-08-27T20:29:53Z")

</div>

Not sure about InApp purchases… i think not.

By coding in C++ you extending code of engine, so there no limitation hat you can do, you can do anything what C++ can. UE4 uses own build menager called UBT and you need to edit build scripts in source directory to add extra liberies, here tutorial how to do it:

> **[A new, community-hosted Unreal Engine Wiki](https://forums.unrealengine.com/t/a-new-community-hosted-unreal-engine-wiki/141494)**
>
> After over a year in maintenance mode, the official Unreal Engine Wiki is now permanently offline. These resources now live on a new community-run Unreal Engine Community Wiki — https://unrealcommunity.wiki/! You will be able to find content from...

UE4 is strictly C++ because it macro trickery stuff in reflations (UHT), but if you try to find some hackery you might find a way to build some ObjC in to UE4. In case of Java, every Android application requires Java code, native code in Android works under supervision of Java application, UE4 is no diffrent, so if you want to add extra Android Java code you can do that. You can find Java portion of UE4 in Engine/Build/Android/Java, also i bet you will find more information on that in UE4 Android forum

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_7d5185b7](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_7d5185b7](https://forums.unrealengine.com/u/anonymous_user_7d5185b7)\
**Post date:** [December 19, 2014, 10:11am UTC](https://forums.unrealengine.com/t/can-we-use-objective-c-code-and-ios-framework-in-ue4/292192/3 "2014-12-19T10:11:59Z")

</div>

You can use ObjC code. Just place the code within an .mm file, instead of a .cpp (not sure whether this is really necessary) and place preprocessor tags around your code:

```
#if PLATFORM_IOS
  // your objc ios code here
#endif

```

---

<div class="post-metadata">

**Author:** ![trutty](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@trutty](https://forums.unrealengine.com/u/trutty)\
**Post date:** [February 16, 2015, 10:42am UTC](https://forums.unrealengine.com/t/can-we-use-objective-c-code-and-ios-framework-in-ue4/292192/4 "2015-02-16T10:42:44Z")

</div>

Ah very nice. Could you help me with [my ObjC question](https://answers.unrealengine.com/questions/164650/how-to-access-ios-photo-library.html) or give a hint?

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_c103d8d81](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_c103d8d81](https://forums.unrealengine.com/u/anonymous_user_c103d8d81)\
**Post date:** [October 3, 2015, 6:28am UTC](https://forums.unrealengine.com/t/can-we-use-objective-c-code-and-ios-framework-in-ue4/292192/5 "2015-10-03T06:28:55Z")

</div>

Hi Serhii,  
Did you find any suitable solutions on how to integrate 3rd party iOS framework with Unreal Engine (4 or earlier)? Looking forward to get some references from you, thanks a lot!
