-
Notifications
You must be signed in to change notification settings - Fork 102
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
use_native_modules! skipped the react-native dependency 'react-native-unity-view'. No podspec file was found. in IOS only. #136
Comments
This is fine as long as you add the library manually. |
Since |
We are successfully using Pods to manage For anyone interested:
Notes:
|
Awesome job |
One more thing. On our CI, the Podspec wasn't passing validation because the
|
Finally getting a chance to try out some of these solutions - thanks a ton for supplying the approach you took @benjarwar . After implementing the above steps, I am running into this error: wondering if anyone else has encountered this? |
@marlon-wiprud Any error that is related to React is your |
@marlon-wiprud can you send your @ziyoshams is right, that the header search paths of You can inspect what's set after running Select |
Looking back at this, I think RNUnityView does not explicitly need to have React paths added once it's also managed using CocoaPods along with React Native. So these two lines can be removed from step 3 above:
We had remnants of getting Pods working in React Native < |
Hi @benjarwar, thank you for the .podspec! I was able to pass through the Not sure if I am missing something. I have made the link process manually:
I have exported my unity project and added to ios folder, like this: I did not add the Any help would be much appreciated. Thanks! |
@gustavobuttenbender Yes you need |
@ziyoshams Ok! Do you know how should I use the |
@gustavobuttenbender You don't do anything else with that file besides the steps in the docs. |
@ziyoshams but currently I point to the |
@gustavobuttenbender In
|
In case you're looking for an updated version of this library, compatible with Cocoapods, you can take a look at this fork: https://github.com/rexraphael/react-native-unity-view. Is also available via NPM/Yarn as react-native-unity-view-reinvented. I submitted a PR to fix the podspec in the fork, as is missing — Note: You still need to add your current Podfile settings to |
Since you guys are pretty active, maybe you can help. I have an unsolved issue mentioned in #114 . Does anyone know why that happens? |
@gustavobuttenbender Have you managed to get it running? I have the same set of errors.
Did I miss sth.? |
Not sure why, but it's compiling without errors for me now. But I have a really weird bug now (iOS), that only occurs after adding react-native-unity-view-reinvented: The whole layout of my app seems to be reversed. For example If i left align text, the text will be right aligned and vise versa. Also flexDirection seems to be reversed, as by default elements are arranged from bottom to top. |
@megasus that issue has happened to me in 2 different projects after integrating RN Unity View. It might be related to where you added the Turns out that the #import line has to be added at the bottom of the file, not at the top. See here for more details. |
@jeserodz Amazingly, that worked. Thank you! |
@jeserodz First of all, thanks a lot for all your work, brought me quite a step further. Do you have any hint what this could be? Or even better, a demo project which you managed to get it running? Again, thanks you very much for your help! |
@nicost71 Can you give a try removing that line and running the app? I have integrated this to multiple Unity + RN projects lately, and one of them showed this issue. After removing the line and building to see what would happen, it worked as expected. About the root cause of the error, we would need to look further, but I think it might be related to the Unity version used when exporting to Xcode. |
@jeserodz I am using Unity 2019.2.14f1 together with "react-native-unity-view-reinvented": "^1.4.2" and "react-native": "0.61.5"... If I change this line to "#include "iPhone_Sensors.h", the code compiles "forever" (over 45 mins now...) As I am rather new to RN + Unity, I am quite struggling, if my entire setup is correctly working (with settings taken from Podfile, and no manual "hacks"). Do you have any "demo-project" you are willing to share with us, demonstrating a working setup? I know it's asked a lot, but I am sure many would profit from your expertise :-) |
@nicost71 - I'll try to put together a working example project for you to reference. I'm sorry I am not able to share the codebases of the projects I'm working with this library. However, the error you mentioned is progress in the setup. Remove "Classes/" from "Classes/iPhone_Sensors.h" and build again. (you'll notice that the file However, |
@jeserodz Thanks so much! An example project will for sure help me (and certainly others) building RN&Unity Apps, and push this even further. As mentioned before, I did try with stripping the "Classes/" from the include, which (btw. same result as removing the references to DynamicLibEngineAPI.mm) resulted in building forever... |
@megasus I followed your steps, but could not get successfully build. @jeserodz I am using reinvented fork, what should for this error? @benjarwar |
@sburaksak not sure, and I'm no longer working on a React Native/Unity project. I do remember having issues when we tried exporting with 2019 Unity builds, which seemed to have compatibility issues with this library (which has not been well-maintained for quite some time). I believe we were stuck on Unity |
For folks who are using latest Unity, i can confirm that https://github.com/asmadsen/react-native-unity-view package works very well with minimal effort. |
@ziyoshams hi, when i try to run the example from the repo you posted, i get this build error in xcode i've done correctly all the steps, i'm on unity 2019.3.0f6. Any idea how to solve this problem? |
@fabioglimb I have not run the example app from that repo. I just followed the installation steps for my project and it is pretty stable. I have seen that error that you are getting and I think it was related to Unity Versions. I can't confirm the Unity version that I used since I no longer work on that project. Try implementing it to your own project, maybe you won't get that error. |
If still someone looking for solution i have made a folks to run on Unity 2019 https://github.com/akroshteotia/react-native-unity-view |
My react native version 0.60.5,Android is working fine.
The text was updated successfully, but these errors were encountered: