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
Undefined symbols for architecture arm64: "_onUnitySceneLoaded" #221
Comments
the full log shows below: Running pod install...
Running Xcode build...
Xcode build done. 14.5s
Failed to build iOS app
Error output from Xcode build:
↳
2020-10-03 22:01:44.748 xcodebuild[5088:732449] DTDeviceKit: deviceType from 2ea7bb242f78168621b05382a3cd2af4414df957 was NULL
** BUILD FAILED **
Xcode's output:
↳
ld: warning: arm64 function not 4-byte aligned: _unwind_tester from /Users/kingtous/projects/cishi-app/ios/UnityLibrary/Libraries/libiPhone-lib.a(unwind_test_arm64.o)
Undefined symbols for architecture arm64:
"_onUnitySceneLoaded", referenced from:
_NativeAPI_onUnitySceneLoaded_m4741E4A6C2A3A84DC595DCA9E6715B0779372985 in Assembly-CSharp.o
(maybe you meant: _NativeAPI_onUnitySceneLoaded_m4741E4A6C2A3A84DC595DCA9E6715B0779372985)
"_onUnityMessage", referenced from:
_NativeAPI_onUnityMessage_mD44345499E1125EA37D67E2892D48D89B448B012 in Assembly-CSharp.o
(maybe you meant: _NativeAPI_onUnityMessage_mD44345499E1125EA37D67E2892D48D89B448B012)
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation) |
@Kingtous please clean your build properly and remove the unityframework from runner and add it again. Should fix it |
@juicycleff I've hot the same problem, and cleaning build and adding unityframework again did not repaired problem. For me changing Api Compability Level (in Unity Player Settings) from .Net Standard 2.0 to .NET 4.x repaired iOS build. |
not working. I'll try changing api compatibility level mentioned by @Antriadus then. |
I've changed to .NET 4.x but it's not working, neither |
DemoAPP from this repository also has this issue now. It seems that there is a bug when upgrading to iOS 14 SDK. |
finally I delete |
Hey all, I'm having this issue too when running the build through my CI, manually editing the project at that point isn't really a viable solution. I tried toggling between different .net versions to no avail. Edit: Just downloaded the example project and ran it too, it also fails with this same error. |
try to what i have done. |
I have, none of those things work for me for iOS. |
Will test and fix any issues in the example and also the unity package. But most times this is due to your ios project. Will update the project with a fix |
I'm not sure if it's helpful, but the problem only started for me after the iOS 14 release. I have a machine that hasn't been upgraded yet an the same project builds on it fine, move the exact same files to the iOS 14 build tool machine and it fails. |
When reimporting the FlutterUnityIntegration I noticed that the meta files for Specifically:
(With the + being the re-imported lines) I'm not entirely certain how these came to be changed (did I do it while trying to build directly for testing, I don't remember). YMMV of course. |
Just reimport for unity for iOS removed unity framework and attach it again, solves this problem. It happens when the exported unity project native integration has changed and your project still references old files |
Hi I have tried all the steps mentioned above and also tried using unity package FlutterUnityPackage-3.0.0.unitypackage but i still cant build |
I had some unfortunate issues getting it to work by reimporting the project. It seemed to be because of the Cocoapod dependency, so in order to solve this I had to do the following (it's a bit long-winded but it worked):
|
No solution works for me |
1 similar comment
No solution works for me |
This problem is caused by unity not using XCodePostBuild.cs, I could solve it by deleting this file and re-importing it into the unity project from the FlutterUnityIntegration-v4.1.0.unitypackage and then exporting the project to IOS again. If it doesn't work you can also try to delete the whole FlutterUnityIntegration folder and re-import the complete package. |
Delete the file and re export the unity iPhone project, works for me |
2 years later and this bug is not fixed.. FFS. The 'solution' of editing files manually kind of works when you're developing, but it's a complete no go when compiling using CI. I've removed and readded both the FlutterUnityWidget and fuw projects (it's not clear which one is 'correct' but I've tried them all) loads of times. That is not a solution. |
If anyone is looking for solution to this, I had to remove the
|
using Flutter 1.22 stable and flutter-unity-view-widget 2.0.0+2.
I've no idea about the solution for iOS build.
the error shows below:
Does this mean there's a problem in my unityLibrary?
The text was updated successfully, but these errors were encountered: