Swift Package for distributing Mozilla's Rust-based application components

Overview

Swift Package for Mozilla's Rust Components

This repository is a Swift Package for distributing releases of Mozilla's various Rust-based application components. It provides the Swift source code packaged in a format understood by the Swift package manager, and depends on a pre-compiled binary release of the underlying Rust code published from mozilla/application-services.

For more information, please consult:

  • application-services ADR-0003, which describes the overall plan for distributing Rust-based components as Swift packages.
  • The Swift Package Manager docs and GitHub repo, which explain the details of how Swift Packages work (and hence why this repo is set up the way it is).
  • The ios-rust crate which is currently responsible for publishing the pre-built MozillaRustComponents.xcframework.zip bundle on which this repository depends.

Overview

Here's a diagram of how this repository relates to the application-services repository and its release artifacts:

A box diagram describing how the rust-components-swift repo, applicaiton-services repo, and MozillaRustComponents XCFramework interact

Key points:

  • The application-services repo publishes a binary artifact MozillaRustComponents.xcframework.zip containing the Rust code and FFI definitions for all components, compiled together into a single library.
  • The Package.swift file references MozillaRustComponents.xcframework.zip as a Swift binary target.
  • The Package.swift file defines an individual module for the Swift wrapper code of each component.
    • Each module references its Swift source code directly as files in the repo.
    • Each module depends on MozillaRustComponentsWrapper which wraps MozillaRustComponents to provide the pre-compiled Rust code.

Cutting a new release

Whenever a new release of the underlying components is availble, we need to tag a new release in this repo to make them available to Swift components. To do so:

  • Edit Package.swift to update the URL and checksum of MozillaRustComponents.xcframework.zip.
  • Run ./make_tag.sh --as-version {APP_SERVICES_VERSION} X.Y.Z to create the new tag.
  • Run git push origin X.Y.Z to publish it to GitHub.

Adding a new component

To add a new component to be distributed via this repo, you'll need to:

  • Add its Rust code and .h files to the build for the MozillaRustComponents.xcframework.zip bundle, following the docs for the ios-rust crate.
  • If the component needs to dynamically generate any Swift code (e.g. for UniFFI bindings, or Glean metrics), add logic for doing so to the ./generate.sh script in this repository.
    • Swift packages can't dynamically generate code at build time, so we use the ./generate.sh script to do it ahead-of-time when publishing a release.
  • Edit ./Package.swift to add the new component.
    • Add a new library product for the component under "products".
    • Add a corresponding target for the component under "targets".
      • Make sure it depends on "MozillaRustComponentsWrapper" to pull in the pre-compiled Rust code, as well as on any third-party Swift packages that it may require.
  • Follow the instructions below to test it out locally.

That's it! The component will be included in the next release of this package.

Testing locally

Swift Packages can only be installed from a git repository, but luckily it is possible to use a local checkout for a git repository for local testing.

You may also need to follow the instructions for locally testing the ios-rust crate if you need to test changes in the underlying Rust code.

To test out some local changes to this repo:

  • Make your changes in a local checkout and commit them.
  • Make a new tag via ./make_tag.sh -f 0.0.1.
    • (You won't push this tag anywhere, but using a very low version number helps guard against any adverse consequences if it does accidentally escape your local machine).
  • In a consuming application, delete the Swift Package dependency on https://github.com/mozilla/rust-components-swift and replace it with a dependency on file:///path/to/your/local/checkout/rust-components-swift at the 0.0. release.

Testing against a local application-services checkout

To run against a local application services checkout, the make_tag.sh script supports setting a local path using a -l flag, for example:

./make_tag -l ../application-services 0.0.1

That's it! The consuming application should be able to import the package from your local checkout.

Comments
  • Remove glean as a dependency from rust-components-swift

    Remove glean as a dependency from rust-components-swift

    The FxiOS team is having an issue with Glean being packaged as part of the SPM due to the nature of the their dependency graph. We tested with https://github.com/mozilla/rust-components-swift/pull/27 and @nbhasin2 confirmed that he was able to successfully deploy to a hardware device (where the current release caused cycle dependency issues).

    We'll have to coordinate with the Focus team to ensure they're onboard with this and won't cause any forward issues (though it should be as simple as adding glean-swift as it's own SPM).

    opened by skhamis 9
  • Give this package the same version as the packages that it wraps

    Give this package the same version as the packages that it wraps

    Is it possible to give this package the same version of the package that it wraps? As in, the latest release of this package would be 85.4.1 ?

    cc @skhamis

    opened by st3fan 6
  • Expose glean as a library

    Expose glean as a library

    This is for adding glean as an exposed library to our rust-components-swift. The change is very simple, it basically does what https://github.com/mozilla/glean-swift does and is meant to replace it for consumers, so we can ensure there is only one version of glean our consumers get

    There is still one part missing from this change that I'll add, and that's the scripts. in glean-swift there is a useful script that updates the version, computes the checksum and creates a tag, we have a script ourselves that does similar things (minus the upgrading the version and computing the checksum, but it can very well do so)

    I am very open to feedback here, and if there are any other ways to do this (expose Glean) or other suggestions to make this easier, I'll happily take them!

    cc: @badboy , this won't merge yet, I'll get to the scripts on my Tuesday (Monday is a Canadian Holiday!) but cc'ing you in case you have any thoughts or opinions on the general direction

    opened by tarikeshaq 4
  • Ships a focus megazord and updates to 93.2.0

    Ships a focus megazord and updates to 93.2.0

    The rust-components-swift part of https://github.com/mozilla/application-services/issues/4821

    Needs https://github.com/mozilla/application-services/pull/4953 to land first, that PR also has the high-level reasoning for this.

    What's changed in this PR

    • We add a new library to ship, FocusAppServices that depends on a separate binary FocusRustComponents that has only the components the focus needs
    • Modifies the scripts to generate the appropriate swift code for focus, and place that in swift-source/focus
    • Moves the directory for the full binary into swift-source/all
    • Modifies the script that updates A-S to also update a focus version and checksum
    • Temporarily uses a circleci artifact, this will change to the release artifact before this lands

    This will stay as a draft until https://github.com/mozilla/application-services/pull/4953 lands and a release is cut.

    opened by tarikeshaq 3
  • Changes package.swit to reference only one target

    Changes package.swit to reference only one target

    Keeping it as a draft, because I realized that I merged the metrics.yaml for logins and nimbus in application services for this to work. I'll open a PR in App services to do that, but for now this should be OK for consumption by Firefox iOS

    opened by tarikeshaq 3
  • Adds local xcframework script

    Adds local xcframework script

    Creates a new script that builds an app-services xcframework, moves the xcframework to the repository, copies/generates any swift source files and switches the Package.swift to use the local xcframework.

    It also stages all the changes into git, and reminds users that changes to this repository must be committed before consumed.

    $ appservices_local_xcframework.sh -h
    

    prints:

    appservices_local_xcframework.sh
    Tarik Eshaq <[email protected]>
    
    Uses a local version of application services xcframework
    
    This script allows switches the usage of application services to a local xcframework
    built from a local checkout of application services
    
    
    USAGE:
        appservices_local_xcframework.sh [OPTIONS] <LOCAL_APP_SERVICES_PATH>
    
    OPTIONS:
        -d, --disable           Disables local development on application services
        -h, --help              Display this help message.
    
    opened by tarikeshaq 1
  • Create PR when Application Services makes a release

    Create PR when Application Services makes a release

    Summary

    • Adds a Github action that does the following steps:

      • Checks out the repository
      • Sets up python
      • Sets up pyhon dependencies needed for the scripts
      • Gets the last application-services tag from Github
      • Checks if we already updated to the latest release, if so, none of the next steps will run
      • Sets up git commiter information
      • Updates the git submodule to be in-line with the release
      • Updates the Package.swift to have the latest xcframework and checksum
      • Installs Rust so it can be used in the make_tag script
      • installs swiftformat, its need to make sure the code generated is formated
      • runs the make_tag, this could be a no-op if no changes to the udls or uniffi happened, but if there were changes, it would generate any code that needs to be regenerated
      • opens a pull request!
    • Adds helper scripts:

      • a script that checks if we already updated is_already_updated.py
      • a script to read the latest tag read_as_tag.py
      • a script to update the Package.swift, update_package_swift.py

      The github action will run every five minutes of the 3pm UTC hour of each day (8am PST) (it's set to run every minute, but github limits it to every five minutes, we can change frequency if we'd like though!)

      some minor cleanups for me to do here and there in the scripts, but I ran it a bunch of times on my fork so I think it's tested enough

      Could be a good idea to merge this, see it in action with version 84.5.0 and iterate if that's buggy

    opened by tarikeshaq 1
  • Adding FxA crate as a swift package

    Adding FxA crate as a swift package

    1. Will need the https://github.com/mozilla/application-services/pull/4405 for this to compile successfully

    Was able to import and use the FxAClient crate in Focus for iOS on an M1!

    From XCode logs:

    [RUST][fxa_client] fxa_client_50a2_FirefoxAccount_new
    [RUST][fxa_client] fxa_client_50a2_FirefoxAccount_begin_oauth_flow2021-08-23 15:29:02.999057-1000 Firefox Focus[37224:384239] Registering this ping: events
    [RUST][reqwest::async_impl::client] response '200 OK' for https://accounts.firefox.com/.well-known/fxa-client-configuration
    fxa oauth URL: https://accounts.firefox.com/authorization?action=email&response_type=code&entrypoint=junk&client_id=junk&scope=profile&state=zV1Pi_5TDOvBgWpVqfUgDQ&code_challenge_method=S256&code_challenge=vAP93d_5i_nX7KZMNSvML8ohh8QxRLYU5LWKEbozBCU&access_type=offline&keys_jwk=eyJrdHkiOiJFQyIsImNydiI6IlAtMjU2IiwieCI6InVaeU5Udmt0azZnNnVrV0tCbndOSE5kMW1zRHFFUTJaVGplNEx4NzhDNnMiLCJ5IjoiSnNTLURjS05sbGE5cXVZ[.....redacted...]N2ejE5YnRtVSJ9&redirect_uri=junk
    

    Since there are changes on the application-services side of things you'll need the submodule to update to the PR above:

    1. Pull down this branch
    2. update .gitmodules to pull the branch in the PR above
    [submodule "external/application-services"]
    	path = external/application-services
    	url = https://github.com/skhamis/application-services
    	branch = fxa-swift-package
    
    1. Run git submodule update --remote
    2. This should update your submodule to that branch From here you can follow the steps for testing locally in the README to ensure that it's up-to-date and easy to follow
    • Most likely will make a task to make this easier as we start porting more packages
    opened by skhamis 1
  • Create more detailed testing docs for producing custom r-c-s builds

    Create more detailed testing docs for producing custom r-c-s builds

    The firefox for iOS team ran into an issue using the local build section of r-c-s to produce a test build to import:

    Steps to reproduce:

    1. Have a fork/branch of r-c-s
    2. Follow the instructions https://github.com/mozilla/rust-components-swift#testing-locally
    3. Since there was no --as-version defined it'll use "main"
    4. Check in and push the branch to consume it as a https://www.github.com/.... in the SPM

    Results: It will fail due to the Package.swift using the latest binary of a RELEASED version of application services rather than the main xcframework: https://github.com/mozilla/rust-components-swift/blob/main/Package.swift#L5-L6

    We should mention that whatever version of application services you use (main, release version, etc) you need to either update the package.swift lines above or use the EXACT same version otherwise the uniffi builds will fail (or other weird reasons).

    opened by skhamis 0
Releases(96.1.3)
  • 96.1.3(Dec 9, 2022)

  • 96.1.2(Dec 8, 2022)

    v96.1.2 (2022-12-07)

    Full Changelog

    Logins

    What's changed

    • Removes Fennec migration code. The function importMultiple no longer exists. (#5268)

    Nimbus

    What's Changed

    • Event store date comparison logic update to be entirely relative (#5265)
    • Updates event store to initialize all dates at the start of the current year (#5279)
    • Adds new Kotlin/Swift methods to clear the event store (#5279)
    • Adds Swift methods to wait for operation queues to finish (#5279)

    Places

    What's changed

    • Removes Fennec migration code. (#5268) The following functions no longer exist:
      • importBookmarksFromFennec
      • importPinnedSitesFromFennec
      • importVisitsFromFennec

    Viaduct

    What's New

    • Allow viaduct to make requests to the android emulator's host address via a new viaduct_allow_android_emulator_loopback() (in Rust)/allowAndroidEmulatorLoopback() (in Kotlin) (#5270)

    Tabs

    What's changes

    • The ClientRemoteTabs struct/interface now has a last_modified field which is the time when the device last uploaded the tabs.
    Source code(tar.gz)
    Source code(zip)
  • 96.1.0(Nov 29, 2022)

    v96.1.0 (2022-11-29)

    Full Changelog

    FxA Client

    What's new

    • Exposed a new function for swift consumers resetPersistedState
      • resetPersistedState can be used to refresh the account manager to reflect the latest persisted state.
      • resetPersistedState should be called in between a different account manager instance persisting the state, and the current account manager persisting state
        • For example, the Notification Service in iOS creates its own instance of the account manager, changes its state (by changing the index of the last retrieved send tab)
        • The main account manager held by the application should callresetPersistedState before calling any other method that might change its state. This way it can retrieve the most up to date index that the Notification Services persisted.

    What's changed

    • The processRawIncomingAccountEvent function will now process all commands, not just one. This moves the responsibilty of ensuring each push gets a UI element to the caller.
    Source code(tar.gz)
    Source code(zip)
  • 96.0.1(Nov 20, 2022)

    v96.0.1 (2022-11-18)

    Full Changelog

    Logins

    What's Changed

    • Updated the URL redaction code to remove potential PII leak. Version 96.0.0 should not be used by downstream clients.

    Nimbus

    What's changed

    • Add methods to Kotlin and Swift to call the record event method on the nimbus client (#5244)

    FxA Client

    What's changed

    • The devices retrieved from the devices list are now only the devices that have been accessed in 21 days. This should help remove duplicates and idle devices for users. (#4984)
    Source code(tar.gz)
    Source code(zip)
  • 95.0.1(Nov 4, 2022)

  • 95.0.0(Nov 1, 2022)

    v95.0.0 (2022-10-28)

    Full Changelog

    General

    What's fixed

    • Fixed a bug released in 94.3.1. The bug broke firefox-ios builds due to a name conflict. (#5181)

    What's Changed

    • Updated UniFFI to 0.21.0. This improves the string display of the fielded errors on Kotlin. Currently only logins is using these errors, but we plan to start using them for all components.

    Autofill

    ⚠️ Breaking Changes ⚠️

    • The autofill API now uses AutofillApiError instead of AutofillError. AutofillApiError exposes a smaller number of variants, which will hopefully make it easier to use for the consumer.

    Logins

    ⚠️ Breaking Changes ⚠️

    • Renamed LoginsStorageError to LoginsApiError, which better reflects how it's used and makes it consistent with the places error name.
    • Removed the LoginsApiError::RequestFailed variant. This was only thrown when calling the sync-related methods manually, rather than going through the SyncManager which is the preferred way to sync. Those errors will now be grouped under LoginsApiError::UnexpectedLoginsApiError.

    What's Changed

    • Added fields to errors in logins.udl. Most variants will now have a message field.

    Nimbus ⛅️🔬🔭

    What's Changed

    • Disabled Glean events recorded when the SDK is not ready for a feature (#5185)
    • Add struct for IntervalData (behavioral targeting) (#5205)
    • Calls to log::error have been replaced with error_support::report_error (#5204)

    Places

    ⚠️ Breaking Changes ⚠️

    • Renamed PlacesError to PlacesApiError, which better reflects that it's used in the public API rather than for internal errors.
    • Removed the JsonError, InternalError, and BookmarksCorruption variants from places error. Errors that resulted in InternalError will now result in UnexpectedPlacesError. BookmarksCorruption will also result in an UnexpectedPlacesError and an error report will be automatically generated. JsonError didn't seem to be actually used.

    Tabs

    ⚠️ Breaking Changes ⚠️

    • The tabs API now uses TabsError with TabsApiError. TabsApiError exposes a smaller number of variants, which will hopefully make it easier to use for the consumer.
    Source code(tar.gz)
    Source code(zip)
  • 94.3.0(Sep 22, 2022)

    v94.3.0 (2022-09-20)

    Full Changelog

    General

    What's Changed

    • Rust toolchain has been bumped to 1.63 and minimum version bumped to 1.61 to comply with our Rust Policy
    • Android: Upgraded NDK from r21d to r25b. (#5142)

    Places

    What's Changed

    • Added metrics for the run_maintenance() method. This can be used by consumers to decide when to schedule the next run_maintenance() call and to check if calls are taking too much time.

    What's new

    • Exposed a function in Swift migrateHistoryFromBrowserDb to migrate history from browser.db to places.db, the function will migrate all the local visits in one go. (#5077).
      • The migration might take some time if a user had a lot of history, so make sure it is not run on a thread that shouldn't wait.
      • The migration runs on a writer connection. This means that other writes to the places.db will be delayed until the migration is done.

    Nimbus

    What's Changed

    • Added applyLocalExperiments() method as short hand for setLocalExperiments and applyPendingExperiments. (#5131)
      • applyLocalExperiments and applyPendingExperiments now returns a cancellable job which can be used in a timeout.
      • initialize function takes a raw resource file id, and returns a cancellable Job.
    Source code(tar.gz)
    Source code(zip)
  • 94.1.0(Aug 18, 2022)

  • 94.0.0(Aug 8, 2022)

    v94.0.0 (2022-08-02)

    Full Changelog

    Logins

    ⚠️ Breaking Changes ⚠️

    • Removed expired logins sqlcipher migration metrics and renamed the migrateLoginsWithMetrics function since it no longer reports metrics. An associated iOS PR (#11470) has been created to address the function renaming. (#5064)
    Source code(tar.gz)
    Source code(zip)
  • 93.7.1(Jul 27, 2022)

  • 93.7.0(Jul 19, 2022)

    v93.7.0 (2022-07-18)

    Full Changelog

    Nimbus FML ⛅️🔬🔭🔧

    What's Changed

    • Added MOZ_APPSERVICES_MODULE environment variable to specify the megazord module for iOS (#5042). If it is missing, no module is imported.

    ✨ What's New ✨

    • Enabled remote loading and using configuring of branches. (#5041)
    • Add a fetch command to nimbus-fml to demo and test remote loading and paths. (#5047)

    Logins

    What's Changed

    • Updated the LoginsStorageError implementation and introduce error reporting for unexpected errors. Note that some errors were removed, which is technically a breaking change, but none of our consumers use those errors so it's not a breaking change in practice.
    Source code(tar.gz)
    Source code(zip)
  • 93.5.0(Jun 16, 2022)

  • 93.3.0(Jun 8, 2022)

    v93.3.0 (2022-06-06)

    Full Changelog

    Error-support

    What's New

    • Added a new error reporting system that is intended to eventually replace using log::error to report errors
    • Added code using the new system to track down application-services#4856
    • Added UniFFI API for this crate. Consumers should use this to register for error reports and breadcrumbs.
    Source code(tar.gz)
    Source code(zip)
  • 93.2.2(May 27, 2022)

  • 93.2.1(May 26, 2022)

    v93.2.1 (2022-05-24)

    Full Changelog

    General

    What's new

    • Uniffi was upgraded to 0.18.0. For our consumers, this means there now exported types that used to be internal to uniffi. (#4949).
      • The types are:
        • Url alias for string
        • PlacesTimestamp alias fori64
        • VisitTransitionSet alias for i32
        • Guid alias for string
        • JsonObject alias for string
      • Non of the exposed types conflict with a type in iOS so this is not a breaking change.

    Nimbus ⛅️🔬🔭

    What's new

    • Make generation of Experimenter compatible YAML repeatable: fields, variables, features and enum variants are listed alphabetically. (#4964).

    Tabs

    What's Changed

    • The component has been updated for integration into Firefox iOS (#4905).
      • The DeviceType naming conflict which prevented rust-components-swift from generating Tabs code has been resolved.
      • Errors and the reset function have been exposed.
      • Parameters for the sync function have been updated to match the SyncUnlockInfo parameters.
      • The tabs-sync example has been updated with the above changes.
    Source code(tar.gz)
    Source code(zip)
  • 93.2.0(May 13, 2022)

    v93.2.0 (2022-05-11)

    Full Changelog

    General

    What's new

    • Application services now releases a separate xcframework with only the components needed by focus-ios (namely Nimbus, Viaduct and Rustlog). This change is only relevant for focus, it does not affect the already existing xcframework for firefox ios. (#4953)
    Source code(tar.gz)
    Source code(zip)
  • 93.1.0(May 6, 2022)

    v93.1.0 (2022-05-06)

    Full Changelog

    Nimbus ⛅️🔬🔭

    What's New

    • New API in the FeatureHolder, both iOS and Android to control the output of the value() call:
      • to cache the values given to callers; this can be cleared with FxNimbus.invalidatedCachedValues()
      • to add a custom initializer with with(initializer:_)/withInitializer(_).

    Places

    What's Fixed:

    • Fixed a bug in Android where non-fatal errors were crashing. (#4941)
    • Fixed a bug where querying history metadata would return a sql error instead of the result (4940)

    What's new:

    • Exposed the deleteVisitsFor function in iOS, the function can be used to delete history metadata. (#4946)
      • Note: The API is meant to delete all history, however, iOS does not use the places Rust component for regular history yet.
    Source code(tar.gz)
    Source code(zip)
  • 93.0.4(Apr 29, 2022)

    v93.0.4 (2022-04-28)

    Full Changelog

    Places

    What's New

    • The delete_visits_for() function now deletes all history metadata even when the item is bookmarked.

    Nimbus

    What's fixed

    • Fixed a bug where the visibility of GetSdk was internal and it was used in generated FML code. (#4927)
    Source code(tar.gz)
    Source code(zip)
  • 93.0.3(Apr 27, 2022)

    v93.0.3 (2022-04-27)

    Full Changelog

    Nimbus ⛅️🔭🔬

    What's New

    • Added targeting attributes for language and region, based upon the locale. #4919
      • This also comes with an update in the JEXL evaluator to handle cases where region is not available.

    What's Changed

    • Fixed: A crash was detected by the iOS team, which was traced to FeatureHolder.swift. (#4924)
      • Regression tests added, and FeatureHolder made stateless in both Swift and Kotlin.
    Source code(tar.gz)
    Source code(zip)
  • 93.0.2(Apr 25, 2022)

    v93.0.2 (2022-04-25)

    Full Changelog

    Nimbus FML

    What's fixed

    • (iOS only) Made the extensions on String and Variables public. The extended functions are used in the generated code and that didn't compile in consumers when internal.
    Source code(tar.gz)
    Source code(zip)
  • 93.0.1(Apr 21, 2022)

  • 91.1.2(Apr 21, 2022)

    v91.1.2 (2022-04-19)

    NOTE: This is not the latest release, and was made a patch release on a previous release to fix a bug on android, you most likely would like to pick up the latest release (93.0.1 at the time of this release). See https://github.com/mozilla/rust-components-swift/releases

    Full Changelog

    IMPORTANT: The following change was cherry-picked to 91.1.2 which was a release not from the main branch. The change then landed in v93.0.1. This means that versions v92.0.0 - v93.0.0 do not have the change.

    Places

    • Downgraded places get_registered_sync_engine log:error to log:warn to fix an issue where places was unnecessarily creating sentry noise.

    Autofill

    What's New

    • Added temp-store, journal-mode, and foreign-keys pragmas to autofill component. (#4882)
    Source code(tar.gz)
    Source code(zip)
  • 93.0.0(Apr 14, 2022)

    v93.0.0 (2022-04-13)

    Full Changelog

    Nimbus ⛅️🔭🔬 + Nimbus FML ⛅️🔬🔭🔧

    What's New

    • Add support for bundled resources in the FML in Swift. This corresponds to the Image and Text types. #4892
      • This must include an update to the megazord, as well re-downloading the nimbus-fml binary.
      • Kotlin support for the same has also changed to match the Swift implementation, which has increased performance.
    Source code(tar.gz)
    Source code(zip)
  • 92.0.1(Mar 28, 2022)

    v92.0.1 (2022-03-24)

    Note: none of the changes released in 92.0.1 on Applications Services impact this repository.

    Full Changelog

    Nimbus FML ⛅️🔬🔭🔧

    What's Fixed

    • Swift: a bug in our understanding of Swift optional chaining rules meant that maps with a mapping and merging produced invalid code. (#4885)

    General

    What's Changed

    • Added documentation of our sqlite pragma usage. (#4876)
    Source code(tar.gz)
    Source code(zip)
  • 92.0.0(Mar 24, 2022)

    v92.0.0 (2022-03-17)

    Full Changelog

    Places

    ⚠️ Breaking Changes ⚠️

    • Removed some functions related to sync interruption. These were never really completed and don't seem to be in use by iOS/Android code:
      • PlacesApi.new_sync_conn_interrupt_handle()
      • Swift only: PlacesAPI.interrupt()
    • The exception variant InternalPanic was removed. It's only use was replaced by the already existing UnexpectedPlacesException. (#4847)

    What's New

    • The Places component will report more error variants to telemetry. (#4847)

    Autofill / Logins / Places / Sync Manager, Webext-Storage

    What's Changed

    • Updated interruption handling and added support for shutdown-mode which interrupts all operations.

    Tabs

    ⚠️ Breaking Changes ⚠️

    • The tabs component's constructor now requires the path to the database file where remote tabs will be persisted to.
    • Requesting remote tabs before the first sync will now return the tabs in this database, so may be "stale".

    Glean

    ⚠️ Breaking Changes ⚠️

    Swift

    • GleanMetrics should now be imported under import Glean instead of importing via MozillaRustComponents

    Nimbus FML

    What's Changed

    • Papercut fixes for nicer developer experience #4867
      • More helpful validation error reporting
      • Better handling of defaults in objects and enum maps
      • More YAML syntactic checking.
    • Allow experimenter to output to a YAML file, as well as JSON. #4874
      • If the file extension is yaml, then output as YAML, otherwise, output as JSON.
    Source code(tar.gz)
    Source code(zip)
  • 91.1.0(Feb 16, 2022)

    v91.1.0 (2022-02-11)

    Full Changelog

    ⛅️🔬🔭 Nimbus SDK

    What's fixed

    • Fixes a bug where disabling studies did not disable rollouts. (#4807)

    ✨ What's New ✨

    • A message helper is now available to apps wanting to build a Messaging System on both Android and iOS. Both of these access the variables provided by Nimbus, and can have app-specific variables added. This provides two functions:
      • JEXL evaluation (#4813) which evaluates boolean expressions.
      • String interpolation (#4831) which builds strings with templates at runtime.

    Xcode

    • Bumped Xcode version from 13.1.0 -> 13.2.1

    Nimbus FML

    What's fixed

    • Fixes a bug where each time the fml is run, the ordering of features in the experimenter json is changed. (#4819)
    Source code(tar.gz)
    Source code(zip)
  • 91.0.1(Feb 3, 2022)

    v91.0.1 (2022-02-02)

    This release has a significant change to how the components are published.

    We now only publish one library, called MozillaAppServices. This is to fix problems with having multiple libraries dynamically loaded into the app.

    Full Changelog

    Places

    What's Changed

    • The database initialization code now uses BEGIN IMMIDIATE to start a transaction. This will hopefully prevent database is locked errors when opening a sync connection.

    What's New

    • The HistoryVisitInfo struct now has an is_remote boolean which indicates whether the represented visit happened locally or remotely. (#4810)
    Source code(tar.gz)
    Source code(zip)
  • 91.0.0(Feb 1, 2022)

    v91.0.0 (2022-01-31)

    Full Changelog

    Nimbus FML

    What's New

    • The Nimbus FML can now generate swift code for the feature manifest. (#4780)
      • It can be invoked using:
      $ nimbus-fml <FEATURE_MANIFEST_YAML> -o <OUTPUT_NAME> ios features
      
      • You can check the support flags and options by running:
      $ nimbus-fml ios --help
      
      • The generated code exposes:
        • a high level nimbus object, whose name is configurable using the --classname option. By default the object is MyNimbus.
        • All the enums and objects defined in the manifest as idiomatic Swift code.
      • Usage:
        • To access a feature's value:
          // MyNimbus is the class that holds all the features supported by Nimbus
          // MyNimbus has an singleton instance, you can access it using the `shared` field:
          
          let nimbus = MyNimbus.shared
          
          // Then you can access the features using:
          // MyNimbus.features.<featureNameCamelCase>.value(), for example:
          
          let feature = nimbus.features.homepage.value()
          
        • To access a field in the feature:
          // feature.<propertyNameCamelCase>, for example:
          
          assert(feature.sectionsEnabled[HomeScreenSection.topSites] == true)
          

    ⚠️ Breaking Changes ⚠️

    • Android only: Accessing drawables has changed to give access to the resource identifier. (#4801)

      • Migration path to the old behaviour is:
      let drawable: Drawable = MyNimbus.features.exampleFeature.demoDrawable
      

      becomes:

      let drawable: Drawable = MyNimbus.features.exampleFeature.demoDrawable.resource
      

    General iOS

    What's changed

    • Moved SwiftKeychainWrapper from an external Swift Package to be bundled with FxA. This is due to issues Firefox iOS had with their dependency tree. (#4797)
    • Exposed all crates as targets for the XCFramework. (#4797)
    Source code(tar.gz)
    Source code(zip)
  • 90.0.0(Jan 25, 2022)

    90.0.0 (2022-01-25)

    Places

    ⚠️ Breaking Changes ⚠️

    • Places has been completely UniFFI-ed

    Glean

    ⚠️ Breaking Changes ⚠️

    • The bundled version of Glean has been updated to v43.0.2. See the Glean Changelog for full details. BREAKING CHANGE: Pass build info into initialize, which contains the build date. A suitable instance is generated by glean_parser in GleanMetrics.GleanBuild.info.

    Nimbus

    What's new

    • The Nimbus SDK now support application version targeting, where experiment creators can set app_version|versionCompare({VERSION}) >= 0 and the experiments will only target users running VERSION or higher. (#4752)
      • The versionCompare transform will return a positive number if app_version is greater than VERSION, a negative number if app_version is less than VERSION and zero if they are equal
      • VERSION must be passed in as a string, for example: app_version|versionCompare('95.!') >= 0 will target users who are on any version starting with 95 or above (95.0, 95.1, 95.2.3-beta, 96 etc..)
    Source code(tar.gz)
    Source code(zip)
  • 87.2.0(Jan 3, 2022)

    Please see https://github.com/mozilla/application-services/releases/tag/v87.2.0 for the latest application-services changes associated with this release.

    Source code(tar.gz)
    Source code(zip)
Owner
Mozilla
This technology could fall into the right hands.
Mozilla
💾 A collection of classic-style UI components for iOS

A collection of classic-style UI components for UIKit, influenced by Windows 95 Introduction This is a little exploration into applying '90s-era desig

Blake Tsuzaki 2.2k Dec 22, 2022
Spinner loader components with liquid animation

LiquidLoader LiquidLoader is the spinner loader UI components with liquid animation, inspired by Spinner Loader - Gooey light Effect [] (https://githu

Takuma Yoshida 1.3k Dec 21, 2022
Modular and customizable Material Design UI components for iOS

Material Components for iOS Material Components for iOS (MDC-iOS) helps developers execute Material Design. Developed by a core team of engineers and

Material Components 4.6k Dec 29, 2022
SwiftUI: Components Library Inspired by Twitter's Bootstrap

bootswiftui SwiftUI: Components Library Inspired by Twitter's Bootstrap Warning This is just SwiftUI exercise. Please do not consider using this repo

Robert Sandru 1 Oct 27, 2022
A few drop-in SwiftUI components for easily importing and thumb-nailing files

FilesUI A few drop-in SwiftUI components for easily importing and thumb-nailing files Usage 1. Import Files To import files you can use the FileImport

Brianna Zamora 3 Oct 19, 2022
It provides UI components such as popover, popup, dialog supporting iOS apps

Overview LCUIComponents is an on-going project, which supports creating transient views appearing above other content onscreen when a control is selec

Linh Chu 7 Apr 8, 2020
NotSwiftUI is designed to help you create UI components quickly and efficiently with code!

NotSwiftUI NotSwiftUI is designed to help you create UI components quickly and efficiently with code! Capitalizing on the idea that most of the UI ele

Jonathan G. 50 Dec 20, 2022
A paging scroll view for SwiftUI, using internal SwiftUI components

PagingView A paging scroll view for SwiftUI, using internal SwiftUI components. This is basically the same as TabView in the paging mode with the inde

Eric Lewis 18 Dec 25, 2022
SwiftUI components and extensions that seem to be highly reusable

SwiftUI components and extensions that seem to be highly reusable

Yusuke Hosonuma 56 Dec 15, 2022
The CITPincode package provides a customizable pincode view

The CITPincode package provides a customizable pincode view. It includes an optional resend code button with a built-in cooldown and an optional divider to be placed anywhere between the cells.

Coffee IT 3 Nov 5, 2022
Swift based simple information view with pointed arrow.

InfoView View to show small text information blocks with arrow pointed to another view.In most cases it will be a button that was pressed. Example To

Anatoliy Voropay 60 Feb 4, 2022
Non-intrusive iOS UI library to implement overlay based interfaces

OverlayContainer is a UI library written in Swift. It makes easier to develop overlay based interfaces, such as the one presented in the Apple Maps, S

Applidium 1k Jan 4, 2023
Placeholder views based on content, loading, error or empty states

StatefulViewController A protocol to enable UIViewControllers or UIViews to present placeholder views based on content, loading, error or empty states

Alexander Schuch 2.1k Dec 8, 2022
A simple Elm-like Store for SwiftUI, based on ObservableObject

ObservableStore A simple Elm-like Store for SwiftUI, based on ObservableObject.

Gordon Brander 28 Nov 8, 2022
A custom reusable circular / progress slider control for iOS application.

HGCircularSlider Example To run the example project, clone the repo, and run pod install from the Example directory first. You also may like HGPlaceho

Hamza Ghazouani 2.4k Jan 6, 2023
Peanut is an orginizational application focusing on user customization whithin a simple interface.

Peanut Peanut is an organizational application focusing on user customization within a simple interface. Table of Contents User Features Architecture

Adam Herring 2 Mar 2, 2022
Application to test MVVM architecture with Combine and UIKit librarys.

Application to test MVVM architecture with Combine and UIKit librarys.

Jose Javier Escudero Gómez 0 Dec 14, 2021
This is the replica of Foursquare application, created using storyboard.

FourSquare-Storyboard- This is the replica of Foursquare application, created using storyboard. API Usage from Foursuare Places Search Get Place Detai

Yasir Siddique 2 Oct 31, 2022
Super awesome Swift minion for Core Data (iOS, macOS, tvOS)

⚠️ Since this repository is going to be archived soon, I suggest migrating to NSPersistentContainer instead (available since iOS 10). For other conven

Marko Tadić 306 Sep 23, 2022