Migration from v1 to v2

Migration guide from v1 to v2 of the SDK
  1. 1.
    Uninstall the old version of the package
  2. 2.
    Install the new version and the prerequisite packages
    1. 1.
      react-native-modal
    2. 2.
      react-native-push-notification-popup
    3. 3.
      react-native-webview
  3. 3.
    Fetch API is used for network communications, so the response need to be converted to json
  4. 4.
    GameballWidget.init function has two more parameters
    platform - (shopify,...etc)
    deeplinks - which is an array of strings that represents the deeplinks of the app.
  5. 5.
    Rename GameballSdk => GameballSDK
  6. 6.
    Player registeration function changed from registerUser to registerPlayer
  7. 7.
    AddReferral function has been removed, instead pass the referrer code to registerPlayer function as mentioned in Getting Started section.
  8. 8.
    InAppNotification component, in v2 it takes only the notification data, isVisible and onCloseFunction have been deleted
--------------Version 1 -----------------------
<InAppNotification
notification={data}
isVreadisible={true} // deleted
onCloseFunction={function} //deleted
/>
​
--------------Version 2 -----------------------
<InAppNotification
notification={data}
/>
​
​