Separate Applications for iPad1-2 and iPad3-4 - iphone

Is it possible to restrict applications to only run in iPad3 and iPad4?
I have an application which has memory leak, most probably on iPad 1-2.
I want to restrict my application.

Answering to your question, that's not possible right now, you can restrict the version of iOS, but not the device.
About your problem, as other people is saying, fix your code because you are leaking somewhere, you get the risk of Apple rejecting it too.
The best way to check it is analysing your code (Product > Analyze), also run the Instruments (Product > Profile) and check the memory leaks.

The best option is fixing your leak.
If you still want to restrict usage of your application you can use the UIRequiredDeviceCapabilities list. add a capability in your plist called auto-focus-camera. This functionality is available starting the 3rd generation iPad.
Keep in mind that this is not the best option
Here is the capabilities list sorted by device

Related

iPhone - app which can not be killed

I am trying to understand, is there any way to develop iPhone app with following conditions:
1) This application should always run in the background
2) This application should not be killable
3) With out JailBreak?
All I am trying to do is want to track my iPhone.
Please help me.
Thanks
It's not clear exactly what you want to do, but one of the cases where Apple allows apps to run in the background is so that they can respond to changes in the GPS location. It's not unkillable per se, but apps do relaunch automatically (I think) if they're killed due to low memory, etc.
See here for the Apple docs.
No, this is not possible unless you are Apple.
No. I'm pretty sure attempting this is going to get your app rejected (if its even possible!). The iOS system has its own ways of managing running applications and will kill apps if certain conditions are met (e.g. unresponsive for a while).
Check out the App State & Multitasking doc.
Your requirements are:
1) This application should always run in the background
2) This application should not be killable
3) With out JailBreak?
Answer:
I think there is no Non-Apple app which has all the three features. I think even one of these feature is nearly not possible.
Also if you say that Photos and Phone and others like Newsstand cannot be deleted, then you need to consider that those are apps of Apple and they have some more capabilities than what they give in Public API's to the developers.
They have some greater access to the iOS and many of its private API's which make them non-deletable.
Hope this helps you.
If you don't plan to release it to AppStore, but rather will sign with enterprise distribution certificate and will use it in your enterprise then you can look at VOIP application for iOS. It runs in the background, system restarts it automatically. I think that's the closest you can get on non jailbroken device.

Memory management in IOS application

I am developing an IOS application and i will submit it the next week the Apple store. but i am not very good in memory management.
I would like to know what are the all tools that you use to remove all the memory erros ( leaks,...).
should i remove all the NSLogs before submit it to the store ?
What are the other things to take care before submit it to the store ?
thanks for your answers
Before submitting to the app store..
Detect all leaks, you can use
a) Leaks (xcode->instruments->leaks).
b) Static analyzer tools, if you are using newer versions of xcode (Build-> build and analyze).
c) Above all , make a thorough check yourselves, that you arereleasing all memory that you are allocing/retaining..
What the need of NSLog in a
distribution build. NSLog helps in
debug..Remove them all..
Run your app in whatever iphone
device you get..Never submit an
iphone app to store without checking
on device itself.
If your app crashed during review,
then it is surely rejected. Resolve
all bugs/crashes before submitting.
A good QC on device is a must.
This checklist might be helpful..
The static analyzer and the instruments will help you detect the leaks. Find and resolve them. Have a look at Memory management it will help to resolve leaks.
In Xcode , Instruments -> Leaks, is used basically to find out memory leaks.
Hope this helps you.

How to check if my iPhone app is hacked/cracked?

I'm wondering if there are some ways to check if my application is hacked?
I mean, I don't really want to prevent my application from hacking, but I would like to list all iPhone (UUID) that use my hacked application.
Check out mtiks. They do free piracy monitoring, but you'll have to re-release your app to the appstore. If you don't have anything setup currently, you're not going to be able to tell who's using it.
Check to see if encryption was removed from you app bundle or any other changes were made.
If you don't prevent your app from being cracked by any different behavior, such as not working, this makes your detection code much harder to find.

What are some good specification/requirements document items for a small iPhone app project?

I'm whipping up a short specifications/requirements document for a small prototype iPhone app project. Describing the basic functionality and behavior is not an issue for me. But, since my mobile application and iPhone development knowledge is very weak, I'm not really sure what else should be in such a document regarding best practices and such.
Example: In my programming world (server side Java), when spec'ing a project for outsourcing, I state that the project must pass static bug analysis by FindBugs.
Example: I understand that there are API calls Apple does not want app developers invoking. These can be cause for having an app rejected from the app store. But I'm not sure how to say that we want Apple's guidelines respected. (I don't even know how to test for that.)
What should I include in a two-page requirements and specification document that is specific to iPhone app development?
These are some points you can mention
1. The application should be developed based on Apple's user interface guidelines
2. There should not be any private API call inside the project which makes the application rejected from apple
3. There should not be any memory leak or excess memory allocation issue during the application running state
4. The application should be supported in all iOS after [your option]. (It mainly depends on the features used in the application)
5. The application should be supported in iOS 4
6. The application should work properly on iPhone 4
Hope this helps
A private API wont be mentioned in any header file or in the documentation so one way to test for that would be to manually go through the source files and search for the functions used in the headers and documentation to see that they are there. It's really not feasable if the project grows but for a small app it could work :)
In addition to the things already mentioned here, I'd add a few more:
The app should work fast, no action should give the user the feeling, the device is doing something
Everything that takes a while should be run in background and even better, be cancelable
Make sure you use animation only where it makes sense but not too seldom. A smooth feeling is most important for users.
These things also imply that you try to minimize application startup time.
There are often tricks to work around performance issues. The feeling a users gets from your application is not how fast it is, but how fast if feels. In my opinion this is the single most critical requirement, besides obvious ones like no crashes etc..
What's the problem with using a private API?
Moreover, I would add that it will be tested on iPhone 3G, 3GS, iPod, 4, all with iOS4 and 3.

iPhone: iPhone application testing

First, Thanks to all for your quick help for any questions asked in this forum.
I just want to know what are the testing tools coming up with Xcode on Mac as i need to test my iPhone application professionally (or) What do you suggest to use debug and test my application using any (or) built-in tools?
Thanks.
The first thing I try is Xcode's "Build and Analyze" menu command.
Next thing is to run Instruments and look for memory and object allocations and disposal. Instruments should keep you busy for quite a while as it can provide you a wealth of information, including network performance and graphics utilization.
When using instruments, the first method you should check is memory allocation and leaks. When your application leaks, it will spike. Click on this leak and then extend the details to find the exact whereabouts of the leak.
However read the documentation on it all first.
Documentation