Build & run the example iOS apps¶
Note: This document assumes that you have installed the :ref:`iOS build requirements <ios_requirements>`_.
The fastest way to build and run the sample iOS apps is to run the following command:
./bazelw run //examples/swift/hello_world:app
This will build and run the Hello World iOS app in a new iOS Simulator.
Using the Xcode GUI¶
Envoy Mobile makes use of the rules_xcodeproj project to add support for many of Xcode’s development, debugging and profiling features to Envoy Mobile.
To start, run ./bazelw run //:xcodeproj to generate an Xcode project
and xed . to open it in Xcode (or double-click Envoy.xcodeproj
in Finder).
In Xcode’s scheme selector, pick the app target you want to build (e.g.
Hello World App), pick a Simulator to run it on,
then hit cmd-R to build and run.
From there, most Xcode features should just work for all transitively compiled source files in C/C++/Objective-C/Objective-C++/Swift:
Auto-complete
Syntax highlighting
Go to definition
Breakpoints
LLDB console
Thread navigator
Symbols
Metrics like CPU/memory/networking/energy
Profiling with Instruments
Running on a real iPhone¶
You can build and run the example iOS apps on a physical iPhone by following these steps:
Set the
TEAM_IDvalue inexamples/BUILDto your Apple Developer Team ID found in the Apple Developer Portal.If needed, change the
PROFILE_NAMEvalue to the name shown by clicking the (i) next to “Xcode Managed Profile” in Xcode’s “Signing and Capabilities” tab.Follow the same steps as defined in the Using the Xcode GUI section above, but targeting your device instead of a simulator.

