Skip to content
This repository has been archived by the owner on Feb 12, 2019. It is now read-only.

iOS 10 Support #228

Open
ajl236 opened this issue Jul 26, 2016 · 6 comments
Open

iOS 10 Support #228

ajl236 opened this issue Jul 26, 2016 · 6 comments

Comments

@ajl236
Copy link

ajl236 commented Jul 26, 2016

ios 10 is shown with classname ath-ios-1 rather than ath-ios-10

likely due to substr(0,1) on addtohomescreen.js line 514

@dryabov
Copy link
Contributor

dryabov commented Jul 27, 2016

I'd replace that by (parseInt(ath.OSVersion) || ''),

@holtkamp
Copy link

Maybe you can provide a pull request?

dryabov added a commit to dryabov/add-to-homescreen that referenced this issue Jul 27, 2016
@dryabov
Copy link
Contributor

dryabov commented Jul 27, 2016

Done.

cubiq pushed a commit that referenced this issue Aug 19, 2016
@khanimdad
Copy link

This is fixed in v3.2.3, but not yet working on iOS 10, not sure how can i debug and fix it

@sutee9
Copy link

sutee9 commented Dec 12, 2016

I fixed it, unfortunately I have no push-access to this rep, so I'll just explain here:

In the addtohomescreen.js replace the statement
(ath.OSVersion + '').substr(0,1)
with
(ath.OSVersion + '').substr(0,(ath.OSVersion + '').indexOf('.'))

In addtohomescreen.css there are a few style declarations that are named according to the ios version, so they will stop working everytime a new iOS version is added. specifically, replace

.ath-ios7 .ath-action-icon,
.ath-ios8 .ath-action-icon,
.ath-ios9 .ath-action-icon{

with

.ath-ios7 .ath-action-icon,
.ath-ios8 .ath-action-icon,
.ath-ios9 .ath-action-icon,
.ath-ios10 .ath-action-icon{

and

.ath-ios8.ath-tablet,
.ath-ios9.ath-tablet{

with

.ath-ios8.ath-tablet,
.ath-ios9.ath-tablet,
.ath-ios10.ath-tablet,{

@holtkamp
Copy link

@sutee9 can you provide a pull request for this nice change? No need for push access, just fork the library, apply the changes and submit a pull request, so these changes can be merged 😄

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

No branches or pull requests

5 participants