NSLog not supported on IOS 10

31 views
Skip to first unread message

shop.servic...@gmail.com

unread,
Aug 10, 2017, 5:55:45 PM8/10/17
to CodenameOne Discussions
If you are experiencing an issue please mention the full platform your issue applies to:
IDE: NetBeans/Eclipse/IDEA NetBeans 8.2
Desktop OS Windows 10
Simulator 7.3
Device IOS 10 Phablets

I have read that NSLog is not supported on IOS 10 and instead should use os_log API.

Can you advise if this is correct and if so how to access this library?

Regards.

Shai Almog

unread,
Aug 11, 2017, 2:28:50 AM8/11/17
to CodenameOne Discussions, shop.servic...@gmail.com
Can you explain why that's relevant to you and what you are trying to achieve?

SSA Support

unread,
Aug 11, 2017, 9:04:18 AM8/11/17
to Shai Almog, CodenameOne Discussions
For debugging IOS devices
I experience occasional app crashes and want to view logs
I do not have any Apple Devi environment tools
Is it feasible approach to debugging?


Sent from my iPhone

Dave Dyer

unread,
Aug 11, 2017, 2:31:35 PM8/11/17
to CodenameOne Discussions, shai....@gmail.com, shop.servic...@gmail.com

On IOS, if you get unlucky enough, there can be crashes that can't be trapped
and logged with any codename1 mechanism.  Of course, these things aren't
supposed to happen, but I've encountered this class of bug multiple times, and
several of these are still unfixed.   When these fast/hard crashes occur, your
only tools are (a) to use apple dev tools to diagnose. (b) to binary search
to narrow down the cause to simple enough case to file as a bug.

Before you resort to such desperate measures, be sure you've really
locked down all the catchable exceptions; the top level of ALL threads
has to have a catch-all clause, and there are a lot of opportunities to
create little threads that "shouldn't" need error catchers.

Shai Almog

unread,
Aug 12, 2017, 1:25:49 AM8/12/17
to CodenameOne Discussions, shai....@gmail.com, shop.servic...@gmail.com
If you have access to a Mac with xcode you should be able to see logs there. There is an open issue here due to changes made by Apple to the underlying logging system, unfortunately because of the sensitivity of the changes we need to do them in the 3.9 timeframe.

Notice that pro logging support which uses emails to send out log content should work fine.

@Dave as your latest issue indicates you have EDT violations causing crashes even on Android and in general you are doing atypical things which we can't guarantee. We went over this multiple times... You are porting AWT games to Codename One which isn't what most of the developers around here are doing so you should qualify your broad statements to indicate that.

Dave Dyer

unread,
Aug 12, 2017, 1:22:06 PM8/12/17
to CodenameOne Discussions, shai....@gmail.com, shop.servic...@gmail.com
My recent bug report featuring EDT isn't relevant - that was caught by ordinary try/catch.  My comments
on this thread relate to various IOS crashes that can't be caught.  Refer to the history of my ios crash
reports on github.  As I said, there are several that are still extant.

Shai Almog

unread,
Aug 13, 2017, 1:27:15 AM8/13/17
to CodenameOne Discussions, shai....@gmail.com, shop.servic...@gmail.com
That was an example. You are building games ported from AWT using low level graphics and separate threads. Your app is MUCH larger than the median. You are running into edge cases that no one else is running into.
Your experience in Codename One isn't applicable to the median Codename One developer.

Dave Dyer

unread,
Aug 13, 2017, 3:42:18 PM8/13/17
to CodenameOne Discussions, shai....@gmail.com, shop.servic...@gmail.com

Being a larger target, I have more arrows in my back for sure; and you have fixed
many of the things that once hit me.  Sampling theory suggests there are plenty
left to be "found" by random lucky users.

Shai Almog

unread,
Aug 14, 2017, 1:26:51 AM8/14/17
to CodenameOne Discussions, shai....@gmail.com, shop.servic...@gmail.com
Larger is just one part.
The fact that you don't use the component model which is the main abstraction process means you are skipping a huge part of our abstraction.
Reply all
Reply to author
Forward
0 new messages