Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ios_platform_images] Add Swift Package Manager support #6684

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion packages/ios_platform_images/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import Flutter
import UIKit

@UIApplicationMain
@main
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was updated automatically by the Flutter tool by running the example app.

@objc class AppDelegate: FlutterAppDelegate {
override func application(
_ application: UIApplication,
Expand Down
Empty file.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ Downloaded by pub (not CocoaPods).
s.source = { :http => 'https:/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'

Expand All @@ -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
Original file line number Diff line number Diff line change
@@ -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")
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I removed macOS from the platforms. Please let me know if you have concerns with this.

],
products: [
.library(name: "ios-platform-images", targets: ["ios_platform_images"])
],
dependencies: [],
targets: [
.target(
name: "ios_platform_images",
dependencies: [],
resources: [
.process("Resources")
]
)
]
)
3 changes: 2 additions & 1 deletion packages/ios_platform_images/pigeons/messages.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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',
))

Expand Down
2 changes: 1 addition & 1 deletion packages/ios_platform_images/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:/flutter/packages/tree/main/packages/ios_platform_images
issue_tracker: https:/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
Expand Down