• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: My app thinks it is a phone. Why?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: My app thinks it is a phone. Why?


  • Subject: Re: My app thinks it is a phone. Why?
  • From: "Gerriet M. Denkmann" <email@hidden>
  • Date: Tue, 08 May 2012 09:14:40 +0700

On 8 May 2012, at 01:08, David Duncan wrote:

> On May 5, 2012, at 10:15 PM, Gerriet M. Denkmann wrote:
>
>> My app (iOS 5.1) has a xib called MainWindow.xib which does NOT contain a window, just two objects, one of this is an UIApplicationDelegate.
>>
>> This UIApplicationDelegate has:
>>
>> - (void)applicationDidFinishLaunching:(UIApplication *)application
>> {
>> 	NSLog(@"%s %u",__FUNCTION__,[[UIDevice currentDevice] userInterfaceIdiom]);
>> 	...
>> }
>>
>> When I run this in iPad 5.1 Simulator, it prints "0" = UIUserInterfaceIdiomPhone.
>>
>> Why does this thing delude itself being a phone?
>>
>> (This was an iPhone project, which I am now trying to make universal).
>
>
> Are you sure you've configured your application to target both iPhone and iPad? Check that the Project and Target levels match and say the same thing.

You are absolutely right: it turned out to be wrong settings:

1. Target → Info → Application requires iPhone environment was YES
2. Bild Settings → Deployment → Targeted Device Family was just iPhone

The first one I found early, the second one many hours after asking the list.

I think this is a general Xcode problem: starting with the right template everything is very smooth.
But changing directions later (like iPhone only to universal, or non-document-based to document-based) is kind of difficult - there are so many settings which may or may not be relevant.

It would be rather nice if Xcode allowed me formulate a wish (like "This project should be universal") and it answered with a list of things which must be (or probably should be) done:
Like: "Targeted Device Family must be changed to iPhone/iPad" and some buttons: "Show me" and: "Please do it for me".
Followed by: "Read more about this in the xxx-Guide" with a helpful button: "Open in Browser".

Such a list probably cannot be exhaustive (even if following all suggestions, some problems might remain) but it would very helpful indeed.


Kind regards,

Gerriet.


_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden


  • Follow-Ups:
    • Re: My app thinks it is a phone. Why?
      • From: David Duncan <email@hidden>
    • Re: My app thinks it is a phone. Why?
      • From: Alex Zavatone <email@hidden>
References: 
 >My app thinks it is a phone. Why? (From: "Gerriet M. Denkmann" <email@hidden>)
 >Re: My app thinks it is a phone. Why? (From: David Duncan <email@hidden>)

  • Prev by Date: Re: inconsistent behavior of NSString's localizedCaseInsensitiveCompare
  • Next by Date: monitoring changes in a local property
  • Previous by thread: Re: My app thinks it is a phone. Why?
  • Next by thread: Re: My app thinks it is a phone. Why?
  • Index(es):
    • Date
    • Thread