How do you manage battery health of your development devices when is always plugged in? - iphone

I know this question is not programming related, so for this I made community wiki. Developers are the best guys to answer the question.
I am addressed to those that do development on devices that runs on batteries, like phones, gadgets etc. Probably you are constantly develop for them, and therefor they are always plugged in and charged at 100%. We develop mainly for smartphones and we have devices that were always above 90% charged in the last month or so.
If a battery is always charged, it degrades it life cycle, so what steps you do to ensure decent battery drain to maximize the life of the batteries.

I think you're talking about "battery memory" which affect NiCd batteries. Most devices use NiMH or LiIon, which doesn't have the problem.

Keep it unplugged sometimes. For a laptop, you can use the laptops battery just fine. For a mobile device like a phone, this is a little more annoying because you are trying to upload to it fairly regularly (but not constantly).
Use the spare. Have a 'dev' battery that you use when constantly plugged in. When done developing and ready to show off your new fart widget to all your friends, just swap the battery out.

Here's a good write-up on Lithium-Ion batteries too:
http://www.batteryuniversity.com/parttwo-34.htm

I'm developing for mobile phones so often that i have phones only for the purpose for devloping of them. So I don't care about the battery. And if I'm missing to seen a low memory screen, I use this app, to get the feeling back ;)
I don't really see a problem. If you're really professional you need 1 or even more (e.g. to simulate network etc) mobile phones for the sole purpose of developing. And if you use the phones also for your private purpose, the the battery will decrease anyway during your spare time.

There's nothing you can really do about it.
With some older devices, it was possible to use them with the battery taken out if the charger was in (how most laptops currently work), but this is very rare.
The best you can do is to unplug it whenever possible (there must be times when you're coding for long periods of time or doing other stuff and don't need the device plugged in).
Also, don't charge it overnight if you know it will be in the charger the next day.
Remember, though, many new devices use Li-ion and Ni-Mh batteries now, which are much more reliable than their Ni-Cd counterparts on this front, so you are unlikely to see deterioration as quickly.

To minimize the loss of Li-ion battery capacity over time:
Keep your devices not plugged as long as possible to have minimal charge level.
Keep your batteries as cool as possible.
You can also remove batteries if your device doesn't require them to operate and store them in a cool place.

Related

Does iPhone developer REALLY needs iPhone?

For the sake of coding itself, I know that I don't need to buy iPhone as there's pretty good emulator.
However, as I will develop iPhone apps for clients (will not have direct contacts to clients) via freelancers sites, do you think that I might get rejected (not chosen) by the contractor because I don't have iPhone at home?
Do contractors accept this way of working:
I develop the app, test it in the emulator and send it to them
They test it in iPhone and send me the list of the bugs
I fix the bugs and send them the app back
They find new bugs and...
Yes, or at least an iPod Touch.
To clarify:
Yes. You really need one. Debugging the kind of errors that cause it not to open on the device at all, for example, can be mind-numbingly tedious if you don't have the device handy.
For most purposes, of course, an iPod Touch should do just fine, but the crux of the matter is that the testers can only test what they see; only the developer can actually test crucial stuff, most of the time.
So to repeat. Yes, you'll need a device. A thousand times yes.
Your client may have something of an issue paying money for software that was never tested on actual hardware. No matter how good an emulator is, you should always try the software on the real machine your program will be running on. The emulator will simulate the way the API responds etc, but you could be blindsided by things such as interference from other running applications, subtle timing bugs, interaction between different versions of the firmware or hardware, etc.
In short, I don't think there is a legal reason you have to test on a real iPhone, but from a Q/C point of view, I think there is no question you need the real hardware to run it on.
Paying customers generally dislike being treated as a beta tester.
I don't think that you won't get the clients - but I do think its a terrible idea not to have a device to test on.
There are many things that won't work properly in the simulator. For instance you can't simulate a camera function, you can't simulate GPS (properly - it always sets you at the apple HQ), you can't simulate sound recording, or test with a real contact address book or a real set up. You can't test whether there is an internet connection or if there are any iphone specific bugs.
On the other side of the coin there are loads of things that will work in the iphone simulator that won't work on the device itself. For instance NSXML and such won't work on an iphone, but WILL work in the simulator.
If you can get hold of one of the new ipod touches they do pretty much most things you will need, and you don't have to get into a data plan or anything. I would suggest AT LEAST getting one of those. You can't make apps if you can't test them properly.
Other things:
In app purchases - #Stephen Darlington
Whenever working for clients, the clients do not pay you for having an iphone or not... or being able to test it on a actual iPhone. The clients pay you for the product you deliver. They expect it to work on the device.
My recommendation is to get yourself an iPhone 3, 3gs and 4 if you want the best results. But, if money is a object here... try developing minor projects which are reliable in the simulator. AND ask friends/family which do have iPhones to test it for you on their device. Its better to ask mates to do this, then ask the client, this way you have a better comunication with your client, your client has more faith in you and... well lets face it, it is the developers responsibility to deliver quality code. Right?
There are some tests you cannot perform in the emulator.
And I am not sure contractors will like this ping-pong test approach (somebody will get tired after couple passes).
You can get an old second-gen iPod touch at a very good price since there are many people who would like to get rid of it. And Apple advices to test apps on older hardware to achieve the best performance. So you'd better get something 'hard' to play with.
Another aspect is performance. The simulator (running on a powerful Mac) will be much faster than a device. This was a huge difference with the original first iPhone.
As an alternative to the iPod: look for a cheap original iPhone on eBay or so. But remember that this will not run iOS4.

Submitting iPhone app to app store without testing on a device

I've tested my app thoroughly on the simulator, but I don't have an iphone/ipad/ipod touch on which to test the app. Are there likely to be bugs that dont expose themselves until I test it on the device?
if i had a macbook, id take my code along with me and meet up with a friend or a stranger to test the app, but im working with a mac mini :(
Thanks for the input.
The one major concern is performance. Devices, especially older ones, have orders of magnitude worse performance than Mac mini, both in terms of CPU and memory. It is possible that your app is crazy slow on a device, yet runs fine in simulator.
Other areas to think about:
network connectivity, performance in poor/no network conditions (good way to test in simulator: yank out ethernet/turn off airport... but some reachability code works differently in device and simulator I think, and you cannot simulate mobile-only [no wifi] situation)
As Rengers said, you should get your friends' device IDs and then create a provisioning profile so they can run the test version of your app which you can e.g just zip up and email to them.
You will really want to pick up a device, an iPod Touch isn't that expensive, and you can even get iPhone 3GSs for less than $100 now at some retailers (contract required). The reason for this is that there have been many cases of the simulator doing one thing while a device does another, in addition to the resource differences (both in terms of available cpu time and memory)
Yes, there are bugs that will only show on the device. It depends on the complexity of your app. For a fairly simple application, chances a bug will show up on the device only will be a little lower.
However, I strongly recommend to test on the device. Bugs aside, you can't get a good measure of performance on the simulator. A real devices has much tighter ram and cpu constraints.
If you have a developers account, afaik you can distribute apps to testers. Perhaps someone else with an 'iDevice' is willing to test for you?

Why are iPhone apps so slow?

Something I've noticed about every iPhone app I've tried is that they all have places where they seem very slow and unresponsive. It's true of the games, the free apps, the pricy, popular, "professional" apps, and even a couple of Apple's built-in apps. They all seem to have places where they take many seconds or even a minute to respond to screen touches; bog down and show a spinning beachball for seconds at a time; "queue up" input so that a button press appears to ignored only to actually do something ten seconds later like a poorly made DVR; and lock up for so long that the OS watchdog just kills them.
Because these perf issues are so widespread it seems to me that there must be some common performance pitfalls some system gotchas that are coming up over and over again for lots of different people. I'm not an iPhone developer myself, so I'm canvassing the community's opinions:
What are the most common performance mistakes on the iPhone?
Or, what human factors of iPhone development make it too easy to ship with poor performance?
I think that the performance issues are a matter of perception. Apple has employed animation throughout every aspect of the iPhone's interface, which produces the impression of a smooth, responsive device. The slowdowns you refer to appear much worse than they might be because they stand out from the otherwise fluid interface. If you compare the total execution times of these tasks to similar applications on other mobile devices, I'd guess that the iPhone implementations would still come out near the top.
There's always room for improvement, though, and I'd expect that many of the tricks people have learned in the last year will lead to faster, more responsive applications. Even the development tools themselves are advancing, and that should make it easier to diagnose and deal with performance bottleneck. I know I keep learning new tricks every week for squeezing a little more out of the CPU, GPU, or onboard memory.
I'm still surprised by how quickly people have shifted their expectations as to what handheld devices can do. I'm the author of an open source application called Molecules, which does 3-D molecular modeling on the iPhone. A little over ten years ago, these types of renderings were being done on dedicated SGI Irix workstations. A few weeks after the launch of the App Store, I started receiving emails from people complaining that the application was a little jerky when they tried to manipulate molecules with over 20,000 atoms in their structure. In a very short time, people went from treating these devices like phones and music players to viewing them as portable computers.
Memory management is a bit of a beast.
But I think the biggest problem is this: How long can you afford to polish a product that will sell for 99 cents and compete with tens of thousands of other apps and has unknown revenue potential in a rapidly changing market?
The iPhone is a GREAT little device, but the competition for mindshare is fierce and expensive.
As mentioned before the ratio of profit/time spent in development would explain it.
More technically, I would say that the lag you see is created on startup when apps are either getting data over network or calling home to check for updates and so on. Additionaly it may be created with initializing application like loading large amounts of data from database/files, loading gui components and images, drawing and so on.
Similar to memory management this all can be solved by designing operations to run in background, lazy loading and so on but that requires more time, time is money, you don't get much for 99C app which may or may not sell at all.
It is interesting that so many times it is pointed out in professional articles (no ref...) that we should not care anymore about memory and speed because desktops are getting faster with more memory. What people tend to forget is that at the same we're trying to squeeze more power from smaller and smaller devices that are running with smaller resources.
Most web pages for example are nowadays designed to load huge amounts of animations and images and, unlike some, are not tweaked at all for performance but do just okay on desktops. Those web pages have no chance of loading on mobile device. The same goes for applications, designing a fat big framework (or gui widget library) for desktop will make it ultra difficult to port the functionality to sleek mobile device be it iphone, some fruit berry and what not.
As in other things in life, you get what you paid for.
My 99C.
I think the biggest issue is that it's impossible to determine the speed of an app without actually running it on the device. Developers perform most of the basic app testing in the iPhone Simulator (which can run up to 1000x times as fast in my experience). Some operations that take a split second in the simulator might require a progress indicator on the phone, and by the time you realize, it would require a lot of effort to go back and add (and in some cases thread) the operation in question. As Noshredna pointed out, it's generally a 99c app.
The iPhone's processor is also just fundamentally limiting. I've seen several nice looking apps that try to do very impressive things without accepting the constraints of the platform.
This is sort of a side note, and I don't want to start the mobile platform wars, but I've found that iPhone Apps are generally more responsive than Android apps...
Well, because maybe you deleated the app and install again because something wrong happens to it, so it must took awhile, it took me about 2 or 3 days to get full loaded so be patient, it will come eventually. Also maybe your iphone doesn't have any more spaces for your app, or your app is quite heavy, try and delete other apps so it will have rooms.

Do I have to support jailbroken iPhones?

We're days away from submitting our first app to the appstore and
last night I was horrified to hear that it does not work on
jailbroken devices. I got a few seconds with the device and saw the OS version, and free memory available (36MB, I guess that's low).
Should I care?
Presumably jailbreak users can buy the app and write scathing reviews.
If so and jailbroken iPhones are common, then the iPhoneJB becomes a de facto shadow-platform that I'm obliged to support.
EDIT
I got some ball park figures, sounds like I should care about the new de facto shadow platform. So either I can try reducing memory requirements and cross my fingers, or get out the credit card and go get me another iPhone to jailbreak.
With around 2.3 million jailbroken iPhones, it is a significant portion of the market. I have a jailbroken iPhone, but most of my apps are from the App Store. I vote yes.
This is a similar issue to what many web developers run into: should they support Internet Explorer 6? While as of this writing 14.9% of the market still uses IE6, many web developers choose not to support it because it is difficult and takes too much time. My own experience was that supporting IE6 caused 50% of my work; that's obviously not a good trade-off.
As Jergason mentioned, there are 2.3 million jailbroken iPhones. Obviously that's a large market. But compare that with the 30 million iPhones total sold as of March 2009. You could probably find better numbers to compare, but assuming those numbers are roughly accurate, less than 10% of the market is jailbroken. Look at how much work, money, etc. it's going to take to support jailbroken phones. I don't know how much work it would take, but when it comes to money, my guess is that simply the cost of getting a jailbroken iPhone to test on will be more than 10% of your revenue (iPhone dev tends to be a small-scale operation, but I don't know the nature of your product so I could be way off-base here).
So my vote is neither yes nor no: do the research and get more detailed stats than I've provided here. When you have your information, don't spend a larger percentage of your revenue supporting a segment of the market than that segment is as a percentage of the whole.
Of course you don't have to support anyone you don't want to! Ultimately, as others have noted, it's a business decision.
In my experience, you'll spend a disproportionate amount of time supporting users with jailbroken handsets. I spent more than twenty hours tracking down one problem that only affected jailbroken phones and even then only found the solution entirely by accident.
Having said that, some of my most enthusiastic (or at least vocal!) users have jailbroken handsets.
At the time of writing, about 25% of users of my free version have a jailbroken handset and 10% for the paid version.
In the end I try to support all users but I do put a higher priority on users with vanilla handsets. I'd draw the line at users of cracked versions, but I have no reason to suspect that's the case.
Incidenally, technically you'd be in breach of your iPhone Developer Program agreement if you used a jailbroken handset. And 36Mb sounds like a lot of available memory for anything other than a 3GS.
The accepted answer to this question seems fine, but I thought I'd add one more (technical) issue to consider.
If you don't at least test your app on jailbroken devices, you may not be aware of some security vulnerabilities. If your app contains any kind of sensitive information, you might want to make sure it can't be easily accessed on a jailbroken device. This might include protecting users' data, or protecting the corporate data on the back end.
Jailbroken phones allow a user to ssh into the phone, and browse any file on the filesystem. The sandbox is nullified (App Store apps will still be limited to their own sandboxes, but non App Store apps will be able to read and write the sandboxes of other apps, including App Store apps).
NSUserDefaults used to store sensitive information, for example, are easily exploited on a jailbroken device.
Even the keychain can be subverted on jailbroken phones.
It would be nice if you didn't have to worry about this, but at least through iOS 6, you really do need to worry about it. So far, Apple has not been able to (or maybe doesn't want to) completely prevent jailbreaking, so it's a real-world vulnerability. Ignoring it is probably not doing your clients or users any favors.
Do your market research. Do you expect to sell to alot of users with jail broken iPhones? Then you need to decide how important that revenue is to you...

Is it possible to develop for the iPhone without an iPhone?

I know there are emulators, but is this good enough? If someone is serious about iPhone development, do they absolutely need an iPhone?
Just my personal opinion: if you're serious it means that you're committed to quality of your product. If you're committed to quality there is no way to deliver a product without actually launching it on the target platform :)
As noted in other posts you'll have tough time testing the multi-touch screen and other aspects of the hardware on your emulator.
Don't forget that most types of iPhone apps also work on the iPod Touch, which is a one time cost and no monthly fees. Even network apps work if the iPod Touch is connected to WiFi.
During development of my first iPhone app, I wrote code that worked fine on the iPhone Simulator, but which did not work on the device. So I would say "Yes, you definitely need to test on an actual device."
The simulator is not an emulator. It is not running the actual iPhone OS; it is running a set of Mac OS X libraries that are very similar, but not identical, to iPhone OS. The simulator is great for debugging and saving time during the code-and-test cycle, so you will use it a lot more than the device, but a device is indispensible.
You really do need to touch-and-feel your app on a real device. A UI that works great while pointing and clicking with a mouse might be terrible when used with thumbs and fingers. If there is any text entry, you need to feel how painful it is to type using the onscreen keyboard, to determine whether it makes sense to provide alternative data-entry methods.
There are also significant performance differences between the simulator and actual devices. You need to test with the oldest (slowest) device you want to support to verify it is not too slow, doesn't run out of memory, etc.
As others have suggested, an iPod Touch is also sufficient, so the cost of a device isn't huge. Also, try to find beta testers with a variety of different models.
Necessary: How the app handles in your hands is critical to something like the iPhone. you cannot tell how it will feel to use when plastered straight in front of you in the emulator on a big screen.
If you cannot hold it you won't be getting the true user experience.
If you need to learn Obj-C, go with the emulator for a while until you learn the ropes and save the expense for later. But yes, eventually you will need an iPhone for final testing. How long you can wait will depend on the features that your app uses, If all you are doing is button presses, you can wait a long time. If you are dragging, using location services, etc., you'll need a device earlier in the development cycle.
Are you trying to convince yourself or your boss? ;-)
I'd say you need one. Emulation of such a new device can only go wrong. Plus don't forget the tactile aspects.
The iPod touch is a reasonable substitute provided you are not using:
GPS, BlueTouch or Camera - the iPod touch doesn't have these
Cellular network - although the iPod touch has WiFi, the latency of a cellular network is way way higher than that of a wifi network. If you are doing anything like designing a custom protocol for your application, you will want to check real-world performance - and if you do this too late in the development cycle, you will be in for an unpleasant surprise.
Whether you develop on the iPod touch or on the iPhone, you absolutely must have a device. This is not optional! The simulator is good, but it is not perfect, and there is no substitute for having a device which correctly indicates performance, screen resolution, brightness, form factor and all the other factors that you will need to consider in your application.
If you buy an iPod touch, you will probably end up getting an iPhone too. I'd just go straight for the iPhone. That way you can use it as your main phone, and get a real feel for how the platform behaves and what an application needs to do to make it great.
Kind-of "yes".
Just download iPhone SDK (it's easy and free) and check out the emulator that is in there. You'll see whether that suits your needs or not. The emulator is not indicative of real hardware performance, there's no touch input, some quirks might be different, some things can not work, etc.
The iPhone Simulator makes it easy to test your applications using the power and convenience of your desktop or laptop computer. Although, your development computer may not simulate complicated touch events, such as multifinger touches, the Simulator lets you perform pinches. To perform a pinch, hold Option while tapping on the Simulator screen.
I'd say it depends on the kind of application you are developing. For a successful iPhone app, one which is properly integrated on the system, you are going to need to be able to test your tactile interface. That's hardly accomplished with the Emulator.
So, my answer is Yes, you do need an iPhone to develop iPhone apps. Fortunately, if you cannot afford one, an iPod Touch (200 bucks) is a very competent replacement. The underlying hardware is pretty much the same.
Necessary. If you plan to develop a successful product it needs to be one the end users (not just the developers) find easy to use.
The best way to do that would be to load your app on an iPhone then take it to various people and ask them to use it while you watch them to see if they experience any issues.
Users can get mighty creative in trying to do things a developer never intended - just ask any support tech.
Unless you're app is going to sell for less then $500 total it's a relatively small investment to build a quality app.
If you are serious about development, an iPhone (or iPod touch) is a must. However, the official SDK comes with a very complete "iPhone simulator". This will allow you getting a feel for Objective C and the entire development workflow. The SDK requires Leopard.
You don't need a Mac for this. You can use OSX86 on your PC, either installed on and booted from disk or through VmWare.
It works. In fact, you can even synch the iPhone through Leopard running in vmWare.
Now, testing on a real iPhone is a necessity because of performance, memory usage etc. Also you need it for the entire authentification procedure, getting the keys etc. (if you want to sell your stuff on the Appstore), testing this really requires an iPhone.
If you buy an iPod touch, you will
probably end up getting an iPhone too.
I'd just go straight for the iPhone.
That way you can use it as your main
phone, and get a real feel for how the
platform behaves and what an
application needs to do to make it
great.
I absolutely agree with this.
If you are seriously developing an iPhone application - for fun or for profit - you will have to run it on a real iPhone to test out compatibility and usability at some point. Since you going to have to get one at some point, you may as well get one now. Don't go for half measures. An iPod Touch may be [significantly] cheaper to start with, but will be money wasted when you go and get your iPhone. (Of course, if you are planning an app that runs on the iPhone as well as the iPod Touch, then you MUST test it on both. You cannot assume that if it is good on one it must be good on the other).
Also, by having an iPhone from day one, you can familiarize yourself with its user interface, its norms and the common metaphors the apps use. That will heavily feed into your own application design process, and make sure that your app looks, feels, and works like a first class iPhone citizen.
From experience developing on other mobile platforms, once you get to a certain point, it really is best to have a physical device to test on. If this is something that you would also be using yourself, if it much easier to get some real world type of testing by using the application out and about.
I also think it helps one to understand the platform better by having the device or devices you are targeting with your app,
if you are going to develop native apps for the iphone, I would say get an iphone or ipod touch to target. emulators are good, but eventually you will need to target the real thing. if you are developing web specific content there are lots of things you can do without it (there are some great dev videos free from apples dev site which will only cost you a sign up) but eventually I would think you would still want to test with the real deal
Get a cheap used iPod touch, develop, get money, buy an iPhone 5.
I'm a nokia dev now, I'm thinking of going to iPhone, Actually I have the Mac to work, just the device itself ;)
I've tried iPhoney and compared to my iPhone (Mark 1) it's not the same, it's close - but not close enough to rely on if the interface is of importance to you.
You absolutely need the real device. The performance difference between the simulator and the actual iPhone/iPod Touch hardware is huge. Code that will run nice and fast in the simulator can easily turn out to be too slow to be usable on the real thing. Also the API provided by the simulator is not 100% identical to the real thing, so code that works fine in the sim, may not work on the device. The only way to know for sure is to test often on the actual device.
As others have mentioned, the iPod touch works well as a development device. So if you don't need any of the features of the iPhone, it's a good, cheaper, alternative.