iPhone app alert without push notification? - iphone

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.

Related

Close other multitasking apps with our application with code - iPhone

I want to close other application running background with my app
how can i do it?
not possible
...unless your are programming in a jailbroken iPhone
You can request the user (who is in control of their device) to kill background apps manually and/or reboot their device. Which is not a good user experience, even though I've seen this request on some game app support forums/FAQs.

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.

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.

Developing for Appstore using jailbroken iPhones

HI,
I am new to development for the I phones and got the iphone from USA which is locked to at&t, i have successfully able to develop the apps on it, while it is not unlocked, now i want to unlock it so that i can use it with my local network and also wants to continue the development on it, so is it possible to continue the development on the jailblroken phones for the app store, and what problems may i encounter.
As long as the application is developed using accepted Apple practices (using the official iPhone SDK, and not open-toolchain or something like that) and does not use any private APIs, you should not have any trouble submitting an application just because you tested it on a jailbroken (or carrier unlocked) phone.
To be 100% accurate, jailbreaking and carrier unlocking are against the developer agreement, but I can't really imagine the circumstances that would lead to you being caught.
I have a first generation american iPhone that is jailbroken and works with my local network.
I had no problem deploying a self made app to my phone.
At the time writing I have iPhone OS 2.1.
I haven't yet gone through the process of submitting the application to AppStore.

What can I do with an iPhone and no service?

I'm interested in developing software for the iPhone camera, but I don't currently own an iPhone and don't really want to pay for service. If I were just doing general app development, I'd probably just pick up an iPod Touch, but the Touch doesn't have a camera.
I know I can walk into the AT&T store, buy an iPhone and immediately cancel service. But what can I do with the resulting iPhone? Can I:
... develop apps for it using the native SDK?
... download apps from the app store (over wifi)?
... use it for everything that I can do with an iPod Touch?
More generally, is this just a bad idea for some other reason?
You could jailbreak it and use it on a non-standard plan and pay less money.
You can still develop on a phone after it's jailbroken. You can also still develop on a phone after it has been unlocked. The difference is important:
Jailbreak: You can install applications not available in the app store.
Unlock: you can run the phone on other networks besides it's default carrier (AT&T when in the USA).
Note that you cannot at this time unlock an iPhone 3g running 2.2.1, which it almost definitely will be if you buy it new. You can jailbreak both iPhone and iPhone 3G.
Also be aware that if you buy a new phone, AT&T will charge you $200 to get OUT of your new contract. I think that goes down by 10 or 20$ each month, so that after a year, it's considerably less costly to get out of the plan.
What I suggest is buying a first generation iPhone on ebay or craigslist. First generation iPhones can all be unlocked, irrespective of whether the previous owner put 2.2.1 on them. Also they are much cheaper, have the camera and are totally fine for software development. I was able to find decent first generation iPhones in Seattle just 2 months ago for about $250 - $350 dollars depending on details. Unlocking/Jailbreaking takes a matter of minutes with QuickPwn, and the phone works great as a development platform.
I believe your iPhone must be activated to be used as a target device in xcode. While it would be activated after purchase you would have problems if you cancelled your account and then needed to restore it at somepoint.
If you do wish to support the camera its possible to develop on an iPod Touch - the mechanism for taking a photo is identical to selecting a picture from the library, you specify the source (camera/library) and the rest is handled by the OS with your code receiving the final picture.
If your app is going to be very camera-centric you should invest in an iPhone, but if it's for minor functionality you can probably get by with a touch.
I believe your iPhone must be
activated to be used as a target
device in xcode. While it would be
activated after purchase you would
have problems if you cancelled your
account and then needed to restore it
at somepoint.
No it does not. You can jailbreak to start and it will work fine.