14 Commits

Author SHA1 Message Date
d3d563de5a Remove use_modular_headers! from Podfiles (#7796)
⚠️ _This PR does not update packages' versions as it only affects unpublished parts of example apps and tests._

We added `use_modular_headers!` to our `Podfile`s as we originally planned to phase out `use_frameworks!` (see https://github.com/flutter/flutter/pull/42204). However, our plans have now changed and we are instead phasing out CocoaPods entirely in favor of Swift Package Manager.

CocoaPods's `use_frameworks!` and `use_modular_headers!` are two different overlapping options that should not be used together. This change removes the `use_modular_headers!` from example apps' `Podfile`s. This change does not affect packages themselves.

Part of https://github.com/flutter/flutter/issues/156259
2024-11-05 21:33:54 +00:00
21d99dcc16 [various] Adds macOS privacy manifests (#7687)
macOS privacy manifest enforcement is rolling out soon, so this brings all macOS plugins into alignment with our iOS policy of always having a manifest, including updating the repo tooling to enforce that.

Very few plugins are affected because most share the implementation package with iOS, and we didn't do any target platform switching when adding the manifests for iOS, automatically covering macOS as well.

Fixes https://github.com/flutter/flutter/issues/155564
2024-09-24 01:16:06 +00:00
65254411e6 [local_auth] Convert native unit tests to Swift (#6779)
Converts native unit tests from Objective-C to Swift, as a first step toward an eventual plugin conversion. Since OCMock usage was removed in a previous PR, the tests are converted essentially directly (the rewrites were largely mechanical syntax replacement), without any changes needed to production code.

There are a few places where interacting with the Pigeon-generated Obj-C is somewhat awkward because the NSError signature isn't auto-converting to `throw` in cases where we use `NSNumber` wrapping, but all that will get cleaned up when we switch the plugin over to Swift Pigeon generation and have idiomatic Swift APIs that the tests will be calling instead.

Fixes a couple of false positives in the repo tooling surfaced by this PR:
- `darwin/Tests/` wasn't recognized as a test directory.
- Swift tests weren't recognized as exempt from requiring Swift entries in the podspec.

Part of https://github.com/flutter/flutter/issues/119104
2024-05-22 14:07:09 +00:00
62c08f4471 Skip podspec Swift Search Path validation if only swift file is Package.swift for darwin plugins (#6635)
Fix for iOS was added in https://github.com/flutter/packages/pull/6627, but neglected to handle when plugin uses darwin directory.

Supplemental fix for https://github.com/flutter/flutter/issues/147548.
2024-05-02 19:05:00 +00:00
aea93d2a51 Skip podspec Swift Search Path validation if only swift file is Package.swift (#6627)
Usually when an iOS plugin uses Swift files, it requires a workaround in the podspec to add Swift to the search paths. Part of the `podspec-check` command is validating this workaround is found. However, when the only Swift file is the `Package.swift` (Swift Package Manager manifest), skip this validation since having this file does not indicate the plugin uses Swift files.

Fixes https://github.com/flutter/flutter/issues/147548.
2024-04-30 23:43:18 +00:00
924c7e6e89 Reverts "[ci] Temporarily allow-warnings in podspec_check_command.dart (#6416)" (#6419)
Reverts: flutter/packages#6416
Initiated by: ditman
Reason for reverting: Failures happen (later) in other plugins (more updates in the related issue)

https://github.com/flutter/flutter/issues/145866
Original PR Author: ditman

Reviewed By: {jmagman}

This change reverts the following previous change:
Adds `--allow-warnings` to podspec_check_command.dart so stuff can keep rolling.

**To be removed soon!**
2024-03-28 02:55:25 +00:00
e23442506e [ci] Temporarily allow-warnings in podspec_check_command.dart (#6416)
Adds `--allow-warnings` to podspec_check_command.dart so stuff can keep rolling.

**To be removed soon!**
2024-03-28 02:18:23 +00:00
c5349bc9a5 [various] Add iOS privacy manifests (#5846)
Adds privacy manifests to all iOS plugins.

While we only *need* to do the plugins listed [here](https://developer.apple.com/support/third-party-SDK-requirements/) for now, the wording of the page:
> The following are commonly used SDKs in apps on the App Store

suggests that the list of things for which this is required is just an arbitrary cutoff rather than a conceptual distinction, so it seems safest to just assume the list will grow over time and do all of them. To ensure that, this includes new repo tooling to check that a manifest is specified in the podspec.

The large caveat is that we do not currently know if this actually works. This is the method of inclusion that seems to be [the consensus among people using Cocoapods](https://github.com/CocoaPods/CocoaPods/issues/10325), as bundling it directly as a `resource` causes problems for clients who do not use `use_frameworks`. (In theory it seems like a manifest would not actually be *required* in that case since there is no framework, but it has the potential to actually stomp top-level resources.) Hopefully the automated analysis that Apple will eventually roll out will tolerate the file being bundled in a resource bundle in the framework rather than a top-level manifest file. If not, however, it's not clear how Cocoapods can be supported, so we can adopt this common approach for now under the assumption that eventually tooling will adapt to the reality of the ecosystem, and revisit the exact bundling later if necessary.

Only `shared_preferences` has a non-empty manifest, as it is our only plugin that uses a required reason API, and none of our plugins themselves collect private data. Ideally for that plugin we would instead use `C56D.1`, which is for wrappers, but as currently written we can't use it since it's exclusively a wrapper. If that changes in the future based on our pending request, we can revisit. For now, however, this reason should suffice since we don't currently allow reading from other app groups.

Fixes https://github.com/flutter/flutter/issues/131495
Fixes https://github.com/flutter/flutter/issues/139756
Fixes https://github.com/flutter/flutter/issues/139757
Fixes https://github.com/flutter/flutter/issues/139758
Fixes https://github.com/flutter/flutter/issues/139759
Fixes https://github.com/flutter/flutter/issues/139760
See also https://github.com/flutter/flutter/issues/139761
2024-01-12 04:27:39 +00:00
4c3bc496be Remove workarounds for check_podspecs needed for older version of Cocoapods (#5724)
CI has been updated to Cocoapods 1.13, which fixes previous issues with the plugin_lint_mac test. Remove workarounds added previously.

See https://github.com/flutter/flutter/issues/125812.
2023-12-20 17:39:02 +00:00
95c88f8a9b [tool] Don't lint Flutter shim podspecs (#5007)
The Flutter build process creates podspecs that are just shims pointing to the local Flutter framework, and which don't pass the linter since they aren't intended for publishing. When finding podspecs to lint, skip those.

This avoids incorrect failures when running on a tree that isn't clean (in particular, where macOS and/or iOS builds have happened), which is very common locally.
2023-09-28 00:52:05 +00:00
b9f2f1e39b Update xcode to 14e222b (#3868)
Packages part of https://github.com/flutter/flutter/issues/125814.
2023-05-02 21:27:17 +00:00
f224eea858 [tool] Add pigeon support to update-dependency (#3640)
[tool] Add pigeon support to update-dependency
2023-04-05 10:44:19 +00:00
25f0f702e5 [various] Update flutter/plugins links (#3256)
Updates links and references to `flutter/plugins` to use `flutter/packages` instead, including making the `repository` pubspec.yaml check stricter in the repo tooling to ensure all packages are pointing to the right place.

Exceptions to the updates are:
- Changelog entries.
- Links to pull requests.

This will re-publish all the moved plugins, thus fixing the current redness of `release` (due to the current versions not being tagged in this repository).
2023-02-22 13:45:11 -05:00
5aa3f1c5da [tool] Check for search paths in Swift plugins (#6954)
* Rename command, bump version

* Update tests to write actual podspecs

* Add new check

* Analyzer fix

* Unhdo file move
2023-01-13 20:49:26 +00:00