Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doesn't work on IOS devices #40

Open
jaredwilli opened this issue Sep 25, 2018 · 8 comments
Open

Doesn't work on IOS devices #40

jaredwilli opened this issue Sep 25, 2018 · 8 comments

Comments

@jaredwilli
Copy link

When I try to view the banner when in device mode in chrome devtools, and using an IOS device setting, the banner does not show up. It also doesn't show on actual devices either.

I have seen this on the demo page too for this repo. Any ideas how to get it to work?

@xanderdeseyn
Copy link

Running into this issue as well. Were you able to fix it jared?

@Boorasso
Copy link
Contributor

Try setting the prop "force" to "ios" to view the ios smart banner in chrome on a computer.
Also did you make sure you cleared your cookies ? The banner won't reappear if you close it until you clear the cookie.

@jaredwilli
Copy link
Author

Actually my work priorities changed and I am no longer working on making this banner for our site. But I was not ever able to get it to work. Cookies were cleared, and I tried to use the force for ios but that didn't work.

@johnanisere
Copy link

@jaredwilli Sorry about your issue.I've been unable to replicate the issue.
Please note that you can only emulate ios/android devices in chrome dev tools using the network conditions tab.
screen shot 2019-01-14 at 1 00 11 pm
screen shot 2019-01-14 at 1 00 40 pm
screen shot 2019-01-14 at 1 01 22 pm

@awreese
Copy link

awreese commented Jun 20, 2019

I can confirm @johnanisere is correct, simulating the User Agent works for testing in the browser.

@dovvas
Copy link

dovvas commented Dec 16, 2020

I had the same issue. I manipulated "setType(deviceType)" function and changed agent.device.vender === 'iOS' || agent.browser.name === 'Mobile Safari'. I know this way it doesn't support iOS < 6.

@arpit-shrivastava-at-appointy

Anyone following up with this repo ? This is still happening in ios devices. Anyone can help ?

@bastian-hidalgo
Copy link

@arpit-appointy @dovvas @jaredwilli the reason that doesn't show on iOS devices its because @patw0929 doesn't want to give it, instead he propose to use the smart banner meta tag for iOS, look at the code:

  // iOS >= 6 has native support for Smart Banner
      } else if (
        agent.os.name === 'iOS' &&
        (this.props.ignoreIosVersion ||
          parseInt(agent.os.version, 10) < 6 ||
          agent.browser.name !== 'Mobile Safari')
      ) {
        type = 'ios';
      }

If you have a iOS version < 6 it will show you.

And i'm not saying that this is incorrect, in fact, use the meta tag for iOS:

<meta name="apple-itunes-app" content="app-id=myAppStoreID, app-argument=myURL">

As Apple suggest: https://developer.apple.com/documentation/webkit/promoting_apps_with_smart_app_banners

Obviously, is not customizable. but thats the reason.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants