diff --git a/wakelock_plus/macos/wakelock_plus.podspec b/wakelock_plus/macos/wakelock_plus.podspec index eb1e4c4..9e2cf7d 100644 --- a/wakelock_plus/macos/wakelock_plus.podspec +++ b/wakelock_plus/macos/wakelock_plus.podspec @@ -1,6 +1,5 @@ # -# To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html. -# Run `pod lib lint wakelock_plus.podspec` to validate before publishing. +# To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html # Pod::Spec.new do |s| s.name = 'wakelock_plus' @@ -13,10 +12,11 @@ Pod::Spec.new do |s| s.license = { :type => 'BSD', :file => '../LICENSE' } s.author = { 'Flutter Team' => 'flutter-dev@googlegroups.com' } s.source = { :http => 'https://github.com/fluttercommunity/wakelock_plus/tree/main/packages/wakelock_plus_macos' } - s.source_files = 'Classes/**/*' + s.source_files = 'wakelock_plus/Sources/wakelock_plus/**/*.swift' s.dependency 'FlutterMacOS' - - s.platform = :osx, '10.11' - s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES' } + s.osx.deployment_target = '10.15' + # 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 = {'wakelock_plus' => ['wakelock_plus/Sources/wakelock_plus/Resources/PrivacyInfo.xcprivacy']} end diff --git a/wakelock_plus/macos/wakelock_plus/Package.swift b/wakelock_plus/macos/wakelock_plus/Package.swift new file mode 100644 index 0000000..35bcca2 --- /dev/null +++ b/wakelock_plus/macos/wakelock_plus/Package.swift @@ -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: "wakelock_plus", + platforms: [ + .macOS("10.15") + ], + products: [ + .library(name: "wakelock-plus", targets: ["wakelock_plus"]) + ], + dependencies: [], + targets: [ + .target( + name: "wakelock_plus", + dependencies: [], + resources: [ + .process("Resources"), + ] + ) + ] +) \ No newline at end of file diff --git a/wakelock_plus/macos/wakelock_plus/Sources/wakelock_plus/Resources/PrivacyInfo.xcprivacy b/wakelock_plus/macos/wakelock_plus/Sources/wakelock_plus/Resources/PrivacyInfo.xcprivacy new file mode 100644 index 0000000..918d80b --- /dev/null +++ b/wakelock_plus/macos/wakelock_plus/Sources/wakelock_plus/Resources/PrivacyInfo.xcprivacy @@ -0,0 +1,12 @@ + + + + + NSPrivacyTrackingDomains + + NSPrivacyCollectedDataTypes + + NSPrivacyTracking + + + diff --git a/wakelock_plus/macos/Classes/WakelockPlusMacosPlugin.swift b/wakelock_plus/macos/wakelock_plus/Sources/wakelock_plus/WakelockPlusMacosPlugin.swift similarity index 100% rename from wakelock_plus/macos/Classes/WakelockPlusMacosPlugin.swift rename to wakelock_plus/macos/wakelock_plus/Sources/wakelock_plus/WakelockPlusMacosPlugin.swift