Migration from v1 to v2

Migration guide from v1 to v2 of the SDK

  1. Uninstall the old version of the package

  2. Install the new version and the prerequisite packages

    1. react-native-modal

    2. react-native-push-notification-popup

    3. react-native-webview

  3. Fetch API is used for network communications, so the response need to be converted to json

  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. Rename GameballSdk => GameballSDK

  6. Player registeration function changed from registerUser to registerPlayer

  7. AddReferral function has been removed, instead pass the referrer code to registerPlayer function as mentioned in section.

  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}
/>

Last updated