Ages ago, I used Realm with iOS projects, but am no longer doing so. However, I still have the template available in Xcode as seen here:
It was never an issue until the Xcode 11 beta, where every time I run a project, I get the following in my console:
error: module importing failed: invalid token (rlm_lldb.py, line 37)
File "temp.py", line 1, in
At this point, I'd just like to remove it, but I cannot find any documentation on how to do it from Realm.
Xcode keeps its custom templates at:
~/Library/Developer/Xcode/Templates
Folders are “groups” within Xcode.
If you navigate to that folder, (ensuring Xcode is not running) you can simple drag the Realm folder to the trash.
There may be files located at the following paths as well that can be removed (with Xcode closed)
~/Library/Application Support/Realm/rlm_lldb.py
~/Library/Application Support/Developer/Shared/Xcode/Plug-ins/RealmPlugin.xcplugin
Then I had to clean and run once - which crashed. But then I cleaned and ran a second time which worked, and has been working for a couple of weeks with no side effects.
Later I finally found the root cause which is still related to the plug in. There are two options;
https://github.com/realm/realm-cocoa
which has a folder called plugin with information for installing the plug in. I've installed it and that seems to correct the error outlined in the question which is related to this error
Otherwise, if you want to remove the plug in entirely, the old template installer modifies a hidden file located at
~/.lldbinit
you can see it by going to the command line, navigating to your home folder
cd..
and then showing hidden files
ls -a
The .lldbinit in your home directory is sourced in BEFORE the target you are going to debug is created. It's purpose is to set up the environment for creating that target.
from this answer.
So that file will contain this line
command script import "~/Library/Application Support/Realm/rlm_lldb.py" --allow-reload
which will try to set up your Xcode environment with the rlm_lldb.py file.
If you're not using the plug in and have removed the other files per above, you can further remove references to it by editing the ~/.lldbinit file.
If you are familiar with the pico editor you can edit the file with
pico .lldb
and either comment the line with a #
or just delete the line entirely.
Credit goes to the answer by sahm to this question.
The rest of the Realm plugin can be disabled by editing ~/.lldbinit
and removing or commenting out this line:
command script import "~/Library/Application Support/Realm/rlm_lldb.py" --allow-reload
Add a #
to comment it out:
#command script import "~/Library/Application Support/Realm/rlm_lldb.py" --allow-reload
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With