I am looking for a log framework which can show log on my mac when I am running app on my device as ad Hoc distribution.
I have come across NSLogger.
It is working good in simulator but if I run on device (from xcode or from net) it is not working.
Not working means mac Desktop Viewer application is not launching as it launch when I run on simulator.
How can I integrate NSLogger so that I can get log from device to my MAC?
Is there any other framework which provide me this kind of logging?
Thanks.
Here are the steps I took to get NSLogger to work. For the desktop viewer:
download the desktop viewer binary or
follow desktop viewer xcode instructions: part one and part two
run the desktop viewer
goto NSLogger->Preferences->Network
check Publish Bonjour service for automatic discovery on local network
type NSLogger in the Bonjour service name text box
goto NSLogger->Window->Show Logger Status and you should see a status window that displays this:
Bonjour (Ready to accept connections)
Bonjour SSL (Ready to accept connections)
TCP/IP Port 50000 (Unavailable)
NOTE: At this point you WILL NOT see the desktop viewer output window... that window only appear when an NSLogger client correctly connects to the desktop viewer.
For the iOS client:
make sure that your iOS device is on the same local network as the computer running the desktop viewer
install the app Discovery which allows you to browse the Bonjour networks
run Discovery and browse the local Bonjour network, you should see two entries published by NSLogger desktop viewer:
_nsloggger._tcp.
_nslogger-ssl._tcp.
integrate the NSLogger client with your iOS application by following these instructions
when you are done integrating your project will look something like this (my project is named iosTapDetectorDemo)
add #import <NSLogger/NSLogger.h> statements where needed (for me this was in include files included by method files that made NSLogger method calls)
replace all NSLog method calls with LoggerCompat method calls
add the following code to your main program:
LoggerSetOptions(LoggerGetDefaultLogger(), kLoggerOption_BrowseBonjour|kLoggerOption_BufferLogsUntilConnection);
LoggerSetupBonjour(LoggerGetDefaultLogger(), CFSTR("_nslogger._tcp"), CFSTR("NSLogger"));
LoggerStart(LoggerGetDefaultLogger());
run your iOS application, a logger output window should appear on the desktop viewer and your LoggerCompat method calls should display text in the viewer
Related
I am a React Native newbie and I am trying to debug my application on Google Chrome since the XCode space is a bit noisy and my console.logs are hard to find.
My approach is to run the application from XCode to my iOS device, to open in Chrome http://localhost:8081/debugger-ui, to shake the device and to select "Debug JS Remotely". I get on the device the following error.
According to the official doc: Here
make sure your device and your desktop are using the same WIFI.
open the file RCTWebSocketExecutor.m and change "localhost" to the IP address of your computer
select "Debug JS Remotely" from the Developer Menu
I have setup the virtual box and installed Ubuntu and also installed “SYNC Applink™ Emulator” with help of your document (ref link: https://developer.ford.com/pages/tools-ios) in both my Windows and Mac.
I have also configured the Port forwarding setup on virtualBox manager and also I connected both system and iPhone in the same network , but still my iPhone not displayed on Phone tab of Sync emulator.
I have checked with your sample application of HelloSDL and App Store application of Spotify , this 2 application also not showing in Apps tab in Emulator.
please help us solve the problems.
I would suggest to try the following steps in HSDLProxyManager.m class:
In the method startProxy, uncomment the method which connects via TCP/IP and then comment the method which uses USB.
Change the variable RemoteIpAddress according to the ip of your virtual machine.
Is there any open source code available for VNC client for the iOS platform?
This Open Source package called wdaproxy provides an web application that is able to be used to remote control any iOS device with the WebDriverAgent (by Facebook) installed.
https://github.com/openatx/wdaproxy
Found this casually on the testerhome forum that has a ton of Chinese users, it provides a partial remote controlling of the phone through the browser session and is the nearest non-jailbreak option found so far.
Background
A few years ago I was developing for C#, WPF and Silverlight and then moved to developing for Android.
I've decided to give Windows phone a try, and install the newest Visual Studio Pro 2012 with its Windows phone sdk, together with the latest version of Windows - windows 8 pro.
I've created a new Windows phone project hoping I will start learning from a hello world project, and I've launched the emulator .
Some specs information
OS is windows 8 pro (final) . 64 bit CPU .
Visual Studio Pro 2012
Windows phone sdk 8
Connected by usb to a wireless D-Link device (DWA-140) .
The problem
Just as soon as I've started the emulator, a dialog came asking if I want to enable networking:
When I chose that I want, an error has appeared:
After selecting ok, the emulator crashed.
Knowing how to search for solutions on the internet, I've found a few (like here and here ) that suggested me to delete the network switches, create an internal switch, and whatnot.
The question
I don't understand what I'm doing wrong, and this is just my starting point. Can anyone please help me with this error and how to make the emulator work?
Please tell me the exact steps that I need to take.
EDIT: after uninstallation of anything related to VS and WP , i've re-installed them both and i still get the same errors.
Not only that , but when trying to create a new external switch (which some websites offered) , it showed me the next error :
How could such a basic feature of an emulator be missing out of the box ?
You might try a couple of things.
First, verify the network connection settings for the "vEthernet (Internal Ethernet Port Windows Phone Emulator Internal Switch)" adapter.
To do so, open "Control Panel\Network and Internet\Network Connections" in Control Panel. Right click on the "vEthernet (Internal Ethernet Port Windows Phone Emulator Internal Switch)" adapter, and choose "Properties". Under "This connection uses the following items:" verify that ONLY the following options are selected:
Client for Microsoft Networks
QoS Packet Scheduler
File and Printer Sharing for Microsoft Networks
Microsoft LLDP Protocol Driver
Link-Layer Topology Discovery Mapper I/O Driver
Link-Layer Topology Discovery Responder
Internet Protocol Version 6 (TCP/IPv6)
Internet Protocol Version 4 (TCP/IPv4)
In addition, you may want to review the network adapter settings for the emulator image in "Hyper-V Manager"
Verify the network adapters that are shown are valid. You might try disabling some (like the adapters connected to the WiFi or Wired Ethernet adapters on your machine) if the adapters they are bound to are not currently enabled in the OS.
Let me know if that helps!
I suspect you may be running afoul of UAC. As you've noted, it's trying to create a virtual device. Doing so requires elevated permissions. If I were you I would either run VS2012 as Administrator or completely disable UAC until it's all installed and configured, and then you can turn UAC back on if you prefer it on. I think Allen's comment about manually creating a VM with the appropriate networking is astute and a worthwhile experiment, since it sidesteps the possible UAC issues.
When running an app on an iPhone/iPad via Xcode, is there anyway to open files for writing on the Mac?
I have an app which requires the device to run, so using the simulator isn't an option. I do however need to analyze some of the app's output. Currently I have to write to files on the device, and then manually sync them to the Mac. I'm looking for a way to write my files to the Mac directly.
I recommend using NSLogger to stream your log data via Bonjour to the Mac. It has a Mac application that allows you view the data as it is coming in.
For more advanced logging you can also combine NSLogger with the CocoaLumberJack framework using this connector project.
Probably the best possible solution for your situation probably rests with leveraging the console and NSLog to redirect output to a file - that's an open channel between the device and the Mac you can leverage as long as your running the app from Xcode.
There are a number of questions and answers relating to how to do this - here's one:
Log XCode gdb output to file with .gdbinit
This solution assumes that you only need to be doing this when running the app through Xcode, which your question implies. If you need to write to the Mac when running the app directly on the device (not debugging) you would need to use some type of network file transfer, such as FTP or HTTP. You could probably whip up a simple HTTP-based logging app that would run on the Mac using:
https://github.com/robbiehanson/CocoaHTTPServer
Then you would just send the content line-by-line to the server. Many other possible approaches along those lines, and probably an existing Mac-based solution you could leverage.