Xcode Project Settings Preventing TabBar at Bottom of iPhone X Models? - ios

I have an old project that I've been working on and off on for about 4 years now - the project has gone through many upgrades of XCode versions from 6 to 10 (I'm now using XCode 10.2.1 with 12.2 SDK). The main problem I'm having with it is that it utilizes a Tab View Controller to switch tabs, and no matter what I do, I cannot get the tab bar to appear on the bottom of an iPhone X family device correctly: it appears much higher than it should.
To try and finally narrow down the problem, I've essentially temporarily "replaced" all code and storyboard items from the project to see if anything will move the tab bar to where it's supposed to (if I just create a blank new project with a tab bar controller, the tab bar does appear where it should). I created a test storyboard with just a Tab Bar Controller going to one navigation controller (no constraints have been put in). There is no viewController codes attached to them. I've replaced the app delegate with a "blank" app delegate so there are essentially no extraneous code or restraints there at all. And I still get the tab bar moved:
This happens on the simulator and the device, and there is no code or storyboard setting that's doing this (this same setup on a new project puts the tab bar in the right place).
I've looked around in the Build Settings and other properties that I may have missed to see if I constrained something years ago that may affect this, and didn't see anything.
Is there anything I should be looking for in the project settings that would do this?
I don't want to rebuild the project in a new project - there are many linked libraries, certificates, cocoapods, storyboard items, and I know it would be horrible to try and put it all back in one piece.
My Deployment Target is set to iOS 11, Devices: iPhone, Base SDK: iOS
Any help would be greatly appreciated!

This is usually caused by not having a correct launch image for the iPhone X. The easiest way to fix this is to tell the app target not to use launch images (from the app bundle or from the asset catalog) but to use the LaunchScreen.storyboard instead. (If you don't have one, make one; be sure to set it as a launch screen storyboard by clicking Use As Launch Screen and configure your target to point to it. Examine a plain vanilla new project to see what I mean.) You might not want to keep things that way in the long term but at least it will allow your app to launch to the correct size on all devices.

Related

iOS app missing splash screen, new black borders and ui glitching after visualstudio 8.10.10 and xcode 13 update

Just updated to Xcode 13 and Visualstudio Mac to 8.10.10. Since then my app:
Wont display the splash screen.
The app is cropped at top and bottom.
Ui is acting generally weird.
Now I have read old threads on similar problems and adding the Launch screen interface file base name. in the info.plist file does make the app cover the whole screen.
I have tried switching splash screens and change location. But it's just black. I don't use a storyboard for the splash and instead provide several different resolutions, which have worked fine for several years.
The UI is glitching like the loader picture, and several different ui elements where colors are provided are "cut" in the middle showing two colors when it should switch.
I have read the release notes for xcode13 but haven't found anything related that would break the whole UI.
The interface glitching and no splash screen I can't seem to find a solution for. Everything worked fine before the update.
What could be the problem? Some setting in the info.plist, a checkbox in the storyboard?
I'm still new to Xamarin and iOS development and greatly accept suggestions.
Let me know if I can clarify anything.
Thanks
iOS load glitch picture
According to your statement, you are not using a storyboard, so you need to replace the Launch Screen with a LaunchImage, then check the LaunchImage file (if it does not exist, you need to create it yourself) and add all strictly standardized pictures inside.

iOS app not taking up entire screen in iOS 12 or 13

I have an old iOS app last built on iOS 8. When the app runs on iOS 10 or higher on larger phones the view doesn't take up the entire screen, there is a black bar on the top and bottom of the screen. In the past, Apple would just expand the app so it was stretched a little.
Not sure how to fix this? I am sure there has to be an expand setting or something? I believe it has to do with setting a Launch Screen, but not sure where to set that or how to? I do have a LaunchScreen.storyboard in my files.
I have tried multiple things to fix the issue, but nothing seems to work?
Also, not sure if it is related, but the Navigation Item (deprecated?) was once sticking to the top and now just randomly floats.
I have solved this problem on my older project by adding launch screen.
Try this if you are missing launch screen:
Add a new launch screen by going to File -> New -> File... -> Launch
Screen
Make sure the newly added LaunchScreen.storyboard is selected as
the launch screen file under project settings.
to check this follow this steps:
1)Choose your project name in Xcode. 2)Select your project target. 3)Then select app icons and launch images and choose your newly added LaunchScreen.storyboard.
Given the age of the app I suspect it uses fixed sizes or size classes for its layout?
You will need to update the code that controls the layout. If the design is simple and vertical based, you may be able to a 'quick and dirty" solution by embedding everything in a stack view. However you should really update your code and/or storyboard to use Autolayout. This will fix the current problem and ensure it will work with future devices of different sizes.

iOS Xcode LaunchScreen Storyboard not displaying

I'm trying to use Xcode's LaunchScreen storyboard as my launch screen? All the questions that have previously been asked about this refer back to the old launch image or .xib method - trying to do it now with the new LaunchScreen storyboard that Xcode automatically generates instead. I've selected the LaunchScreen storyboard as my launch screen file in my Deployment Info:
The storyboard itself confirms that it is set as the launch screen in it's file inspector.
And the info.plist file reflects this as well.
And yet, it doesn't work. The LaunchScreen storyboard never shows - it just goes straight to the first screen in my main storyboard. Using Xcode 7.2 and deploying to iOS 9.
Enable these two settings for the LaunchScreen.storyboard
If you are using xcode 11.2 you'll need to remove the app and execute it again to see the launch screen. I have to do this every time I modify the launch screen in order to see the new changes.
Another thing to make sure is that Launch Screen File is set to Launch Screen.storyboard
**Delete the app from the device. Re-run. **
In my case I had all the suggested settings set correctly but continued to have the original blank launchscreen. In the spirit of AmJa's suggestion regarding a "cache" problem, I deleted my app from my device and reinstalled. Reinstalling did the trick for me on both my devices and simulators.
In case anyone else runs into this issue, I resolved it by simply deleting the ViewController on my LaunchScreen storyboard (leaving me with an empty storyboard), creating a new ViewController and resetting the Storyboard entry point to that new ViewController. There may be some sort of bug with XCode 7.2 with respect to the LaunchScreen storyboard and default entry point into the auto-created View Controller, but then again, I've tried replicating this 3 times and it hasn't ever repeated itself, so maybe not.
In storyboard, in ViewController scene, I had to check Is Initial View Controller for storyboard to be seen as Launch Storyboard.
Suprisingly this is not checked when you add first View Controller. Xcode 11.
Just in case it helps someone.
Scenario, I created my new project and copied a old Launch Image from another project. And then started getting the launch image but when I wanted to change it to new image then still i was viewing the old image it was stuck for ever as launch image no matter what I do.
Then I reset my Simulator and restarted my iPhone and there you go I stared getting the new image. This looks like that somewhere in the documents or cache the devices store the old image until you reset the phone.
Thanks
As #abanet, mentioned in his answer, anyone who uses Xcode 11.2 and above, they have to delete their app and launch it again to see launch screen changes. It's not reflecting immediately. It looks like a bug from Xcode definitely not an intension.
How to fix for Xcode 11.0 and above:
Do this: https://stackoverflow.com/a/41287094/2190175 if you haven't already, and after that:
Delete app from device / simulator
Restart device / simulator
Reason: Launch Screen part of storyboard is cached during development and doesn't change until you remove app from device / simulator and reinstall it completely.
Other solutions didn't work for me, but this did:
Toggle on and off Device Orientation (e.g. support Upside Down) and Hide Status Bar in General.
I'm not sure which one did the trick, but it's working now.
If you don't see anything and your Launchscreen.storyboard only has an ImageView in it, then it might actually be showing the storyboard but not the image. Try putting a button in it or something. I've discovered that my Launchscreen.storyboard is actually showing but won't show any images and I don't know why.
The issue can be also that the "LaunchScreen.storyboard" is not added to this target.
To fix this open "LaunchScreen.storyboard" then press on "File Inspector" and under "Target Membership" add it to the needed target.
I tried everything mentioned here, the only thing that worked for me was creating a new LaunchScreen file. I'm using Xcode 12.1
(Don't forget to update the reference in the targets settings)
I was banging my head against a wall with this since Xcode 10.1 does not include a launch option for the new 11" iPad Pro when you create a new iOS Launch Image set, and without it, the iPad Pro doesn't display correctly, leaving me no choice but to get this working with a Launch Screen storyboard.
I tried combinations of so many things, but I wanted to post what ended up making it work 100% of the time (which was, in fact, a combination of a number of things).
As you have no doubt read, for the UIImageView within the Launch Screen storyboard, you should NOT include the extension (.jpg or .png). So many posts say that, but leave out that the reason is that you should create a new image set within Images.xcassets (NOT Launch Screen image set, but just image set) and name it whatever you want (for instance, "Launch-Default"). Then, drag and drop the desired .jpg or .png into the new image set. You will then use the name of that image set within the UIImageView in the storyboard and everything should work fine (the image should even show up inside of Interface Builder).
Also, within the General settings for the project, make sure to set the Launch Screen File to your new storyboard.
You need to add App orientation specific Launch Screen.
LaunchScreen Portrait: https://app.box.com/s/hfoeuvsy68iu913keb8p5hs1z9fdz3jk
LaunchScreen Landscape : https://app.box.com/s/o9q5nkrvk2ewdh57oiiar85zf658olgj
Drag LaunchScreen.storyboard & LaunchScreenBackground.png to Xcode sidebar. Then specify LaunchScreen in Xcode General page. See attach image
In my case, the problem was that the image for the logo was taken from a different target. Make sure that the image is from the main target of the application, and reset the simulator via menu Device/Erase All Content ad Settings...
In my case a few image views cover the whole parent view of the launch screen (e.g. pinned to the view edges). I had to uncheck the Resize view from NIB in the Attribute inspector for the launch storyboard and finally it worked for me (just do not forget to manually delete the old app from the simulator)
In my case the background color of the view (full screen) was set to a "missing" color literal! After trying all above of course ;(
A jpg image does a problem change the extension to png or use another png image
Worked like a charm for me
in xcode9 swift4 LaunchScreen storyboard, use .jpg image & uncheck clear graphics context for imageview. it's absolutly working.

Launch Screen illegal Configuration XCode 6.4

I have been trying to fix the compilation issues for the open source project https://github.com/gontovnik/DGRunkeeperSwitch with XCode6.4. I seem to have fixed all the issues but unsure of how to fix the following errors:
DGRunkeeperSwitch/DGRunkeeperSwitchExample/Base.lproj/LaunchScreen.storyboard: Launch screens may not use instances of IBUISceneExitPlaceholder.,
DGRunkeeperSwitch/DGRunkeeperSwitchExample/Base.lproj/LaunchScreen.storyboard: Launch screens may only have one top level object, which must be a UIView or a kind of UIViewController.
and
DGRunkeeperSwitch/DGRunkeeperSwitchExample/Base.lproj/LaunchScreen.storyboard: Launch screens may not use instances of IBUIStoryboardEntryPointIndicator.
Can someone please provide some pointers on how to go about fixing these errors?
Delete Your file LaunchScreen.StoryBoard, and then clear "LaunchScreen" in Lauch Screen File as photo. Done. Or you can add file LauchScreen.xib to your project, and then chose it in Launch Screen File as photo
"Requirements: Xcode 7-beta or higher." There's likely something new in the LaunchScreen.storyboard that trips up Xcode 6.
Since the launch screen is not a critical/essential part of the sample code, the easiest fix is to delete the existing launch screen, then create a new one in Xcode 6.
Update:
A launch screen is a splash screen that appears while your app launches. It doesn't have its own view controller, and is not the entry point for an app.
The example's navigation controller is the app's initial scene.
Update 2:
It's not that it's not fixable. Someone with the time and skill could rewrite it to remove the dependencies. Yet it does work as is with Xcode 7, so it's not really practical to fork it.
The error messages really are self-descriptive, but you may have introduced some of the problems by making some inadvertent/unintentional changes that broke it.
You could upgrade your tools and project to Xcode 7, find a different third-party component to replace this one, find someone who will fix it for you, or brush up on your skills and rewrite it yourself.
first you delete your launch screen and then delete UItests, you can find uitests in your project build settings under target files

iphone to ipad conversion: some storyboard options missing

I'm converting an iphone app to an ipad app. I've changed the project's build target from "iphone" to "ipad" and the app compiles, builds, runs and displays the way I want it to.
However, I've noticed that some parts of Storyboard still believe this is an iphone app. For example, when I try to build a segue, it only offers me the "push" "modal" and "custom" options. A newly created ipad project also offers the "popover" and "replace" options.
Similarly, this converted app does not offer me the possibility of a Split View Controller.
So is there a setting or some way to get this "iphone" -> "ipad" app to have the full ipad storyboard options without restarting the project and copying everything over?
I had a similar problem to this awhile back. I fixed it by clicking on my main project on the navigation panel. If you go to summary and look under the iOS Application Development you will see a spot that asks which devices your app is targeted to. Make sure this is switched to universal
Next create an iPad storyboard under File > new > File... > User Interface > Storyboard > set Device Family to iPad (It sounds like you already did this though). Make sure you call it something different then your iPhone storyboard.
Lastly go back to your project settings and scroll down to the iPad Development Info you will see a drop down titled Main Storyboard. Make sure that is set to your newly created iPad storyboard.
If this still is not working for you the Standford ItunesU iOS course has a lecture on converting iPhone applications to universal ones.

Resources