Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Question Getting error related to NiceVibrations plugin after using Facebook Unity SDK

Discussion in 'Editor & General Support' started by msnz, Oct 13, 2022.

  1. msnz

    msnz

    Joined:
    Nov 4, 2020
    Posts:
    31
    Our game uses the NiceVibrations plugin for haptic feedback, and the Facebook Unity SDK for user login.

    After updating the Facebook Unity SDK to version to 13.2.0, we suddenly get a Parse Error in Xcode.

    It marks these 3 lines inside the "UnityFramework-Swift.h" file with an "Expected a type" error:

    + (void)RegisterHapticEngineFinishedCallbackWithCallback:(HapticCallback _Nonnull)callback;
    + (void)RegisterHapticEngineResetCallbackWithCallback:(HapticCallback _Nonnull)callback;
    + (void)RegisterHapticEngineErrorCallbackWithCallback:(HapticCallback _Nonnull)callback;


    The
    UnityFramework-Swift.h
    file is used by the
    FBUnitySDKDelegate.h
    file, which is then used by
    FBUnityInterface.mm
    file.

    Screenshot (click to enlarge):


    Our other games that still use version 11.0 of the Facebook Unity SDK don't get that error. I've also looked at the "UnityFramework-Swift.h" file for those games and didn't see those lines. In fact, there are no lines related to NiceVibrations in the entire "UnityFramework-Swift.h" file.

    Has anybody come across this issue before?
     
    Smrdis, ageana and lenchez-mrg like this.
  2. khorenj

    khorenj

    Joined:
    Nov 18, 2017
    Posts:
    1
    I've got exactly the same problem
     
  3. msnz

    msnz

    Joined:
    Nov 4, 2020
    Posts:
    31
    I haven't found a solution for this yet so I just downgraded back to FB SDK v11.0 in the meantime.
     
  4. omicronbilisim

    omicronbilisim

    Joined:
    Sep 17, 2018
    Posts:
    1
    Hi, did you find a solution?
     
  5. unity_uoAyPtg-84MTOg

    unity_uoAyPtg-84MTOg

    Joined:
    Mar 12, 2020
    Posts:
    1
    Did you find any solution so far?
    We use FB 11 but still get the same issue
     
  6. devanshp915

    devanshp915

    Joined:
    Jan 15, 2019
    Posts:
    5
    did anyone find any solution so far?
     
  7. LymanInBole

    LymanInBole

    Joined:
    Dec 31, 2020
    Posts:
    8
    Exactly the same problem.
    Unity 2019.4.36f1
    NiceVibration Unity SDK v3.9
    Facebook Unity SDK v14.1
     
  8. koin_brian

    koin_brian

    Joined:
    Aug 13, 2022
    Posts:
    1
    Anybody find a solution? I've tried Facebook SDK v12, 14.1 and 15 but they all generate the same error. I did nothing other than add the Facebook SDK and add my app info in the Facebook Settings.
     
  9. frontlinesaint

    frontlinesaint

    Joined:
    Jul 18, 2018
    Posts:
    2
    did you manage to figure it out?
     
  10. pistoleta

    pistoleta

    Joined:
    Sep 14, 2017
    Posts:
    536
    I'm guessing this is the same error you're talking about ?


    I also have the NiceVibrations plugin, but in my case Xcode complains on the Facebook side.

    Using Unity 2021.3.23
    FacebookSDK 16.01

    Any suggestions? I've been fighting with this for hours,
    Thanks in advance