Im using Xcode 4.1 lion release. My app was rejected because it only works on the iPhone, this is how it should be, but i guess i didnt set my app up so it only works on the iPhone. How would i do so?
I go to Targeted Device Family under my project build settings and i have iPhone selected.
`
What else do i need to do. Thanks
EDIT: During the app review it was still set up under device family as iPhone
Remove and iPad xib files that were created initially. By default Xcode makes an iPad folder when you select the universal build, remove that and you should be good. Other considerations might be to remove iPad launch images if they are present, or any iPad specific code like popover view controllers etc.
Related
This might be a repeat question.But i have a problem. I have an iPad app functional. The app is built in iOS 6. When i started building it i chose iPad as targeted device NOT universal. Now my client has asked for an iPhone version of it.In my iPad app i keep adding custom views as the client clicks "Add More".I add a custom view which is bunch of textfields, buttons etc.So i copied my iPad app and changed the Targeted device family to iPhone once and also Universal next time and tested it. So when i launch the app in iPhone configuration (keeping the targeted device family as Universal) my view controller stays like that on iPad. I cannot scroll the app also(not up/down..nor sideways). Is this the correct way to convert iPad app to iPhone app . Also everything is still with scale to iPad. Should i start a new project and start everything from scratch.Set the storyboard to fit according to iPhone configuration? In my research people said just change the targeted device family to Universal. But it doesn't work. Please let me know if you need more information. Thanks.
It is possible to convert the current project you have to an app that can be used universally, but it would take more time than simply just creating a new project that allows universal usage, and adding in the files of which you used for your iPad project.
Hint: You can use more than one storyboard when the project was created universally. It will automatically set this up for you.
I would also advise that you separate your files into what works universally, and what is specific for the iPhone or the iPad.
Happy Coding!
After many search i found that it possible to have an application for both Iphone and ipad devices.but in your code you should define unique ui for each device(two xib file).
I'm about to release an app that I have been working on for quite some time and is has currently been built to target both iPhone and iPad. The app has both iPhone and iPad storyboards and various device specific code and views. I now wish to remove the iPad references and release the app targeted for iPhone only.
Can a project be changed in this way without too much difficulty and what are the potential complications that may arise?
You should be able to change the device target in Xcode to just iPhone, then verify the build runs in the iPhone simulator window on the iPad. You can also check the bundle plist to verify that UIDeviceTarget contains only 1, not 1 and 2.
If you want to remove the iPad resources, click on your storyboard (or other files), check the properties pane, and uncheck the target. This will stop the file from being copied into the app bundle.
In this image you can see Devices is selected for iPhone only. You can change it from here.
I already have an application which i have built for iphone only. I need to change it to work in both iphone and ipad.the upgrade to ipad application option in project tab of xcode is faded.. which I means I cant do that... I tried to run the project in ipad simulator but it gets automatically run in iphone simulator.
What are the proper steps to change my project to work in iphone and ipad.
Initially change the build setting,ie change the Targeted Device Family field to iPhone/iPad. To write logic for iPad use "UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad" this condition.
I recently converted my iPhone app to be for iPad as well by right-clicking on the target and selecting "Upgrade Current Target for iPad". Then, every time I opened the app with the iPad simulator, it opens the newly created MainWindow-iPad.xib.
However, I ran into problems, so what I'd like to do is "downgrade" the iPhone app so it only runs the iPhone xib on the iPhone/iPad. (So when it runs on the iPhone, it runs normally, and on the iPad it opens in the "smaller" view for iPhone-only apps). Is this possible, or do I have to change the build targets or something along those lines?
Thanks for any help in advance.
It is fairly easy to undo the changes made by Xcode. Look at the Info.plist file for your app and you should see an entry named NSMainNibFile~ipad. This is what causes the iPad specific NIB file to be loaded. If you delete that entry you should be back to using the iPhone NIB file for both devices.
You may also want to change the Targeted Device Family from iPhone/iPad back to be just iPhone.
I created my first universal app by using the universal app template.
I set up xib files and main view controllers for both iPhone and iPad and the iPhone version runs fine.
Yet even though I change the simulator hardware to iPad/3.2 when I test, the simulator changes back to the iPhone.
Please help.
Dan
I found that if I change the targeted device in the project settings from iPhone/iPad to iPad, I can test. I'll have to change it back when I'm ready to release the product. Who knows if it will work.
Side issue: I found that the new imageWithCGImage:scale:orientation is not supported in 3.2. I have to branch upon the interface idiom.