Remove all Carthage and switch to xcframeworks (#4619)

* removing carthage and using xcframeworks
* update xcode to 13.2.1
* update resource class
This commit is contained in:
Sammy Khamis 2022-02-03 15:05:05 -10:00 коммит произвёл GitHub
Родитель cbfa39d756
Коммит a086905f3d
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
23 изменённых файлов: 39 добавлений и 373 удалений

Просмотреть файл

@ -138,22 +138,6 @@ commands:
popd popd
- build-libs: - build-libs:
platform: ios platform: ios
carthage-bootstrap:
steps:
- run:
name: Determine XCode version
command: echo "$(xcodebuild -version)" >| xcode_version
- restore_cache:
name: Restore Carthage/ cache
key: carthage-dir-cache-{{ arch }}-{{ checksum "xcode_version" }}-{{ checksum "Cartfile.resolved" }}
- run:
name: Bootstrap Carthage dependencies
command: XCODE_XCCONFIG_FILE=`pwd`/xcconfig/xcode-12-fix-carthage-lipo.xcconfig carthage bootstrap --platform iOS --cache-builds
- save_cache:
name: Save Carthage/ cache
key: carthage-dir-cache-{{ arch }}-{{ checksum "xcode_version" }}-{{ checksum "Cartfile.resolved" }}
paths:
- Carthage
test-setup: test-setup:
steps: steps:
- build-desktop-libs - build-desktop-libs
@ -224,7 +208,6 @@ commands:
rm /usr/local/lib/python3.9/site-packages/six.py rm /usr/local/lib/python3.9/site-packages/six.py
brew install swift-protobuf --force brew install swift-protobuf --force
- carthage-bootstrap
- run: - run:
name: Verify the build environment name: Verify the build environment
command: ./libs/verify-ios-ci-environment.sh command: ./libs/verify-ios-ci-environment.sh
@ -237,8 +220,8 @@ executors:
- image: cimg/rust:1.53.0 - image: cimg/rust:1.53.0
macos: macos:
macos: macos:
xcode: 13.1.0 xcode: 13.2.1
resource_class: m2.medium resource_class: macos.x86.medium.gen2
jobs: jobs:
Check Swift formatting: Check Swift formatting:
@ -330,56 +313,7 @@ jobs:
- run: rustup override set beta - run: rustup override set beta
- run-tests - run-tests
- save-sccache-cache - save-sccache-cache
iOS build carthage:
executor: macos
steps:
- full-checkout
- restore-sccache-cache
- install-rust
- setup-rust-target-version
- setup-sccache
- setup-ios-environment
- run:
name: Build Carthage archive
no_output_timeout: 20m
command: |
if [ -z "${CIRCLE_TAG}" ]; then
# XCode tests build in Debug configuration, save us a full
# Rust rebuild in Release mode by forcing Debug mode on
# non-release builds.
bash build-carthage.sh --out MozillaAppServices.framework.zip --configuration Debug
else
bash build-carthage.sh --out MozillaAppServices.framework.zip
fi
- store_artifacts:
path: raw_xcodebuild.log
destination: logs/raw_xcodebuild.log
- run:
name: "Create Carthage bin-only project specification"
command: |
ZIP_URL=https://circleci.com/api/v1.1/project/github/mozilla/application-services/$CIRCLE_BUILD_NUM/artifacts/0/dist/MozillaAppServices.framework.zip
echo "{\"0.0.1\":\"$ZIP_URL\"}" > mozilla.app-services.json
- save-sccache-cache:
path: "~/Library/Caches/Mozilla.sccache"
- store_artifacts:
name: Store Carthage framework in workspace
path: MozillaAppServices.framework.zip
destination: dist/MozillaAppServices.framework.zip
- store_artifacts:
name: Store Carthage bin-only project specification in workspace
path: mozilla.app-services.json
destination: dist/mozilla.app-services.json
- run:
name: "Carthage binary snapshot URL"
command: |
JSON_URL=https://circleci.com/api/v1.1/project/github/mozilla/application-services/$CIRCLE_BUILD_NUM/artifacts/0/dist/mozilla.app-services.json
echo "Add the following line to your Cartfile:"
echo "binary \"$JSON_URL\" ~> 0.0.1-snapshot # mozilla/application-services@$CIRCLE_SHA1"
- persist_to_workspace:
root: .
paths:
- MozillaAppServices.framework.zip
iOS build xcframework: iOS build xcframework:
executor: macos executor: macos
steps: steps:
@ -433,17 +367,6 @@ jobs:
fi fi
- save-sccache-cache: - save-sccache-cache:
path: "~/Library/Caches/Mozilla.sccache" path: "~/Library/Caches/Mozilla.sccache"
Carthage release:
executor: macos
steps:
- full-checkout
- attach_workspace:
at: .
- install-ghr
- run:
name: Release Carthage archive on GitHub
command: |
ghr -replace "${CIRCLE_TAG}" MozillaAppServices.framework.zip
XCFramework release: XCFramework release:
executor: macos executor: macos
steps: steps:
@ -535,22 +458,10 @@ workflows:
ios-test-and-artifacts: ios-test-and-artifacts:
jobs: jobs:
- iOS test - iOS test
- iOS build carthage:
filters: # required since `Carthage Release` has tag filters AND requires this job
tags:
only: /.*/
- iOS build xcframework: - iOS build xcframework:
filters: # required since `XCFramework release` has tag filters AND requires this job filters: # required since `XCFramework release` has tag filters AND requires this job
tags: tags:
only: /.*/ only: /.*/
- Carthage release:
requires:
- iOS build carthage
filters:
branches:
ignore: /.*/
tags:
only: /^v.*/
- XCFramework release: - XCFramework release:
requires: requires:
- iOS build xcframework - iOS build xcframework

Просмотреть файл

@ -28,3 +28,7 @@ Use the template below to make assigning a version number during the release cut
- JEXL is now available for evaluation from application code in Swift and Android ([#4813](https://github.com/mozilla/application-services/pull/4813)). - JEXL is now available for evaluation from application code in Swift and Android ([#4813](https://github.com/mozilla/application-services/pull/4813)).
This is the next piece of the puzzle for supporting Messaging Experiments. This is the next piece of the puzzle for supporting Messaging Experiments.
## Xcode
- Bumped Xcode version from 13.1.0 -> 13.2.1

Просмотреть файл

@ -1,2 +0,0 @@
github "apple/swift-protobuf" ~> 1.0
github "jrendel/SwiftKeychainWrapper" ~> 4.0

Просмотреть файл

@ -1,2 +0,0 @@
github "apple/swift-protobuf" "1.18.0"
github "jrendel/SwiftKeychainWrapper" "4.0.1"

Просмотреть файл

@ -2,8 +2,7 @@
set -euvx set -euvx
carthage bootstrap --platform iOS --cache-builds ./megazords/ios-rust/build-xcframework.sh --build-profile release
set -o pipefail && \ set -o pipefail && \
xcodebuild \ xcodebuild \
-workspace ./megazords/ios/MozillaAppServices.xcodeproj/project.xcworkspace \ -workspace ./megazords/ios/MozillaAppServices.xcodeproj/project.xcworkspace \

Просмотреть файл

@ -47,8 +47,6 @@ elif firefox_ios_branch is not None:
if not Path(repo_path, "Carthage").exists(): if not Path(repo_path, "Carthage").exists():
step_msg("Carthage folder not present. Running the firefox-ios bootstrap script") step_msg("Carthage folder not present. Running the firefox-ios bootstrap script")
run_cmd_checked(["./bootstrap.sh"], cwd=repo_path) run_cmd_checked(["./bootstrap.sh"], cwd=repo_path)
step_msg("Running carthage substitution script")
run_cmd_checked(["./appservices_local_dev.sh", "enable", find_app_services_root()], cwd=repo_path)
if action == "do-nothing": if action == "do-nothing":
exit(0) exit(0)

Просмотреть файл

@ -1,34 +0,0 @@
#!/usr/bin/env bash
set -eu
CONFIGURATION="Release"
FRAMEWORK_NAME="MozillaAppServices.framework.zip"
ARCHIVE=true
while [[ "$#" -gt 0 ]]; do case $1 in
--configuration) CONFIGURATION="$2"; shift;shift;;
--out) FRAMEWORK_NAME="$2"; shift;shift;;
--no-archive) ARCHIVE=false; shift;;
*) echo "Unknown parameter: $1"; exit 1;
esac; done
set -vx
XCODE_XCCONFIG_FILE=$(pwd)/xcconfig/xcode-12-fix-carthage-lipo.xcconfig
export XCODE_XCCONFIG_FILE
carthage bootstrap --platform iOS --cache-builds
set -o pipefail && \
carthage build --no-skip-current --platform iOS --verbose --configuration "${CONFIGURATION}" --cache-builds | \
tee raw_xcodebuild.log | \
xcpretty
if [ "$ARCHIVE" = true ]; then
## When https://github.com/Carthage/Carthage/issues/2623 is fixed,
## carthage build --archive should work to produce a zip
# Exclude SwiftProtobuf.
zip -r "${FRAMEWORK_NAME}" Carthage/Build/iOS megazords/ios/DEPENDENCIES.md -x '*SwiftProtobuf.framework*/*'
fi

Просмотреть файл

@ -1,90 +0,0 @@
#!/usr/bin/env bash
set -eEuvx
function error_help()
{
ERROR_MSG="It looks like something went wrong building the Application Services framework."
ERROR_MSG="${ERROR_MSG} This is most likely related to some missing system dependencies."
ERROR_MSG="${ERROR_MSG} See https://github.com/mozilla/application-services/blob/main/docs/building.md#ios-development for instructions."
echo "error: ${ERROR_MSG}"
}
trap error_help ERR
# XCode tries to be helpful and overwrites the PATH. Reset that.
PATH="$(bash -l -c 'echo $PATH')"
# This should be invoked from inside xcode, not manually
if [[ "${#}" -ne 4 ]]
then
echo "Usage (note: only call inside xcode!):"
echo "path/to/build-scripts/xc-universal-binary.sh <STATIC_LIB_NAME> <FFI_TARGET> <APPSVC_ROOT_PATH> <buildvariant>"
exit 1
fi
# e.g. liblogins_ffi.a
STATIC_LIB_NAME=${1}
# what to pass to cargo build -p, e.g. logins_ffi
FFI_TARGET=${2}
# path to app services root
APPSVC_ROOT=${3}
# buildvariant from our xcconfigs
BUILDVARIANT=${4}
RELFLAG=
RELDIR="debug"
if [[ "${BUILDVARIANT}" != "debug" ]]; then
RELFLAG=--release
RELDIR=release
fi
LIBSDIR=${APPSVC_ROOT}/libs
TARGETDIR=${APPSVC_ROOT}/target
# If the libs don't exist, or it's modification time is older than the last commit in ${LIBSDIR}/ios, wipe it out.
if [[ ! -d "${LIBSDIR}/ios" ]] || [[ "$(stat -f "%m" "${LIBSDIR}/ios")" -lt "$(git log -n 1 --pretty=format:%at -- "${LIBSDIR}")" ]]; then
echo "No iOS libs present, or they are stale"
pushd "${LIBSDIR}"
rm -rf ios
env -i PATH="${PATH}" HOME="${HOME}" ./build-all.sh ios
popd
else
echo "iOS libs already present, not rebuilding"
fi
# We can't use cargo lipo because we can't link to universal libraries :(
# https://github.com/rust-lang/rust/issues/55235
LIBS_ARCHS=("x86_64" "arm64")
IOS_TRIPLES=("x86_64-apple-ios" "aarch64-apple-ios")
for i in "${!LIBS_ARCHS[@]}"; do
LIB_ARCH=${LIBS_ARCHS[${i}]}
env -i \
PATH="${PATH}" \
NSS_STATIC=1 \
NSS_DIR="${LIBSDIR}/ios/${LIB_ARCH}/nss" \
SQLCIPHER_LIB_DIR="${LIBSDIR}/ios/${LIB_ARCH}/sqlcipher/lib" \
SQLCIPHER_INCLUDE_DIR="${LIBSDIR}/ios/${LIB_ARCH}/sqlcipher/include" \
RUSTC_WRAPPER="${RUSTC_WRAPPER:-}" \
SCCACHE_IDLE_TIMEOUT="${SCCACHE_IDLE_TIMEOUT:-}" \
SCCACHE_CACHE_SIZE="${SCCACHE_CACHE_SIZE:-}" \
SCCACHE_ERROR_LOG="${SCCACHE_ERROR_LOG:-}" \
RUST_LOG="${RUST_LOG:-}" \
"${HOME}"/.cargo/bin/cargo build --locked -p "${FFI_TARGET}" --lib ${RELFLAG} --target "${IOS_TRIPLES[${i}]}"
done
UNIVERSAL_BINARY=${TARGETDIR}/universal/${RELDIR}/${STATIC_LIB_NAME}
NEED_LIPO=
# if the universal binary doesnt exist, or if it's older than the static libs,
# we need to run `lipo` again.
if [[ ! -f "${UNIVERSAL_BINARY}" ]]; then
NEED_LIPO=1
elif [[ "$(stat -f "%m" "${TARGETDIR}/x86_64-apple-ios/${RELDIR}/${STATIC_LIB_NAME}")" -gt "$(stat -f "%m" "${UNIVERSAL_BINARY}")" ]]; then
NEED_LIPO=1
elif [[ "$(stat -f "%m" "${TARGETDIR}/aarch64-apple-ios/${RELDIR}/${STATIC_LIB_NAME}")" -gt "$(stat -f "%m" "${UNIVERSAL_BINARY}")" ]]; then
NEED_LIPO=1
fi
if [[ "${NEED_LIPO}" = "1" ]]; then
mkdir -p "${TARGETDIR}/universal/${RELDIR}"
lipo -create -output "${UNIVERSAL_BINARY}" \
"${TARGETDIR}/x86_64-apple-ios/${RELDIR}/${STATIC_LIB_NAME}" \
"${TARGETDIR}/aarch64-apple-ios/${RELDIR}/${STATIC_LIB_NAME}"
fi

Просмотреть файл

@ -100,7 +100,6 @@ public enum MZKeychainItemAccessibility {
return key return key
} }
} }
return nil return nil
} }
} }

Просмотреть файл

@ -95,7 +95,6 @@ open class MZKeychainWrapper {
// Remove accessibility attribute // Remove accessibility attribute
keychainQueryDictionary.removeValue(forKey: SecAttrAccessible) keychainQueryDictionary.removeValue(forKey: SecAttrAccessible)
// Limit search results to one // Limit search results to one
keychainQueryDictionary[SecMatchLimit] = kSecMatchLimitOne keychainQueryDictionary[SecMatchLimit] = kSecMatchLimitOne
@ -375,7 +374,6 @@ open class MZKeychainWrapper {
return false return false
} }
} }
/// Remove all keychain data, including data not added through keychain wrapper. /// Remove all keychain data, including data not added through keychain wrapper.
/// ///
/// - Warning: This may remove custom keychain entries you did not add via SwiftKeychainWrapper. /// - Warning: This may remove custom keychain entries you did not add via SwiftKeychainWrapper.
@ -396,7 +394,6 @@ open class MZKeychainWrapper {
@discardableResult private class func deleteKeychainSecClass(_ secClass: AnyObject) -> Bool { @discardableResult private class func deleteKeychainSecClass(_ secClass: AnyObject) -> Bool {
let query = [SecClass: secClass] let query = [SecClass: secClass]
let status: OSStatus = SecItemDelete(query as CFDictionary) let status: OSStatus = SecItemDelete(query as CFDictionary)
if status == errSecSuccess { if status == errSecSuccess {
return true return true
} else { } else {
@ -413,7 +410,6 @@ open class MZKeychainWrapper {
if let accessibility = accessibility { if let accessibility = accessibility {
keychainQueryDictionary[SecAttrAccessible] = accessibility.keychainAttrValue keychainQueryDictionary[SecAttrAccessible] = accessibility.keychainAttrValue
} }
// Update // Update
let status: OSStatus = SecItemUpdate(keychainQueryDictionary as CFDictionary, updateDictionary as CFDictionary) let status: OSStatus = SecItemUpdate(keychainQueryDictionary as CFDictionary, updateDictionary as CFDictionary)
@ -441,7 +437,6 @@ open class MZKeychainWrapper {
if let accessibility = accessibility { if let accessibility = accessibility {
keychainQueryDictionary[SecAttrAccessible] = accessibility.keychainAttrValue keychainQueryDictionary[SecAttrAccessible] = accessibility.keychainAttrValue
} }
// Set the keychain access group if defined // Set the keychain access group if defined
if let accessGroup = self.accessGroup { if let accessGroup = self.accessGroup {
keychainQueryDictionary[SecAttrAccessGroup] = accessGroup keychainQueryDictionary[SecAttrAccessGroup] = accessGroup

Просмотреть файл

@ -93,7 +93,6 @@ public extension MZKeychainWrapper {
if let value = bool(forKey: key.rawValue) { if let value = bool(forKey: key.rawValue) {
return value return value
} }
return nil return nil
} }
@ -101,7 +100,6 @@ public extension MZKeychainWrapper {
if let value = integer(forKey: key.rawValue) { if let value = integer(forKey: key.rawValue) {
return value return value
} }
return nil return nil
} }
@ -109,7 +107,6 @@ public extension MZKeychainWrapper {
if let value = float(forKey: key.rawValue) { if let value = float(forKey: key.rawValue) {
return value return value
} }
return nil return nil
} }
@ -127,7 +124,6 @@ public extension MZKeychainWrapper {
if let value = double(forKey: key.rawValue) { if let value = double(forKey: key.rawValue) {
return value return value
} }
return nil return nil
} }

Просмотреть файл

@ -14,7 +14,7 @@ The key points:
* We use [Cargo](https://github.com/rust-lang/cargo) for building and testing the core Rust code in isolation, * We use [Cargo](https://github.com/rust-lang/cargo) for building and testing the core Rust code in isolation,
[Gradle](https://gradle.org/) with [rust-android-gradle](https://github.com/mozilla/rust-android-gradle) [Gradle](https://gradle.org/) with [rust-android-gradle](https://github.com/mozilla/rust-android-gradle)
for combining Rust and Kotlin code into Android components and running tests against them, for combining Rust and Kotlin code into Android components and running tests against them,
and [Carthage](https://github.com/Carthage/Carthage) driving [XCode](../xconfig) and [XCframeworks](https://developer.apple.com/documentation/swift_packages/distributing_binary_frameworks_as_swift_packages) driving [XCode](../xconfig)
for combining Rust and Swift code into iOS components. for combining Rust and Swift code into iOS components.
* [TaskCluster](../automation/taskcluster/README.md) runs on every pull-request, release, * [TaskCluster](../automation/taskcluster/README.md) runs on every pull-request, release,
and push to main, to ensure Android artifacts build correctly and to execute their and push to main, to ensure Android artifacts build correctly and to execute their
@ -75,18 +75,13 @@ For iOS consumers the corresponding steps are:
* TODO: could this step check for signed tags as an additional integrity measure? * TODO: could this step check for signed tags as an additional integrity measure?
* TODO: can we prevent these steps from being able to see the tokens used * TODO: can we prevent these steps from being able to see the tokens used
for publishing in subsequent steps? for publishing in subsequent steps?
4. CircleCI builds two binary artifacts: 4. CircleCI builds a binary artifact:
* A Carthage framework containing both Rust and Swift code compiled together, as a zipfile.
* An XCFramework containing just Rust code and header files, as a zipfile, for use by Swift Packags. * An XCFramework containing just Rust code and header files, as a zipfile, for use by Swift Packags.
* TODO: could a malicious dev dependency from step (3) influence the build environment here? * TODO: could a malicious dev dependency from step (3) influence the build environment here?
5. CircleCI uses [dpl](https://github.com/travis-ci/dpl) to publish to GitHub as a release artifact. 5. CircleCI uses [dpl](https://github.com/travis-ci/dpl) to publish to GitHub as a release artifact.
* CircleCI config contains a github token (owned by the @appsvc-moz GitHub account) with appropriate permissions to add release artifacts. * CircleCI config contains a github token (owned by the @appsvc-moz GitHub account) with appropriate permissions to add release artifacts.
6. Consumers fetch the published artifacts from GitHub during their build process, 6. Consumers add Application services as a dependency from the [Rust Components Swift](https://github.com/mozilla/rust-components-swift/) repo using Apple's Swift Package Manager.
using Carthage.
It's worth noting that Carthage will *prefer* to use the built binary artifacts,
but will happily check out the tag and compile from source itself if such artifacts
are not available.
This is a diagram of the pipeline as it exists (and is planned) for the Nimbus SDK, one of the This is a diagram of the pipeline as it exists (and is planned) for the Nimbus SDK, one of the
libraries in Application Services: libraries in Application Services:

Просмотреть файл

@ -105,7 +105,6 @@ Configure maven to use the native windows maven repository - then, when doing `.
## Building for Firefox iOS ## Building for Firefox iOS
1. Install Carthage: `brew install carthage`
1. Install [xcpretty](https://github.com/xcpretty/xcpretty#installation): `gem install xcpretty` 1. Install [xcpretty](https://github.com/xcpretty/xcpretty#installation): `gem install xcpretty`
1. Run `./libs/verify-ios-environment.sh` to check your setup and environment 1. Run `./libs/verify-ios-environment.sh` to check your setup and environment
variables. variables.

Просмотреть файл

@ -1,47 +0,0 @@
# Guide to Consuming Rust Components on iOS
The application services libraries are published as a zip file containing a single composite (megazord) framework called *MozillaAppServices.framework*,
which contains the compiled code for all components.
The package is published as a release on github: https://github.com/mozilla/application-services/releases
## Carthage
- Add the dependency line to the Cartfile, for instance: `github "mozilla/application-services" ~> "v0.16.1"`
- `carthage` will download MozillaAppServices.frameworks.zip, and add all the available frameworks to the 'Carthage/' dir.
- Link against the provided MozillaAppServices.framework (in the *Link Binary with Libraries* step in your Xcode target).
- Add additional dependencies, see [below](#additional-dependencies).
### Adding a carthage provided framework to Xcode
- In general, to do this, add *XXX.framework* from *Carthage/Build/iOS* to *Link binary with Libraries* for the Xcode target.
- Update the list of additional dependencies below, so that consumers know to include the framework in their final build.
### Using a Circle-CI built framework
Rather than using a tagged release version, one can grab the build from Circle-CI, like so:
`binary "https://circleci.com/api/v1.1/project/github/mozilla/application-services/2862/artifacts/0/dist/mozilla.app-services.json" ~> 0.0.1-snapshot`
## Additional dependencies
The project has additional 3rd-party dependencies that a client must link against.
### NSS
- In your project, add all the .dylibs in the `../Carthage/Build/iOS/MozillaAppServices.framework` directory to both the "Embedded Binaries" and the "Linked Frameworks and Libraries" panels.
### Protobuf
- *SwiftProtoBuf.framework* should be automatically downloaded by carthage while pulling in the application-services dependency.
- [Add that framework to Xcode.](#adding-a-carthage-provided-framework-to-xcode)
## Third-party licenses
This project incorporates code from a number of third-party dependencies,
under a variety of open-source licenses. You should review the license info
in the file `DEPENDENCIES.md` and decide on an appropriate way to include
license and attribution notices into your product.

Просмотреть файл

@ -35,8 +35,8 @@
**Note:** If you need to manually produce the iOS build for some reason (for example, if CircleCI cannot), someone with a mac needs to do the following steps: **Note:** If you need to manually produce the iOS build for some reason (for example, if CircleCI cannot), someone with a mac needs to do the following steps:
1. If necessary, set up for performing iOS builds using `./libs/verify-ios-environment.sh`. 1. If necessary, set up for performing iOS builds using `./libs/verify-ios-environment.sh`.
2. Run `./build-carthage.sh` in the root of the repository. 2. Run `./megazords/ios-rust/build-xcframework.sh`
3. Upload the resulting `MozillaAppServices.framework.zip` as an attachment on the github release. 3. Upload the resulting `MozillaRustComponents.xcframework.zip` as an attachment on the github release.
--- ---
## Make a new point-release from an existing release that is behind latest main. ## Make a new point-release from an existing release that is behind latest main.

Просмотреть файл

@ -1,24 +0,0 @@
# Using locally-published components in Firefox for iOS
It's often important to test work-in-progress changes to this repo against a real-world
consumer project. Here are our current best-practices for approaching this on iOS:
1. Make a local build of the application-services framework using `./build-carthage.sh`.
1. Checkout and `carthage bootstrap` the consuming app (for example using [these instructions with Firefox for
iOS](https://github.com/mozilla-mobile/firefox-ios#building-the-code)).
1. In the consuming app, replace the application-services framework with a copy of your local build. For example:
```
rm -rf Carthage/Build/iOS/MozillaAppServices.framework
rsync -ad path/to/application-services/Carthage/Build/iOS/MozillaAppServices.framework/ Carthage/Build/iOS/MozillaAppServices.framework/
```
1. Open the consuming app project in Xcode and build it from there.
After making changes to application-services code, you will need to re-run these steps in order to
copy the latest changes over into the consuming app.
Firefox for iOS also has a helper script that automates these steps:
[`appservices_local_dev.sh`](https://github.com/mozilla-mobile/firefox-ios/blob/main/appservices_local_dev.sh).
Note that for firefox-ios specifically, you may also need to copy the Glean `sdk_generator.sh` script
from the appservices build into the root of the firefox-ios repository.

Просмотреть файл

@ -22,11 +22,6 @@ rustup target add "${RUST_TARGETS[@]}"
# If you add a dependency below, mention it in building.md in the iOS section! # If you add a dependency below, mention it in building.md in the iOS section!
if ! [[ -x "$(command -v carthage)" ]]; then
echo 'Error: Carthage needs to be installed. See https://github.com/Carthage/Carthage#installing-carthage for install instructions.' >&2
exit 1
fi
if ! [[ -x "$(command -v protoc-gen-swift)" ]]; then if ! [[ -x "$(command -v protoc-gen-swift)" ]]; then
echo 'Error: swift-protobuf needs to be installed. See https://github.com/apple/swift-protobuf#alternatively-install-via-homebrew for install instructions.' >&2 echo 'Error: swift-protobuf needs to be installed. See https://github.com/apple/swift-protobuf#alternatively-install-via-homebrew for install instructions.' >&2
exit 1 exit 1
@ -37,14 +32,6 @@ if ! [[ -x "$(command -v xcpretty)" ]]; then
exit 1 exit 1
fi fi
# For Xcode 12 make sure EXCLUDED_ARCHS is set to arm architectures otherwise
# the build will fail on lipo due to duplicate architectures.
XCODE_XCCONFIG_FILE=$(pwd)/xcconfig/xcode-12-fix-carthage-lipo.xcconfig
export XCODE_XCCONFIG_FILE
echo "Running carthage boostrap..."
carthage bootstrap --platform iOS --cache-builds
if [[ ! -d "${PWD}/libs/ios/universal/nss" ]] || [[ ! -d "${PWD}/libs/ios/universal/sqlcipher" ]]; then if [[ ! -d "${PWD}/libs/ios/universal/nss" ]] || [[ ! -d "${PWD}/libs/ios/universal/sqlcipher" ]]; then
pushd libs || exit 1 pushd libs || exit 1
./build-all.sh ios ./build-all.sh ios

Просмотреть файл

@ -19,9 +19,7 @@ fi
echo "" echo ""
echo "Looks good! You can do the following:" echo "Looks good! You can do the following:"
echo "- Build the project:" echo "- Open the XCode project:"
echo " ./build-carthage.sh --no-archive"
echo "- Open the Xcode project:"
echo " open megazords/ios/MozillaAppServices.xcodeproj" echo " open megazords/ios/MozillaAppServices.xcodeproj"
echo "- Run the iOS tests:" echo "- Run the iOS tests:"
echo " ./automation/run_ios_tests.sh" echo " ./automation/run_ios_tests.sh"

Просмотреть файл

@ -61,10 +61,6 @@ cargo_build () {
case $TARGET in case $TARGET in
x86_64*) x86_64*)
LIBS_DIR="$REPO_ROOT/libs/ios/x86_64";; LIBS_DIR="$REPO_ROOT/libs/ios/x86_64";;
# TODO: when we want to include crates that depend on SQLCipher or NSS,
# we'll need to distinguish between hardware and simulator builds here
# and link the later against separately-compiled libraries.
# Ref https://github.com/mozilla/application-services/issues/4352.
aarch64*) aarch64*)
LIBS_DIR="$REPO_ROOT/libs/ios/arm64";; LIBS_DIR="$REPO_ROOT/libs/ios/arm64";;
*) *)

Просмотреть файл

@ -69,11 +69,7 @@
BF1A87D025064AC000FED88E /* Sysctl.swift in Sources */ = {isa = PBXBuildFile; fileRef = BF1A87CC25064AC000FED88E /* Sysctl.swift */; }; BF1A87D025064AC000FED88E /* Sysctl.swift in Sources */ = {isa = PBXBuildFile; fileRef = BF1A87CC25064AC000FED88E /* Sysctl.swift */; };
BF1A87D125064AC000FED88E /* Unreachable.swift in Sources */ = {isa = PBXBuildFile; fileRef = BF1A87CD25064AC000FED88E /* Unreachable.swift */; }; BF1A87D125064AC000FED88E /* Unreachable.swift in Sources */ = {isa = PBXBuildFile; fileRef = BF1A87CD25064AC000FED88E /* Unreachable.swift */; };
BF1A87D325064B1100FED88E /* sdk_generator.sh in Resources */ = {isa = PBXBuildFile; fileRef = BF1A87D225064B1100FED88E /* sdk_generator.sh */; }; BF1A87D325064B1100FED88E /* sdk_generator.sh in Resources */ = {isa = PBXBuildFile; fileRef = BF1A87D225064B1100FED88E /* sdk_generator.sh */; };
C852EE9E220A283200A6E79A /* libsqlcipher.a in Frameworks */ = {isa = PBXBuildFile; fileRef = C852EE9D220A283200A6E79A /* libsqlcipher.a */; };
C852EED6220A29FE00A6E79A /* LoginsStorage.swift in Sources */ = {isa = PBXBuildFile; fileRef = C852EECD220A29FE00A6E79A /* LoginsStorage.swift */; }; C852EED6220A29FE00A6E79A /* LoginsStorage.swift in Sources */ = {isa = PBXBuildFile; fileRef = C852EECD220A29FE00A6E79A /* LoginsStorage.swift */; };
C852EEEF220A2E9400A6E79A /* libmegazord_ios.a in Frameworks */ = {isa = PBXBuildFile; fileRef = C852EEEE220A2E9400A6E79A /* libmegazord_ios.a */; };
CD440A422238A08E003F004B /* SwiftProtobuf.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = EB7DE84C2214D30B00E7CF17 /* SwiftProtobuf.framework */; };
CD440A452238A703003F004B /* SwiftProtobuf.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = EB7DE84C2214D30B00E7CF17 /* SwiftProtobuf.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
CD4CFDD3221DFA5100EB3B33 /* LogTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = CD4CFDD2221DFA5100EB3B33 /* LogTest.swift */; }; CD4CFDD3221DFA5100EB3B33 /* LogTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = CD4CFDD2221DFA5100EB3B33 /* LogTest.swift */; };
CD5ECD192716FB88009D10CC /* QuantityMetric.swift in Sources */ = {isa = PBXBuildFile; fileRef = CD5ECD182716FB88009D10CC /* QuantityMetric.swift */; }; CD5ECD192716FB88009D10CC /* QuantityMetric.swift in Sources */ = {isa = PBXBuildFile; fileRef = CD5ECD182716FB88009D10CC /* QuantityMetric.swift */; };
CD5ECD1B2716FB99009D10CC /* UrlMetric.swift in Sources */ = {isa = PBXBuildFile; fileRef = CD5ECD1A2716FB99009D10CC /* UrlMetric.swift */; }; CD5ECD1B2716FB99009D10CC /* UrlMetric.swift in Sources */ = {isa = PBXBuildFile; fileRef = CD5ECD1A2716FB99009D10CC /* UrlMetric.swift */; };
@ -92,14 +88,12 @@
CE3A2F38225BDE5300EA569C /* PlacesTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = CE3A2F37225BDE5300EA569C /* PlacesTests.swift */; }; CE3A2F38225BDE5300EA569C /* PlacesTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = CE3A2F37225BDE5300EA569C /* PlacesTests.swift */; };
CE58B2F8242D54340089F091 /* RustViaductFFI.h in Headers */ = {isa = PBXBuildFile; fileRef = CE58B2F7242D54340089F091 /* RustViaductFFI.h */; settings = {ATTRIBUTES = (Public, ); }; }; CE58B2F8242D54340089F091 /* RustViaductFFI.h in Headers */ = {isa = PBXBuildFile; fileRef = CE58B2F7242D54340089F091 /* RustViaductFFI.h */; settings = {ATTRIBUTES = (Public, ); }; };
CE90D1BB23D7570A00FD9A5F /* FxAccountManagerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = CE34DB3C23D0C9640027AD63 /* FxAccountManagerTests.swift */; }; CE90D1BB23D7570A00FD9A5F /* FxAccountManagerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = CE34DB3C23D0C9640027AD63 /* FxAccountManagerTests.swift */; };
CE96459C23D7A7D500B662F8 /* SwiftKeychainWrapper.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = CE96459823D7A77500B662F8 /* SwiftKeychainWrapper.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
CE9FFA13242D4E7B0011029E /* Viaduct.swift in Sources */ = {isa = PBXBuildFile; fileRef = CE9FFA12242D4E7B0011029E /* Viaduct.swift */; }; CE9FFA13242D4E7B0011029E /* Viaduct.swift in Sources */ = {isa = PBXBuildFile; fileRef = CE9FFA12242D4E7B0011029E /* Viaduct.swift */; };
CEB1A06823D8A42D005BD4DD /* FxAccountMocks.swift in Sources */ = {isa = PBXBuildFile; fileRef = CEB1A06723D8A42D005BD4DD /* FxAccountMocks.swift */; }; CEB1A06823D8A42D005BD4DD /* FxAccountMocks.swift in Sources */ = {isa = PBXBuildFile; fileRef = CEB1A06723D8A42D005BD4DD /* FxAccountMocks.swift */; };
CED443CD23CD13E5007E5FA6 /* FxAccountDeviceConstellation.swift in Sources */ = {isa = PBXBuildFile; fileRef = CED443CC23CD13E5007E5FA6 /* FxAccountDeviceConstellation.swift */; }; CED443CD23CD13E5007E5FA6 /* FxAccountDeviceConstellation.swift in Sources */ = {isa = PBXBuildFile; fileRef = CED443CC23CD13E5007E5FA6 /* FxAccountDeviceConstellation.swift */; };
CEDDBC8E23DB4CD600CFF5AA /* PersistedFirefoxAccount.swift in Sources */ = {isa = PBXBuildFile; fileRef = CEDDBC8D23DB4CD600CFF5AA /* PersistedFirefoxAccount.swift */; }; CEDDBC8E23DB4CD600CFF5AA /* PersistedFirefoxAccount.swift in Sources */ = {isa = PBXBuildFile; fileRef = CEDDBC8D23DB4CD600CFF5AA /* PersistedFirefoxAccount.swift */; };
CEFB1EB022EF708B0001E20F /* ResultError.swift in Sources */ = {isa = PBXBuildFile; fileRef = CEFB1EAF22EF708B0001E20F /* ResultError.swift */; }; CEFB1EB022EF708B0001E20F /* ResultError.swift in Sources */ = {isa = PBXBuildFile; fileRef = CEFB1EAF22EF708B0001E20F /* ResultError.swift */; };
D05434A1225680D900FDE4EF /* MozillaAppServices.h in Headers */ = {isa = PBXBuildFile; fileRef = C852EEF2220A3C6800A6E79A /* MozillaAppServices.h */; settings = {ATTRIBUTES = (Public, ); }; }; D05434A1225680D900FDE4EF /* MozillaAppServices.h in Headers */ = {isa = PBXBuildFile; fileRef = C852EEF2220A3C6800A6E79A /* MozillaAppServices.h */; settings = {ATTRIBUTES = (Public, ); }; };
EB879D7F221234EB00753DC9 /* MozillaAppServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CE9D202020914D0D00F1C8FA /* MozillaAppServices.framework */; };
EB879D8B22123FD900753DC9 /* LoginsTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = EB879D8A22123FD900753DC9 /* LoginsTests.swift */; }; EB879D8B22123FD900753DC9 /* LoginsTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = EB879D8A22123FD900753DC9 /* LoginsTests.swift */; };
/* End PBXBuildFile section */ /* End PBXBuildFile section */
@ -150,14 +144,13 @@
dstPath = ""; dstPath = "";
dstSubfolderSpec = 10; dstSubfolderSpec = 10;
files = ( files = (
CE96459C23D7A7D500B662F8 /* SwiftKeychainWrapper.framework in CopyFiles */,
CD440A452238A703003F004B /* SwiftProtobuf.framework in CopyFiles */,
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
}; };
/* End PBXCopyFilesBuildPhase section */ /* End PBXCopyFilesBuildPhase section */
/* Begin PBXFileReference section */ /* Begin PBXFileReference section */
1B6FD2C0272B533D00858E16 /* MozillaRustComponents.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = MozillaRustComponents.xcframework; path = "../ios-rust/MozillaRustComponents.xcframework"; sourceTree = "<group>"; };
1B9B8EFE267439CC00C8A918 /* places.udl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = places.udl; path = ../../src/places.udl; sourceTree = "<group>"; }; 1B9B8EFE267439CC00C8A918 /* places.udl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = places.udl; path = ../../src/places.udl; sourceTree = "<group>"; };
1B9B8F0726743B8800C8A918 /* places.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = places.swift; path = ../../Generated/places.swift; sourceTree = "<group>"; }; 1B9B8F0726743B8800C8A918 /* places.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = places.swift; path = ../../Generated/places.swift; sourceTree = "<group>"; };
1B9B8F0826743B8800C8A918 /* placesFFI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = placesFFI.h; path = ../../Generated/placesFFI.h; sourceTree = "<group>"; }; 1B9B8F0826743B8800C8A918 /* placesFFI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = placesFFI.h; path = ../../Generated/placesFFI.h; sourceTree = "<group>"; };
@ -224,9 +217,7 @@
BF1A87D225064B1100FED88E /* sdk_generator.sh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; name = sdk_generator.sh; path = ../sdk_generator.sh; sourceTree = "<group>"; }; BF1A87D225064B1100FED88E /* sdk_generator.sh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; name = sdk_generator.sh; path = ../sdk_generator.sh; sourceTree = "<group>"; };
BF1A87D625064B4C00FED88E /* Metrics.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Metrics.swift; sourceTree = "<group>"; }; BF1A87D625064B4C00FED88E /* Metrics.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Metrics.swift; sourceTree = "<group>"; };
C852EE9A220A26E600A6E79A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; }; C852EE9A220A26E600A6E79A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
C852EE9D220A283200A6E79A /* libsqlcipher.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libsqlcipher.a; path = ../../libs/ios/universal/sqlcipher/lib/libsqlcipher.a; sourceTree = "<group>"; };
C852EECD220A29FE00A6E79A /* LoginsStorage.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = LoginsStorage.swift; sourceTree = "<group>"; }; C852EECD220A29FE00A6E79A /* LoginsStorage.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = LoginsStorage.swift; sourceTree = "<group>"; };
C852EEEE220A2E9400A6E79A /* libmegazord_ios.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libmegazord_ios.a; path = ../../target/universal/release/libmegazord_ios.a; sourceTree = "<group>"; };
C852EEF2220A3C6800A6E79A /* MozillaAppServices.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MozillaAppServices.h; sourceTree = "<group>"; }; C852EEF2220A3C6800A6E79A /* MozillaAppServices.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MozillaAppServices.h; sourceTree = "<group>"; };
CD4CFDD2221DFA5100EB3B33 /* LogTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LogTest.swift; sourceTree = "<group>"; }; CD4CFDD2221DFA5100EB3B33 /* LogTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LogTest.swift; sourceTree = "<group>"; };
CD5ECD182716FB88009D10CC /* QuantityMetric.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = QuantityMetric.swift; sourceTree = "<group>"; }; CD5ECD182716FB88009D10CC /* QuantityMetric.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = QuantityMetric.swift; sourceTree = "<group>"; };
@ -246,7 +237,6 @@
CE34DB3C23D0C9640027AD63 /* FxAccountManagerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FxAccountManagerTests.swift; sourceTree = "<group>"; }; CE34DB3C23D0C9640027AD63 /* FxAccountManagerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FxAccountManagerTests.swift; sourceTree = "<group>"; };
CE3A2F37225BDE5300EA569C /* PlacesTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PlacesTests.swift; sourceTree = "<group>"; }; CE3A2F37225BDE5300EA569C /* PlacesTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PlacesTests.swift; sourceTree = "<group>"; };
CE58B2F7242D54340089F091 /* RustViaductFFI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RustViaductFFI.h; sourceTree = "<group>"; }; CE58B2F7242D54340089F091 /* RustViaductFFI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RustViaductFFI.h; sourceTree = "<group>"; };
CE96459823D7A77500B662F8 /* SwiftKeychainWrapper.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SwiftKeychainWrapper.framework; path = ../../Carthage/Build/iOS/SwiftKeychainWrapper.framework; sourceTree = "<group>"; };
CE9D202020914D0D00F1C8FA /* MozillaAppServices.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = MozillaAppServices.framework; sourceTree = BUILT_PRODUCTS_DIR; }; CE9D202020914D0D00F1C8FA /* MozillaAppServices.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = MozillaAppServices.framework; sourceTree = BUILT_PRODUCTS_DIR; };
CE9FFA12242D4E7B0011029E /* Viaduct.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Viaduct.swift; sourceTree = "<group>"; }; CE9FFA12242D4E7B0011029E /* Viaduct.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Viaduct.swift; sourceTree = "<group>"; };
CEB1A06723D8A42D005BD4DD /* FxAccountMocks.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FxAccountMocks.swift; sourceTree = "<group>"; }; CEB1A06723D8A42D005BD4DD /* FxAccountMocks.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FxAccountMocks.swift; sourceTree = "<group>"; };
@ -254,7 +244,6 @@
CEDDBC8D23DB4CD600CFF5AA /* PersistedFirefoxAccount.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PersistedFirefoxAccount.swift; sourceTree = "<group>"; }; CEDDBC8D23DB4CD600CFF5AA /* PersistedFirefoxAccount.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PersistedFirefoxAccount.swift; sourceTree = "<group>"; };
CEFB1EAF22EF708B0001E20F /* ResultError.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ResultError.swift; sourceTree = "<group>"; }; CEFB1EAF22EF708B0001E20F /* ResultError.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ResultError.swift; sourceTree = "<group>"; };
D9FA8C532644A170008344BF /* HistoryMetadata.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HistoryMetadata.swift; sourceTree = "<group>"; }; D9FA8C532644A170008344BF /* HistoryMetadata.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HistoryMetadata.swift; sourceTree = "<group>"; };
EB7DE84C2214D30B00E7CF17 /* SwiftProtobuf.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SwiftProtobuf.framework; path = ../../Carthage/Build/iOS/SwiftProtobuf.framework; sourceTree = "<group>"; };
EB879D7A221234EB00753DC9 /* MozillaAppServicesTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = MozillaAppServicesTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; EB879D7A221234EB00753DC9 /* MozillaAppServicesTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = MozillaAppServicesTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
EB879D7E221234EB00753DC9 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; }; EB879D7E221234EB00753DC9 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
EB879D8A22123FD900753DC9 /* LoginsTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginsTests.swift; sourceTree = "<group>"; }; EB879D8A22123FD900753DC9 /* LoginsTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginsTests.swift; sourceTree = "<group>"; };
@ -268,8 +257,6 @@
isa = PBXFrameworksBuildPhase; isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647; buildActionMask = 2147483647;
files = ( files = (
C852EEEF220A2E9400A6E79A /* libmegazord_ios.a in Frameworks */,
C852EE9E220A283200A6E79A /* libsqlcipher.a in Frameworks */,
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
}; };
@ -277,8 +264,6 @@
isa = PBXFrameworksBuildPhase; isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647; buildActionMask = 2147483647;
files = ( files = (
CD440A422238A08E003F004B /* SwiftProtobuf.framework in Frameworks */,
EB879D7F221234EB00753DC9 /* MozillaAppServices.framework in Frameworks */,
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
}; };
@ -588,10 +573,7 @@
CE9D203720914D4800F1C8FA /* Frameworks */ = { CE9D203720914D4800F1C8FA /* Frameworks */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
CE96459823D7A77500B662F8 /* SwiftKeychainWrapper.framework */, 1B6FD2C0272B533D00858E16 /* MozillaRustComponents.xcframework */,
EB7DE84C2214D30B00E7CF17 /* SwiftProtobuf.framework */,
C852EE9D220A283200A6E79A /* libsqlcipher.a */,
C852EEEE220A2E9400A6E79A /* libmegazord_ios.a */,
); );
name = Frameworks; name = Frameworks;
sourceTree = "<group>"; sourceTree = "<group>";
@ -652,8 +634,8 @@
CEEA12EF20AA1D630018998A /* Build Rust libraries */, CEEA12EF20AA1D630018998A /* Build Rust libraries */,
BF1A87712506468F00FED88E /* Generate Glean metrics */, BF1A87712506468F00FED88E /* Generate Glean metrics */,
CE9D201B20914D0D00F1C8FA /* Sources */, CE9D201B20914D0D00F1C8FA /* Sources */,
CE9D201C20914D0D00F1C8FA /* Frameworks */,
CE9D201D20914D0D00F1C8FA /* Headers */, CE9D201D20914D0D00F1C8FA /* Headers */,
CE9D201C20914D0D00F1C8FA /* Frameworks */,
CE9D201E20914D0D00F1C8FA /* Resources */, CE9D201E20914D0D00F1C8FA /* Resources */,
); );
buildRules = ( buildRules = (
@ -663,6 +645,8 @@
dependencies = ( dependencies = (
); );
name = MozillaAppServices; name = MozillaAppServices;
packageProductDependencies = (
);
productName = Logins; productName = Logins;
productReference = CE9D202020914D0D00F1C8FA /* MozillaAppServices.framework */; productReference = CE9D202020914D0D00F1C8FA /* MozillaAppServices.framework */;
productType = "com.apple.product-type.framework"; productType = "com.apple.product-type.framework";
@ -693,7 +677,7 @@
isa = PBXProject; isa = PBXProject;
attributes = { attributes = {
LastSwiftUpdateCheck = 1010; LastSwiftUpdateCheck = 1010;
LastUpgradeCheck = 1300; LastUpgradeCheck = 1320;
ORGANIZATIONNAME = Mozilla; ORGANIZATIONNAME = Mozilla;
TargetAttributes = { TargetAttributes = {
CE9D201F20914D0D00F1C8FA = { CE9D201F20914D0D00F1C8FA = {
@ -714,6 +698,8 @@
Base, Base,
); );
mainGroup = CE9D201620914D0D00F1C8FA; mainGroup = CE9D201620914D0D00F1C8FA;
packageReferences = (
);
productRefGroup = CE9D202120914D0D00F1C8FA /* Products */; productRefGroup = CE9D202120914D0D00F1C8FA /* Products */;
projectDirPath = ""; projectDirPath = "";
projectRoot = ""; projectRoot = "";
@ -778,7 +764,7 @@
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh; shellPath = /bin/sh;
shellScript = "bash $PWD/../../build-scripts/xc-universal-binary.sh libmegazord_ios.a megazord_ios $PWD/../.. $buildvariant\n\n\n"; shellScript = "bash $PWD/../../megazords/ios-rust/build-xcframework.sh\n\n\n";
}; };
/* End PBXShellScriptBuildPhase section */ /* End PBXShellScriptBuildPhase section */
@ -795,6 +781,7 @@
BF1A87B625064A8100FED88E /* UuidMetric.swift in Sources */, BF1A87B625064A8100FED88E /* UuidMetric.swift in Sources */,
BF1A87AE25064A8100FED88E /* BooleanMetric.swift in Sources */, BF1A87AE25064A8100FED88E /* BooleanMetric.swift in Sources */,
CEFB1EB022EF708B0001E20F /* ResultError.swift in Sources */, CEFB1EB022EF708B0001E20F /* ResultError.swift in Sources */,
CE1B09A3231863D7006226E1 /* KeychainWrapper+.swift in Sources */,
CE1B09A5231865BC006226E1 /* FxAccountStorage.swift in Sources */, CE1B09A5231865BC006226E1 /* FxAccountStorage.swift in Sources */,
1BD3484C27A0DF8900AA1422 /* KeychainWrapperSubscript.swift in Sources */, 1BD3484C27A0DF8900AA1422 /* KeychainWrapperSubscript.swift in Sources */,
BF1A87B525064A8100FED88E /* CounterMetric.swift in Sources */, BF1A87B525064A8100FED88E /* CounterMetric.swift in Sources */,
@ -902,7 +889,6 @@
buildSettings = { buildSettings = {
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
IPHONEOS_DEPLOYMENT_TARGET = 12.0; IPHONEOS_DEPLOYMENT_TARGET = 12.0;
SWIFT_COMPILATION_MODE = wholemodule;
VALIDATE_WORKSPACE = NO; VALIDATE_WORKSPACE = NO;
}; };
name = Release; name = Release;
@ -910,20 +896,29 @@
CE9D202920914D0D00F1C8FA /* Debug */ = { CE9D202920914D0D00F1C8FA /* Debug */ = {
isa = XCBuildConfiguration; isa = XCBuildConfiguration;
buildSettings = { buildSettings = {
"EXCLUDED_ARCHS[sdk=iphonesimulator*]" = arm64;
FRAMEWORK_SEARCH_PATHS = (
"$(PROJECT_DIR)-rust/MozillaRustComponents.xcframework/ios-arm64_x86_64-simulator",
"$(PROJECT_DIR)-rust/MozillaRustComponents.xcframework/ios-arm64",
);
MACH_O_TYPE = mh_dylib; MACH_O_TYPE = mh_dylib;
OTHER_LDFLAGS = "-lc++"; OTHER_LDFLAGS = "-lc++";
PRODUCT_BUNDLE_IDENTIFIER = org.mozilla.MozillaAppServices; PRODUCT_BUNDLE_IDENTIFIER = org.mozilla.MozillaAppServices;
VALIDATE_WORKSPACE = NO; VALIDATE_WORKSPACE = YES;
}; };
name = Debug; name = Debug;
}; };
CE9D202A20914D0D00F1C8FA /* Release */ = { CE9D202A20914D0D00F1C8FA /* Release */ = {
isa = XCBuildConfiguration; isa = XCBuildConfiguration;
buildSettings = { buildSettings = {
FRAMEWORK_SEARCH_PATHS = (
"$(PROJECT_DIR)-rust/MozillaRustComponents.xcframework/ios-arm64_x86_64-simulator",
"$(PROJECT_DIR)-rust/MozillaRustComponents.xcframework/ios-arm64",
);
MACH_O_TYPE = mh_dylib; MACH_O_TYPE = mh_dylib;
OTHER_LDFLAGS = "-lc++"; OTHER_LDFLAGS = "-lc++";
PRODUCT_BUNDLE_IDENTIFIER = org.mozilla.MozillaAppServices; PRODUCT_BUNDLE_IDENTIFIER = org.mozilla.MozillaAppServices;
VALIDATE_WORKSPACE = NO; VALIDATE_WORKSPACE = YES;
}; };
name = Release; name = Release;
}; };
@ -939,7 +934,7 @@
OTHER_LDFLAGS = "-lc++"; OTHER_LDFLAGS = "-lc++";
PRODUCT_BUNDLE_IDENTIFIER = mozilla.org.MozillaAppServicesTests; PRODUCT_BUNDLE_IDENTIFIER = mozilla.org.MozillaAppServicesTests;
PRODUCT_NAME = "$(TARGET_NAME)"; PRODUCT_NAME = "$(TARGET_NAME)";
VALIDATE_WORKSPACE = NO; VALIDATE_WORKSPACE = YES;
}; };
name = Debug; name = Debug;
}; };
@ -955,7 +950,7 @@
OTHER_LDFLAGS = "-lc++"; OTHER_LDFLAGS = "-lc++";
PRODUCT_BUNDLE_IDENTIFIER = mozilla.org.MozillaAppServicesTests; PRODUCT_BUNDLE_IDENTIFIER = mozilla.org.MozillaAppServicesTests;
PRODUCT_NAME = "$(TARGET_NAME)"; PRODUCT_NAME = "$(TARGET_NAME)";
VALIDATE_WORKSPACE = NO; VALIDATE_WORKSPACE = YES;
}; };
name = Release; name = Release;
}; };

Просмотреть файл

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<Scheme <Scheme
LastUpgradeVersion = "1300" LastUpgradeVersion = "1320"
version = "1.3"> version = "1.3">
<BuildAction <BuildAction
parallelizeBuildables = "YES" parallelizeBuildables = "YES"

Просмотреть файл

@ -2,7 +2,6 @@
INFOPLIST_FILE = config/Info.plist INFOPLIST_FILE = config/Info.plist
HEADER_SEARCH_PATHS = "../../components/fxa-client/ios/FxAClient" "../../components/logins/ios/Logins" "./RustLog" "./Viaduct" HEADER_SEARCH_PATHS = "../../components/fxa-client/ios/FxAClient" "../../components/logins/ios/Logins" "./RustLog" "./Viaduct"
LIBRARY_SEARCH_PATHS = "../../target/universal/$(buildvariant)" "../../libs/ios/universal/sqlcipher/lib" FRAMEWORK_SEARCH_PATHS = "../ios-rust/MozillaRustComponents.xcframework"
FRAMEWORK_SEARCH_PATHS = "../../Carthage/Build/iOS"
CLANG_ENABLE_MODULES = YES CLANG_ENABLE_MODULES = YES
ALWAYS_SEARCH_USER_PATHS = NO ALWAYS_SEARCH_USER_PATHS = NO

Просмотреть файл

@ -1,6 +0,0 @@
// Carthage has an issue with Xcode 12 architecture changes which doesn't allow
// it to compile dependencies for proper architecture. This works around it.
// Ref https://github.com/Carthage/Carthage/issues/3019
EXCLUDED_ARCHS__EFFECTIVE_PLATFORM_SUFFIX_simulator__NATIVE_ARCH_64_BIT_x86_64=arm64 arm64e armv7 armv7s armv6 armv8
EXCLUDED_ARCHS=$(inherited) $(EXCLUDED_ARCHS__EFFECTIVE_PLATFORM_SUFFIX_$(EFFECTIVE_PLATFORM_SUFFIX)__NATIVE_ARCH_64_BIT_$(NATIVE_ARCH_64_BIT))
IPHONEOS_DEPLOYMENT_TARGET=12