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

build archive for ios #93

Closed
subjectdenied opened this issue Jan 7, 2020 · 17 comments
Closed

build archive for ios #93

subjectdenied opened this issue Jan 7, 2020 · 17 comments

Comments

@subjectdenied
Copy link

subjectdenied commented Jan 7, 2020

i can't do this from flutter at all using the cmd-line "flutter build ios", as it always tells me that "UnityFramework.h" is not found

this is what i found so far:

  • the podspec is wrong, it has an entry for the framework search path, that doesnt even exist in my flutter installation ("{PODS_ROOT}/../.symlinks/flutter/ios-release")
  • somehow the UnityFramework is no dependency to the flutter-unity-widget on archive/releasebuilds which means at least it is never built for release-mode and the linked framework simply doesnt exist when the widget is built (that is where the main error comes from)

these are the steps i did to build the app as an archive (finally, after 4 days of research)

  • add Unity-iPhone Project to both Runner Project and Pods Project
  • make sure UnityFramework-target and Runner-Target are both for architecture arm64 only
  • in Pods Project / flutter_unity_widget add the now available UnityFramework-target as an dependency in build phases, make sure you don't also embed UnityFramework as a library there (else validating the build later on store-upload claims no nested embedded frameworks allowed), it should be included in runner only, so
  • in Runner Project/runner add UnityFramework as embedded lib in build-phases
  • make sure you set "skip install" for the Unity-iPhone/UnityFramework target (or else xcode wont archive the project to "ios apps" but to "other items" instead

"archive" the project from within xcode, as using "flutter build ios" will overwrite everything you did in the steps listened above ...

that said, this whole cocoapods, flutter build, auto-doing something, somehow building-chain is a big pile of mess, with xcode and "it just works" on top of it

also i tried to reach one of the devs directly, and got no answer back, so to be honest, i would not rely on this project to be stable enough in the future, which is said, cause it has big potential, but i had so many issues alone with the android build to get working, just because of missing or wrong documentation (with things solved inside closed github-issues), some latest code needed to even export the unity-project only available in example repo, fixes users wrote about inside issues never commited to code (which clearly would help a lot of people), ...

@sandrush73
Copy link

@subjectdenied Were you able to generate a IPA file ..?

@subjectdenied
Copy link
Author

subjectdenied commented Jan 16, 2020

@sandrush73 yes my app just got approved today, but you have to do this from xcode, when i do this using "flutter build ios" from a shell, i still get the missing UnityFramwork.h error

@sandrush73
Copy link

can you share the screenshots of all changes that you did to create a successful build at sandrush73@gmail.com please i am trying to fix this error for a long time

@sandrush73
Copy link

@subjectdenied i did those changes but i am still having that issue with 'UnityFramework/UnityFramework.h' file not found

@subjectdenied
Copy link
Author

@sandrush73 i have no time right now to collect screenshots, but if you want i can help you by using a remote desktop app

@sandrush73
Copy link

@subjectdenied can u send me your email I'd I will send you remote access we can talk there

@subjectdenied
Copy link
Author

subjectdenied commented Jan 16, 2020 via email

@sandrush73
Copy link

I just sent you a inv via email

@luisfmcosta
Copy link

I'm having the same problem.
Can any of you provide a more detailed description on how to solve the problem?
Any help would be appreciated.

@kingkimohero69
Copy link

Thank you @subjectdenied you really helped me , i managed to create ipa file but the app crashes after opening it immediately.
I think i did something wrong as the ipa file is only 50 MB

@devpratically
Copy link

are you getting any error while it crashes

@kingkimohero69
Copy link

Thank you @devpratically i managed to solve the problem .

@juicycleff
Copy link
Owner

Please look at the example, it's updated now with the current unity version. You need to update the scripts you copied as the previous version wasn't compatible with new versions of Unity

@juicycleff
Copy link
Owner

Tested fully on iOS, will try out Android later today

@cobainmo
Copy link

cobainmo commented Jul 6, 2020

i can't do this from flutter at all using the cmd-line "flutter build ios", as it always tells me that "UnityFramework.h" is not found

this is what i found so far:

  • the podspec is wrong, it has an entry for the framework search path, that doesnt even exist in my flutter installation ("{PODS_ROOT}/../.symlinks/flutter/ios-release")
  • somehow the UnityFramework is no dependency to the flutter-unity-widget on archive/releasebuilds which means at least it is never built for release-mode and the linked framework simply doesnt exist when the widget is built (that is where the main error comes from)

these are the steps i did to build the app as an archive (finally, after 4 days of research)

  • add Unity-iPhone Project to both Runner Project and Pods Project
  • make sure UnityFramework-target and Runner-Target are both for architecture arm64 only
  • in Pods Project / flutter_unity_widget add the now available UnityFramework-target as an dependency in build phases, make sure you don't also embed UnityFramework as a library there (else validating the build later on store-upload claims no nested embedded frameworks allowed), it should be included in runner only, so
  • in Runner Project/runner add UnityFramework as embedded lib in build-phases
  • make sure you set "skip install" for the Unity-iPhone/UnityFramework target (or else xcode wont archive the project to "ios apps" but to "other items" instead

"archive" the project from within xcode, as using "flutter build ios" will overwrite everything you did in the steps listened above ...

that said, this whole cocoapods, flutter build, auto-doing something, somehow building-chain is a big pile of mess, with xcode and "it just works" on top of it

also i tried to reach one of the devs directly, and got no answer back, so to be honest, i would not rely on this project to be stable enough in the future, which is said, cause it has big potential, but i had so many issues alone with the android build to get working, just because of missing or wrong documentation (with things solved inside closed github-issues), some latest code needed to even export the unity-project only available in example repo, fixes users wrote about inside issues never commited to code (which clearly would help a lot of people), ...

@subjectdenied How did managed to solve this issue with Nested embedded upon app validation. I followed your instructions, but cannot pass validating app? P.S. I embedded UnityFramework only in Runner project.

@subjectdenied
Copy link
Author

i was not working with this project the past months, sry also to those who tried to reach me and got no reply

iirc it was about NOT embedding the library in the flutter_unity_widget pod (where instead the build dependency is added only), but having it only in the runner. if you already did it like this and it is not working, then i probably will get to this issue myself too in the not too distant future, at least when iOS14 is going to be released

@cobainmo
Copy link

cobainmo commented Jul 6, 2020

It was my fault. I had embedded pods in Runner target. It was a long day and your instruction helped me. It was frustrating since i manage to release 2 builds without this, but it was random occasion and i could not know what i did right those 2 times.

Again, thank you very much, you saved the day for me :)

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

7 participants