Location app in background on iPhone 3G - iphone

I'm working on a location based app, which needs to send coordinates to server at a defined interval. It works properly on iPhone 4, even in background(see: iOS HTTP request while in background).
A friend of mine installed it on iPhone 3G with iOS 4.2.1 and after he put the app in background, it was killed by the OS. The app has 3 screens, first is a login screen. After he returns in foreground, the login screen appears again, instead the screen he has left open(which means the app was killed and restarted upon re-launch). on iPhone 4 work as expected.
Why on iPhone 3G the app is not run in background even it is declared as location app("required background modes" is set on "app registers for location updates")?

Because on iPhone 3G, multitasking is not officially available.
(you can jailbreak the iPhone, do some plist hackery and make your iPhone 3G have multitasking, but I suppose you don't consider jailbreaking at all even if you know about it.)

Related

Iphone resolution on an Ipad

We have an app that has been rejected in the review process by the Apple app review people. The cause for the rejection is that the app is not scaling properly when run on an Ipad.
The app was never meant to be run on an Ipad, but there seems to be no point in arguing with them about that.
Apple sent us a couple of screenshots that show our app being run on an Ipad with the top portion of the view cut off. Notice how the app is run in some mode where it looks like an Iphone app and does not fill out the entire display area. When we bring up the app on an Ipad, it fills out the screen and does so without any edges cut off.
Can anyone please tell me how to run the app on an Ipad the way the Apple guys have - Iphone-sized? We believe we have a fix for the issue but we need to reproduce the error and then be able to verify that the fix solves the issue.
(the logotypes in the images are intentionally blurred)
I just went through this myself and here is how I resolved it:
Go into info.plist and see if any of the supported interface orientations are set for iPad. Despite selecting iPhone only, I had iPad supported orientations for four (portrait, portrait upside down, landscape left, landscape right). I deleted those.
I also deleted any reference to the launch screen in the info.plist. My app is pretty simple and there's no preloading of data so I don't really need a launch screen. If you do, you could go old school and make your first VC the launch screen.
I then made these changes in Target-->General-->App Icons and Launch Images
That was the only way I could get it in the sim to run the app at iPhone resolution while running an iPad (iPad2, iPad Air).
If Apple is going to force developers to ensure an app runs on an iPad even if it is made just for iPhone, they should eliminate the iPhone Only and Universal options and just have iPad Only as an option.
To run an iPhone app on an iPad, you just need to:
Acquire an iPad (you can also use the simulator)
Set the target device family in Xcode (it's under your target) to iPhone
Connect your iPad, perform any necessary certificate dances
Run the app on the iPad.
As long as the target device family is set to iPhone, the iPad will show your app in this mode.
Apple is likely running your app on a simulator, not on a real device. Notice the "2X" on the top right. In XCode - you should run the app on iPad Retina Simulator. On the bottom right you will see a button that you can toggle from 1X to 2X.
If you place the simulator in "2X" mode, you will see what Apple is seeing.
What OS are you running on your iPad? Things have changed in iOS 8 - and that's likely why you're not seeing what Apple is seeing. My guess is that your are running an app that was initially developed for iOS 7 or earlier - which means that you need to upgrade from scaled resolution to native resolutions to resolve this issue. Here is how you do it:
How to enable native resolution for apps on iPhone 6 and 6 Plus?

iPhone 5 Launch image and App review

I am about to submit a game app for a review.
Game is built with iOS SDK 6.1 and iOS 5.1 as deployment target.
I currently do NOT have views for iPhone 5 (wide) and
the app is running in a letterbox mode on the IP5 which is fine.
The apple guidelines says that Default-568#2x (IP5 launch image) image is required,
but I get a problem if I include this image - the app is not longer running in letterbox mode and looks broken (content is not centered, appears on the left in landscape).
If I do not include the launch image for the IP5, can I expect problem with app review?
Has anyone recently submitted app without IP5 launch image?
IMPORTANT UPDATE:
Original question is now outdated! Since May 1st 2013 all submitted apps must have iPhone 5 launch image and you cannot rely on compatibility letterbox mode anymore.
You only include iPhone 5 launch image if you are supporting that screen. Not including the Default-568#2x.png launch image indicates that you are implicitly not supporting the screensize of the iPhone 5 and letterbox mode will be applied to iPhone 5 devices running your app.
You will not have any issues on the App Store. That is until Apple decides that all apps must support the 4" Retina screen going forward.
I just got App rejected for not having the -568h launch screen, which it says has been required as of May 1.
You are no longer allowed to submit an app or an update to an existing app without support for the 4" retina display on iPhone 5 and iPod Touch 5. Your binary will be rejected by an automatic scan process before it enters the "Waiting For Review" state.
No, not required Default-568#2x if you want to run your app in letterbox....

Simulating a phone call interruption in the iPhone simulator

I want to see what happens to my application if it is interrupted by a phone call or text message. Is there a way I can test this on the iPhone simulator?
It may not help in your situation (since it doesn't work in the simulator), but activating Siri works in a similar way to a phone call, sending your application to the background and interrupting audio, so is easier to test than making a call. Siri is on iPhone 4S and above, iPod touch 5th gen, and iPad 3 and above. Just hold down the home button if you have Siri enabled.
To expand on Lewis Gordon's answer it also works for devices without Siri. If you have voice control enabled then holding the home button down will interrupt audio and resign active.
Hardware -> Toggle In-Call Status will let you test the in-call UI.
I don't know of a way to test interruptions in the simulator, but as Lewis Gordon points out, you can bring up Siri on a device — even if there's no phone.

Running Iphone App on Ipad

how do you make the Iphone app run as 2X on Ipad automatically?
Building the app as both Iphone and Ipad would require you to build the Ipad from scratch right?
I prefer the 2x mode on IPad, but the build says its only geared toward Iphone. I like the user to use this app for both Iphone and Ipad, and 2x inside IPAD.
Any app built for the iPhone will run on iPad either at default size or zoomed in to 2X size, but you can't control what the user selects.
It is possible to create a universal application where you design an interface for both the iPhone and the iPad within the same app. The alternative is creating an entirely separate app for the iPad.
Whether to run an iPhone app in 1x or 2x mode on an iPad is entirely up to the user. It's not something you can control. If you want it to be fullscreen always on an iPad, you'll need to make your app handle iPads.

Compatible with iPhone, iPod touch and

I uploaded an app on app store just for iphone and ipod touch but on app store write
Compatible with iPhone, iPod touch and
iPad
why? is it necessary that i do something in iphone sdk ?
Don't worry. iPhone (and iPod touch) applications are "automagically" compatible with the iPad. In other words, they can be run unmodified. When executed in an iPad, they are zoomed in order to fill the whole screen.
just leave it as it is. that doesn't mean that your app is universal.
the ipad can run iphone apps.