Open jaredwilli opened 6 years ago
Running into this issue as well. Were you able to fix it jared?
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.
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.
@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.
I can confirm @johnanisere is correct, simulating the User Agent works for testing in the browser.
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.
Anyone following up with this repo ? This is still happening in ios devices. Anyone can help ?
@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.
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?