Tulsi generated projects behave just like Xcode projects in this respect. You simply change the build configuration for your target scheme.
permission denied
error. What’s wrong?If Instruments reports an error along the lines of
Target failed to run: Permission to debug <your_app_id> was denied. The app must be signed with a development identity (e.g. iOS Developer).
it usually means that your entitlements are missing get-task-allow
. To fix this, you will want to add
<key>get-task-allow</key><true/>
to your entitlements file for builds which you do not plan to submit to Apple for signing.
Xcode 8 fixes a bug preventing the use of LLDB's target.source-map setting via ~/.lldbinit-Xcode
files. Tulsi makes use of this feature to remove the need to inject environment-specific information into Bazel-generated binaries.
Unfortunately, the lldbinit file is parsed by Xcode once and then cached until Xcode restarts, meaning that loading additional projects without restarting Xcode will lead to incorrect behavior. Anytime you load a different Tulsi-generated Xcode project and find that breakpoints no longer work, you should close any other projects and restart Xcode in order to resolve the issue.
As background: the use of .lldbinit
was initially an attempt to fix Swift debugging but various other issues were discovered, necessitating the addition of a dSYM post-processor which may someday replace Tulsi's use of lldbinit entirely.
The Tulsi options pane provides settings for flags that can be passed through to Bazel.
As mentioned in the user guide “The project bundle is entirely shareable apart from the tulsiconf-user
files, which contain settings that are likely to be user specific (such as absolute paths).”
So you'll want to .gitignore
.tulsiconf-user
files but otherwise the entire .tulsiproj
bundle is encouraged to be revision controlled and shared across your team.
Tests can be grouped via Bazel's test_suite
rule, with one small caveat. Tests that are not xctest-based (where the xctest
attribute is set to the non-default 0
) must be run as standalone targets. When building the Xcode scheme for a test_suite
rule, Tulsi will print a warning and ignore any non-xctest tests that are included in the suite.
The Tulsi build script produces a ton of interesting debugging data that isn‘t shown by default in the Xcode UI. Luckily it’s very simple to retrieve:
Open up the Xcode Report navigator, right click anyplace in the build log and select “Expand All Transcripts.”
Open up the Xcode Report navigator, scroll down to the action you'd like to expand, and click on the expander button on the right hand side.
Once things are expanded, you can right click on the build log and select “Copy Transcript for Shown Results” to copy everything to the pasteboard.
Simulator logs may be retrieved via Console.app (/Applications/Utilities
) or by grabbing the files directly.
Generally you'll need to provide two logs, both of which may be found under ~/Library/Logs
.
CoreSimulator.log
<simulator ID>/system.log
Where <simulator ID>
is the GUID of the simulator you were using when you encountered a problem. If you don't know the simulator ID, you can retrieve it through the “Devices” window in Xcode (under the Window
menu or shift+cmd+2).
Device logs may be retrieved via the Xcode “Devices” window (under the Window
menu or shift+cmd+2 in Xcode). If the console log is not already showing, you can click the disclosure button on the lower right to open it.
tulsi - /ˈto͝olsē/ A kind of basil that is venerated by Hindus as a sacred plant.