Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unity 2018 il2cpp issues #119

Open
vvodicka opened this issue Jan 19, 2019 · 13 comments
Open

Unity 2018 il2cpp issues #119

vvodicka opened this issue Jan 19, 2019 · 13 comments

Comments

@vvodicka
Copy link

Hi,
I am trying this with Unity 2018.3/ XCode 10.1 and I am getting a lots of errors similar to this one:
#31

For example:
No member named 'ParseAssemblyName' in 'il2cpp::icalls::mscorlib::System::Reflection::AssemblyName'
No member named 'UnsafeGetValue' in 'il2cpp::icalls::mscorlib::System::Reflection::FieldInfo'
No member named 'PropertyInfo' in namespace 'il2cpp::icalls::mscorlib::System::Reflection'; did you mean simply 'PropertyInfo'?
etc...

I also needed to fix some include paths like #include "Classes/Unity/UnitySharedDecls.h" to #include "../Classes/Unity/UnitySharedDecls.h" according to your folder structure.

When building project in Unity, I use scripting runtime version .NET 4.* Equivalent, since 3.5 is deprecated.

Am I doing something wrong?

@vvodicka vvodicka changed the title Unity 2019 il2cpp issues Unity 2018 il2cpp issues Jan 19, 2019
@jenthone
Copy link

jenthone commented Jan 22, 2019

You can try: #120

@Arkania9
Copy link

Hi, did you find a solution? I stuck in the same place...

@jenthone
Copy link

@Arkania9 Did you try this? #119 (comment)

@Arkania9
Copy link

@jenthone thank you so much, it worked!
Cheers

@ghus86
Copy link

ghus86 commented Feb 7, 2019

I remove the file as suggested in #120
But still get the same error (clean and restart Xcode)
I am using Unity 2018.3.4

Any idea @jenthone @Arkania9 ?

@Arkania9
Copy link

Arkania9 commented Feb 7, 2019

Hi, did you remove files or only reference from the project? In my case removing references was enough.

@ghus86
Copy link

ghus86 commented Feb 7, 2019

Ok thanks first only reference then deleted the files =/

@uditmukherjee
Copy link

Where are the files?

@User11101989
Copy link

Build Error :No member named 'Contexts' in namespace 'il2cpp::icalls::mscorlib::System::Runtime::Remoting' on Xcode 10.2 and Unity 2018.3.121.

@Soorya-S
Copy link

I have fixed this issue by appending "-DNET_4_0" to the OTHER_CFLAGS in Unity.xcconfing file.

see this for more info : #31

@Bredj0
Copy link

Bredj0 commented Aug 13, 2019

I also needed to go through this process so I put all required steps you guys mentioned together. Thanks a bunch for solving these issues. Hope it helps :).

Using Unity 2019.1.7f1 and build with Xcode 10.3

Note: Do a Clean Build Folder and in Xcode if you want to Rebuilding!!!

---- Step 1 ----

When error: _Undefined symbol: OBJC_CLASS$AVPlayerViewController

Xcode → Target//General/Linked Frameworks and Libraries → add AVKit.framework

---- Step 2 ----

When error: 'Classes/iPhone_Sensors.h' file not found

→ in DynamicLibEngineAPI.mm

change:

#include Classes/iPhone_Sensors.h

to:

#include iPhone_Sensors.h

---- Step 3 ----

→ in Unity.xcconfig

Appending -DNET_4_0 to the OTHER_CFLAGS in Unity.xcconfig file (also mentioned in a comment in this file).

source: #119 (comment)

---- Step 4 ----

Please delete reference of: DynamicLibEngineAPI-functions.h && DynamicLibEngineAPI.mm from xcode projectif this error occur (can be about 100 errors):Undefined symbols for architecture arm64:"_SetUnityiOS81orNewerBody", referenced from:_SetAllUnityFunctionsForDynamicPlayerLib in DynamicLibEngineAPI.o"_SetUnityiOS82orNewerBody", referenced from:_SetAllUnityFunctionsForDynamicPlayerLib in DynamicLibEngineAPI.o

source: #120 (comment)

→ search in Xcode project for:

#include DynamicLibEngineAPI-functions.h

and comment out or delete all #include directives that reference this file.

most calls are → in DynamicLibEngineAPI.mm

---- Step 5 ----

Clean Build Folder, Build Project

→ Error free :)

@divyeshmakwana96
Copy link

---- Step 6 ----

If you are using Vuforia (8.3.8 or similar) and having VuforiaWrapper not found error then add "$(PRODUCT_NAME)/Unity/Libraries/com.ptc.vuforia.engine/Vuforia/Plugins/iOS" to the LIBRARY_SEARCH_PATHS in Unity.xcconfig file

@divyeshmakwana96
Copy link

@RichardAchilles for step 2, you can achieve the same by adding a build phase before Unity Rsync to avoid editing:

sed -i '' 's+Classes/iPhone_Sensors.h+iPhone_Sensors.h+g' "$UNITY_IOS_EXPORT_PATH"/Classes/DynamicLibEngineAPI.mm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants