5 Reasons Apple Might Reject Your HTML5 Mobile App



·

There was one particularly remember-able rejection I received from Apple. I was working with a not for profit organisation to create an app for an event they had coming up soon. Considering the time sensitivity of the project, I put a lot of care into making sure the app would not be rejected by Apple. I waited with bated breath for those seven or so torturous days the app was in the review queue, until I got a rejection notice at about 2:00 AM when I was out one night. Uh oh.

Why was it rejected? The app included a link to a donation page for the organisation which would launch an In App Browser (powered by the In App Browser PhoneGap Build plugin) to display the donation page. As it turns out, it’s fine to include a donation link in an iOS application but the link must be launched through the Safari browser.

The collection of charitable donations must be done via a web site in Safari or an SMSApple

Lesson learned.

It goes to show that even with the best intentions, there’s some pretty obscure reasons your app could be rejected by Apple. So it’s important to make sure you read over the App Store Review Guidelines, but there’s certainly no hard and fast rules about what’s in and what’s out.

We will reject Apps for any content or behavior that we believe is over the line. What line, you ask? Well, as a Supreme Court Justice once said, “I’ll know it when I see it”. And we think that you will also know it when you cross it.Apple

How do I make sure my HTML5 app isn’t rejected?

There are obviously a lot of guidelines that apply to all app submissions, native or HTML5. But there is some things in particular you should pay more attention to given the nature of the HTML5 approach.

1. Your app is more like a web page than a mobile application

The cool thing about technologies like PhoneGap is that we can take HTML, CSS and JavaScript code, wrap it up in PhoneGap and then immediately we have an application that can run natively on iOS and Android. If you’re not implementing an appropriate mobile user interface though, with features that users have come to expect (i.e. smoothly scrolling lists, smooth animations between screens) then Apple may reject your application. If you have literally just wrapped up a website, and haven’t used a HTML5 mobile framework, Apple will definitely reject your application.

2. Your app is slow or unresponsive

HTML5 applications can be a bit slower than native applications. They’ve certainly come a long way, and a well designed HTML5 app will be just as fast as native, but if you’re not careful you could easily create an app that is slow or unresponsive. Having too many elements in the DOM, complex animations and styling or just a poorly thought out application structure can negatively affect the performance of your app. Common effects would include slow page load times and laggy scrolling lists. Apple is very protective of their brand, and want to ensure that if a user is using an application on an Apple device then it will be to a certain quality. Frameworks like Sencha Touch make it a lot easier to ensure a high degree of performance in a HTML5 mobile app.

3. You don’t handle online / offline states

It’s easy to design your application and forget to handle what actually happens if the user isn’t connected to the Internet. Switch your device into flight mode and run through your application – does it fail gracefully? If you’re loading services like the Google Maps API or loading data from a server then obviously you will require an Internet connection. In the event that these services can not be reached, you need to make sure that an appropriate error message is displayed to the user, and that your app doesn’t just break.

The Network Information plugin for PhoneGap comes in very handy here, we can use the following code:

var networkState = navigator.connection.type;

if(networkState != Connection.NONE && networkState != Connection.UNKNOWN){
     return true;
}

to easily check if the user is connected to the Internet, and then perform different actions based on that.

4. Your app doesn’t scale to the appropriate resolution

iPhone Apps must also run on iPad without modification, at iPhone resolution, and at 2X iPhone 3GS resolutionApple

It’s very important to test your application on different screen sizes. If you’ve designed it specifically to fit, say, the iPhone 5 resolution then Apple will reject your application when it doesn’t work properly on an iPad or a different model of iPhone. Again, Sencha Touch is pretty good in this regard. Applications created in Sencha Touch will automatically scale to any size, but you can also create specific profiles for different devices – so if you want to make use of the extra screen real estate when your app is running on an iPad you can do that.

5. You’re using a workaround that breaks the rules

Using the HTML5 + PhoneGap approach we don’t always have access to everything that a native iOS application has access to. It is possible to use plugins and work around these things though, just make sure you’re not breaking any rules like the following:

Apps that do not use the MediaPlayer framework to access media in the Music Library will be rejectedApple

I spent a lot of time trying to work around this (without realising it wasn’t allowed) when I was developing RunTap. In the end I didn’t figure out how to do it anyway and used SoundCloud instead!

So, there’s some things to look out for. But there’s plenty of horror stories from the Apple Review queue – what’s yours?

What to watch next...

  • rawan

    From Apple 4. 2 DESIGN: MINIMUM FUNCTIONALITY Design – 4.2

    Your app provides a limited user experience as it is not sufficiently different from a mobile browsing experience. As such, the experience it provides is similar to the general experience of using Safari. Including iOS features such as push notifications, Core Location, and sharing do not provide a robust enough experience to be appropriate for the App Store.

    Specifically, your app is only a web view of the Go Wabi Website. Please see attached screenshots for details.

    Next Steps

    Please revise your app to provide a more robust user experience by including additional native iOS functionality.

    If you cannot – or choose not to – revise your app to be in compliance with the App Store Review Guidelines, you may wish to build an HTML5 web app instead. You can distribute web apps directly on your web site; the App Store does not accept or distribute web apps.

    It mean we can’t any app with html5 framework for ios

  • Thanks for the useful tip.

    First Crush
    http://www.firstcrush.co

  • Abhimanyu Kumar

    how to fix it ??

    Guideline 5.1.5 – Legal – Privacy – Location Services

    *
    * Your app uses background location services but does not clarify the purpose of its use in the location modal alert as required in the iOS Human Interface Guidelines.
    *
    * Please see attached screenshots for details.
    *
    * Next Steps
    *
    * To resolve this issue, please revise the NSLocationAlwaysUsageDescription value in the Info.plist to specify the intended purpose of using the user’s location while the app is in the background.
    *
    * Resources