Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update iOS docs for adding a Rust component; install Apple silicon iOS Simulator target. [ci full] #5322

Merged
merged 3 commits into from
Jan 10, 2023
Merged

Conversation

linabutler
Copy link
Contributor

@linabutler linabutler commented Jan 10, 2023

Hi! 👋🏼 I went through the (fantastic! 🤩) instructions for adding a Rust component, and updated the ones for iOS based on my experience. (I also had to install the aarch64-apple-ios-sim target on my M1 Mac, or the framework wouldn't build at all). Please take a look whenever it's convenient, thanks!

Rendered view

(No changes to the code, but I added [ci full] just in case, since I did change the CI bootstrapping script).

Pull Request checklist

  • Quality: This PR builds and tests run cleanly
    • Note:
      • For changes that need extra cross-platform testing, consider adding [ci full] to the PR title.
      • If this pull request includes a breaking change, consider cutting a new release after merging.
  • Tests: This PR includes thorough tests or an explanation of why it does not
  • Changelog: This PR includes a changelog entry in CHANGES_UNRELEASED.md or an explanation of why it does not need one
    • Any breaking changes to Swift or Kotlin binding APIs are noted explicitly
  • Dependencies: This PR follows our dependency management guidelines
    • Any new dependencies are accompanied by a summary of the due dilligence applied in selecting them.

Branch builds: add [ff-android: firefox-android-branch-name] and/or [fenix: fenix-branch-name] to the PR title.

* Fix the path to `MozillaTestServices.xcodeproj`.
* Clarify that the generated bindings for the component should be added
  after the UDL file. When adding a UniFFIed component for the first
  time, the `Generated` subdirectory won't exist until after the UDL
  file has been added to the project, _and_ Xcode has run
  `uniffi_bindgen` to generate the `.swift` file.
* Add a note to double-check that the new `.udl` file is _not_ added as
  a bundle resource (it should be added as a source), and the generated
  `.swift` file isn't added at all. Xcode's "add files" dialog likes to
  add files to a target, which will cause a cryptic build cycle error
  in this case.
* The "Headers" phase has been removed; it looks like it's not necessary
  to add `<your_crate_name>FFI.h` to the list of Public headers anymore.
* Fix the module name for tests.
We currently install the Intel iOS Simulator target, but not the Apple
silicon iOS Simulator target. Without the latter, `build-xcframework.sh`
can't build the framework on an M1 Mac.
@codecov-commenter
Copy link

codecov-commenter commented Jan 10, 2023

Codecov Report

Base: 46.91% // Head: 46.91% // No change to project coverage 👍

Coverage data is based on head (91e69ad) compared to base (d48232b).
Patch has no changes to coverable lines.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #5322   +/-   ##
=======================================
  Coverage   46.91%   46.91%           
=======================================
  Files         180      180           
  Lines       14474    14474           
=======================================
  Hits         6791     6791           
  Misses       7683     7683           

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

tarikeshaq
tarikeshaq previously approved these changes Jan 10, 2023
Copy link
Contributor

@tarikeshaq tarikeshaq left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WOHOO thanks a ton, @linabutler!! :shipit:

@linabutler
Copy link
Contributor Author

Yaaay thank you so much for the speedy review, @tarikeshaq! 🙏🏼

@mergify mergify bot dismissed tarikeshaq’s stale review January 10, 2023 22:57

The pull request has been modified, dismissing previous reviews.

Copy link
Contributor

@tarikeshaq tarikeshaq left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving again, because mergify did the thing again 😬

@tarikeshaq
Copy link
Contributor

I'll land this as long as the required CI passes, no need for the android builds to run! I'll also get @linabutler added to the github team that prevents mergify from dismissing reviews and allows landing PRs

@tarikeshaq tarikeshaq merged commit b6bbe8c into mozilla:main Jan 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants