Skip to content

Commit 6d82423

Browse files
stuartmorgan-gTecHaxter
authored andcommitted
[quick_actions] Add Swift Package Manager support (flutter#6682)
Adds SPM support. Does not include any package changes, to maintain compatibility with `stable`. Also adds a missing `import` in a test; it looks like it was probabl/y compiling before due to bleed-through from the Cocoapod dependency, and switching to SPM broke it. The test references a UIKit type, so should definitely have been importing it. Fixes flutter/flutter#146915
1 parent fca79e8 commit 6d82423

File tree

10 files changed

+35
-5
lines changed

10 files changed

+35
-5
lines changed

packages/quick_actions/quick_actions_ios/CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
## NEXT
1+
## 1.1.0
22

3+
* Adds Swift Package Manager compatibility.
34
* Updates minimum iOS version to 12.0 and minimum Flutter version to 3.16.6.
45

56
## 1.0.10

packages/quick_actions/quick_actions_ios/example/ios/RunnerTests/Mocks/MockShortcutItemProvider.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
// Use of this source code is governed by a BSD-style license that can be
33
// found in the LICENSE file.
44

5+
import UIKit
6+
57
@testable import quick_actions_ios
68

79
final class MockShortcutItemProvider: ShortcutItemProviding {

packages/quick_actions/quick_actions_ios/ios/quick_actions_ios.podspec

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,13 @@ Downloaded by pub (not CocoaPods).
1515
s.source = { :http => 'https://github.com/flutter/packages/tree/main/packages/quick_actions' }
1616
s.documentation_url = 'https://pub.dev/packages/quick_actions'
1717
s.swift_version = '5.0'
18-
s.source_files = 'Classes/**/*.swift'
18+
s.source_files = 'quick_actions_ios/Sources/quick_actions_ios/*.swift'
1919
s.xcconfig = {
2020
'LIBRARY_SEARCH_PATHS' => '$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)/ $(SDKROOT)/usr/lib/swift',
2121
'LD_RUNPATH_SEARCH_PATHS' => '/usr/lib/swift',
2222
}
2323
s.dependency 'Flutter'
2424
s.platform = :ios, '12.0'
2525
s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES' }
26-
s.resource_bundles = {'quick_actions_ios_privacy' => ['Resources/PrivacyInfo.xcprivacy']}
26+
s.resource_bundles = {'quick_actions_ios_privacy' => ['quick_actions_ios/Sources/quick_actions_ios/Resources/PrivacyInfo.xcprivacy']}
2727
end
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
// swift-tools-version: 5.9
2+
3+
// Copyright 2013 The Flutter Authors. All rights reserved.
4+
// Use of this source code is governed by a BSD-style license that can be
5+
// found in the LICENSE file.
6+
7+
import PackageDescription
8+
9+
let package = Package(
10+
name: "quick_actions_ios",
11+
platforms: [
12+
.iOS("12.0")
13+
],
14+
products: [
15+
.library(name: "quick-actions-ios", targets: ["quick_actions_ios"])
16+
],
17+
dependencies: [],
18+
targets: [
19+
.target(
20+
name: "quick_actions_ios",
21+
dependencies: [],
22+
resources: [
23+
.process("Resources")
24+
]
25+
)
26+
]
27+
)

packages/quick_actions/quick_actions_ios/pigeons/messages.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import 'package:pigeon/pigeon.dart';
66

77
@ConfigurePigeon(PigeonOptions(
88
dartOut: 'lib/messages.g.dart',
9-
swiftOut: 'ios/Classes/messages.g.swift',
9+
swiftOut: 'ios/quick_actions_ios/Sources/quick_actions_ios/messages.g.swift',
1010
copyrightHeader: 'pigeons/copyright.txt',
1111
))
1212

packages/quick_actions/quick_actions_ios/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: quick_actions_ios
22
description: An implementation for the iOS platform of the Flutter `quick_actions` plugin.
33
repository: https://github.com/flutter/packages/tree/main/packages/quick_actions/quick_actions_ios
44
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+in_app_purchase%22
5-
version: 1.0.10
5+
version: 1.1.0
66

77
environment:
88
sdk: ^3.2.3

0 commit comments

Comments
 (0)