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

A problem when using Nice Vibrations in Unity #35

Open
dmitry-markevich opened this issue Mar 4, 2021 · 8 comments
Open

A problem when using Nice Vibrations in Unity #35

dmitry-markevich opened this issue Mar 4, 2021 · 8 comments

Comments

@dmitry-markevich
Copy link

dmitry-markevich commented Mar 4, 2021

I have just added Nice Vibrations to my Unity project and now I get this error while building the whole React Native + Unity app on rect-native-unity-view compile step:

Module 'UnityFramework_NiceVibrationsPrivate' not found (https://prnt.sc/10cremj)

UnityFramework_NiceVibrationsPrivate is described in module.modulemap file in Nice Vibrations library (https://prnt.sc/10crh5p):

module UnityFramework_NiceVibrationsPrivate {
header "UnitySwift-Bridging-Header.h"
export *
}

It connects swift and Obj-C code:

MMNViOSCoreHapticsInterface.swift -> UnityFramework_NiceVibrationsPrivate -> UnitySwift-Bridging-Header.h:

#import <Foundation/Foundation.h>
#import <CoreHaptics/CoreHaptics.h>
#import "UnityInterface.h"
typedef void (*HapticCallback)();

Nice Vibrations has post process script to add some dependencies when building Xcode project from Unity:

https://prnt.sc/10crmx7
https://prnt.sc/10cro72

Unity Framework compiles OK https://prnt.sc/10crqcr , but has warning:

Umbrella header for module 'UnityFramework' does not include header 'UnitySwift-Bridging-Header.h'

When build comes to react-native-unity-view, I get the error https://prnt.sc/10crsgk

I will be grateful for any help or ideas in solving the problem

@lukezbihlyj
Copy link

Did you ever fix this? We're having the same problem and I thought I fixed it before but it broke again randomly

@dmitry-markevich
Copy link
Author

No, I had to use another asset

@MohdAmmarNaeem
Copy link

Did someone fixed this issue?

@khorenj
Copy link

khorenj commented Oct 19, 2022

Did anyone fixed this?

@UmeshAmbaliya
Copy link

I am also getting same issue. can anyone help?

@lukezbihlyj
Copy link

I swapped to this plugin instead: https://github.com/CandyCoded/HapticFeedback

@mehmetcanari
Copy link

Here is the solution.

1- Type "MMNV" on project searchbar.

2- Click on "MMNV Path Definition" SO.
Screenshot 2023-12-12 at 12 48 17

3- On inspector you must assign "UnitySwift-Bridging-Header"
Screenshot 2023-12-12 at 12 49 10

That's it. You can build without getting any errors.

@Dsearle2
Copy link

I'm still getting this issue when trying to build despite having UnitySwift-Bridging-Header assigned. Is there a fix for this issue?

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