I have a number of projects which support iOs5. When adding a launch.xib file I have an error
error: Illegal Configuration: Auto Layout on iOS Versions prior to 6.0
now everything works fine, I can build and run to my old devices, they don't support the launch.xib file obviously, so they're falling back to the asset catalog for an image just as it ever was, they do not try to load the xib, therefore they don't throw any 'wtf is NSAutolayoutConstraint' type exception.. but the nib being there saves me worrying about the new iPhone6 sizes for start images, as well as any future screen sizes.
But this red ! up top is driving me crazy !! I'm not accustomed to ignoring them, nor to having one on my screen yet having my project happily build and run on all targets... Can anybody please give me a clue how to disable a specific error message in xcode6 (which I view as pointless) . Thanks so much
Turn off Auto Layout in Storyboard settings. Click Main.storyboard on the left, then in right panel 1st Tab, turn off "Auto Layout" (turn off Size Classes of Xcode 6 as well).
Of course, I would recommend you not to support iOS 5 anymore, as Apple has discontinued its support already.
Related
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.
I had a storyboard in Xcode 7.3.1 that was set to Compact width and Regular height. When I downloaded the Xcode 8 beta and opened my storyboard file, I get an error: Internal error. Please file a bug at bugreport.apple.com and attach "/var/folders/xl/2m4k1hnj70bbc2dz94sbl029pc_hk8/T/IB-agent-diagnostics_2016-06-17_10-28-34_051000". I'm also unable to see anything on my storyboard.
Bug? I set the view to iPhone 6s.
Thanks in advance!
When people default to editing a storyboard in Compact-Regular (which has always been strongly discouraged) their views and constraints get added only for that very specific configuration, and don't apply to other size classes. If this is the case for your document, one option is to use the File inspector to uncheck "Use Trait Collections" (prior to Xcode 8, it's "Use Size Classes") and choose to keep the data for iPhone. Then re-check the box.
Please do file a bug at https://bugreport.apple.com, you only need to be a registered developer, but registering is free. The IB team can investigate what's going in with your project. Attaching the diagnostics folder mentioned in the warning will help provide the detail needed to diagnose the bug.
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
My app looks completely different on a real device compared to a simulator. I used storyboard and used "add missing constraints" on all objects to remove warnings. Could this have caused the problem?
The actual device has most image views collapsed in the upper left corner
The simulator (for all devices you can test with) shows all 4 images filling the screen
Thanks!
A likely cause would be Autolayout constraints that do not create the intended effect.
You may be seeing the expected behaviour in the simulator simply because it has old cached versions of the NIB files... sometimes will get device/simulator differences due to this. Alternatively, could be the app on the device that has the old version. A clean build may result in problem resolved or seeing the same problem in both places, either of which solves half the question.
Using the automatic "Add missing constraints" is almost certainly the immediate cause here, if the problem occurred at the same time you did that.
Presuming you have the project under source control, I'd recommend rolling back and adding missing constraints in a more planned way, as the automatic system isn't smart enough for every scenario it seems.
I'm writing a very first program for iOS in Xcode 6 (Single-view application).
I added a label and ran a simulation.
I have seen this label on a simulator. But when i added an additional button on a Main.storyboard's ViewControler and rebuilt the project - the was no any button. It seems like simulator ran first version without the button. How can i launch last version of my project on a simulator?
Thanks.
Xcode 6 run by default with auto layout enabled along with size classes also enabled..
you can check that by disable both of them by going to your storyboard and show file inspector (you'll find it on the right side pane)
And then rerun the app.. if you find the button in its place.. then you should start learn how to use the auto layout cause it's essential now by apple to support any universal app you wish to create in the future .