Upgrade project for iPhone X and iOS 11 - objective-c

I'm working on very old project which is written in objective-C and it's all views and controllers are written programatically. (There are not even XIBs, except some cells)
I've already open project in latest Xcode 9.3 and resolve all error and dependencies and compiled it successfully.
But now I want to upgrade the whole project to give support for iOS 11 and iPhone X layout, and I also want to add storyboards and remove all programatically controllers. It's also compatible for iPad and iPhone both.
Can anyone suggest me how to start it and what to keep in mind?
It's huge project so I'm bit confuse either would I make it or not. (I don't wanna introduce swift at the moment, first I'll update it for iPhone X layout and storyboards, then I'll think about swift too)

First of all start with creating UI on storyboard with autolayout.
Remove the resizing views conditions from the code.
Use size class to support both iPhone and iPad.
so basically first 3 steps will solve 70% of your issues.
My suggestion is don't move to the swift before doing all this.

Related

XCode 8 - How to solve an Auto resizing issue on XCode version 8.0?

I used XCode version 7.2.1 for my project. But I updated the XCode version 8.0 now. Though the scroll view is messed in view controllers of my project. Here I have used Resizing only not an Auto layout. I referred many forums. But can't able to find a solution for that. Here I have attached similar links to what I had tried.
Xcode 8 GM seed Storyboard layout issue
Layout issues after updating to Xcode 8
I have to update frame of everything in storyboard every time I start Xcode
What is the exact solution for Scroll view resizing issue in XCode version 8.0?
Its work for me
https://stackoverflow.com/a/39770664/6619234 you can try this...
after Save & Close don't open this xib/Storyboard....it is an temporary solution....till the apple fix it..
Apple just came out with XCode 8.2, which fixes this problem for me. I have been using XCode 7.3.1 for my interface design parallel to 8.1, but I can now use 8.2 without any problems.
The storyboard gets updated with widths and height of frames though, to accommodate the new 'View as:' functionality. Though it doesn't seem to affect running on device/simulator.
Curiously, the bugfix it is not noted in the XCode 8.2 release notes.
I was able to solve the same by selecting my xib files and then I selected my view in the xib after that I went to attribute inspector and changed the size, status bar, top bar and bottom bar as inferred and it worked but before that xocode pointed out I am missing 2x retina display file so I clicked the warning and it was added automatically.
I asked to Apple about this same issue, and they have sent the following message to my inbox:
Hello Raja,
Engineering has determined that your bug report (28489404) and will be closed.

Scaling for multiple devices

So I am creating an app that will be released in the App Store available for iPhone 4/4s and iPhone 5.
In my project I am using storyboard for the interface.
At the moment not every object is able to aline perfect with the objects above so when I for example test on iphone 4 every thing gets messed up.
How can I fix the place of the object.
Do I have to hardcode this? Or can I use storyboard for this.
I think autolayout should suffice in most cases. You can check out a comprehensive tutorial here: http://floatlearning.com/2012/11/designing-for-multiple-screens-in-ios/

Managing an iOS app across different platforms

I have an iOS 5.0 app presently and had a few questions regarding deploying the app across multiple platform and multiple OS upgrades. I would like to know if there is a clean and configurable system that allows me to have one project handle deployment to the iPhone iOS5 and iOS6 and the latest iPad iOS without having ugly selection statements everywhere determining the platform the app is being currently run on. So I would like to know if there is a way to manage the code from a dev prespective so i can support all version/platform specific features of my app depending on what platform/version it is being currently run on (for ex. automatically switching to use the longer dimension background images if the app is being run on an iPhone 5 with iOS 6)
Is there any way to have this functionality?
I am slightly confused with your question, but I'll explain what I know. Xcode already has a way to change your app depending on what Device/iOS Version the user is running. If you use storyboards, then it will automatically resize your app content depending on whether the screen has retina support, and the size of the screen. In addition, you can have a storyboard for iPad, so that when you run the app it will use the iPad version. It also will change the app icons. Just go to the project settings and scroll down until your get to the icons and lunch images.
Now, if you mean you want to change how your app works using the source code directly, then there is no easy to way to manage it. Your best bet is to go with Storyboards, as it makes it very easy to resize content depending on what device your using.

XCode 4: Create iPad Version using autosizing masks

I've just upgraded to XCode 4 Gold and I can't find a way to automatically create the iPad view from an iPhone view (or viceversa).
To be clear, the feature I am looking is the same as in the Interface Builder of XCode 3, there is an option "Create iPhone/iPod touch version using autosizing masks" when you're working on an iPad View, and "Create iPad version using autosizing masks" on iPhone/iPod Touch.
If anybody know if this is possible...
Thanks in advance.
There is still a way to convert xibs to iPad. It is just hard to find:
Select the project in the navigator, then right-click the target and make sure it is set to iPhone -- if set to Universal this process will not work. (You can set it back to universal afterwards)
Right click the target and then select Duplicate.
Choose to Duplicate and Transition to iPad. A group called "Resources-iPad" will be added to your project and will contain the iPad-converted xibs.

How do I programatically get a large iPad window on startup with MonoTouch?

I have the latest Ipad compatible Monotouch library. I have upgraded my projects to use 3.2 SDK and MonoTouch 1.9 Alpha.
The docs say you need to change the Window in your XIB for the large iPad Window. I don't use XIB. I build my interface from code by constructing the object programatically. What should I be doing to get the large iPad style Window?
Nothing (I assume).
[UIScreen mainScreen].bounds (and its equivalent on MonoTouch) will be 768x1024 in iPad mode and 320x480 in iPhone mode. If your windows and views do not have any hard-coded values they should adopt to the new size naturally.
After further investigation, I found that I needed to add an entry into the info.plist file like so:
Information Property List
UIDeviceFamily
item 0 2
Once this is present the dynamic Window class that I create is the full iPad screen size.
I think it is basically telling the system that my app supports that device. Will have to find our more in the docs.