2 Replies Latest reply on Jul 22, 2016 10:10 PM by StudyStack

    Using a phonegap build app with various iOS emulators


      I need to be able to view my applications on multiple iOS emulator sizes so I can see how my app looks across the different versions of iphones and sp I can take screenshots for the app store.  How can I go about running my phonegap build app on various emulators and what emulators should I use?

        • 1. Re: Using a phonegap build app with various iOS emulators
          kerrishotts Adobe Employee

          There are no iOS emulators, only simulators. The simulators only run on Mac OS X with Xcode installed. To the best of my knowledge,  PGB apps aren't supported on these simulators because they need to be compiled for x86-64 architecture, not arm (which is what your phone would use, and what PGB generates).


          You've got two problems, really: determining if an app works in a given screen size, and getting AppStore-ready screen shots.


          First, verifying layout:


          • Test in a browser. Chrome and Safari both have mechanisms for resizing the web viewport to the same size you would see on a physical device. Chrome's font rendering is further away from iOS's rendering than is Safari, so keep in mind that this won't be 100% perfect.
          • Test in the simulator. This will require building the app again locally. The sim isn't perfect, though it is much closer than a desktop browser.
          • The only way to be absolutely sure about the layout is to try it on a physical device of the desired size. Bribe your friends and family with chocolates or alcohol if necessary. Excepting the iPad Pro, all iPads have the same logical resolution (1024x768). iPhones have the widest variation (see https://www.paintcodeapp.com/news/ultimate-guide-to-iphone-resolutions )


          Second, generating screenshots:


          • Just remember, this is always a pain in the rear.
          • Fake it. Use a browser rendition of your app as the screenshot. Resize/crop as necessary. Far from perfect, but if you don't have any other option, it gets it done.
          • Use the simulator. Again, this requires building the app locally. The sim isn't perfect, but it works for most cases (unless you are trying to demonstrate a feature that requires a physical device). I use the sim for screenshots when I don't have a physical version of the device on hand.
          • Again, the only way to be absolutely perfect is to use the device(s) you are targeting and take a screenshot. If you only have one of each form factor, you can probably fake the rest (but this is not perfect). If necessary, bribe your friends and family again. That said, an iPhone 5s will give you the iPhone 4s screenshot as well -- they are equal width (in portrait), so you just have to crop the bottom a bit for the iPhone 4s.
          • Make sure your status bar is "clean". There are lots of utilities out there that do this provided you given them a correctly-sized screen shot.
          • The screenshots on the app store don't have to be pixel-perfect representations -- you can add text and other graphics as well. Which means you can get away with quite a bit... ;-) Browse the app store -- you'll see what I mean.
          • If your app supports multiple localizations, you need to repeat this for each localization. You aren't required to do so, but it's a good idea.


          Hope that helps some!

          • 2. Re: Using a phonegap build app with various iOS emulators
            StudyStack Level 1

            I used appscreens.io to generate fake screenshots for submitting with iTunes Connect.   I liked that it was free and easy to use.   I made some screenshots of my app using an ipod touch.   Then I uploaded those images to appscreens.io and it made mockups for the other devices using that image.   However, it did seem a little buggy.   It could generate multiple screenshots for most devices, but, for iPad it would only generate one at a time.   It also did not generate images for the iPad Pro.   But that makes sense since the screen resolution is so much higher for the iPad pro.