Xcode iOs Simulator - native websites check before going online - xcode

I am downloading the Xcode from the app store to check how my websites will look on different devices. I know how to use the iOS simulator but for websites that are already online. Is there a way to check how a website looks like when i have it native on my mac? I mean when i am at the development stage of the website before put it online, is there a way to check it on the iOs simulator?
Thanks

The simulator contains a version of Safari that can access the outside world via your Mac's network connection. So you don't have to do anything — just type in the address as with any other browser.
You can also drag and drop local HTML content (or anything else the simulator's miniaturised suite of apps can handle) directly onto the simulator to preview without uploading anywhere.

Related

How can I see the view hierarchy in any app download from appstore while using Xcode?

I download and installed some great app from App Store. And I like to see the view hierarchy of the app just for studying.
Is it possible?
How about using a jailbreak iPhone?
It's not possible with Xcode.
But with a jailbroken iPhone you might be able to use Reveal. But I haven't tested it.

Testing apps on a Firefox OS Phone Device

I have the Keon from geeksphone. The Mozilla developer site talks about using the emulator, but nothing about installing an application onto a physical device. It is a developer phone, so I assume there's a way to develop with it? I can host the app and test it in the phone's browser, but I'd prefer trying to package it up and actually install it onto the device.
Found it. Now I need to figure out how to install an XPI file...
Testing Packaged Apps
Android bridge API
Now I need to figure out how to install an XPI file...
XPI files are add-ons, which FirefoxOS does not support at the moment.
You want to install FirefoxOS Simulator addon file which is in .xpi format? If yes then just drag and drop the file onto Firefox Browser, it will get installed.

How to install weinre on mac?

I wanted to debug my mobile web app that would be running on a mobile device or simulator (like iOS simulator). On googling a lot I came across Weinre but could not figure out how to install on my macbook.
I was able to comfortably install weinre following the instructions on page http://blog.joelambert.co.uk/2012/05/17/installing-weinre-on-mac-os-x/ .
After installation, I executed weinre command which started a server on http://localhost:8080. I typed the same on my desktop browser which gave me further instructions. It asked me to copy-paste a script tag (similar to <script src="http://localhost:8080/target/target-script-min.js#anonymous"></script>) into the page (http://myMobApp.local) that I was trying to remotely debug. I did that and opened the mobile app page on my iOS simulator. After it loaded in simulator I open the debug client user interface link (similar to http://localhost:8080/client/#anonymous) that was shown on the instructions page. It gave me a beautiful interface to debug the web app running on simulator.
Short update: though Goje87's answer is perfectly accurate, I want to point out that as of iOS 6, Apple has supercharged Safari's web inspector to be able to inspect HTML pages running within apps on iOS devices.
The advantage over Weinre is that you can even debug JS scripts (breakpoints, watches etc.).
Here's a guide on making this work: http://moduscreate.com/enable-remote-web-inspector-in-ios-6/
EDIT: You need a Mac for this.

Writing files to an iOS device from a MacOS app

I'd like to be able to transfer files from a MacOS app to a connected iOS devices, so a related iOS app can open them - effectively replicating iTunes music functionality, but not for musc. Is this possible? I know you can set an iOS app to have file sharing enables so you can drop files into it with iTunes, but I'd prefer to do it in my own app.
This library came up in another question on SO recently: https://bitbucket.org/tristero/mobiledeviceaccess/ - I don't know anything about it but it sounds like it might do what you want ?

How to limit iTunes App Store "Requirements" listing?

The iTunes AppStore auto generates some listings on its published pages. One of them is "Requirements:" and shows the devices that this app is compatible with. iPod, iPhone or iPad etc.
QUESTION: Where is this REQUIREMENTS listing set during the build process?
I have submitted an app that I 'thought' was properly configured because the Xcode settings for iPhone and NOT iPhone/iPad. But apparently this is either broken or I am totally confused as to where this is set and how its created on the AppStore.
Can someone enlighten me?
If you create an app that is iPod/iPhone only, it will still run on an iPad, just not as an iPad native app. That is to say, an iPhone/iPod-only app will run in an iPhone-sized window on an iPad. I do not think that you can say you want your iPhone app NOT to run on iPad.
When you select iPhone/iPad for your app type in Xcode, that is telling Apple and iTunes that your app binary is a universal app -- built for both platforms.
may be it's done by apple reviewers according to this guidelines limitation
App Store Review Guidelines:
2.10
iPhone apps must also run on iPad without modification, at iPhone resolution, and at 2X iPhone 3GS resolution
... or else it will be rejected.
What's the problem? When you start a project you get to choose whether its for iPhone or iPad or both. When you submit it to apple this is also checked against your iOS build version and other things (normally though if there's a conflict it'll let you know before submission - eg: if you haven't included the iPad icons and your app says that its for iPad too).
In XCode4 theres a nice handy interface now that you can use. If you select your project in the left hand pane and click on your main target in the main window you can select the iOS application targets that your app is for.
In your Project settings Version, Device and Deployment Target are where the iTunes Requirements come from. If you choose only iPhone, then your requirements will inlcude iPod touch.
I believe this is the answer you are looking for:
http://developer.apple.com/library/ios/#documentation/iphone/conceptual/iphoneosprogrammingguide/App-RelatedResources/App-RelatedResources.html

Resources