![]() You may wish to disable this feature if your app already implements a crash handler, or if you do not want to include GTM as a dependency. Exception Handlingīy default, iConsole intercepts unhandled exceptions (crashes) and deciphers the stack trace using the GTM library. delegate = myDelegate įor an example of how to implement this, look at the HelloWorld app. Note that this code must be called BEFORE the console is first shown, or the input field will not appear: Use the following code to set your class as the delegate for the iConsole. iConsole does not place any restriction on the command syntax, or provide any helper methods for processing commands at this time. This receives a single string representing the command that the user has typed. your app delegate or main view controller.Īdd the handleConsoleCommand: method to your delegate class. It doesn't matter which one, but it should be a persistent class that will exist for the duration of the app's lifetime, e.g. Implement the iConsoleDelegate protocol on one of your classes. To enable it, you need to create a command delegate, which you do as follows: If you need to update the GTM classes, you can check out the latest version using:Īs well as displaying logs, the console can also allow user command input. To install iConsole into your app, drag the iConsole and (optionally) GTM folder into your project. tool in Xcode and make sure all files that you wish to use ARC for (including iConsole.m) are checked. If you wish to convert your whole project to ARC, comment out the #error line in iConsole.m, then run the Edit > Refactor > Convert to Objective-C ARC. To do this, go to the Build Phases tab in your target settings, open the Compile Sources group, double-click iConsole.m in the list and type -fobjc-arc into the popover. ![]() If you wish to use iConsole in a non-ARC project, just add the -fobjc-arc compiler flag to the iConsole.m class file. ARC CompatibilityĪs of version 1.5, iConsole requires ARC. it doesn't rely on any unavailable SDK features) but is no longer being tested for compatibility and may require tweaking or bug fixes to run correctly. 'Compatible' means that the library should work on this OS version (i.e. NOTE: 'Supported' means that the library has been tested with this version.
0 Comments
Leave a Reply. |