Xcode for Dummies: Can I simulate an iDevice camera? - iphone

So, is it possible to simulate the iPhone (arguably future iPad) camera in Xcode using the built in camera on my MacBook?
I read some similar posts, but from the answers I feel it was left up in the air if it can or can not...
Thanks in advance!

No, you cannot. There is no camera app installed, and calling the camera related classes normally creates a crash. You can however sync photos to it.
Short answer: Never use the simulator. It's a joke. I think the only reason they put it in there is so that people can fiddle with stuff before they pay 100 dollars for the developer program.

You cannot simulate the camera using just iOS SDK frameworks while staying within the app sandbox.
However, on the Mac Simulator, you CAN reach outside the sandbox and connect to another camera server Mac application or process, which you would have to develop. So it's technically possible using Mac frameworks and processes outside of the iOS environment for debug purposes to get a camera view inside a Simulated but-non-pure iOS app. Not for dummies though...

Related

How can I test game center (multipleyr) on single IOS device

How Can i test game center (multiplyer) on single iPad device. Please give me idea.
Thanks in advance.
To my knowledge this is not possible. You cannot run the multiplayer functionality of GameCenter within the simulator (as documented here: https://developer.apple.com/library/ios/#documentation/NetworkingInternet/Conceptual/GameKit_Guide/GameCenterOverview/GameCenterOverview.html#//apple_ref/doc/uid/TP40008304-CH5-SW16).
I myself just bought a 2nd iOS device for this very reason. On the plus side, having two devices allows you to try out other multiplayer games from both sides, to see how things work.
If you have an iPhone in addition to an iPad, you might be able to develop a single application that runs on both devices, even if for deployment you plan on supporting only the iPad. For example you could detect that you're on the iPhone and run only the functionality necessary to test multiplayer. In my instance, this wasn't feasible, so I just went ahead and bought the 2nd iPad, but I mention it for completeness.
Finally, now that the third generation iPad has been released, you can probably find the first devices used for significantly less than retail.

What kind of iPhone / iPod Touch do I need to test my app?

I've written a fairly basic app for the iPhone, which I would like to test on at least one device and then get it onto the market place.
I don't need a data plan, so I'm considering buying an iPod touch, but I understand it doesn't have a camera, video, compass. While I don't need those for my current app, I might for a future one, nothing for sure there.
My concern about purchasing an iPhone, used or new, is that I believe I won't be able to use it without a sim card unless I jailbreak it. I'd prefer not to get involved with jailbreaking, as I'm unclear how it would my efforts to test the app on the device and/or get the app onto the app store.
If I get a new iPhone, I would have to cancel the contract immediately, and my same concern about the lack of a sim card would apply.
I'd be interested in people's experience with this issue, e.g. starting out with iPhone apps and not having an iPhone, is with this issue.
The newest iPod Touch does have a camera: http://www.apple.com/ipodtouch/
You should be able to test nearly everything you'd need to test on an iPod Touch.
Also, if you want to support older devices, it might be a good idea to also pick up a used, older, iPod Touch on eBay or somewhere, so you can test on a non-Retina display.
I have development going on without an iPhone but is preferred to develop with a device cause you could test your codes once in awhile. iPod Touch 4 does have camera. Anyway i think iPhone would still be able to function properly without a sim card just that you can't call. Otherwise getting an iPad is not that bad, since you can run both iPad and iPhone apps in iPad.
You may want to get the oldest slowest model of device running the oldest version of iOS on which you want you apps to be compatible. This may also be a low cost way to get into testing on devices. If your apps are commercially successful, you will be able to afford acquiring more newer test devices, but the old one may be the most valuable one for app testing purposes.
I have been using my old iPhone 3G for developement, mostly because it allows me to see how my code runs on one of the slowest devices out there.
The phone is not currently signed up with AT&T and it still works fine for development. For data access the wifi works fine without a carrier account. It also has the camera and (basic) GPS/mapping.
I could probably pick up a used iPhone 3G off one of the auction site relatively cheaply.

Can a deactivated iPhone be used for app development/testing?

I'm thinking of upgrading my iPhone 3G and was wondering if I can continue to use it for appstore application development & testing after I do so. I don't want to continue to pay for an additional line and data plan, and I wouldn't be interested in using is as a phone. Would I be able to provision and debug on it? Would it have to be jailbroken?
You definitely can. I'm currently using my deactivated 2G for development. Aside from the 100 Ad-Hoc devices you can test on, you are also allowed to provision a number of phones that you can build directly to, and it doesn't matter if they are deactivated.
as I think, your phone would function the same as iPod Touch (plus Camera). And since you can use iPod Touch for development, so you can also use your deactivated iPhone.

Do we need an iPhone/iPad for its development?

Today i was going through an website and found something over this iphone and ipad development projects. I had a question whether a developer requires an iphone to actually work with or is there any other simulator type device where we can test it out too.
It would be also great if you can share some docs on getting started.
Thanks.
We have applications that run without a problem on the simulator and crash on the device, so I'd say yes. You might delay it for a bit, and work on the main aspects and buy the device later, but you should have it.
You should start at the iPhone Dev center and depending on your knowledge of Objective C, try some tutorials for it. One of the first tutorials I read about Objective C, and which helped me a lot, is here
You can simulate certain gestures and actions while running the simulator: the developer.apple article is here
You can test many aspects without having an iPad.
There are, however, some that you cannot.
Touch
Acceleration sensor
3G internet
much more
I strongly recommend buying an iPad / iPhone to test the user interface. A PC and the iPad have very different user interaction models, it's hard to create a native feeling app without having an actual device.
You can develop with the iPhone SDK which include an emulator. http://developer.apple.com/iphone/index.action but you would probably be better off having one of the devices if your developing a complex application. For working with Camera's or sensors it's best to have a real device to test you code on.
I dont think there are any devices that run the iPhone system. If there are they are probably illegal.
There is emulator build in XCode.
You dont need a device to run your code etc, but try to test the touch and other sensors in the emulator.
So basically if you are planning on shipping something bigger than helloworld you probably should get the Apple device.
There must be an emulator (I'm not sure, that's a guess), but as with any other development you better have a real device as well so that you have better chances of reproducing problems customers will report.
For iPad development you must have Mac OS X 10.6 Snow Leopard

How to test on the IPhone without having access to one?

Want to write a site for the iphone, but I don't have one and I don't know anyone who has one.
Is there a way to develop for it without having access to one, maybe apple has some sort of sim for this or something.
Anyone know of anything?
An iPhone simulator is included with the iPhone SDK, which can be downloaded for free from here:
http://developer.apple.com/iphone/program/start/register/
Or, if you have the Safari web browser, you can use this for a fairly accurate result:
http://www.testiphone.com/ or http://iphonetester.com/
There's a iPhone simulator for Aptana (should work on any system) and an emulator Apple provides (if you have a Mac). I've not tested the Aptana one. The Apple one is pretty good, but it runs most web stuff much faster than the actual device.
Try buying an iPod Touch. It has most of what you need to test your code to make sure it's iPhone ready.
The simulator is available for convenience but you won't be able to check proper HIG such as buttons or text being too small.
For a quick test, try regular Safari zoomed until the dimensions of viewport are similar to those of iPhone. Safari exists for Windows too :) Moreover, you can ask it to present itself as iPhone (in the Develop menu) and try a couple of sites.
For a serious development you definitely need iPod Touch. You'll need to have a familiarity with how interface, both native and mobile web, works. The SDK won't be able to give you that.
I wonder though what kind of application you are developing. I don't think web-based applications are that useful or bring revenue at this moment.
I'd suggest running VM ware booting up Mac OS...
You'll need an intel CPU though but still, worth it.
See here:
How to load Mac OS Lion in a VM