1 min read

Get Started

Last Updated - Platform 22.0 - SDK 17.0

The Swipe to Like (S2L) feature uses the Search API to provide swipeable card based wishlisting. It does not support Variant level wishlisting out of the box, but will work if you customise the Wishlist button to show the Variant Selector.

Set up the Swipe to Like screen

  1. Ensure the SDK and Platform are set up following the PoqSDK set up steps.
  2. Add the PoqSwipeToLike framework to your project following these steps.

This is all the code you need to be able to deeplink to the Swipe to Like screen. To have it as a tab continue to the next section.

Replace a tab with Swipe to Like

SwipeToLike Tab

By default Swipe to Like is only accessible via deeplinks but it does set itself up with the swipetolike tab alias. The features presented by the 5 tabs are determined from the MightyBot settings tab1 through tab5.

  1. Open MightyBot and login with your account (ask your contact for access and the link).
  2. Edit your app on the Apps page then edit your next (unreleased) app version.
  3. Navigate to the Config tab and search for tab{1-5} with the tab index to replace.
  4. Copy or edit the tab{1-5} config.
  5. Set the iPhone value to swipetolike (iPad defaults to this so you can leave it blank).
  6. Make the option Exportable then tap Save.

Assuming your app is using the modified version, if you run your app now the Swipe to Like feature will be visible as a tab. But it's content may not be what you want. To use a specific category you can set the default ProductListSource via the coordinator.

  1. Open your AppModule to the didAddToPlatform or setUpSwipeToLike function.
  2. Customise the default PoqSwipeToLikeCoordinator specifying the default source.
Container.shared.coordinators.swipeToLike.replace {
// Example using a category named 'swipe-to-like'.
PoqSwipeToLikeCoordinator(source: .init(method: .category("swipe-to-like")))
}

Replace the Cart tab

SwipeToLike CartButton

A common customisation replaces the Cart tab with Swipe to Like, moving the Cart button to the navigation bar. This can be done with any tab by setting a custom navigationBarButtonItem but the Cart has additional badge logic.

  1. Open your AppModule to the didAddToPlatform or setUpCart function.
  2. Inject the CartNavigationBarButtonItem as the app-wide navigation bar button.
Container.shared.views.navigationBarButtonItem = .factory { .cart }

This button can be customised or moved anywhere within your app. See the navigation button customisation docs for further details.

Next steps