gabn88
gabn88

Reputation: 811

Ionic cordova app working on all browsers and IOS 9, but not anymore on IOS 8 [freezes without error]

I have an Ionic application that worked well under iOS 8.

Now I have updated some code and included the network information plugin and updated to cordova-ios-3.9.2.

I have done some debugging for two days, but I get no errors, not in Xcode and not when I inspect the app using safari webinspector.

However, the app does not work anymore under iOS 8.1. It does work under iOS 9 and all Android versions.

I know it is a vague issue, I hope to find someone who can help. Maybe someone who knows the difference between iOS 8 and 9?

we are using the following plugins:

The changes in the code are minor and well tested on all major browser, plus I get no error in the safari web-inspector, plus it works under iOS 9 so I do not suspect them.

Also strange is that the layout looks strange under IOS8. Maybe it is a css error? I have no idea if this is even possible?

Any help is appreciated!

EDIT: What I have tried: use the previous ionic code with ios-cordova 3.9.2. This works. Also on iOS 8.1

Upvotes: 0

Views: 1248

Answers (2)

JackDev
JackDev

Reputation: 5062

So I had a similar issue, and I use this plugin: https://github.com/sindresorhus/gulp-autoprefixer

The issue was that this plugin recommends the following implementation:

const gulp = require('gulp');
const autoprefixer = require('gulp-autoprefixer');

gulp.task('default', () =>
    gulp.src('src/app.css')
        .pipe(autoprefixer({
            browsers: ['last 2 versions'],
            cascade: false
        }))
        .pipe(gulp.dest('dist'))
);

What happened is that two weeks ago, iOS 9.3 was released, thus removing support for iOS 8 and breaking my app, and having some really irate customers.

The fix was to specify the versions I needed supported.

gulp.task('default', () =>
    gulp.src('src/app.css')
        .pipe(autoprefixer({
            browsers: ['ios_saf >= 7', 'Chrome >= 42'],
            cascade: false
        }))
        .pipe(gulp.dest('dist'))
);

Hope that helps someone out there!

Upvotes: 3

gabn88
gabn88

Reputation: 811

The issues was with the CSS prefixes. Between releases we had accidentially removed some of them. Without the -webkit- css prefix the ios app breaks without warning or error.

Upvotes: 0

Related Questions