Two part question about submitting bluetooth-enabled apps for the iPhone - iphone

I have a couple questions about submitting blue-tooth enabled apps on the iPhone.
I want to first say that bluetooth is merely an option in the application. The application does not completely rely on bluetooth as there are many modes the user can go in.
First, do they require you to have the "peer-peer" key set in UIRequiredDeviceCapabilities even if bluetooth interface options can be disabled or hidden for non-bluetooth enabled devices? Basically, it's just an OPTION in the game and there are many other modes the player can play.. Does Apple not allow you to do that? I'm just curious, because it seems like something they would do.
Adding to that, how do you check for it's functionality at runtime? In essence, how do you check UIRequiredDeviceCapabilities at runtime. I'm aware of checking iPhone device types, so would that be a proper way of going about it?
I'm also sort of unaware which devices can run bluetooth gamekit, there doesn't seem to be a proper reference at the SDK site, or I'm unable to find it.
Thanks for reading!
[edit] I can confirm the existance of somebody rejected for submitting a bluetooth enabled app which didn't work on a iPhone 2G.. Of course, they didn't say if that was the MAIN function of the app, though.

For devices that do not support this capability, see the Game Kit Programming Guide:
Bluetooth networking is not supported
on the original iPhone or the
first-generation iPod Touch. It is
also not supported in Simulator.
If this is an optionally-enabled feature, you might be able to get by with disabling it for the appropriate devices by detecting first-generation iPhones and iPod touches using code like Jeff LaMarche's UIDevice category. If you hide this option when running on unsupported devices, if a reviewer happens to use one of those devices they won't even see that there's something nonfunctional.

Related

Change compatibility of submitted app from universal to iPhone only

My app that I submitted yesterday to the App Store had to be compatible only for iPhones because that is how I already set it to like this.
Now I saw that on iTunes on my app it says that is compatible with iPhone, iPad and iPod and it really should be only iPhone.
I tried to solve the problem with adding the element telephony to the array Required device capabilities in info.plist like this.
Will that make in iTunes to say Compatible with iPhone only and not allow installs on iPads and iPods ? If not how can I solve the problem ?
Yes, that should do it according to this other stack overflow post:
How to Restrict the iOS app only for iPhone excluding iPad?
Essentially there's no way to restrict apps by device unless the device doesn't have a feature you need, in this case, the ability to make calls (telephony).

Prevent iPhone app to run on iPad

I'm shipping two binaries; one for iPhone/iTouch and the other for iPad. It's the same application.
Will Apple ensure that the user will never receive an iPhone version of the app on the iPad? If YES, then I don't have anything to worry about, but if not then I do have a problem.
The reason I ask is the iPhone application will simply not work correctly on the iPad because the server knows it's an iPad and will deliver the iPad HD content to it and the iPhone cannot handle that. I would rather not hack my application to send the server a fake device type if running the iPhone app on the iPad in order to receive the correct resources.
Suggestions?
I've been looking for this for a while because I couldn't prevent the iPhone app to load on the iPad. Searched a bit to understand why this was happening, followed #hotpaw2 instructions and found this on the official apple store rules:
UPDATE:
2.4.1 To ensure people get the most out of your app, iPhone apps should run on iPad whenever possible. We encourage you to consider
building universal apps so customers can use them on all of their
devices. Learn more about Universal apps.
https://developer.apple.com/app-store/review/guidelines/
The SDK and/or App store rules prohibit you from preventing an iPhone app from running on an iPad in 1X or 2X zoom mode, unless there are other requirements listed in the app plist. Apple's app review is known to test iPhone-only app submissions (unless there are other requirements) on an iPad, and reject the app if it doesn't run properly.
Other requirements (as listed under UIRequiredDeviceCapabilities in the app's plist) might include your app requiring telephone capabilities (or healthkit, etc.), which might help you temporarily, but still won't prevent the app from running on some hypothetical future iPad product that includes telephony capabilities (and/or healthkit, etc.).
Actually you can.
Add telephony to UIRequiredDeviceCapabilities in your plist file.
But i really not recommend it and maybe you could get rejected because of gratuitously using this property.
I think you should handle that there are iPad versions and iPhone versions on iPads, use the second one as an iPhone.
Also don't forget that retina iPads will use upscaled applications at retina resolution while none retina ones use the standard resolution. And this behavior can tweaked using jailbreak tweaks like RetinaPad and FullForce.
In the plist settings, add Application requires iPhone environment and set the boolean to YES

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.

Do I have to check LSRequiresIPhoneOS in order to find out if camera is available?

In my Xcode project there is Info.plist file in resources. It has an attribute like this:
LSRequiresIPhoneOS
So my question is: do I have to check that? What I want is that my app finds out itself weather there is a camera or not. If not, the feature is disabled, and if yes: Cool! It must work on both iPhone and iPod Touch!
I guess that if I disable this in Info.plist, I can still use iPhone features, and Apple will not refuse my code because of that, right?
You should leave LSRequiresIPhoneOS checked (which is the default value). This does not prevent the app from running on the iPod Touch. It may seem confusing, but in this case "IPhoneOS" is referring to the OS that runs on both the iPhone and the iPod Touch (assuming the user has installed iPhone OS on the Touch so that it can run 3rd-party apps).
Regarding camera usage, you can use something like the following to specifically see if the camera is available:
BOOL isCameraAvailable = [UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypeCamera];
This kind of approach--checking for specific functionality--is usually better than using the iPhone OS version or hardware model.