Skip to content

Commit

Permalink
add support for SPM for sensors package
Browse files Browse the repository at this point in the history
  • Loading branch information
charafau committed Aug 11, 2024
1 parent e61b472 commit e26ed5c
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 2 deletions.
Empty file.
4 changes: 2 additions & 2 deletions packages/sensors_plus/sensors_plus/ios/sensors_plus.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ Flutter plugin to access the accelerometer, gyroscope, magnetometer and baromete
s.author = { 'Flutter Community Team' => '[email protected]' }
s.source = { :http => 'https://github.com/fluttercommunity/plus_plugins/tree/main/packages/sensors_plus' }
s.documentation_url = 'https://pub.dev/packages/sensors_plus'
s.source_files = 'Classes/**/*'
s.source_files = 'sensors_plus/Sources/sensors_plus/**/*.swift'
s.dependency 'Flutter'
s.platform = :ios, '12.0'

# Flutter.framework does not contain a i386 slice.
s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES', 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'i386' }
s.swift_version = '5.0'
s.resource_bundles = {'sensors_plus_privacy' => ['PrivacyInfo.xcprivacy']}
s.resource_bundles = {'sensors_plus_privacy' => ['sensors_plus/Sources/sensors_plus/PrivacyInfo.xcprivacy']}
end
24 changes: 24 additions & 0 deletions packages/sensors_plus/sensors_plus/ios/sensors_plus/Package.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
// 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: "sensors_plus",
platforms: [
.iOS("12.0"),
],
products: [
.library(name: "sensors-plus", targets: ["sensors_plus"])
],
dependencies: [],
targets: [
.target(
name: "sensors_plus",
dependencies: [],
resources: [
.process("PrivacyInfo.xcprivacy"),
]
)
]
)

0 comments on commit e26ed5c

Please sign in to comment.