Printing in console - ios

Print something in console usually is fast (<1s) but recently I started working on a project and the print time is huge (>20s).
(for example putting a "Print("bla")" in the code will work fine, but printing through the console is slow)
Any ideas what might cause this?
This happens in Xcode 7,8 (and I don't remember if 9 also, but I think so). Also it's reproducible regardless of simulator/device.
This only happens for the 1st time I try to print, then it works fine.

Related

Vue Web App Blank on Some iPhones, but fine on all other devices

I created a webapp in Vue several months back and have been using it for some time. I've used it on Android, iPhone, Mac, Windows, and all was good in the beginning, however a couple of months back, I began noticing that the page would sometimes load on iPhone, and sometimes not. It worked perfectly fine on every Android I've tried without issue, works on Mac and on Windows, though iPhone seems to be hit or miss (haven't tried it on any other iOS/iPadOS devices), and I have no idea where to start. I know this doesn't give a lot of information to begin with, but I'm not sure how to even begin debugging this. What I have tried so far:
Resetting cache - did not fix
Using various browsers - blank page across Safari, Chrome, in private/incognito modes and normal modes
Tried different iPhones - would work without issue on some, but not on others
I have not touched the Vue config file, is there some support issue between specific iOS versions and Vue that I'm not aware of?
Again, I know there's not much detail provided other than "It doesn't work", but I honestly don't know what else to try or what information I might be able to use - if there is something additional I need to provide, let me know and I can update the post with the information.

view iphone console logs without a mac

Is there a way to view the iphone console logs without having a mac ?
It used to be possible using the iPhone Configuration Utility but it does not seem to be available any longer.
I saw a tool called iTools but it seems to require a 32bit version of itunes which is also not available any more.
Given an iPhone device + windows + linux, Is there any workaround / tool to view the iphone console logs?
Realizing it is over half a year ago you asked this, but since it does not have an accepted answer yet:
I ran into this very same issue over and over, and got fed up with it, so I decided to have a go at writing a script that displays console messages in HTML, so you can just view everything in the webpage itself, without having to resort to a console-replacement or a tedious remote debugger (for which you, indeed, require a Mac), without having to modify each console call in existing code.
The key lies in 'replacing' the four main functions in window.console: log, warn, error and trace. This is done by redifining each method, adding own code to that, and calling the original method in the end. Jakub Fiala wrote the basic script for that, on which I built the rest: https://gist.github.com/jakubfiala/8fe3461ab6508f46003d
I dubbed it 'MobileConsole'. It is quite unobtrusive and will 'catch' all console.log (or .warn, .error or .trace) events, and even bind to window.onerror.
I have created a separate page for this script with an elaborate explanation on how it works, including a demo, over here.
Download this from the app store onto the iphone, you can then view logs directly on the phone:
https://itunes.apple.com/us/app/console/id317676250?mt=8
Please note, this is an old app, it will crash when launched, then on reopening it will show you the device logs.
If that fails, here is a link to the iPhone configuration utility for windows:
http://download.cnet.com/iPhone-Configuration-Utility-for-Windows/3000-20432_4-10969175.html

Debugging IOS ... nothing shows in console

I am working on a final project for school, forgive me, I am having difficulty so I am trying to run in debug ... what am I doing wrong? I set my breakpoints and I run the simulator, for some reason the simulator starts up but my project closes ... I reopen it and it is obviously running, but there is nothing present in the console, even when run the code that should break on. Please help if you can, I am really getting frustrated because I can't get my code to work and now I cannot get my debug to work. Thank you in advance.
To see output in the "All Output" pane of the debugger, you need to call NSLog with a log string (which can be a format string with variables like printf). If you do not have any NSLog calls, then you should not expect to see any output in the debugger.

Phonegap application would not work in iOS

I have a very interesting problem. I have a phone-gap application that I am building. It works fine when we run it in the android environment, or even when we open index.html in firefox. But when I try to run this on an iPad simulator in Xcode, it fails.
The application installs fine and displays the start up page correctly. The next thing my application requires is to open a job attached in the email. But as soon as we do that, thats when it starts failing. It does not display the body text. The header and the footer are displayed fine.
To me this does not look like any javascript error because I am able to run this code on other platforms. I think its got to do with some css I am using which might not be compatible with iOS. Also, I have this other problem that my code will not run on any version except phone gap-1.3.0. I am not sure if that has anything to do with this too.
Anyways, I would like to know your thoughts on this.
ok the offending code was found to be the following:
$.mobile.touchOverflowEnabled = true;
I just stumbled across this and I am not sure why its breaking my app. Anybody got any ideas.
After commenting this code out, my app worked fine.

Why would an swf break when changing its export version from Flash 6 to 7?

I need to make a small modification to an existing Flash library (Fusion Charts Free) written in AS1 with Flash 6 as its publish version. My change uses ExternalInterface, which requires Flash 8, so I opened Publish Settings and changed the version to 8. No other changes were made.
Now the swf loads, but encounters some error part-way through its operation. If I change the publish version back to 6, it works again. Changing it to 7 breaks it. My questions:
Is there a complete list of changes between Flash 6 and 7 that affect existing AS1 code?
Is there any way to get real debugging output from an swf, to determine what has happened? It's frustrating that there doesn't seem to be any sort of log or console whatsoever. I've seen a few solutions that involve using ExternalInterface to log to Firebug or such, but obviously that isn't useful to me, given that my whole problem centers around exporting to Flash 8.
the externalInterface is probably not the reason for errors.. i tested myself to ensure.. (with flash8 + AS1).
1) maybe you accidentally selected AS2 instead..
2) the error is while compiling? or during it's running?
3) the error happens when you run it from the application? or as standalone? (when it's standalone the ExternalInterface might raise an exception because there's no "external interface".
4) what's the error?
5) try to put "try" block on the ExternalInterface part if the error is not while compiling..
6) if the error is while its running, then you have a debugger.. just press Ctrl+Shift+Enter
Having completed this project, I'll share my experience. Virtually all incompatibilities fell into three categories, described in this very useful article:
Flash 7 variables names are case-sensitive, so xPos and xpos are now separate variables and can't be used interchangeably. You would never do this anyway, if you were writing good code, but if you're trying to port some third-party code, as I was, this is the #1 problem to look out for.
Undefined variable values have changed. In Flash 6, numbers were initialized to zero and strings were empty. In Flash 7, a number is NaN and a string is undefined.
String boolean equivalents are different. In Flash 6, empty strings, or strings other than "1" evaluate to false. In Flash 7, a string with any contents evaluates to true; only empty strings evaluate to false.

Resources