-
Notifications
You must be signed in to change notification settings - Fork 506
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
Build iOS, get this: #69
Comments
I had the same error, for me it seemed to be caused by the post-build script I exported the project again - the changes in the post-build script were made this time and no more errors. Hope that helps. |
you don't exist the error?
|
Did you do this step in the README? |
As stated by @nickmeinhold, it seems to be an issue with the XCodePostBuild.cs script not running sometimes once the build has completed. The script is able to run in Unity after the build by declaring above the required method with [PostProcessBuild], which sticks the method into a list of required post build runs, which the script has. However sometimes it seems it just wont run, even after exporting multiple times in a row. What worked for me is to specify the run order for the post build by changing it to [PostProcessBuild(0)] informing Unity you want it to be the first thing run straight after the build, before anything else (if anything else) I am not sure if it will work for everyone, but I am now getting consistent builds without this issue reappearing. I hope that helps |
@RomanTechnologies however, this doesnt solve the issue with not being able to build the widget cause "UnityFramework/UnityFramework.h" missing, when trying to do a archive build |
Can you give a little more information on how to implement this fix? |
@jbrantl8 he is talking about Assets/Editor/XCodePostBuild.cs on around line 44 change: |
Ok, thanks! Did that, but still getting this error:
I added UnityFramework.framework to Runner like shown in the screenshot here: I also added UnityFramework Target Membership to the Data folder like shown in the screenshot here: The 'UnityFramework/UnityFramework.h' file not found? seems to be coming from line 12 of FlutterUnityWidgetPlugin.m located in this directory: flutter/.pub-cache/hosted/pub.dartlang.org/flutter_unity_widget-0.1.6+5/ios/Classes/FlutterUnityWidgetPlugin.m Help!! |
@jbrantl8 basically you have to add the unity-iphone project to both the runner and the pods, and then use the unityframework as a dependency for the flutter-unity-widget (inside pods) in its buildphases |
@jbrantl8 also don't try to build using the flutter cli (i never got this working), only build from xcode |
Wow, thank you! That solved the framework issue. Now getting 2 more errors when building target Runner.:
Looks like it got through almost everything but that... |
Changing AppDelegate.m to AppDelegate.mm fixes those last errors. I don't fully understand why, other than .mm tells the compiler to recognize both Objective-C and Objective-C++ classes, while .m apparently only does Objective-C classes. |
Now getting this. What a disaster.
|
FYI ~ Rebuilt the project and didn't have this issue again. Not sure what was causing this. If you know, feel free to chime in. It now works! Thanks a ton @subjectdenied |
Finally got things running with the flutter run command. I did several things, but the biggest thanks goes to this: flutter/flutter#17978 (comment) I also added This will need to be revisited when unity as a library supports the simulator, but should work until then. Note: this fix isn't something that should be pulled into master. I will continue to monitor the thread until a fix is found that doesn't require UnityFramework.framework to be moved in this fashion. |
Check the updated example. Its a lot easier now to set up on iOS |
We need more info! Screenshots, paths, better readme, anythimg, but not a single sentence :( |
same problem here, nothing helps EDIT: Building for real device helped |
/Users/desi/development/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_unity_widget-0.1.6+5/ios/Classes/UnityUtils.mm:55:10: error: no visible @interface for
'UnityFramework' declares the selector 'frameworkWarmup:argv:'
[ufw frameworkWarmup: g_argc argv: g_argv];
~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
note: Using new build systemnote: Planning buildnote: Constructing build description
The text was updated successfully, but these errors were encountered: