CALayers does not appears on real device - ios-simulator

I have some problems with CALayers. I have UITableView with custom TableViewCells, in this cells i draw some objects using CALayers. When I run my app on IOS 7 simulator, it works great. But when i run app on real IPhone 5 - no layers are appears. Help solve this problem plz.

I ran into this issue and resolved it by modifying the property attributes of my CALayer. I was using (weak, nonatomic) and a change to (strong, nonatomic) caused them to appear on the device.

Related

Incorrect Ikonli icons displayed

I am having problems using the Ikonli icon packs. I am creating FontIcon objects and then using those to set the graphics on buttons. Icons taken from the FontAwesome5 pack work great. Icons taken from the Material2 pack seem to shift somehow - for example, I try to get mdal-6_ft_apart but what actually gets displayed is mdal-loyalty. And no matter which Icon I load from MaterialDesign2, all I see is an empty box.
I'm running this through Eclipse, and everything looks fine when stepping through with the debugger. This is the value of the button graphic:
ObjectProperty [bean: mdal-6_ft_apart:15:0xffffffff, name: iconCode, value: MDAL_6_FT_APART]
and yet, on the screen, it's something completely different.
This is a Maven project using OpenJDK 16 and JavaFX 16. I've tried loading just a single icon pack instead of all 3, but no difference. Also, there are never any errors retrieving the icons. The ServiceProviders are all found, and the icons are available.
I made a small Hello World program and everything runs fine, so it's definitely an issue with my program and not the library. But I have no idea what the problem is, and I've been staring at this for almost 2 hours. Has anyone come across this before? I'd appreciate any help, because I'm out of ideas.
Answering this myself in case it saves someone else some time. I was installing the Ikonli library in order to replace the FontAwesomeFX library that is no longer available. I had gotten partway through replacing the icons when I ran the app in order to check the progress, and that's when I saw the errors.
The problem turned out to be an interference between the two libraries - FontAwesomeFX was throwing of Ikonli. The icon shift didn't actually occur until the code displayed a FontAwesomeFX icon, which made it seem a little random depending on the order I would open the dialogs when testing. I'm assuming an issue with the Service Handlers, though I'm not positive because I stopped troubleshooting once I realized the problem and just finished the replacement.
Once I stopped displaying FontAwesomeFX icons and the dependency was removed, Ikonli worked fine.

JavaFX: Stages are empty

I am facing a strange problem: When running my application everything works fine, the code compiles, the debugger shows that everything is in order but stages different to the primary stage do not show their continent, they appear just empty white.
I cannot provide a reproducible code sample because it works on my other system just OK.
So my question is: What could cause the stages not to display their content?
I am using JavaFX 11 with ZuluFX 11.
UPDATE: I just tried to run version which was built on a system where the displaying works and I have the same effect: Empty windows.
Screenshot:
It's hard to say without further information, but try to start the application with -Djavafx.verbose=true -Dprism.verbose=true and check if you get some error message which might help you.
Apparently, using SW rendering works fine. I am not sure how large the impact of SW rendering is.

Hiding Bitmap Layers on Pebble Watchface

I've been building a pretty basic watch face that includes mute & bluetooth indicator icons. I've been trying to use layer_set_hidden() to hide the layers depending on the connection and mute state but I've run in to some trouble. The layer_set_hidden() command works in the init() function but not in main_window_load(). It causes the app to crash on load and nothing is visible. The logs are showing:
[ERROR] ault_handling.c:97: App fault! {77b4b888-5c9a-40b4-9dca-54f0eb498831} PC: 0x80a5204 LR: 0x441
I've been developing on CloudPebble and the Github is here. I've put in some obnoxious comments showing the 2 lines that are causing the crash as well as the layer_set_hidden() call in init() that works fine.
One other less critical issue is setting the background colour of a transparent png on a bitmap layer is not changing. I the default is black but I want my black icons to show up on a white background. Those outlines have also been outlined with big comments.
Any help would be appreciated!

iOS 9 status bar appears below black bar

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.

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.

Resources