Is there a performance hit on development-enabled iOS devices? - iphone

Here's my situation:
I've got a personal iPhone 4 that I use day-to-day, and I was thinking of using it for development.
If I do enable my iPhone for development, will there be any noticeable difference with regards to the performance of the device?
Thanks

Not significantly. If there's any diagnostic information that needs to be collected, it's crash logs, which are already generated on a regular basis by all devices from day 1. When you enable your device for development, Xcode just collects information about it once, presumably to know how to decide how to work with it as you build and test your apps.
You may have debug versions of your apps on your iPhone, but I seriously doubt they will affect OS performance. Even if they do stuff that causes them to slow down it should only happen while their debuggers are running.
Anyway, when it comes to using your personal device for development, I am sure there are other, more important concerns than performance.
Anecdotally, my white iPhone 4 disagrees that it was "violated" in any way by Xcode. In fact it seems pleased to work with it. But that could be just because it knows a developer owns it, so it gets itself in the testing mood.

I think the performance difference is minimal. All iOS devices in our house are enabled for debugging (because I like to try out my apps on all sorts of devices) and I haven't been able to tell the difference.
But it might be something personal, something you would have to try for yourself. Just make sure you make a backup of your device, before enabling. If you think it slows down your device to much, just restore to the backup.

Related

memory-leak happens when running on physical iOS device

When testing my app, everything runs fine on the iOS simulator, but I experience memory leaks when running the same app on a physical iOS device. I am new to developing iOS apps and I know that are many potential reasons for this. I want to know why things are different between the simulator and a physical device and if there is a way to solve my memory leak issue?
I would suggest you go through the tutorial below. It will help you a lot to understand how to debug your memory problems and other issues.
My App Crashed – Now What? 1/2
My App Crashed – Now What? 2/2
hint: your problem can be solved with zombie objects; but I advise you to follow the tutorials first.
I'm surprised that you have a leak in your device and not in the simulator. How did you conclude that? Both could be leaking, but the problem is just being manifested differently on the different platforms or simply encountering the problem more quickly on the device than the simulator.
If you have a leak, I'd suggest two things:
Run your code through the static analyzer (select "Analyze" from the "Product" menu in Xcode). Newer developers tend to ignore this incredibly useful tool. I know that I finally mastered my Objective C memory management techniques only after going through the analyzer results and really understanding (and resolving) each and every issue in a really big project I had. Anyway, if you're getting any warnings there, you really should fix them, as they're often indications of memory management problems.
Run the program through the profiler. See the Finding Leaks documentation.
Yes, there is a difference (sometimes an annoying large one) between the simulator and the device. This is because the underlying hardware of each is quite different. Obviously the simulator is simulating the iOS hardware, but that doesn't make it foolproof. With certain APIs and frameworks, things may ONLY work on the hardware, and sometimes bugs will occur on the hardware that didn't occur on the simulator. Just think of it as the "adventure" of iOS development.
As for resources, I'd take a look at #Arab_Geek's links, and also Apple's Tools for iOS Development - specifically Instruments, like Leaks.

Is it a bad sign that an ipad app runs perfectly on the ipad but not in the simulator?

i've been developing an ipad app for quite some time now, all the previous versions run perfectly on both the simulator and the Ipad, but the newest version which is a major revamp of the app, runs super smooth on the ipad but has a lot of issues on the simulator (images not appearing, etc)
Is this a bad sign? Should i wait to make it work on both before submitting?
Thanks!
I would suggest that you be sure to test it on both versions of iPad and as many OS versions as you can. Be sure that you are running the same OS on both simulator and iPad (As I see in the comments that you say you are). Just to rule out any problems with using code that is incompatable with older OS's.
In general though, if your app is running fine on the hardware you shouldn't have anything to worry about. I would be much more concerned if it was the other way around.
It is almost always bad when an app does something you did not expect or design it to do. If you designed the app to run on both the Simulator and the iPad, and it doesn't run on one, there is possibly something seriously wrong with your design that could do other unknown things during app review, or worse, on many app user's devices (leading to lots of 1-star ratings).
Therefore you should figure out why something is going wrong, and preferably fix it (or at least understand what's happening well enough to determine how it will behave on your customer's iPads).
Some other suggestions:
make sure that both device and simulator are using the same internet connection
uninstall your app from simulator and device, and run clean on your project, and then do a fresh install

iPhone - is a unlocked iPhone indistinguishable by Xcode

My question is: is a unlocked iPhone treated the same way by Xcode? or in other words, can one develop using a unlocked iphone without any problem? When I say unlocked I mean not the official way.
I ask this because I have the possibility of beta testing my apps with some friends and some of them use jailbroken iphones and some just unlocked their phones on an unofficial way. I would like to know if it will be trustable to have these devices testing my app.
I think Xcode does not realize that, it treats all devices as not jail-broken.
The only difference you might see is (depending on the stuff you have installed in your jail-broken device) you will get many messages in the console.
I remember once I installed winterBoard and I was getting many many debugging messages about it. Messages not regarding my code!.
Regarding permissions: many things are different. So, you should test at least once you app on a not jailbroken device.
I think it all depends on how you went about jailbreaking and how much you've changed the system. Obviously, there's a difference between unlocking and leaving everything else untouched compared to replacing large parts of the OS.
However, I'm sure there are folks who can go into far more detail.

What are the potential issues of jail-breaking to test the new background APIs on a 3G?

I've registered/paid for the iPhone developer program, which allows me to test apps on a device. I have an old 3G that I would like to use. However, I'm interested in using the significant change notifications as well as it working in the background.
If I were to jailbreak to enable background processing and things like that, what issues could I have, and how likely are they to arise?
EDIT:
I actually do have an iPhone4, but I'm using it for my personal phone. I've heard that it's not to great of an idea to use your everyday phone as a development device. I've done a little more reading, looks like I could use Ad-Hoc distribution to test while avoiding the problems of using your primary phone as a development device. Seems like the only downside of this would be no debug info, other than logs.
iOS 4 has been hacked to allow home screen wallpapers and multitasking on iPhone 3G. (http://pixelatedgeek.com/2010/06/ios4-jailbreak-and-multitasking-now-available-for-iphone-3g/)
It seems to be running fine without any issues, probably not as fast as an iPhone 3GS or iPhone 4.
Just be careful if you use this as your main testing device and make sure you test on supported hardware before releasing. Personally, I'd use something that was 100% supported to be sure everything worked as expected. However, if you don't own a supported device this may not be possible.
Again, make sure you test on friends 3GS or 4 before releasing. I don't foresee any major issues, but testing features on hardware that isn't officially supported could cause problems.
Update: I've used my phone for development purposes before and haven't run into any earth shattering problems. If an issue comes up you can always restores your device.
If you are planning to target iOS4 you really, really really should spring for an iPhone4. You can understand how things will run on it, and also be able to see how the higher resolution display interacts with your app. I'm not sure running iOS4 on a hacked 3G will tell you much more than running in the simulator, and in fact because of the reduced memory may show some issues that just do not occur on real devices.
One other great option is a recent generation Touch. Although it doesn't give you the display to check against it is a good test platform for multitasking.

Will you publish your app without device testing?

me and my friend develop iPad application (a lot of CoreGraphics stuff). But we can't find an agreement. I tell him that testing on device is essential, he tells me that testing on iPhone 3G/3GS will be enough (I have both devices). Can you tell me, probably we really can test our app on 3GS? The main thing is that interface will be iPad designed, so I even not sure how we'll do that...
UPDATED: It is iPad only software, UI is designed for 1024x768
For a high quality product, you have to test on the device. The performance of the iPad is different, and if you have any interaction which involves threading, that can lead to race conditions that you might not find on the iPhone (slower) or the simulator (too fast). I've also seen a number of students run into memory issues that they didn't find on simulator, but that they discover on device.
This doesn't mean you have to buy a device - you can either solicit a friend with an iPad to be a beta tester, or you can lurk in a Starbucks or Peet's. You'd be surprised how many people will bring in iPads, and how many of them are willing to try out a new application.
You can use the simulator, but that's not enough. It is essential that you test your app on an actual device, because the performance on the simulator is vastly different than the device.
If you don't have the money or the iPad isn't available where you are, then ask someone who has one to be a beta tester.
IMHO testing on the device is one of the first rules of developing for a mobile platform.
Apple strongly recommends you test on device before releasing. The iPad and the iPhone are running two different versions of the OS on two different hardwares. Some functions are not really emulated on the simulator. You're asking for trouble.
On the other hand, if you don't have an iPad and you need to ship, you can always roll the dice.
We've ended up having it fail on different devices. Being a small company (about 30 people), we have quite a few different iPhones floating around. Even though we have pretty much every version covered, we still don't cover all releases of the OS. We've caught several bugs internally but there still seem to be some that happen out in the wild that just require different hardware/software configurations. In short, test on as many as possible, but it is very unlikely that you will ever be able to test on all software/hardware combinations.
I'd recommend having the latest iPhone, one that is one or two generations old, and probably the same for the iPad (when it ends up having older hardware versions), but DEFINITELY have both one iPhone and one iPad (and maybe even an iPod touch).
Use the iPad simulator in the iPhone SDK 3.2.
While the performance level can vary, so it certainly would be best to test on the actual device, don't let it be a barrier. You can use the performance analysis tools in the SDK to find problems.
You might try a beta release anyway.
Not a must but highly recommended. I cannot imagine what is worse than someone reports a bug but you have no way to confirm it's true or false. The iPad is faster than 3Gs generally speaking. Of course, your partner may have a "time to market" concern. So, there is no fix answer to this question.
It can be done but is not recommended. I had a iPad app in the store on April 1 before the iPad was released on April 3. It had been tested on real iPhones and the iPad simulator in the SDK. I don't recommend it but there was no choice at the time.
If the performance is acceptable on an actual iPhone 3G, it should be fine on the iPad which has a faster CPU.
You can test your application on simulator. but it is not enough to upload your application on app store because some memory issues generated on device which cannot be produced on simulator. So, better to test your application at least once before uploading on app store. You have to also check your application under performance tools like "leaks".