-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathHOWTO.txt
107 lines (63 loc) · 3.04 KB
/
HOWTO.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
** this documentation does not yet exist ** work in progress **
Using EngineRoom in your Application
------------------------------------
Recommendations:
Put the EngineRoom folder beneath your project folder.
Use a shared build directory (Xcode -> Preferences -> Building)
These instructions are for use with the above setup.
Not using a shared build directory will need more project adjustments.
Now open your project, select the project itself and choose
Add -> Existing files.
Navigate to
OSX: EngineRoom/EngineRoom-OSX and choose EngineRoom-OSX.xcodeproj
iOS: EngineRoom/EngineRoom-iOS and choose EngineRoom-iOS.xcodeproj
Do not tick "Copy".
On opening the new entry it should reveal
OSX: EngineRoom.framework
iOS: libEngineRoom.a
OSX: Create a new Copy Files Build Phase with target "Frameworks" and drag the
framework to it (from the EngineRoom project).
Option-Drag the framework from there to your targets 'Link Binary with Libraries'.
iOS: Drag the libEngineRoom.a from the EngineRoom project to your targets 'Link Binary with Libraries'
Open the inspector for your target, Tab "General",
add EngineRoom-OSX as a dependency.
iOS: Add '-all_load' and '-ObjC' to 'Other Linker Flags'
(needed to load the ObjC classes and the initFunction)
OSX: Open your MainMenu NIB and add an NSObject, set its class to EngineRoom,
this will provide you with a LogPoint Menu.
If you prefer a MenuItem, add one and connect EngineRoom's engineRoomMenuItem outlet to it.
And try clicking the item.
I recommend adding
--- 8< ---
#import <EngineRoom/EngineRoom.h>
#import <EngineRoom/logpoints_default.h>
// useful for testing - makes your NSLog()s into logpoints
#import <EngineRoom/logpoints_nslog.h>
--- >8 ---
to your prefix header (Other Sources -> YourProject_Prefix.pch)
Now recompile and run.
On OSX:
hit Option-Command-.
You can enter predicates in the textfields to activate LogPoints.
There is shorthand available - still a moving target - therefore undocumented:
but here is an example:
if you enter:
:selectorPrefix ; @ClassPrefix ; #keyword ; ?drag
EngineRoom will activate LogPoints matching the following predicate:
( symbolNameOrSelectorNameForDisplay BEGINSWITH 'selectorPrefix' ) OR
( className BEGINSWITH 'ClassPrefix' ) OR
( keys CONTAINS 'keyword' ) OR
( formatInfo CONTAINS 'drag' )
formatInfo is (more or less) the format string you gave to your log message.
The startup filter is written to your apps user defaults and can be modified like this:
$ defaults write your.app.identifier logPointFilter '...'
$ defaults write your.app.identifier logPointDump -bool YES
will produce a dump of all logpoints for testing purposes
Both of these keys can be included in your Info.plist to be used
as a fallback if no defaults are set.
iOS:
The last paragraph above is the way to set filters for now.
Useful hints:
In Xcode, double click on the opening bracket of <file:lineno> and
hit Cmd-Shift-Opt-D (Open this quickly).
(This does not work if a Find Panel is active - close it)