Search Issue Tracker

Fixed in 2020.1

Fixed in 2018.4, 2019.4

Votes

0

Found in

2018.4

2018.4.6f1

Issue ID

1189679

Regression

No

MacOS IL2CPP ignores project's Objective-C native source files

MacOS

-

Issue

Unity supports compiling plugins using native programming languages such as C, Java, and Objective-C. In 2018 MacOS IL2CPP support was added to Unity. Adding C/C++ files to a project results in them being compiled and the code accessible to the csharp layer.

Currently and since at least 2018.4, adding *.m, *.mm Objective-C files to a project makes no impact to a project.

Expectation

Adding *.m, *.mm Objective-C files to a Unity Project would make the code in those files be compiled, included in executable, and accessible to the csharp layer.

Reproduction

1 Create a Unity project in 2018.4
2 Add a *.m file
3 Add a *.cs file with a binding to that objective-c
4 Build
5 See csharp be unable to access the objective-c

https://drive.google.com/open?id=1qydRWAo-ur9wDBoaTMWcDgfGGXuzzr0_ (see slack discussion for instructions)

Origin

A support-request was opened for the Unity IAP plugin on MacOS IL2CPP due to its inability to utilize the Apple Objective-C StoreKit API.

Slack discussion

https://unity.slack.com/archives/C0BFP81B9/p1569285818014800?thread_ts=1569240226.008600&cid=C0BFP81B9

Impact

* Enterprise customer Ninja Kiwi blocked from releasing on MacOS
* ATTN Sebastien Thevenet, John Sietsma
* https://unity3d.zendesk.com/agent/tickets/660808
* Project == Bloons TD 6

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.