You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
mobile: fix iOS build for open source contributors (#39649)
**Commit Message:** mobile: fix iOS build for open source contributors
**Additional Description:**
Me and another contributor were unable to build iOS from our machines as
external contributors. This fixes the build.
~**1) XCode version:** The main change was to update the XCode version
to ~16.3~ 16.1, since 15.3 is too old and no longer runs on modern
macOS.~ Stopped forcing the old XCode version 15.3, allowing the
developer to build on modern machines.
~**2) CI macos version:** The `macos-14` machine doesn't have XCode
16.3. We could use 16.2, but developers should not be using macOS 14 for
security reasons, so migrating to `macos-15` better aligns with the
developer environment.~. _Keeping macos-14 for now to make it work with
the CI_
**3) Broken macros:** We also had to remove the C++17 override for iOS,
since it was causing variadic macros to fail. Adding
`--cxxopt=-Wno-error=variadic-macro-arguments-omitted` fixes the C++17
issue, but using C++20 is more sane and avoids loads of warnings.
**4) MINIMUM_IOS_VERSION:** We also update `MINIMUM_IOS_VERSION` from
16.3 to 16.5. Without that the build was failing with:
```
In file included from external/envoy/source/common/json/json_streamer.h:11:
external/envoy/source/common/buffer/buffer_util.h:46:40: error: 'to_chars' is unavailable: introduced in iOS 16.5 simulator
46 | std::to_chars_result result = std::to_chars(buf, buf + sizeof(buf), number);
```
So the support for 16.3 was already absent.
**5) Simulator version:** Stopped forcing the simulator version, which
prevents running on platforms that don't have the exact version of the
simulator required.
**Risk Level:** Medium
**Testing:**
Built the xcframework:
```sh
./bazelw build ios_dist --config=ios
```
Ran the Swift app:
```
./bazelw run //examples/swift/hello_world:app --config=ios
```
<img width="367" alt="image"
src="https://github.com/user-attachments/assets/1114e625-e140-4673-acab-6bd332888463"
/>
Ran the Objective-C app:
```
./bazelw run //examples/swift/hello_world:app --config=ios
```
I'm counting on the CI to run the tests.
**Docs Changes:** None
**Release Notes:** None
**Platform Specific Features:** No new features.
[Optional Runtime guard:]
[Optional Fixes #Issue]
[Optional Fixes commit #PR or SHA]
[Optional Deprecated:]
[Optional [API
Considerations](https://github.com/envoyproxy/envoy/blob/main/api/review_checklist.md):]
---------
Signed-off-by: Vinicius Fortuna <[email protected]>
0 commit comments