skip to Main Content

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 are suddenly getting 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.

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?

2

Answers


  1. Just got the same problem integrating the latest Facebook SDK into my game with haptics.
    I’ve found that POSSIBLE reason for that is the cyclic dependencies coming from the

    #import <UnityFramework/UnityFramework-Swift.h>
    

    It is used both in FBUnitySDKDelegate.h and MMNViOSCoreHapticsInterface.mm
    I’ve found a way to build the game, but it is stupid, and I am not an IOS guru to find a better way.

    • I’ve built the game.
    • Removed the import manually from the Facebook file.
    • Commented out everything that was using this import(Everything related to Facebook tournaments, which I do not use anyways)
    • Done.

    This allowed me to build a game and it runs successfully, but I am eager to know how to fix this properly.

    Login or Signup to reply.
  2. If you downgrade the Facebook SDK version the problem will be solved, this problem is caused by Facebook SDK.

    I used version FBSDK 9.2.0 and it worked without any problems.

    you can download archived Facebook SDK from here

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search