juicycleff / flutter-unity-view-widget

Embeddable unity game engine view for Flutter. Advance demo here https://github.com/juicycleff/flutter-unity-arkit-demo
BSD 3-Clause "New" or "Revised" License
2.09k stars 506 forks source link

failed at building iOS with No such module 'UnityFramework' even latest 2022.2.0 pacakge #798

Open kotran88 opened 1 year ago

kotran88 commented 1 year ago

Xcode build done. 5.4s Failed to build iOS app Swift Compiler Error (Xcode): No such module 'UnityFramework' /Users/pedrojung/.pub-cache/hosted/pub.dev/flutter_unity_widget-2022 .2.0/ios/Classes/FLTUnityView.swift:9:7

Encountered error while building for device. I command flutter build iOS I did ok with android app with command flutter run .

I made new flutter project and build ios . and then I just added this plugin by flutter pub add flutter_unity_widget and build ios , then it cause same error

cd ios then I install pod and update but still same

https:

스크린샷 2023-04-24 오전 1 08 44

//

I added flutter_unity_widiget.framework but it keep error

스크린샷 2023-04-24 오전 1 08 52

Showing Recent Messages Multiple commands produce '/Users/pedrojung/Library/Developer/Xcode/DerivedData/Runner-gfxqpjiejpiuckgwutuizqtjvgpp/Build/Products/Debug-iphoneos/Runner.app/Frameworks/flutter_unity_widget.framework'

timbotimbo commented 1 year ago

Did you actually open a Unity project and export it using this plugins build script? This package doesn't just work by adding it in Flutter, you need Unity too.

Your first screenshot is missing the entite unity project in xcode, Unity-iPhone Scherm­afbeelding 2023-04-24 om 10 14 10

In you second screenshot, you don't need to add a flutter_unity framework, there should be a unityframework after a correct setup. Scherm­afbeelding 2023-04-24 om 10 14 35

If you did use Unity, make sure the unity project is in the right location: <flutter project>\unity\<unity ptoject folder>

SeunghwaSong commented 1 year ago

Did @kotran88 solve it? I'm in the same situation. Like the photo @timbotimbo posted, there is no Unity-iPhone. I definitely did Flutter-Export iOS (Debug) in Unity. Where did I go wrong?

SeunghwaSong commented 1 year ago

I solved it. https://github.com/juicycleff/flutter-unity-view-widget/blob/master/example/unity/DemoApp/Assets/FlutterUnityIntegration/Editor/Build.cs

Referring to this, I traced and processed what Export iOS (Debug) was doing one by one.

good work

DaeHyeonNam commented 1 year ago

@SeunghwaSong Could you explain how you solved this issue? I am getting the same error.

In the lastest update of Readme file of this package says

"Disable the Thread Performance Checker feature in Xcode to fix this.

This solves the problem for a while but the error shows up again after a few builds.

SeunghwaSong commented 1 year ago

@DaeHyeonNam https://github.com/juicycleff/flutter-unity-view-widget/blob/master/example/unity/DemoApp/Assets/FlutterUnityIntegration/Editor/Build.cs

DaeHyeonNam commented 1 year ago

I finally solved this issue by upgrading the unity editor to the latest one (in my case, 2022.3.1f1). And please also note that, if you are using 2022.3.1f1, you should not add the ndk path in android/local.properties. (they automatically add it to generating unitylibrary.)

JosephCarrington commented 1 year ago

I upgraded the unity editor and still had the same problem. But since I am testing AR stuff, I remembered that I had targeted a real device not a simulator, and I was trying to run in a simulator from XCode (just to see if it opened at all). When I switched to testing on a real device, it started working.

diogozup commented 5 months ago

i am having this issue. anyone can help please?? i am trying for days.. going crazy. every step i checked it worked fine like the tutorial and the oficial docs. for android works fine but ios allways the same error. doenst matter the versions or the builds that i try. Please help!!

el-mimoso commented 3 months ago

I upgraded the unity editor and still had the same problem. But since I am testing AR stuff, I remembered that I had targeted a real device not a simulator, and I was trying to run in a simulator from XCode (just to see if it opened at all). When I switched to testing on a real device, it started working.

Any ideas how can I run it inside a simulator in order to take the screen shots?

tomosesame commented 3 months ago

I just managed to solve this one. It seems that the only available Unity Editor version is 2021s'. I think the later version (e.g 2022 or 2023) will have such issue. So simply DON'T use it. Also, if you want to run it on a simulator, the player setting of Unity should be altered and build again (I guess...)

UnityPlayerSetting
Abo-ghazalla commented 1 month ago

any updated to solve this issue?

diogozup commented 1 month ago

I paused The project but Will resume in few days. My 1st try Will be build for IOS decide and nor emulator since thats seems to bem The reason to fail.

Hope you can also take care of The bug this way.

Tell me if u do

Cheers fellow programmer


From: Mohamed Abo-ghazalla @.> Sent: Saturday, June 1, 2024 10:08:40 PM To: juicycleff/flutter-unity-view-widget @.> Cc: diogozup @.>; Comment @.> Subject: Re: [juicycleff/flutter-unity-view-widget] failed at building iOS with No such module 'UnityFramework' even latest 2022.2.0 pacakge (Issue #798)

any updated to solve this issue?

— Reply to this email directly, view it on GitHubhttps://github.com/juicycleff/flutter-unity-view-widget/issues/798#issuecomment-2143590295, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AJ4SFAXPSZ4AOMAPMN2LSTLZFIZ5RAVCNFSM6AAAAAAXIMREQOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNBTGU4TAMRZGU. You are receiving this because you commented.Message ID: @.***>