How to setup RemoteLog in Swift/Orion
RemoteLog by Muirey03 is a useful utility for debugging your tweak. Since you can't connect Xcode's debugger (LLDB) and can't use print
you either have to use:
NSLog
Logger
, which works only with static values.UIAlertController
s, which are convenient for small text, but if there is a huge amounts of text that should be printed out, it becomes unusable quickly.
To get started with RemoteLog, follow the steps on their GitHub. Don't enter the RLog
code though!
Next, add this code in a new .swift
file, let's call it RemoteLog.swift
:
And now you can call this function from any place in your code. Let's try printing out some objects:
💡
Make sure you have the Python server running!
In the terminal running Python server you should see a similar output to what I get:
❯ python3 rlogserver.py
(100.0, 200.0)
<UIView: 0x13f5c0cf0; frame = (0 0; 0 0); layer = <CALayer: 0x2834f1360>>
💡
If you don't see anything:
- Verify you are compiling the correct project
- The IP is correctly set
- The server is running
- Try calling
- Check logs with
- Verify you are compiling the correct project
- The IP is correctly set
- The server is running
- Try calling
remLog
somewhere else- Check logs with
oslog
from BigBoss💡
Congrats, you finished!