iOS application targeting iPhone still opens fullscreen on iPad? - ios

I am developing an application with Phonegap/Cordova which should target iPhone only. I set Targeted Device Family on the project settings accordingly:
However, when I run the application on the simulator, or on a test device, it still keeps opening fullscreen on iPad, while I thought it should display in a small window at iPhone resolution.
Any suggestions on how to fix this problem?

XCode's "Target Settings" were overriding "Project Settings".
More details on this matter here:
XCode Edit Project Settings vs Edit Active Target

Actually, I've had this same problem. The fix was pretty much the same as yours but I'd like to elaborate a bit on that.
Using Xcode 4.5.1:
Go Project navigator
Click top item (This should be the name of your project, saying something like "1 target, iOS SDK 6.0)
Click on your app name under "Targets"
Then, under the tab "Summary" set the "Devices" value to iPhone (or iPad, or whatever you wish)
Then click on your app name under "Project"
Click Build Settings
Scroll all the way down to the "Deployment" section and select the proper value for Targeted Device Family EVEN WHEN IT'S ALREADY CORRECT!
That did the trick for me. I had to "confirm" that setting again and then my trouble were over. I've seen an experienced iOS dev do that thing too a bunch of times and I thought it was a tick :) Turns out it actually has an effect sometimes. I guess the config isn't always in sync with what Xcode shows.

Related

Itunes connect device famly, only submit for iphone

I want my app to only support iphone/ipod. Yet for some reason itunes connect still thinks I'm submitting for Ipad as well. If you noticed below I have my device family set properly to 1 for Iphone/ipod.
Whats up here? Am I missing a setting in xcode?
Can you please share your deployment target screen?
https://developer.apple.com/library/ios/documentation/IDEs/Conceptual/AppDistributionGuide/ConfiguringYourApp/ConfiguringYourApp.html
To set the target devices
In the project navigator, select the project and your target to display the project editor.
Click General and, if necessary, click the disclosure triangle next to Deployment Info to reveal the settings.
From the Devices pop-up menu, choose iPhone, iPad, or Universal (to target both families).

Xcode 7.2.1 only shows 'Generic Device' when I want to run my app, instead of the list of iPhones and iPads

I am a beginner in Xcode and I just updated it to 7.2.1. Before I did this I never had a problem with running my app, but now it only shows me 'Generic Device', instead of the regular simulators I use. Anyone know how I can solve this?
Sure, you can add any simulator you like. Just open Xcode and under the "Window" menu, click "Devices".
Then, you can click the little plus in the lower left to add a Simulator.
Just select the one you want, and name it, and you should be all set!
You may also need to actually download the simulators, if for some reason they're no longer on your computer. Go to the Xcode preferences, and then in the downloads tab you'll see simulators listed.

How to set app-icons in XCode 5?

I am using XCode 5.
I am properly setting up all app-icons in proper size and resolution.
When I run the app in iPhone Simulator, the app-icon displays correctly. But, when I change the simulator from iPhone to iPad, then the app-icons does not appear.
What could be the root cause of issue ?
Few Tests
Make sure you have set the icons for iPad as well.
If you have, you can probably stop the project, quit the simulator manually, clean, build and run the project by selecting iPad Simulator.
Make sure you have all the icons set -ie- iPhone and iPad specific. Following is the checklist for the same:
App Icons
Splash Screens
Hope this helps !!!
Icon size for iphone and ipad differs. Check here for apple's documentation
Click on project name.On the right side click General Tab and check whether you have added icons of correct resolution or not.
Icons for Universal Apps
Universal applications use the following icons. Items marked with "Required" must be included.
In addition to the above icons, universal applications with a deployment target of iOS 6.1 or earlier use the following icons. Items marked with "Required" must be included if the application's deployment target is iOS 6.1 or earlier.
more detail https://developer.apple.com/LIBRARY/IOS/qa/qa1686/_index.html

iOS simulator reverts to iOS7 when I'm trying to run 6

I'm having a weird situation in XCode 5 that I can't explain. My project's build target is iOS 6.1. I go into the simulator menu and change device to iPhone Retina (4-inch) / iOS 6.1. Should run in iOS6, yes?
When I hit run, the simulator immediately flips to iOS7 and runs the app in that instead. I've tried deleting the app from the sim, cleaning the build folder, resetting the simulator, restarting both...all the standard stuff. Still happens.
This is a project I had been working on in iOS6/Xcode 4. When I first opened it in XCode 5, I was prompted to "update the storyboard". I hit "yes" because it seemed like a good idea. Now I'm worried I can no longer support (or even test for) iOS6???
Appreciate any help.
A few things to check:
Like #vikingosegundo said, click on your project file and select 'Info' at the top. Your 'iOS Deployment Target' should be set to 6.0 or 6.1
Stay in your project file and click on your main target. Select 'General' at the top. Your 'Deployment Target' should be set to 6.0 or 6.1 here as well.
Now, when you go to select which simulator to run your project on it should give you the option to run on iOS 6.0/6.1 or iOS 7.0
As an aside, you can work with a storyboard file in iOS 6 or 7 mode by selecting your storyboard file in the project navigator, clicking on the File Inspector and changing 'Builds for' and 'View as' to the appropriate iOS target.
(To find the file inspector: in XCode, once you've selected the storyboard file go to the right-side panel and click on the little document icon on the upper left side. When you hover over it, it should say 'Show the File Inspector')

iOS simulator issue

I downloaded xcode 4 and created a single view application with storyboard.
I added two views to the segue and tied them back to the home screen. After that I must have done something weird. The only thing I can think of is that I put the iOS simulator on the dock. I've updated the project and the changes are not being reflected on the simulator.
What I think is the issue is that I have two iOS simulators on the computer. For some reason whenever I try to find one in spotlight or in the applications it only shows one. When I click on it it is the old iOS simulator from Xcode 3. So what I did was I looked at stackoverflow and it suggested cleaning and running the project. That did not work.
After that I looked harder and found that I should reset content and settings on my new iOS simulator. That's what I did and now when I build and run it it is saying that it can't find my storyboard.
Generally you don't run simulator separately, but let Xcode fire it up for you. So, in Xcode, in the upper left corner you can select your scheme (and you select whether you want it on the simulator or the device). You can then select the simulator and then press the "Run" button and it should fire up the simulator for you. No need to fire the simulator up separately.
If Xcode is not behaving well (i.e. there are no error messages but the simulator never comes up automatically when you tell Xcode to run it on you simulator), I'd suggest (a) quitting and restarting Xcode (sometimes it gets in a weird state); (b) cleaning your project; and (c) try running it again.
In terms of not finding the simulator in Spotlight, it's now part of the Xcode.app bundle, so Spotlight won't find it. But if you want to dock it (not sure why, but feel free), just fire it up from Xcode by running an app on the simulator and when it appears in your dock, control-click on it and select "Options > Keep in Dock".

Resources