daemon process in iphone SDK 4.1? - iphone

is there any API to enable background process...(in IPHONE SDK 4.1)?

Not in the conventional sense, no. Apple allow a restricted number of use cases, such as VoIP and music, but other background processes are not allowed. This is well documented on the iOS Developer Centre.

Related

How to hide an iPhone App from the iPad's AppStore

I noticed that WhatsApp Messenger [1] isn't available for iPad anymore.
Apple states that "iPad runs nearly all applications, or apps, designed for iPhone and iPod Touch" [2]
Now, I must have missed a memo since I knew that any iPhone App could be downloaded on iPad too.
So we finally get to my question: How to hide an iPhone App from the iPad's AppStore?
Thanks.
[1] https://itunes.apple.com/it/app/whatsapp-messenger/id310633997?mt=8
[2] http://support.apple.com/kb/ht4082
As far as I know, WhatsApp has never been available for download on the iPad. This is because they listed telephony as one of the Required Device Capabilities in their info.plist.
That's the only way that you can get an iPhone app not to install on an iPad. Apple doesn't provide any other way as they want all (most) of the iPhone apps to be compatible on iPads (if the app is not universal it'll just run in the iPhone scaled mode).
Please note that if you require telephony to achieve this, but that's not an actual requirement for your app, it will most likely be rejected on the App review process as Apple don't allow artificial hardware requirements used for limiting device types.

iOS5 - Downloading 100MB in background when app is not running

iOS5 has multi tasking enabled feature.
So, When the app is in background mode, can I download the data in background?
Will apple permit to write such code?
If yes, any examples will be of great help.
You can. You could use one of methods described in iPhone - Backgrounding to poll for events to get 'constat background' for you
But Apple is very unlikely to approve such abuse for AppStore

Can I restrict my iPhone app from being used by iPhone3G's?

My iphone app doesn't run well on the iPhone 3G. Can I make it so users with these models can't download the app? If so, what does a 3G user see when they search for my app in the app store?
Does it appear in the store at all for them? If it does, when are they notified that they can't download the app?
I recommend you use the UIRequiredDeviceCapabilities key in your info.plist. This lets you tell the App Store exactly which capabilities you require instead of which device you require.
If your app "doesn't run well" on a 3G I'll guess it is because of performance and therefore you'd want to require a newer processor. Look into setting arm7 as one of your required device capabilities.
For more info look here:
http://developer.apple.com/iphone/library/documentation/General/Reference/InfoPlistKeyReference/Articles/iPhoneOSKeys.html#//apple_ref/doc/uid/TP40009252-SW3
Make it run better. Or if it's not completely unusable, just let them use it anyway. People with old devices expect them to be a bit slow.
According to the iTunes Connect Developer Guide (which links to the iOS Application Programming Guide), you can't prohibit certain devices. You can, however, require certain features which are only present on new devices:
armv7 is what I'd recommend (older devices are armv6)
magnetometer, because older devices don't have one. Apple might look at you funny if your app doesn't actually use the compass though.
opengles-2, because older devices only support 1.1. Apple might look at you funny too.
auto-focus-camera, except the iPad and all the iPod Touches don't have one. Probably not what you want.
iPhone 3GS uses iOS 6.1.x so if your app support iOS 7+ it will not be able to install on iPhone 3GS, this is the best possible way to avoid download on that device.

I need to work on multitasking in Iphone SDK 4.0

Actually I am looking for Multitasking in Iphone SDK 4.0 and want to run to apps at the same time as it does in Ipod application for Iphone like songs while u can use different apps also. Is there any idea that how to use that feature in Iphone SDK 4.0 beta.
I have tried multiple NSThread but runs on same view or differnt but cant figured out to run 2 apps at same time.
I think the spirit of the NDA needs to be honored, and details, as well as specific API calls or even links to specific docs for 4.0 should not be posted.
At the same time, in my mind, there's some leeway to talk about fundamentals like this question that have been asked in variants again and again here, since there's clearly no harm in setting fellow developers on the right track.
That said, here's my answer: 4.0's interpretation of Multitasking can't run arbitrary third party apps as full blown background processes. You can't keep any code running in the background. They have to conform to certain types of approved services that Apple has chosen for 4.0, based on common app and developer demands.
If you're asking specifically about an app that plays music in the background (similar to a new Pandora app will under 4.0), you want to support the 'audio' background mode, as discussed in the document titled 'Supporting Multitasking In Your Applications' and linked from the 4.0 SDK section of the Apple developer site. This has been discussed in public keynotes, which is why I think it's fair game to give as an answer here.
If you have further questions, and are a paying Apple developer, you can discuss the 4.0 SDK on their developer forums.

iPhone app alert without push notification?

How can I alert a user that they need to do something without using a push notification? For instance, if I have an alarm clock app, how can I get it to ring when it is not already running without using a push notification?
You can't. As of writing, iPhone OS does not support background processes. (There wouldn't be any need for push notifications if iPhone OS supported background processes!) You can alert the user while your application is running using UIAlertView, but once your app is closed, you can't do anything.
As #Henrik P. Hessel mentions, it is rumoured that background processes will finally be supported in iPhone OS 4.0. Rumours also suggest that iPhone OS 4.0 will be previewed at the January 27 Apple Special Event. We'll soon see whether they're true...
That's not possible yet. There're rumors though that multitasking and background processes will be allowed in iPhone OS 4.0. But that's more than speculative.
You can't do it in the official iPhone OS 3.1.2 or lower. As mentioned by others, there are rumors that iPhone OS 4.0 will support background processes, but nothing about that has been confirmed by Apple.
You may, however, develop an application that can alert the user without push notifications if you forgo the officially sanctioned SDK + App Store route, and build applications for jailbreak (Cydia or Rock). There are a growing number of for-pay apps in jailbreak land these days. Of course, this will limit your app's exposure, and will be negatively looked at by Apple, but if you have a niche market (and don't mind requiring jailbreak users) or this is only for yourself/friends, this might be a good direction to go in.