iPhone/iPad browser simulator? [closed] - iphone

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 6 years ago.
Improve this question
I need to see how my webpages are looking on an iPhone and iPad on my windows desktop. Is this possible?
A quick search yielded some iPhone testing sites, which seemed like what I wanted. However, they are wildly inaccurate when I compared against my own iPhone! I really need something that is as close to 100% accurate as possible.
Does XCode have a simulator that is 100% accurate? I understand I'd need a Mac to run XCode...

The iPhone/iPad simulator that comes with Xcode includes Safari. If you run Safari in the simulator, you can view your website and it should appear the same as it would on a real device. This may work for general layout testing. But since it is a simulator, it is possible that not every single bit of functionality will be exactly the same as using a real iOS device.
If you are writing a website and you need to verify that it looks proper on a given device, then you need to test your website on that actual device. Testing with real hardware is part of the price of doing business.
And yes, you need a Mac to run Xcode.

EDIT 2020: Most of these are basically just to test resolution stuff, some of them even outdated, sadly, mobile browser development went sideways with desktop (especially in Apple), therefore one can't really "emulate" a real phone with these as mentioned with comment.
To emulate real phones, often the best choice is to download a desktop app which, for Windows, is usually paid/freemium, on Mac just use the Xcode one (but I doubt Mac people are looking for this Q/A).
Freemium online easy to use that I found recently is Appetize.io it seems to really render the screen according to network, but honestly I didn't really dig into whether it also has identical features and indentically missing features as real iOS.
Word of advice:before release, always test on the real device :)
I've encountered cases when even the iOSes themselves behaved differently on 2 iPhones...
Online simulators / emulators I use
1) recombu
Fine simulator which - unlike resizing browser window to mobile phone dimensions - acts same as a smart phone. Don't be confused that you can't edit address bar in safari - just open deveolper tools (usually F12) and rewrite iframe's source URL to yours.
Link: http://recombu.com/mobile/interactive/ios7-demo/
2) responsimulator
Seems to work like recombu, but you can open url directly by text input and you can zoom in/out.
Link: http://www.responsimulator.com/
3) transmog
This one seems to process the webpage, but it emulates old iPhone - still handy sometimes.
Link: http://transmog.net/iphone-simulator/mobile-web-browser-emulator.php
X) google it / internet search for it
Always use google (or other internet searchers) to check for other simulators/emulators and new versions.
Link with example google search for this one:
https://www.google.cz/search?q=online+iphone+emulator
Browser device mode
If you open your browser's developer's tools (in Chrome F12), there will probably be an option to toggle device mode (in Chrome it is the little smartphone icon at top-left).
After choosing this option GUI will change and will provide option to select device to simulate (in Chrome it is at the top - select option "Device"), after selecting device, refreshing the page is often adviced to ensure simulator's accuracy.

Both Chrome and Firefox now have built-in emulators. They aren't perfect but are good enough that can get you almost all of the way before testing on an actual device. The best part is if you like the browser's developer tools (Chrome, Firefox), you can use them while emulating.
To get the emulator: [Ctrl+Shift+M] and select the device that you want to emulate. You might have to refresh the page, esp if you have anything that depends on script that executes on page load.
Internet Explorer also has a device emulation mode. F12, then CTRL+8. It's not quite as straight forward as the Chrome Mobile Device emulation, but does allow you to simulate geolocation:

For now i think best emulator is https://app.crossbrowsertesting.com
It has real sizes and virtual keyboard (that is the most important thing) , zooming events...
Also https://appetize.io/demo has same things but it has time limit.

You can run safari in Xcode's simulator and it should accurately emulate iPads and iPhones. Another thing on the market that I've heard good reviews for is Ripple for chrome.

There's no good substitute to testing on an actual device.
Real devices have higher display densities, meaning that pixels are smaller. If you don't test on a real device, you may not realise that your design includes text that is too small to read or buttons that are too small to tap.
You use real devices with your fingers, not a mouse. This means that the accuracy of your taps is much lower and what you are tapping is obscured by your finger. If you don't test on a real device, you may not realise you've introduced usability problems into your design.

XCode does come with a simulator for the iPad and iPhone.
You can also use Safari on OS X to debug websites on your iOS device.

You can use the Ripple emulator on Chrome.

I have been using Mobilizer, which is an awesome free app
Currently it has default simulation for Iphone4, Iphone5, Samsung Galaxt S3, Nokia Lumia, Palm Pre, Blackberry Storm and HTC Evo.
Simple straightforward and effective.

I use mobile-browser-emulator chrome plug-in which is has iphone device types. It actually uses user-agent and size of device on which based responsive pages are rendered

Related

iPhone not appearing in Develop menu in Safari

On my "Develop" menu, in Safari, the iPhone no longer appears after updating Safari to the latest version, making it impossible to inspect and debug sites and apps.
I restarted the iPhone, killed and relaunched Safari, restarted my Mac too, but the issue is still there. Affects both Safari mobile and phonegap applications.
Anyone experienced the same problem?
FWIW, I tried all of these suggestions, and it worked briefly after resetting Privacy & Location settings but stopped working immediately after.
What ended up working as a long term solution was to turn both WiFi and Bluetooth off on the iPhone while connected to the Mac.
Turns out, my issue was that the update to the latest iOS version disabled the "Web Inspector" settings on my iPhone.
To re-enable it, go to Settings > Safari > Advanced.
In our case we needed to reset the trust between iPhone & Mac. From iPhone Settings > General > Reset choose reset Privacy & Location and also Network Settings. The phone reboots, we reconnected to the laptop, tapped Yes to Trust this Computer and now Mac Safari can once again debug mobile Safari.
What helped for me was the following:
Open Xcode
On the Menu: Window -> Devices and Simulators
Check the Connect via network checkbox. (If it is already selected then uncheck it and re-check)
In my case, resetting only Privacy & Location did the job (but only temporarily, see update below!).
Try only resetting that before resetting your whole network settings for nothing!
Almost immediately after reset, the "Trust this Computer" popup appeared and after trusting my device appeared in the Develop menu.
Update:
I kept having regular issues with this (having to reset it multiple times per day, restarting Safari and a combination of other things) until I found the real fix here:
https://stackoverflow.com/a/58654871/167983
#BearSnowstorm:
One more tip to try - after trying many of the above suggestions I
turned off "Sync with this iPhone over Wi-Fi" in iTunes.
Voila! Got my iPhone into the Develop menu!
(for context, this is in Mojave 10.14.6, iOS 13.1.3, Safari 13.0.3)
My comment on that answer describes the same thing but updated for Catalina:
I had recurring issues with this and the only way I could make it work (sometimes) was to reset Location & Privacy, close Safari, unplug my device, etc. It was always a temporary fix though and the issues would come back very quickly. This however seems to work more permanently! I confirm what #Florian said: the setting was off by default for me, turning it on then off (after letting the sync finish) worked. On Catalina, this setting is named "Show this iPhone when on Wi-Fi" under General when you select your iDevice in the Finder.
Reading that answer my instinct was that it could not possibly make a difference, but it does! I have had zero issues since I did this. Try it!
Some cables (even official Apple Lightning Connector) don't support this feature because of some damage inside. My Lightning Connector was able to charge the iPhone but prevented to use dev tools on the Mac. I used another cable to successfully connect to dev tools.
In my case, this was totally a network issue.
Everything works well when I used 4G network.
If I use my wi-fi, safari failed to detect my device.
Turning off wifi on the iPhone allows it to appear in the develop menu.
The best and permanent solution in Catalina is to open a new Finder window, select in sidebar, then check 'Show this iPhone when on wifi'.
To disable caches (and to avoid constantly having to delete website data) open your site in a new Private Window. Changes to stylesheets will then update as normal.
Seems the front ports of my Mac Pro were not working correctly, plugged the cable on the keyboard port and I was able to connect to the dev tools.
I know all these tricks but after installing Catalina none of them worked. What DID work for me was Settings > Developer > Clear Trusted Computers. Strangely, the phone appears in the Safari Developer menu on the Mac, but the phone never asked to re-trust the computer!
The phone disappears again sometimes, but the same trick gets it back.
MacOS and iOS still look beautiful, but both are turning into a messy pigsty underneath. I sometimes wonder if Apple still even cares. :(
I've tried with the reset of Privacy and Location but it didn't work. What worked for me was disabling the hotspot from the phone. With the hotspot active Safari doesn't shows the iPhone in the developer menu.
Crazy but true, when i disconnected bluetooth and tried to check under develop option, connected device was shown.
In my case the only solution was to reboot my Macbook... stupid but effective solution
My solution was simply to move the cable to a different USB port.
reboot fix everything,works for me.
In my case, I was working from home and had a VPN tunnel to my work that was redirecting all traffic through my company's network. Disabling that revealed the phone in the Develop menu again.
As an alternative, connecting with VPN and disabling WIFI and Bluetooth works.

iOS (Apple): Is there any way for the application to ask the OS to block the device in that application?

I would find useful, in some cases, and under the user's permission, to block the device so only the running application can be accessed unless the usrer's password (pattern or whatever is used to unlock the session) is introduced.
I guess the mecanism should be something like: The application asks the os to do this, the OS asks the user for permission and then the application asks the device to block the application on "exit" or standby (or both).
This would be useful for using an iPhone or iPad as a device for public use. One example could be a Library where visitors can see the book list and some previews in the device. In this case, you don't want the user to access any other resource/application in the system.
Does it make sense?
What your asking is there any type of kiosk mode for iOS devices.
The short answer in no. The longer answer is if you're using a Jail broken device you might be able to relaunch the app on exit, but it would take significant R&D.
I hade a client ask about this last week, after some investigation and thinking I told her,
It's best to look for a case that blocks the home button. Or some kind of security bracket. It'll be cheaper and easier.
Also any App you create with this functionality would be rejected form the App store.
If your looking for advice on programming Jail broken devices there is a Stack Exchange proposal you can follow.
Supposedly there's a way to have a "kiosk" mode with a .mobileconfig file. Both of these articles talk about it, basically covering the same territory:
http://joris.kluivers.nl/blog/2012/03/02/kiosk-mode-for-ios/
http://rick-hawkins.blogspot.ca/2012/01/turning-ipad-into-kiosk-device.html
I was looking into this again and found out that iOS already supports the feature. It is called Guided Access, it was incorporated on iOS 6, it does not require jailbreak and can be used for any app installed on the device.
It makes sense, but I don't think you can do that without jailbreaking the phone. In iOS, the home button cannot be overridden by applications. Besides there is cheaper hardware out there for kiosk-style applications.

How do I launch an iOS app upon startup?

I am working on a project where the iPad will be used for a specific purpose, and only run one app. When the device starts up, I want my app to run, and I want to override the home button so that it does not quit the app (like the iPhone/ iPod demos in the store).
I have seen bits and pieces of this functionality, but am unsure how to implement it. I realize that it would have to be on a jailbroken device, and the client is fine with that.
Any ideas?
Thanks!
Thomas
Edit 1: I found this site, which explains some iOS daemons. I'm still researching, so I'll just keep posting what I find.
Edit 2: I found Saurik's IRC channel and asked around in there. One of the participants told me that it is possible, but probably not as simple as I thought. I am still doing some digging around in the iPhone 3G filesystem now just to get the feel of what certain things do.
The project has been scrapped, but I'm still looking for help on this though....just cuz I'm interested lol.
Here's my progress on the issue. Question's still not completely answered, but I'm making some headway :-)
I've been researching Jailbreak and the iOS filesystem as well. That has helped my understanding of the issue some.
Without jailbreaking this would not be possible.
There has to be something in /etc somewhere that runs through all the things that start up, just like on Linux.
It so happens that my current ipod touch has a WALD screen after me manually deleting a few mp3 files. Some anti mp3 mocking code policing it, and not liking me touching the mp3 file structures... otherwise I'd look for you right now.
Do you know how to ssh into your ipod/iphone?
Well, I believe Apple itself uses this on the iPads running at the Apple Stores (those showing animations about the products where you can ask to talk with a blue shirt).
I would look for something on the official IPCU (iPhone Configuration Utility) to check if there is an option for auto-loading apps on boot time.
If not, try to get friends with someone working on an Apple Store and get some hints on how they run their app on those iPads.
you can add the "voip" key in the information plist.
This is backed up by Apple:
You can also see this sample project:
https://github.com/lithium3141/BootLaunch
PB.

iphone multitask

I want to make my iphone run application in the background.I know there is a program called "backgrounder",but it isn't I want.What should I do?
This is flat out not allowed... period.
You may want to look into the development community for jailbroken phones. I think there are projects like that there, although you are severely cutting off your userbase.

Develop iPhone app without a Mac? [duplicate]

This question already has answers here:
Closed 13 years ago.
Possible Duplicates:
How can I develop for iPhone using a Windows development machine?
I'm looking to build an iPhone app for my wife's phone, but am not interested in buying a Mac as a development platform for a one-off piece of work. The app:
should run standalone on the iPhone (i.e. without network connectivity)
would be perfectly acceptable with a GUI created using one of the iPhone Javascript libraries that are around
will do some database IO to read and update data
has no commercial value and will never be used by anyone else
Here's my thinking:
jailbreak the iPhone
install Ruby + Sinatra on the iPhone
write the app using Sinatra, hitting a database (SQLite?) on the iPhone
To access the app on the iPhone:
start the Sinatra app in the
background (is this possible?)
start a Safari browser session
navigate to the Sinatra app at e.g. http://localhost:12345
etc.
This seems like a strange approach, but I can't think of a simpler way of writing a standalone iPhone app without buying a Mac. Is there a better way of doing this?
The only reliable info I could find is at the always-excellent MetaFilter
http://ask.metafilter.com/110466/Anyway-to-develop-iPhoneiTouch-apps-without-investing-in-a-Mac
The answer is apparently no.
You absolutely need an Intel Mac of some description.
The entire iPhone build process is too deeply ingrained in XCode to build elsewhere; and the only other Objective-C compiler I know is gcc, which doesn't support any Apple's additions to the language (nor their libraries).
And, in direct opposition to what people are saying above, Objective-C is absolutely my favorite native, compiled language. Elegant, small (only a few changes from C), late-binding, dynamic, straightforward. It's what C++ should have been.
Lots of people recommend picking up a secondhand Intel (remember, must be Intel!) Mac Mini as the cheapest "port of entry".
What you have described is a viable solution, however you should consider using the open toolchain for the iphone.
You don't need a mac then, only need to jailbreak the phone to make sure your app will work.
For all those who say it can't be done, this was the only way to make Apps for the iphone before the SDK was out :)
Also if you are after a guide to using the open toolchain then I highly recomend this book
If you're considering creating a GUI using a javascript library anyway, why don't you just write a web app instead of an iPhone-native one? It seems like overkill to jailbreak the device just so that you can install a ruby + sinatra web app on it. Can't you just put the ruby web app on a server and create a Safari shortcut to it on the home screen? If you don't have a server, you could always run the website off a PC in your home...
Jailbreaking the OS and running a ruby app onto it would be technically cool, don't get me wrong - I just think it'd end up being a time sink.
Just my 2c!
Depends on what your time is worth, I guess. That seems like a terribly convoluted way to get what is otherwise a simple app on the phone to avoid the US$400 purchase of a used Mac Mini.
There is the hackintosh route, which may work on your existing hardware, but again one has to put a price on time. It's what got me started before I dropped big coin on a Macbook Pro, an MSI Wind then a home-built. It's of questionable legality (the right thing to do is fork over US$129 for Leopard regardless), but you are already talking about jailbreaking. :-)
Get someone else to do it, or rent the resources that you need.
Another option is to find nearby iPhone developer who has it all setup and either get him to write the app or do it together, he provides development environment you code the solution or code it together.
The only problem is that you wont be able to update maintain it.
I would still consider getting older gen Mac or Mac mini - all the other options sound more complicated.
If you are going to be stubborn about not using a mac, but you want an app that will work offline with the iPhone / iPod Touch and Android devices, then I would use HTML 5 to create an offline app.
You can do a lot now with HTML 5 - Google have an email client that uses HTML 5 for the iPhone now and it can work offline etc. If you do this and get the user to add a bookmark to their home screen for your app - it will be almost as good.
If I was you I'd fork out for a mac - or look to see if you could borrow one - or time-share with someone - you will not create a very good quality app without it.
You can jailbreak the phone and install Python. There are some sample applications in Cydia for it (it's called iPhone/Python. Search for Python in cydia).
Then you will have a "native" app, not a web application and you can use the entire iPhone UI library (the part of it that is accessible via py-objc anyway) and you don't need to run a web server in the background.
You can do your development on the phone itself via SSH or you can use an iPod Touch for it. Packaging is also easy (should you need it), just create your own Cydia repository and host your package(s) in there.
Look at iPhone applications in Python for more information.
Come on, just look on eBay for the cheapest intel mac mini you can find. Even a Mac laptop with a busted screen (that you could hook to an external display) would work. You're talking just a few hundred dollars probably and then you can maintain it as her phone/Touch is upgraded.
there's some special meta tags you can put in a webpage to make your web app savable and full screenable to the iphone hard drive. (so it can work offline) Here's an example : http://mrgan.tumblr.com/post/125490362/glyphboard2
There's also frameworks like phonegap that let you access cocoa apis from javascript, but it sounds like you don't need that.
Does your wife enrolled in any kind of data plan? If so, you can simply write a small webapp which runs on some cheap webspace and access it via MobileSafari.
If you need a full grown iPhone application, you better look after one of the first intel-based mac minis on eBay, should be to expensive, in my opinion. And as a plus you avoid the hassle of a jailbreak.