iOS 9 status bar appears below black bar - autolayout

What is happening to my app in Xcode 7 / iOS 9?
The whole screen looks condensed, as if an iPhone 4S app is displaying on an iPhone 6. It looks normal in the iPhone 4S simulator.
I thought it was a problem with the auto layout constraints in the main storyboard, so I eventually deleted everything apart from the root view in the root view controller (blue screen), and there's still a problem with it.
I tried enabling size classes, thinking that this was the problem due to previously being disabled, but the result was the same.
Is anyone else getting this problem in their existing apps running in iOS 9?

Target>General>Launch Image Source>use asset
it will create new asset named BrandAsset, place your launch images over here. Create LaunchScreen.storyboard if already not existing and select it to Target>General>Launch Screen File.

Thanks for the answers. They pointed me in the right direction, as I wasn't aware it was anything to do with the launch screen.
I found out I had no LaunchScreen.storyboard file. Digging around in the docs led me onto this:
New projects are created with a launch screen storyboard file called
LaunchScreen.storyboard. Alternately, you can create a new launch
screen file using File > New, selecting the User Interface category,
and choosing a file type of Launch Screen.
It was weird that I had to do this, as I only started developing this app in iOS 8, and apparently this was a change in iOS 8. But with iOS 9 Apple are obviously getting more aggressive with deprecating incorrectly set up projects, and the consequences were that it was bug to my app.
The positive I guess, is that all of this forced me to at least create a launch image instead of having nothing.

Related

How to make sikuli focus on Desktop screen

I am using VS CODE to develope a Robot with Robot Framework and Sikuli. When I run my script I get an error
"could not find P(sage.png)"
This happen because the current screen is the VS CODE's screen and not the desktop where the "sage.png" is.
What I can use in my script in order to focus on desktop screen first of all?
I just looked at the documentation of sikuli.
You can make use of the below method, where they have specifically talked about your issue.
classmethod focusedWindow()
On Windows, this method always returns a region. When there is no
window opened on the desktop, the region may refer to a special window
such as the task bar or an icon in the system tray.
# highlight the currently fontmost window for 2 seconds
App.focusedWindow().highlight(2)
# save the windows region before
firstWindow = App.focusedWindow()
firstWindow.highlight(2)

Keep QDialog on top of everything, even fullscreen applications?

On a project I work on, using Python3 + PySide, I try to print a popup-message as some sort of notification.
This popup needs to be on top of everything, this includes fullscreen applications like games or browsers. And that's the point that does not work. It works fine for all windows on my Desktop, normal windows, maximized, but as soon as there is a fullscreen application or a borderless window ("pseudo fullscreen") the popup is created, but "behind" the fullscreen app.
I already use self.setWindowFlags(QtCore.Qt.FramelessWindowHint | QtCore.Qt.WindowStaysOnTopHint) but this flag does get ignored by other fullscreen apps.
How do I fix this? Also without giving focus to the popup.
It is just there to present information, and it is not good when your window looses focus while playing a game.
My code can be found here: https://github.com/GosuSan/PyECM
additional Info:
- my project aims to be cross-platform, so I need a platform-independend solution
- I am running linux, without having a windows machine atm,
so I can't test stuff there.
If you need any more info, let me know!
Edit:
It seems that PySide.QtGui.QSystemTrayIcon.showMessage does what I want, it works on fullscreen as well as on borderless-windows. So I will try to either find out how those messages are displayed on top, or just use them, not sure for now.

WatchKit Menu Items Not Displaying

I'm in Xcode 6.2 Beta 3 (Build 6C101), I've added a menu and two menu items to my Interface Controller, and created IBActions for both. I've given them titles and images, but when I run the app nothing displays.
I've read
https://developer.apple.com/library/prerelease/ios/documentation/General/Conceptual/WatchKitProgrammingGuide/Menus.html
and can't see anything about need to show menu items programatically - what am I missing?
You do not need to present the menu programmatically. The only thing you need to do is wire each button to IBActions in your Watch app extension.
The most likely issue is caching of the previous Watch app storyboard. Do a clean build and try again.
Finally, as you likely know WatchKit menus only display on a "force press". They cannot be used for the main interface of the Watch app. In the Simulator, a click and hold with the mouse will simulate a force press, and the animation will make it clear when you have done one, even in contexts where it doesn't do anything.
This was solution for me- Go to Hardware->Touch Pressure->Deep Press then try tap on watch simulator.
I have recently encountered this issue on a real device, although the menu was working as expected on the watch simulator. In my case, the problem was in SF Symbol that I've used as an image.
Everything was fixed after replacing it with an image from the assets catalogue.

iOS simulator weird "broken glass" behavior, App only lists contacts groups

I'm working on a two months old project that was working till today, without any changes except maybe XCode update from 4.4 to 4.5.
I use RHAddressBook to read contacts groups, which seems to be a very good framework, but got a weird behavior.
In this order :
Simulating in iOS5 iPhone non retina : app displays a black screen, weird log :
objc[31712]: Class _NSZombie_CFCalendar is implemented in both ?? and ??. One of the two will be used. Which one is undefined.
Simulating in iOS6 iPhone non retina : everything works fine, groups are loaded and displayed, no log
Simulating in iOS5 iPhone non retina : app displays contact list but their seems to be a broken glass effect on the simulator display, and neither top or bottom bars are displayed, weird log again
Here is my storyboard (root view in navigation controller) :
And simulator screenshot for the same screen :
And the second screen (simple segue opening blank page) :
If some idea crosses your mind I'd be glad to hear it !
Thanks a lot.
EDIT: seems like this is an iPhone Simulator bug, I will try reinstalling it. On another app (SYGalleryExample from SYGallery) it displays it as if it was on an iPad, with the same broken glass effect, and here is another app perfectly working on production use :
EDIT 2: Reinstalling XCode, wiping out ~/Library/Developer and ~/Library/Application Support/iPhone Simulator folders didn't do anything. Seems like I'm going for a full system installation again.
EDIT 3: even iphone simulator "native" apps are active weird. Here is proof :
Everything fixed, Apple bug somewhere in my user files for iPhone Simulator on iOS5. To recap : the display of every app I built was screwed up, including app that were working yesterday without any change done till then.
Then I spotted also native apps were not OK, design was the iPad one on the simulated iPhone non retina device .
Logging in another session, launching the same native apps (settings, maps, etc) everything was fine.
Logged back on the original session, everything works again.
Hope this can help some future reader.
EDIT :
actually no, still not working. complete new install of osx on new hard drive, no time machine restore or whatsoever, run working project on ipad 5.0 simulator and still :
For me it only reproduced on iOS5, iOS6 worked fine.
This is how i managed to fix it:
The problem was that i had installed SwitchResX, which is a program that creates display profiles for mac. This application interfered with the resolution of the iPad simulator.
So my suggestion is to remove any applications that change your resolution or try a different display resolution.

Letter box in iPhone5

It works like magic to get rid of the letter box in iPhone5. Just put in the picture
Default-568h#2x.png.
And the app will open with the NavBar in the top in iPhone5 instead of in a letter box.
But how to reverse that?? If I remove the Default-568h#2x.png it still opens unboxed.
Is it possible to go back to the previous letter boxed version?
Or in a new project using Xcode 4.5 to build for letter boxed apps?
The simplest way to get back to the letterbox (3.5-inch display) on the iPhone 5 seems to be
Remove the 4-inch display sized launch image from the project.
Delete the app from the phone.
Clean the project using Product > Clean.
Install the app to the phone.
I asked how can this be done without deleting the app?, but it doesn't seem to be possible.

Resources