[quick_actions]Migrate the plugin class to Swift, and remove custom modulemap (#6369)
diff --git a/packages/quick_actions/quick_actions_ios/CHANGELOG.md b/packages/quick_actions/quick_actions_ios/CHANGELOG.md
index 7334bbd..e002bd7 100644
--- a/packages/quick_actions/quick_actions_ios/CHANGELOG.md
+++ b/packages/quick_actions/quick_actions_ios/CHANGELOG.md
@@ -1,3 +1,8 @@
+## 1.0.1
+
+* Removes custom modulemap file with "Test" submodule and private headers for Swift migration.
+* Migrates `FLTQuickActionsPlugin` class to Swift.
+
## 1.0.0
* Updates version to 1.0 to reflect current status.
diff --git a/packages/quick_actions/quick_actions_ios/example/ios/RunnerTests/FLTQuickActionsPluginTests.m b/packages/quick_actions/quick_actions_ios/example/ios/RunnerTests/FLTQuickActionsPluginTests.m
index b47f898..89651b5 100644
--- a/packages/quick_actions/quick_actions_ios/example/ios/RunnerTests/FLTQuickActionsPluginTests.m
+++ b/packages/quick_actions/quick_actions_ios/example/ios/RunnerTests/FLTQuickActionsPluginTests.m
@@ -4,7 +4,6 @@
@import Flutter;
@import quick_actions_ios;
-@import quick_actions_ios.Test;
@import XCTest;
#import <OCMock/OCMock.h>
@@ -26,9 +25,9 @@
FLTShortcutStateManager *mockShortcutStateManager = OCMClassMock([FLTShortcutStateManager class]);
- FLTQuickActionsPlugin *plugin =
- [[FLTQuickActionsPlugin alloc] initWithChannel:OCMClassMock([FlutterMethodChannel class])
- shortcutStateManager:mockShortcutStateManager];
+ QuickActionsPlugin *plugin =
+ [[QuickActionsPlugin alloc] initWithChannel:OCMClassMock([FlutterMethodChannel class])
+ shortcutStateManager:mockShortcutStateManager];
XCTestExpectation *resultExpectation =
[self expectationWithDescription:@"result block must be called."];
[plugin handleMethodCall:call
@@ -45,9 +44,9 @@
FlutterMethodCall *call = [FlutterMethodCall methodCallWithMethodName:@"clearShortcutItems"
arguments:nil];
FLTShortcutStateManager *mockShortcutStateManager = OCMClassMock([FLTShortcutStateManager class]);
- FLTQuickActionsPlugin *plugin =
- [[FLTQuickActionsPlugin alloc] initWithChannel:OCMClassMock([FlutterMethodChannel class])
- shortcutStateManager:mockShortcutStateManager];
+ QuickActionsPlugin *plugin =
+ [[QuickActionsPlugin alloc] initWithChannel:OCMClassMock([FlutterMethodChannel class])
+ shortcutStateManager:mockShortcutStateManager];
XCTestExpectation *resultExpectation =
[self expectationWithDescription:@"result block must be called."];
[plugin handleMethodCall:call
@@ -63,9 +62,9 @@
FlutterMethodCall *call = [FlutterMethodCall methodCallWithMethodName:@"getLaunchAction"
arguments:nil];
- FLTQuickActionsPlugin *plugin =
- [[FLTQuickActionsPlugin alloc] initWithChannel:OCMClassMock([FlutterMethodChannel class])
- shortcutStateManager:OCMClassMock([FLTShortcutStateManager class])];
+ QuickActionsPlugin *plugin =
+ [[QuickActionsPlugin alloc] initWithChannel:OCMClassMock([FlutterMethodChannel class])
+ shortcutStateManager:OCMClassMock([FLTShortcutStateManager class])];
XCTestExpectation *resultExpectation =
[self expectationWithDescription:@"result block must be called."];
[plugin handleMethodCall:call
@@ -79,9 +78,9 @@
- (void)testHandleMethodCall_nonExistMethods {
FlutterMethodCall *call = [FlutterMethodCall methodCallWithMethodName:@"nonExist" arguments:nil];
- FLTQuickActionsPlugin *plugin =
- [[FLTQuickActionsPlugin alloc] initWithChannel:OCMClassMock([FlutterMethodChannel class])
- shortcutStateManager:OCMClassMock([FLTShortcutStateManager class])];
+ QuickActionsPlugin *plugin =
+ [[QuickActionsPlugin alloc] initWithChannel:OCMClassMock([FlutterMethodChannel class])
+ shortcutStateManager:OCMClassMock([FLTShortcutStateManager class])];
XCTestExpectation *resultExpectation =
[self expectationWithDescription:@"result must be called."];
[plugin
@@ -97,9 +96,9 @@
- (void)testApplicationPerformActionForShortcutItem {
id mockChannel = OCMClassMock([FlutterMethodChannel class]);
- FLTQuickActionsPlugin *plugin =
- [[FLTQuickActionsPlugin alloc] initWithChannel:mockChannel
- shortcutStateManager:OCMClassMock([FLTShortcutStateManager class])];
+ QuickActionsPlugin *plugin =
+ [[QuickActionsPlugin alloc] initWithChannel:mockChannel
+ shortcutStateManager:OCMClassMock([FLTShortcutStateManager class])];
UIApplicationShortcutItem *item = [[UIApplicationShortcutItem alloc]
initWithType:@"SearchTheThing"
@@ -118,9 +117,9 @@
- (void)testApplicationDidFinishLaunchingWithOptions_launchWithShortcut {
id mockShortcutStateManager = OCMClassMock([FLTShortcutStateManager class]);
- FLTQuickActionsPlugin *plugin =
- [[FLTQuickActionsPlugin alloc] initWithChannel:OCMClassMock([FlutterMethodChannel class])
- shortcutStateManager:mockShortcutStateManager];
+ QuickActionsPlugin *plugin =
+ [[QuickActionsPlugin alloc] initWithChannel:OCMClassMock([FlutterMethodChannel class])
+ shortcutStateManager:mockShortcutStateManager];
UIApplicationShortcutItem *item = [[UIApplicationShortcutItem alloc]
initWithType:@"SearchTheThing"
@@ -138,9 +137,9 @@
}
- (void)testApplicationDidFinishLaunchingWithOptions_launchWithoutShortcut {
- FLTQuickActionsPlugin *plugin =
- [[FLTQuickActionsPlugin alloc] initWithChannel:OCMClassMock([FlutterMethodChannel class])
- shortcutStateManager:OCMClassMock([FLTShortcutStateManager class])];
+ QuickActionsPlugin *plugin =
+ [[QuickActionsPlugin alloc] initWithChannel:OCMClassMock([FlutterMethodChannel class])
+ shortcutStateManager:OCMClassMock([FLTShortcutStateManager class])];
BOOL launchResult = [plugin application:[UIApplication sharedApplication]
didFinishLaunchingWithOptions:@{}];
XCTAssertTrue(launchResult,
@@ -150,11 +149,14 @@
- (void)testApplicationDidBecomeActive_launchWithoutShortcut {
id mockChannel = OCMClassMock([FlutterMethodChannel class]);
id mockShortcutStateManager = OCMClassMock([FLTShortcutStateManager class]);
- FLTQuickActionsPlugin *plugin =
- [[FLTQuickActionsPlugin alloc] initWithChannel:mockChannel
- shortcutStateManager:mockShortcutStateManager];
+ QuickActionsPlugin *plugin =
+ [[QuickActionsPlugin alloc] initWithChannel:mockChannel
+ shortcutStateManager:mockShortcutStateManager];
- [plugin application:[UIApplication sharedApplication] didFinishLaunchingWithOptions:@{}];
+ BOOL launchResult = [plugin application:[UIApplication sharedApplication]
+ didFinishLaunchingWithOptions:@{}];
+ XCTAssertTrue(launchResult,
+ @"didFinishLaunchingWithOptions must return true if not launched from shortcut.");
[plugin applicationDidBecomeActive:[UIApplication sharedApplication]];
OCMVerify(never(), [mockChannel invokeMethod:OCMOCK_ANY arguments:OCMOCK_ANY]);
}
@@ -162,9 +164,9 @@
- (void)testApplicationDidBecomeActive_launchWithShortcut {
id mockChannel = OCMClassMock([FlutterMethodChannel class]);
id mockShortcutStateManager = OCMClassMock([FLTShortcutStateManager class]);
- FLTQuickActionsPlugin *plugin =
- [[FLTQuickActionsPlugin alloc] initWithChannel:mockChannel
- shortcutStateManager:mockShortcutStateManager];
+ QuickActionsPlugin *plugin =
+ [[QuickActionsPlugin alloc] initWithChannel:mockChannel
+ shortcutStateManager:mockShortcutStateManager];
UIApplicationShortcutItem *item = [[UIApplicationShortcutItem alloc]
initWithType:@"SearchTheThing"
@@ -173,9 +175,10 @@
icon:[UIApplicationShortcutIcon
iconWithTemplateImageName:@"search_the_thing.png"]
userInfo:nil];
- [plugin application:[UIApplication sharedApplication]
- didFinishLaunchingWithOptions:@{UIApplicationLaunchOptionsShortcutItemKey : item}];
-
+ BOOL launchResult = [plugin application:[UIApplication sharedApplication]
+ didFinishLaunchingWithOptions:@{UIApplicationLaunchOptionsShortcutItemKey : item}];
+ XCTAssertFalse(launchResult,
+ @"didFinishLaunchingWithOptions must return false if launched from shortcut.");
[plugin applicationDidBecomeActive:[UIApplication sharedApplication]];
OCMVerify([mockChannel invokeMethod:@"launch" arguments:item.type]);
}
@@ -183,9 +186,9 @@
- (void)testApplicationDidBecomeActive_launchWithShortcut_becomeActiveTwice {
id mockChannel = OCMClassMock([FlutterMethodChannel class]);
id mockShortcutStateManager = OCMClassMock([FLTShortcutStateManager class]);
- FLTQuickActionsPlugin *plugin =
- [[FLTQuickActionsPlugin alloc] initWithChannel:mockChannel
- shortcutStateManager:mockShortcutStateManager];
+ QuickActionsPlugin *plugin =
+ [[QuickActionsPlugin alloc] initWithChannel:mockChannel
+ shortcutStateManager:mockShortcutStateManager];
UIApplicationShortcutItem *item = [[UIApplicationShortcutItem alloc]
initWithType:@"SearchTheThing"
@@ -194,9 +197,10 @@
icon:[UIApplicationShortcutIcon
iconWithTemplateImageName:@"search_the_thing.png"]
userInfo:nil];
- [plugin application:[UIApplication sharedApplication]
- didFinishLaunchingWithOptions:@{UIApplicationLaunchOptionsShortcutItemKey : item}];
-
+ BOOL launchResult = [plugin application:[UIApplication sharedApplication]
+ didFinishLaunchingWithOptions:@{UIApplicationLaunchOptionsShortcutItemKey : item}];
+ XCTAssertFalse(launchResult,
+ @"didFinishLaunchingWithOptions must return false if launched from shortcut.");
[plugin applicationDidBecomeActive:[UIApplication sharedApplication]];
[plugin applicationDidBecomeActive:[UIApplication sharedApplication]];
// shortcut should only be handled once per launch.
diff --git a/packages/quick_actions/quick_actions_ios/example/ios/RunnerTests/FLTShortcutStateManagerTests.m b/packages/quick_actions/quick_actions_ios/example/ios/RunnerTests/FLTShortcutStateManagerTests.m
index f5b8b34..96fbf22 100644
--- a/packages/quick_actions/quick_actions_ios/example/ios/RunnerTests/FLTShortcutStateManagerTests.m
+++ b/packages/quick_actions/quick_actions_ios/example/ios/RunnerTests/FLTShortcutStateManagerTests.m
@@ -3,7 +3,6 @@
// found in the LICENSE file.
@import quick_actions_ios;
-@import quick_actions_ios.Test;
@import XCTest;
#import <OCMock/OCMock.h>
diff --git a/packages/quick_actions/quick_actions_ios/ios/Classes/FLTQuickActionsPlugin.h b/packages/quick_actions/quick_actions_ios/ios/Classes/FLTQuickActionsPlugin.h
deleted file mode 100644
index 63f6154..0000000
--- a/packages/quick_actions/quick_actions_ios/ios/Classes/FLTQuickActionsPlugin.h
+++ /dev/null
@@ -1,14 +0,0 @@
-// Copyright 2013 The Flutter Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-@import Flutter;
-
-@interface FLTQuickActionsPlugin : NSObject <FlutterPlugin>
-
-/// Unavailable.
-- (instancetype)init NS_UNAVAILABLE;
-
-/// Unavailable.
-+ (instancetype)new NS_UNAVAILABLE;
-@end
diff --git a/packages/quick_actions/quick_actions_ios/ios/Classes/FLTQuickActionsPlugin.m b/packages/quick_actions/quick_actions_ios/ios/Classes/FLTQuickActionsPlugin.m
deleted file mode 100644
index fb89943..0000000
--- a/packages/quick_actions/quick_actions_ios/ios/Classes/FLTQuickActionsPlugin.m
+++ /dev/null
@@ -1,99 +0,0 @@
-// Copyright 2013 The Flutter Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#import "FLTQuickActionsPlugin.h"
-#import "FLTQuickActionsPlugin_Test.h"
-#import "FLTShortcutStateManager.h"
-
-static NSString *const kChannelName = @"plugins.flutter.io/quick_actions_ios";
-
-@interface FLTQuickActionsPlugin ()
-@property(nonatomic, strong) FlutterMethodChannel *channel;
-/// The type of the shortcut item selected when launching the app.
-@property(nonatomic, strong, nullable) NSString *launchingShortcutType;
-@property(nonatomic, strong) FLTShortcutStateManager *shortcutStateManager;
-@end
-
-@implementation FLTQuickActionsPlugin
-
-+ (void)registerWithRegistrar:(NSObject<FlutterPluginRegistrar> *)registrar {
- FlutterMethodChannel *channel =
- [FlutterMethodChannel methodChannelWithName:kChannelName
- binaryMessenger:[registrar messenger]];
- FLTQuickActionsPlugin *instance =
- [[FLTQuickActionsPlugin alloc] initWithChannel:channel
- shortcutStateManager:[[FLTShortcutStateManager alloc] init]];
- [registrar addMethodCallDelegate:instance channel:channel];
- [registrar addApplicationDelegate:instance];
-}
-
-- (instancetype)initWithChannel:(FlutterMethodChannel *)channel
- shortcutStateManager:(FLTShortcutStateManager *)shortcutStateManager {
- if ((self = [super init])) {
- _channel = channel;
- _shortcutStateManager = shortcutStateManager;
- }
- return self;
-}
-
-- (void)handleMethodCall:(FlutterMethodCall *)call result:(FlutterResult)result {
- if ([call.method isEqualToString:@"setShortcutItems"]) {
- [self.shortcutStateManager setShortcutItems:call.arguments];
- result(nil);
- } else if ([call.method isEqualToString:@"clearShortcutItems"]) {
- [self.shortcutStateManager setShortcutItems:@[]];
- result(nil);
- } else if ([call.method isEqualToString:@"getLaunchAction"]) {
- result(nil);
- } else {
- result(FlutterMethodNotImplemented);
- }
-}
-
-- (void)dealloc {
- [_channel setMethodCallHandler:nil];
- _channel = nil;
-}
-
-- (BOOL)application:(UIApplication *)application
- performActionForShortcutItem:(UIApplicationShortcutItem *)shortcutItem
- completionHandler:(void (^)(BOOL succeeded))completionHandler
- API_AVAILABLE(ios(9.0)) {
- [self handleShortcut:shortcutItem.type];
- return YES;
-}
-
-- (BOOL)application:(UIApplication *)application
- didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
- UIApplicationShortcutItem *shortcutItem =
- launchOptions[UIApplicationLaunchOptionsShortcutItemKey];
- if (shortcutItem) {
- // Keep hold of the shortcut type and handle it in the
- // `applicationDidBecomeActure:` method once the Dart MethodChannel
- // is initialized.
- self.launchingShortcutType = shortcutItem.type;
-
- // Return NO to indicate we handled the quick action to ensure
- // the `application:performActionFor:` method is not called (as
- // per Apple's documentation:
- // https://developer.apple.com/documentation/uikit/uiapplicationdelegate/1622935-application?language=objc).
- return NO;
- }
- return YES;
-}
-
-- (void)applicationDidBecomeActive:(UIApplication *)application {
- if (self.launchingShortcutType) {
- [self handleShortcut:self.launchingShortcutType];
- self.launchingShortcutType = nil;
- }
-}
-
-#pragma mark Private functions
-
-- (void)handleShortcut:(NSString *)shortcut {
- [self.channel invokeMethod:@"launch" arguments:shortcut];
-}
-
-@end
diff --git a/packages/quick_actions/quick_actions_ios/ios/Classes/PrivateHeaders/FLTShortcutStateManager.h b/packages/quick_actions/quick_actions_ios/ios/Classes/FLTShortcutStateManager.h
similarity index 100%
rename from packages/quick_actions/quick_actions_ios/ios/Classes/PrivateHeaders/FLTShortcutStateManager.h
rename to packages/quick_actions/quick_actions_ios/ios/Classes/FLTShortcutStateManager.h
diff --git a/packages/quick_actions/quick_actions_ios/ios/Classes/PrivateHeaders/FLTQuickActionsPlugin_Test.h b/packages/quick_actions/quick_actions_ios/ios/Classes/PrivateHeaders/FLTQuickActionsPlugin_Test.h
deleted file mode 100644
index 514d063..0000000
--- a/packages/quick_actions/quick_actions_ios/ios/Classes/PrivateHeaders/FLTQuickActionsPlugin_Test.h
+++ /dev/null
@@ -1,23 +0,0 @@
-// Copyright 2013 The Flutter Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-@import Flutter;
-#import "FLTShortcutStateManager.h"
-
-NS_ASSUME_NONNULL_BEGIN
-
-/// APIs exposed for unit tests.
-@interface FLTQuickActionsPlugin ()
-
-/// Initializes a FLTQuickActionsPlugin with the given method channel.
-/// API exposed for unit tests.
-/// @param channel A method channel.
-/// @param shortcutStateManager An FLTShortcutStateManager that manages shortcut related states.
-/// @return The initialized FLTQuickActionsPlugin.
-- (instancetype)initWithChannel:(FlutterMethodChannel *)channel
- shortcutStateManager:(FLTShortcutStateManager *)shortcutStateManager;
-
-@end
-
-NS_ASSUME_NONNULL_END
diff --git a/packages/quick_actions/quick_actions_ios/ios/Classes/QuickActionsPlugin.modulemap b/packages/quick_actions/quick_actions_ios/ios/Classes/QuickActionsPlugin.modulemap
deleted file mode 100644
index 3f7d7ce..0000000
--- a/packages/quick_actions/quick_actions_ios/ios/Classes/QuickActionsPlugin.modulemap
+++ /dev/null
@@ -1,11 +0,0 @@
-framework module quick_actions_ios {
- umbrella header "quick_actions_ios-umbrella.h"
-
- export *
- module * { export * }
-
- explicit module Test {
- header "FLTQuickActionsPlugin_Test.h"
- header "FLTShortcutStateManager.h"
- }
-}
diff --git a/packages/quick_actions/quick_actions_ios/ios/Classes/QuickActionsPlugin.swift b/packages/quick_actions/quick_actions_ios/ios/Classes/QuickActionsPlugin.swift
new file mode 100644
index 0000000..26d6d20
--- /dev/null
+++ b/packages/quick_actions/quick_actions_ios/ios/Classes/QuickActionsPlugin.swift
@@ -0,0 +1,90 @@
+// Copyright 2013 The Flutter Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+import Flutter
+
+public final class QuickActionsPlugin: NSObject, FlutterPlugin {
+
+ public static func register(with registrar: FlutterPluginRegistrar) {
+ let channel = FlutterMethodChannel(
+ name: "plugins.flutter.io/quick_actions_ios",
+ binaryMessenger: registrar.messenger())
+ let instance = QuickActionsPlugin(channel: channel)
+ registrar.addMethodCallDelegate(instance, channel: channel)
+ registrar.addApplicationDelegate(instance)
+ }
+
+ private let channel: FlutterMethodChannel
+ private let shortcutStateManager: FLTShortcutStateManager
+ /// The type of the shortcut item selected when launching the app.
+ private var launchingShortcutType: String? = nil
+
+ // TODO: (hellohuanlin) remove `@objc` attribute and make it non-public after migrating tests to Swift.
+ @objc
+ public init(
+ channel: FlutterMethodChannel,
+ shortcutStateManager: FLTShortcutStateManager = FLTShortcutStateManager()
+ ) {
+ self.channel = channel
+ self.shortcutStateManager = shortcutStateManager
+ }
+
+ public func handle(_ call: FlutterMethodCall, result: @escaping FlutterResult) {
+ switch call.method {
+ case "setShortcutItems":
+ // `arguments` must be an array of dictionaries
+ let items = call.arguments as! [[String: Any]]
+ shortcutStateManager.setShortcutItems(items)
+ result(nil)
+ case "clearShortcutItems":
+ shortcutStateManager.setShortcutItems([])
+ result(nil)
+ case "getLaunchAction":
+ result(nil)
+ case _:
+ result(FlutterMethodNotImplemented)
+ }
+ }
+
+ public func application(
+ _ application: UIApplication, performActionFor shortcutItem: UIApplicationShortcutItem,
+ completionHandler: @escaping (Bool) -> Void
+ ) -> Bool {
+ handleShortcut(shortcutItem.type)
+ return true
+ }
+
+ public func application(
+ _ application: UIApplication,
+ didFinishLaunchingWithOptions launchOptions: [AnyHashable: Any] = [:]
+ ) -> Bool {
+ if let shortcutItem = launchOptions[UIApplication.LaunchOptionsKey.shortcutItem]
+ as? UIApplicationShortcutItem
+ {
+ // Keep hold of the shortcut type and handle it in the
+ // `applicationDidBecomeActive:` method once the Dart MethodChannel
+ // is initialized.
+ launchingShortcutType = shortcutItem.type
+
+ // Return false to indicate we handled the quick action to ensure
+ // the `application:performActionFor:` method is not called (as
+ // per Apple's documentation:
+ // https://developer.apple.com/documentation/uikit/uiapplicationdelegate/1622935-application).
+ return false
+ }
+ return true
+ }
+
+ public func applicationDidBecomeActive(_ application: UIApplication) {
+ if let shortcutType = launchingShortcutType {
+ handleShortcut(shortcutType)
+ launchingShortcutType = nil
+ }
+ }
+
+ private func handleShortcut(_ shortcut: String) {
+ channel.invokeMethod("launch", arguments: shortcut)
+ }
+
+}
diff --git a/packages/quick_actions/quick_actions_ios/ios/Classes/quick_actions_ios-umbrella.h b/packages/quick_actions/quick_actions_ios/ios/Classes/quick_actions_ios-umbrella.h
deleted file mode 100644
index d099a04..0000000
--- a/packages/quick_actions/quick_actions_ios/ios/Classes/quick_actions_ios-umbrella.h
+++ /dev/null
@@ -1,10 +0,0 @@
-// Copyright 2013 The Flutter Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#import <Foundation/Foundation.h>
-
-FOUNDATION_EXPORT double quickActionsIOSVersionNumber;
-FOUNDATION_EXPORT const unsigned char quickActionsIOSVersionString[];
-
-#import <quick_actions_ios/FLTQuickActionsPlugin.h>
diff --git a/packages/quick_actions/quick_actions_ios/ios/quick_actions_ios.podspec b/packages/quick_actions/quick_actions_ios/ios/quick_actions_ios.podspec
index 68eaa6f..d8090ca 100644
--- a/packages/quick_actions/quick_actions_ios/ios/quick_actions_ios.podspec
+++ b/packages/quick_actions/quick_actions_ios/ios/quick_actions_ios.podspec
@@ -14,11 +14,14 @@
s.author = { 'Flutter Dev Team' => 'flutter-dev@googlegroups.com' }
s.source = { :http => 'https://github.com/flutter/plugins/tree/main/packages/quick_actions' }
s.documentation_url = 'https://pub.dev/packages/quick_actions'
- s.source_files = 'Classes/**/*.{h,m}'
- s.public_header_files = 'Classes/*.h'
- s.private_header_files = 'Classes/PrivateHeaders/*.h'
+ s.swift_version = '5.0'
+ s.source_files = 'Classes/**/*.{h,m,swift}'
+ s.xcconfig = {
+ 'LIBRARY_SEARCH_PATHS' => '$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)/ $(SDKROOT)/usr/lib/swift',
+ 'LD_RUNPATH_SEARCH_PATHS' => '/usr/lib/swift',
+ }
+ s.public_header_files = 'Classes/**/*.h'
s.dependency 'Flutter'
s.platform = :ios, '9.0'
s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES' }
- s.module_map = 'Classes/QuickActionsPlugin.modulemap'
end
diff --git a/packages/quick_actions/quick_actions_ios/pubspec.yaml b/packages/quick_actions/quick_actions_ios/pubspec.yaml
index 82fd25f..f01ae4a 100644
--- a/packages/quick_actions/quick_actions_ios/pubspec.yaml
+++ b/packages/quick_actions/quick_actions_ios/pubspec.yaml
@@ -2,7 +2,7 @@
description: An implementation for the iOS platform of the Flutter `quick_actions` plugin.
repository: https://github.com/flutter/plugins/tree/main/packages/quick_actions/quick_actions_ios
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+in_app_purchase%22
-version: 1.0.0
+version: 1.0.1
environment:
sdk: ">=2.15.0 <3.0.0"
@@ -13,7 +13,7 @@
implements: quick_actions
platforms:
ios:
- pluginClass: FLTQuickActionsPlugin
+ pluginClass: QuickActionsPlugin
dartPluginClass: QuickActionsIos
dependencies: