adjust / smart_banner_sdk

Adjust Smart Banner SDK
MIT License
1 stars 0 forks source link

Ipad pro, Ipad air could not show the smart banner #17

Closed qingbolove closed 1 month ago

qingbolove commented 2 months ago

We are integrating smart banner SDK to our code base, we are working on testing now, and now we found Ipad pro, Ipad air could not show the smart banner, it report "Can't show banner, you should initialise Smart Banner SDK first", but Ipad min could work perfectly without error message, iphone 12, iphone 13 could work as well, just the exactly same code! So please help to check why ? Thanks image

qingbolove commented 2 months ago

iPad min could work

image
YaraMatkova commented 2 months ago

Hi @qingbolove 👋

Could you please set log level verbose in SDK initialisation like this

AdjustSmartBanner.init({
  // ... appToken and other options go here
  logLevel: "verbose",
})

so we could probably see what's going wrong on iPad Pro?

And could you also log userAgent of your testing browser and share the result?

console.log(navigator.userAgent);
qingbolove commented 2 months ago

How could I get the log, do you have a wiki to follow?

YaraMatkova commented 2 months ago

Hey @qingbolove,

To instruct the SDK print verbose logs please add logLevel: "verbose" to your SDK initialisation as it shown in the comment above.

Based on screenshots I assume you use desktop Chromium-based browser for testing, so you can find the logs on Console tab in browser development tools.

qingbolove commented 2 months ago

image Sorry, no, we do not have Chromium-based browser for Xiaomi, we use real device

YaraMatkova commented 2 months ago

Um. Let me remind that issue you created has title "Ipad pro, Ipad air could not show the smart banner" 🙂

Actually I suppose the issue with the iPads is related to their user agents. The SDK relies on the user agent, but these devices user agents are the same as ones of desktop browser. Looks like an SDK bug, we will fix it and update you here, once the fix is released.

Regarding Xiaomi Browser, hopefully this article Remote debug Android devices could be useful.

Also I would recommend to merge init({/*...*/}) calls in one and make it independent of common.isIos function, since the SDK detects the platform itself and uses only needed arguments

const iosPath = ""; // your code to get iOS deep link path
const androidPath = "";  // your code to get Android deep link path

AdjustSmartBanner.init({
  appToken: {
    ios: adjustIosWebToken,
    android: adjustAndroidWebToken
  },
  iosDeepLinkPath: iosPath,
  androidDeepLinkPath: androidPath,
  language: lang,
  bannerParent: element,
  logLevel: "verbose",
  onDismissed: () => this.close()
})
YaraMatkova commented 1 month ago

Hi @qingbolove, I'm going to close this. Feel free to comment, reopen this issue, or create a new one if you have additional questions. All the best!