Convert iPhone App to iPad App (Just The Easy Part) - iphone

I make a basic View-Based application for iPhone in XCode 3.2, but when I switch the emulator to the iPad, the application gets "framed" (not sure what the right term is):
iPhone App, Framed http://dl.dropbox.com/u/2652228/iphone-app-framed.png
If I adjust the width of the View(s), it has no effect. I cannot adjust the width of the "Window" in Interface Builder (it's greyed out, and adding another Window to replace it gives me another Window instance in which the size is still grayed out). How should I proceed?

In Xcode, choose Project -> Upgrade Current Target for iPad... And read the documentation for details. It's all described in there step by step.

If you are using Xcode 4 then:
Go to your Project Target Summary (Go to Project Navigator, Click on first horizontal project named row tab, then click on Targets and choose 'Summary' tab)
In Devices drop down choose iPad (take a look at other options in settings below if you are interested)
Now you can just run and see how you app will look on iPad.
Steps mentioned above are just a way to just scale your app to iPad resolution. But for a great app you might want to render app differently wrt device. You might want to code different ViewControllers for different devices.
You can read more on this here: iOS Developer Library - Creating a Universal App

Related

ios11 iphone app icon is missing on iPad

I have an iPhone only app but it works in compatibility mode in the iPad too(no surprises).
but after I updated the app for the ios11, app icon on the iPad is missing.
here is what I've tried;
- launch on the iPhone simulator, icon appears
- launch on the iPad simulator, icon is missing
change the device options from "iphone" to "universal", run the iPad simulator, icon appears but app needs a new iPad ui.
change back to "iPhone" and the app icon is missing again in iPad. really confusing.
I tried to create a new project and make the same changes but never able to make the icon missing again.
I'm using cocoa pods if that makes any sense.
I think I'm missing a settings or something else, I'm really trying to find it, any advice would be greatly appreciated.
I've found the problem.
In info.plist, there was an extra or problematic entry.
- CFBundleIcons~ipad
Remove this line and iPad icons appear normally.
This problem has been reported by many users over the past 6 months (including desperate pleas to Apple to fix this bug), yet no one's reported the following solution.
I'm using Xcode 9.2, and I noticed today that my iPad/iPhone's application will run fine on my iPad (iOS v11.2.1) but the icon is missing.
This is a legacy app, about 2-3 years old, and the cause seems to be my Appicon file. When I view this file, I see this:
Previously, this resource was sufficient to provide the app icon for both the iPad and iPhone, but apparently, not anymore.
I went into my Images.xcassets file, right-clicked, and selected "App Icons & Launch Images\New IOS App Icon" and now have a look at the extra icon possibilities:
Notice the extra icons for iPads.
Sure enough, I created yet more .png files, with resolutions matching the desired iPad resolutions settings, and now, when I build my app and run it on the iPad, it does show the correct icon.
Oh, and I also needed to go into my project's build settings, select the "General" tab, and change the "App Icons Source" to the name of my new image set, "AppIconNew".
Et voila. No messing around with Cocoapods, no need to change the .plist file (mine didn't have that "CFBundleIcons~ipad" entry anyway), I just needed to create a new image set.
Okay, time to go back to my modern, cosy world of using Visual Studio again now.
(Happy sigh..)
I've had a few legacy apps that did have the CFBundleIcons~ipad in the Info.plist, so I check that first. However, I've also had instances where it was just missing the asset as #Mike Gledhill mentioned. If this is the case, you don't have to go through adding a new AppIcon set. Just check the iPad box in the Attributes Inspector for the current AppIcon assets and the iPad sizes will show in the current set. Then just add the correct assets for each size requirement.
I didn't have CFBundleIcons~ipad entry in my Info.plist file as per "karpat"s answer. So I moved to "Mike Gledhill"s answer, then after observing my all the icons from Image assests, I found that for particular icon which was invisible only on iPad, the device type set was iPhone.
I just changed device type by right cling on image set to Universal :
This did work for me.

Will releasing an iPhone app makes it available for iPad by default?

In my XCode's Targets summary screen, the "Devices" drop down is set to "iPhone" (other possible values are iPad and Universal) because I haven't fine tuned the app's UI for iPad. However, will people be able to download and run my app from the iPad in non-fullscreen? (e.g., with black border surrounding most of the screen)
I want people to be able to search for it in app store, install it, and run it even though it is not full screen.
Even though your device settings for app is iPhone, you can download it from iPad, but it can be viewed only as in iphone size or in 2x option is there on right bottom side of the app (refer image) to double the app size in ipad; but doubled view will look stretched.
An iphone app downloaded to ipad will look like as shown (In 1x mode).
If it's on the app store as an iPhone app then you can still run it on the iPad but they'll run in their original size unless you change the size to fit using the 1x or 2x icon. The graphics won't be as sharp and if your app uses any iPhone only features - make calls, then it's not going to work as expected.
If you want to get rid of the little iPhone app inside the iPad then you'll need to change the target to Universal in order to run as a native iPad app
What type build you use? XIB or Storyboard?
In any case go to the drop down menu and set Universal App, xcode create automatically the Xib or storyboard target for iPad, and the app run in full screen on iPad.
Ok now you have to setting up a new interface specific fo iPad:
if you use a xib files, you have to only resize the interface target for iPad.
if you use a Storyboard, in order you have to
Right click on your project and click on NewFile
add New Storyboard target fon iPad
Now you have a new storyboard for ipad, but is empty and not linked, so go to you project setting and set the new story under the iPad settings, click on iPhone Storyboard and pres CMD + A select all inside your storyboard for iPhone go to your storyboard for iPad and again CMD + A and press CANC Yes delete all inside a iPad Storyboard and press CMD + V now you have copy all your project correctly target for ipad but now you need to relink and resize all stuff.
Hope this help you and other people, do not forget vote up ;)

Making two storyboards for iOS (iPhone and iPad)

Is it possible to make only one application and inside of it make two storyboards, one for iPhone and one for iPad? I don't like the idea of running the app on iPad and clicking the 2x button.
My idea was to create two storyboards and have a beginning class that would check if the device you are using is an iPhone or an iPad and then redirect to the according storyboard after. I think it is a good idea cause the code is the same.
create two different storyboards and name them so they are easily specified which is which. Then click on the file that allows you to change settings for your actual app. and change the build to universal, then specify which storyboard you want to use!
there is a storyboard setting for iphone and ipad
iPhone
iPad
Make sure the names of the storyboards are correctly set though
Even if you already made an app non universal, just change it to universal (target-->summary), then create a new ipad story board and make sure under target-->summary that the main iphone storyboard and main ipad storyboard are set to the right storyboards.
Did you try creating new Universarl XCode project? If you create Universal project, there will be two Storyboards(One for iPhone and another one for iPad) created by default. i think.
I had to do this in a project recently... so first you should navigate to your projects target then click the summary button in the top bar you will then see a bar that says "iOS Application Target" in there you will see a drop down menu with a title that says Devices select the universal option. Now add a storyboard for the iPad. Now go back to the projects target and scroll down to the "iPad Deployment Info" section and set your new storyboard as the main storyboard in the text field here you can also add the iPad icon and launch images. Now you are set up for creating a universal app!
its very simple, just do the app in universal and then go to the target and then info and then add the main storyborad file base name (iPad) then build and run when iPhone is run to its show iPhone and when iPad run so show as iPad.

iphone app only showing in little window on ipad

I have developped an iPhone app and I now need it to work on iPad. On the simulator the app only show in a little window (the x2 zoom enable the app to work in full screen) but is there a way to have the app directly showing in full screen ?
Thanks a lot,
Luc
go to project settings and set Targeted Device Family to iPhone/iPad
As Max said, go to project setting and set Target Device Family to iPhone/iPad. But this is not enough. With this change the application type will be universal application. This is good, because the app will start in full screen, but if you hard coded the dimensions of the views in the application then the look and feel on the iPad will be bad. So do the first step what Max suggested for you and then check if the app looks like you want, because it will not arrange the views automatically. You should do the changes from code or from nibs.
There is a little help if you set properly the autoresizing masks.
Edit:
Project menu -> Edit Project settings -> Targeted device family
You will need to do at least the following:
Change the Targeted Device Family to include the iPad.
Create or convert all needed .xibs for the iPad (using the Interface Builder Menu).
Reference the top level iPad .xib from your app's info.plist (using the NSMainNibFile~ipad key).
Handle the iPad paradigm wherever the controller or view source code needs to differ.

Building with CoreLocation framework, simulator and device

How can I add a reference the CoreLocation framework to my app and get it to compile for both the Simulator and a device without needing to delete and re-add the frame when switching platforms?
I'm writing a multi player game. Sometimes I test by putting my app on a device and also in the simulator and debug in simulator side. But I've recently added some CoreLocation services to my app and when I switch the platform from Simulator to Device, I need to remove the CoreLocation reference and re-add it from a different location. Then, when switching back to Simulator, I need to do it again.
I understand why. I'm just wondering if there are any tricks or tips which might help me automate this.
if you add it with relative path, it will point to the right base sdk when you switch between simulator and device.
When you do "add exiting frameworks", there is a window that tells you reference type, it should be Default (which should point to Relative to Current SDK)
then when you change the SDK to device or simulator it will look from the active SDK frameworks folder.
You have to add the framework by double-clicking the target, open the general tab, pressing the plus-button below the "liked-libraries" section.
Something is going wrong here, you do NOT have to remove and re-add frameworks between testing on the device and simulator (working with the iPhone keychain will only work on device).
Look at the image below, do you see the little tiny grey icon on the lower left hand corner of the toolbox. This indicates that the framework is "linked" correctly. If you do not see an icon with the little tiny grey circle like icon on the toolbox then you are not selecting
"add" > "Existing framework" in Xcode.
NOTE this image is for MKMapKit not corelocation, just used to illustrate what a correctly linked framework should look like.
I guess it's not that complicated. You can drag both the simulator framework and the device framework into an XCode project and it works. I'll remove the Simulator one before shipping, but it works for debugging.
I'm new to XCode development and ran into the same problem that you did.
There are several ways to add a framework to a project: dragging and dropping into the frameworks folder; adding to the linked libraries in the target's info page; etc. I found that the easiest way to add a framework to a project is the right click on the Frameworks folder in the "Groups and Files" Tab and choose "Add>Existing Frameworks"
When you select a framework it will be added relative to the SDK - If you open the frameworks' "info" window (ctrl-click> Get Info) after adding it, the path-type will be set to "Relative to current SDK")