-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
feat(device_info_plus): Add Swift Package Manager support #3167
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
Merged
Merged
Changes from 5 commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
912fe6a
add support for swift package manager for device info plugin
charafau f86a7b7
remove redundant file
charafau 29f925a
remove .build and .swiftpm from repository, remove gitkeep, update gi…
charafau 33c7946
add spm support for macos
charafau e97205e
fix podspec file for macos
charafau d5d4d34
Apply suggestions from code review
charafau 0496ac0
Merge branch 'main' into device_info_spm
vbuberen 524ae08
fix(device_info_plus): Move MacOS privacy manifest into a correct place
vbuberen File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -14,11 +14,11 @@ Downloaded by pub (not CocoaPods). | |
| s.author = { 'Flutter Community Team' => '[email protected]' } | ||
| s.source = { :http => 'https://github.com/fluttercommunity/plus_plugins/tree/main/packages/device_info_plus' } | ||
| s.documentation_url = 'https://pub.dev/packages/device_info_plus' | ||
| s.source_files = 'Classes/**/*' | ||
| s.public_header_files = 'Classes/**/*.h' | ||
| s.source_files = 'device_info_plus/Sources/device_info_plus/**/*.{h,m}' | ||
| s.public_header_files = 'device_info_plus/Sources/device_info_plus/include/**/*.h' | ||
| s.dependency 'Flutter' | ||
| s.platform = :ios, '12.0' | ||
| s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES' } | ||
| s.resource_bundles = {'device_info_plus_privacy' => ['PrivacyInfo.xcprivacy']} | ||
| s.resource_bundles = {'device_info_plus_privacy' => ['device_info_plus/Sources/device_info_plus/PrivacyInfo.xcprivacy']} | ||
| end | ||
|
|
||
27 changes: 27 additions & 0 deletions
27
packages/device_info_plus/device_info_plus/ios/device_info_plus/Package.swift
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| // swift-tools-version: 5.9 | ||
| // The swift-tools-version declares the minimum version of Swift required to build this package. | ||
|
|
||
| import PackageDescription | ||
|
|
||
| let package = Package( | ||
| name: "device_info_plus", | ||
| platforms: [ | ||
| .iOS("12.0"), | ||
| ], | ||
| products: [ | ||
| .library(name: "device-info-plus", targets: ["device_info_plus"]) | ||
| ], | ||
| dependencies: [], | ||
| targets: [ | ||
| .target( | ||
| name: "device_info_plus", | ||
| dependencies: [], | ||
| resources: [ | ||
| .process("PrivacyInfo.xcprivacy"), | ||
| ], | ||
| cSettings: [ | ||
| .headerSearchPath("include/device_info_plus") | ||
| ] | ||
| ) | ||
| ] | ||
| ) | ||
charafau marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -13,8 +13,8 @@ https://github.com/flutter/flutter/issues/46618 | |
| s.license = { :file => '../LICENSE' } | ||
| s.author = { 'Flutter Community' => '[email protected]' } | ||
| s.source = { :path => '.' } | ||
| s.source_files = 'Classes/**/*' | ||
| s.public_header_files = 'Classes/**/*.h' | ||
| s.source_files = 'device_info_plus/Sources/device_info_plus/**/*.swift' | ||
| s.public_header_files = 'device_info_plus/Sources/device_info_plus/**/*.h' | ||
| s.dependency 'FlutterMacOS' | ||
|
|
||
| s.platform = :osx | ||
|
|
||
23 changes: 23 additions & 0 deletions
23
packages/device_info_plus/device_info_plus/macos/device_info_plus/Package.swift
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| // swift-tools-version: 5.9 | ||
| // The swift-tools-version declares the minimum version of Swift required to build this package. | ||
|
|
||
| import PackageDescription | ||
|
|
||
| let package = Package( | ||
| name: "device_info_plus", | ||
| platforms: [ | ||
| .macOS("10.14") | ||
| ], | ||
| products: [ | ||
| .library(name: "device-info-plus", targets: ["device_info_plus"]) | ||
| ], | ||
| dependencies: [], | ||
| targets: [ | ||
| .target( | ||
| name: "device_info_plus", | ||
| dependencies: [], | ||
| resources: [ | ||
| ] | ||
| ) | ||
| ] | ||
| ) |
File renamed without changes.
File renamed without changes.
File renamed without changes.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.