diff --git a/packages/ios_platform_images/CHANGELOG.md b/packages/ios_platform_images/CHANGELOG.md index 5b4c76c6098d..e85c36769902 100644 --- a/packages/ios_platform_images/CHANGELOG.md +++ b/packages/ios_platform_images/CHANGELOG.md @@ -1,6 +1,7 @@ -## NEXT +## 0.2.4 * Updates minimum iOS version to 12.0 and minimum Flutter version to 3.16.6. +* Adds Swift Package Manager compatibility. ## 0.2.3+2 diff --git a/packages/ios_platform_images/example/ios/Runner/AppDelegate.swift b/packages/ios_platform_images/example/ios/Runner/AppDelegate.swift index d83c0ff0beea..4580c8e76da4 100644 --- a/packages/ios_platform_images/example/ios/Runner/AppDelegate.swift +++ b/packages/ios_platform_images/example/ios/Runner/AppDelegate.swift @@ -5,7 +5,7 @@ import Flutter import UIKit -@UIApplicationMain +@main @objc class AppDelegate: FlutterAppDelegate { override func application( _ application: UIApplication, diff --git a/packages/ios_platform_images/ios/Assets/.gitkeep b/packages/ios_platform_images/ios/Assets/.gitkeep deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/packages/ios_platform_images/ios/ios_platform_images.podspec b/packages/ios_platform_images/ios/ios_platform_images.podspec index bb9574e42607..cbe750ced4ad 100644 --- a/packages/ios_platform_images/ios/ios_platform_images.podspec +++ b/packages/ios_platform_images/ios/ios_platform_images.podspec @@ -16,6 +16,7 @@ Downloaded by pub (not CocoaPods). s.source = { :http => 'https://github.com/flutter/packages/tree/main/packages/ios_platform_images' } s.documentation_url = 'https://pub.dev/packages/ios_platform_images' s.source_files = 'Classes/**/*.swift' + s.source_files = 'ios_platform_images/Sources/ios_platform_images/**/*.swift' s.dependency 'Flutter' s.platform = :ios, '12.0' @@ -25,5 +26,5 @@ Downloaded by pub (not CocoaPods). 'LD_RUNPATH_SEARCH_PATHS' => '/usr/lib/swift', } s.swift_version = '5.0' - s.resource_bundles = {'ios_platform_images_privacy' => ['Resources/PrivacyInfo.xcprivacy']} + s.resource_bundles = {'ios_platform_images_privacy' => ['ios_platform_images/Sources/ios_platform_images/Resources/PrivacyInfo.xcprivacy']} end diff --git a/packages/ios_platform_images/ios/ios_platform_images/Package.swift b/packages/ios_platform_images/ios/ios_platform_images/Package.swift new file mode 100644 index 000000000000..b594a5a8d604 --- /dev/null +++ b/packages/ios_platform_images/ios/ios_platform_images/Package.swift @@ -0,0 +1,28 @@ +// swift-tools-version: 5.9 +// The swift-tools-version declares the minimum version of Swift required to build this package. + +// 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 PackageDescription + +let package = Package( + name: "ios_platform_images", + platforms: [ + .iOS("12.0") + ], + products: [ + .library(name: "ios-platform-images", targets: ["ios_platform_images"]) + ], + dependencies: [], + targets: [ + .target( + name: "ios_platform_images", + dependencies: [], + resources: [ + .process("Resources") + ] + ) + ] +) diff --git a/packages/ios_platform_images/ios/Classes/IosPlatformImagesPlugin.swift b/packages/ios_platform_images/ios/ios_platform_images/Sources/ios_platform_images/IosPlatformImagesPlugin.swift similarity index 100% rename from packages/ios_platform_images/ios/Classes/IosPlatformImagesPlugin.swift rename to packages/ios_platform_images/ios/ios_platform_images/Sources/ios_platform_images/IosPlatformImagesPlugin.swift diff --git a/packages/ios_platform_images/ios/Resources/PrivacyInfo.xcprivacy b/packages/ios_platform_images/ios/ios_platform_images/Sources/ios_platform_images/Resources/PrivacyInfo.xcprivacy similarity index 100% rename from packages/ios_platform_images/ios/Resources/PrivacyInfo.xcprivacy rename to packages/ios_platform_images/ios/ios_platform_images/Sources/ios_platform_images/Resources/PrivacyInfo.xcprivacy diff --git a/packages/ios_platform_images/ios/Classes/UIImageIosPlatformImages.swift b/packages/ios_platform_images/ios/ios_platform_images/Sources/ios_platform_images/UIImageIosPlatformImages.swift similarity index 100% rename from packages/ios_platform_images/ios/Classes/UIImageIosPlatformImages.swift rename to packages/ios_platform_images/ios/ios_platform_images/Sources/ios_platform_images/UIImageIosPlatformImages.swift diff --git a/packages/ios_platform_images/ios/Classes/messages.g.swift b/packages/ios_platform_images/ios/ios_platform_images/Sources/ios_platform_images/messages.g.swift similarity index 100% rename from packages/ios_platform_images/ios/Classes/messages.g.swift rename to packages/ios_platform_images/ios/ios_platform_images/Sources/ios_platform_images/messages.g.swift diff --git a/packages/ios_platform_images/pigeons/messages.dart b/packages/ios_platform_images/pigeons/messages.dart index 36cd9931e5bd..f45a914e19ac 100644 --- a/packages/ios_platform_images/pigeons/messages.dart +++ b/packages/ios_platform_images/pigeons/messages.dart @@ -6,7 +6,8 @@ import 'package:pigeon/pigeon.dart'; @ConfigurePigeon(PigeonOptions( dartOut: 'lib/src/messages.g.dart', - swiftOut: 'ios/Classes/messages.g.swift', + swiftOut: + 'ios/ios_platform_images/Sources/ios_platform_messages/messages.g.swift', copyrightHeader: 'pigeons/copyright.txt', )) diff --git a/packages/ios_platform_images/pubspec.yaml b/packages/ios_platform_images/pubspec.yaml index 7500447d9159..e17ed82f26c2 100644 --- a/packages/ios_platform_images/pubspec.yaml +++ b/packages/ios_platform_images/pubspec.yaml @@ -2,7 +2,7 @@ name: ios_platform_images description: A plugin to share images between Flutter and iOS in add-to-app setups. repository: https://github.com/flutter/packages/tree/main/packages/ios_platform_images issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+ios_platform_images%22 -version: 0.2.3+2 +version: 0.2.4 environment: sdk: ^3.2.3