diff --git a/wakelock_plus/ios/Assets/.gitkeep b/wakelock_plus/ios/Assets/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/wakelock_plus/ios/wakelock_plus.podspec b/wakelock_plus/ios/wakelock_plus.podspec index 0e6b79b..ed17d5b 100644 --- a/wakelock_plus/ios/wakelock_plus.podspec +++ b/wakelock_plus/ios/wakelock_plus.podspec @@ -13,12 +13,12 @@ Plugin that allows you to keep the device screen awake, i.e. prevent the screen s.license = { :file => '../LICENSE' } s.author = { 'Flutter Team' => 'flutter-dev@googlegroups.com' } s.source = { :path => '.' } - s.source_files = 'Classes/**/*' - s.public_header_files = 'Classes/**/*.h' + s.source_files = 'wakelock_plus/Sources/wakelock_plus/**/*.{h,m}' + s.public_header_files = 'wakelock_plus/Sources/wakelock_plus/include/**/*.h' s.dependency 'Flutter' s.platform = :ios, '11.0' # Flutter.framework does not contain a i386 slice. s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES', 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'i386' } - s.resource_bundles = {'wakelock_plus_privacy' => ['Resources/PrivacyInfo.xcprivacy']} + s.resource_bundles = {'wakelock_plus_privacy' => ['wakelock_plus/Sources/wakelock_plus/Resources/PrivacyInfo.xcprivacy']} end diff --git a/wakelock_plus/ios/wakelock_plus/Package.swift b/wakelock_plus/ios/wakelock_plus/Package.swift new file mode 100644 index 0000000..790ec85 --- /dev/null +++ b/wakelock_plus/ios/wakelock_plus/Package.swift @@ -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: "wakelock_plus", + platforms: [ + .iOS("11.0") + ], + products: [ + .library(name: "wakelock-plus", targets: ["wakelock_plus"]) + ], + dependencies: [], + targets: [ + .target( + name: "wakelock_plus", + dependencies: [], + resources: [ + .process("Resources") + ], + cSettings: [ + .headerSearchPath("include/wakelock_plus") + ] + ) + ] +) \ No newline at end of file diff --git a/wakelock_plus/ios/Resources/PrivacyInfo.xcprivacy b/wakelock_plus/ios/wakelock_plus/Sources/wakelock_plus/Resources/PrivacyInfo.xcprivacy similarity index 100% rename from wakelock_plus/ios/Resources/PrivacyInfo.xcprivacy rename to wakelock_plus/ios/wakelock_plus/Sources/wakelock_plus/Resources/PrivacyInfo.xcprivacy diff --git a/wakelock_plus/ios/Classes/UIApplication+idleTimerLock.m b/wakelock_plus/ios/wakelock_plus/Sources/wakelock_plus/UIApplication+idleTimerLock.m similarity index 100% rename from wakelock_plus/ios/Classes/UIApplication+idleTimerLock.m rename to wakelock_plus/ios/wakelock_plus/Sources/wakelock_plus/UIApplication+idleTimerLock.m diff --git a/wakelock_plus/ios/Classes/WakelockPlusPlugin.m b/wakelock_plus/ios/wakelock_plus/Sources/wakelock_plus/WakelockPlusPlugin.m similarity index 100% rename from wakelock_plus/ios/Classes/WakelockPlusPlugin.m rename to wakelock_plus/ios/wakelock_plus/Sources/wakelock_plus/WakelockPlusPlugin.m diff --git a/wakelock_plus/ios/Classes/UIApplication+idleTimerLock.h b/wakelock_plus/ios/wakelock_plus/Sources/wakelock_plus/include/wakelock_plus/UIApplication+idleTimerLock.h similarity index 100% rename from wakelock_plus/ios/Classes/UIApplication+idleTimerLock.h rename to wakelock_plus/ios/wakelock_plus/Sources/wakelock_plus/include/wakelock_plus/UIApplication+idleTimerLock.h diff --git a/wakelock_plus/ios/Classes/WakelockPlusPlugin.h b/wakelock_plus/ios/wakelock_plus/Sources/wakelock_plus/include/wakelock_plus/WakelockPlusPlugin.h similarity index 100% rename from wakelock_plus/ios/Classes/WakelockPlusPlugin.h rename to wakelock_plus/ios/wakelock_plus/Sources/wakelock_plus/include/wakelock_plus/WakelockPlusPlugin.h diff --git a/wakelock_plus/ios/Classes/messages.g.h b/wakelock_plus/ios/wakelock_plus/Sources/wakelock_plus/include/wakelock_plus/messages.g.h similarity index 100% rename from wakelock_plus/ios/Classes/messages.g.h rename to wakelock_plus/ios/wakelock_plus/Sources/wakelock_plus/include/wakelock_plus/messages.g.h diff --git a/wakelock_plus/ios/Classes/messages.g.m b/wakelock_plus/ios/wakelock_plus/Sources/wakelock_plus/messages.g.m similarity index 99% rename from wakelock_plus/ios/Classes/messages.g.m rename to wakelock_plus/ios/wakelock_plus/Sources/wakelock_plus/messages.g.m index 9a7105c..25110f4 100644 --- a/wakelock_plus/ios/Classes/messages.g.m +++ b/wakelock_plus/ios/wakelock_plus/Sources/wakelock_plus/messages.g.m @@ -1,7 +1,7 @@ // Autogenerated from Pigeon (v22.7.0), do not edit directly. // See also: https://pub.dev/packages/pigeon -#import "messages.g.h" +#import "./include/wakelock_plus/messages.g.h" #if TARGET_OS_OSX #import diff --git a/wakelock_plus/pigeons/messages.dart b/wakelock_plus/pigeons/messages.dart index f179cf0..d2f1828 100644 --- a/wakelock_plus/pigeons/messages.dart +++ b/wakelock_plus/pigeons/messages.dart @@ -13,10 +13,12 @@ class IsEnabledMessage { @ConfigurePigeon(PigeonOptions( dartOut: '../wakelock_plus_platform_interface/lib/messages.g.dart', dartTestOut: '../wakelock_plus_platform_interface/test/messages.g.dart', - objcHeaderOut: 'ios/Classes/messages.g.h', - objcSourceOut: 'ios/Classes/messages.g.m', + objcHeaderOut: + 'ios/wakelock_plus/Sources/wakelock_plus/include/wakelock_plus/messages.g.h', + objcSourceOut: 'ios/wakelock_plus/Sources/wakelock_plus/messages.g.m', objcOptions: ObjcOptions( prefix: 'WAKELOCKPLUS', + headerIncludePath: './include/wakelock_plus/messages.g.h', ), kotlinOptions: KotlinOptions(errorClassName: "WakelockPlusFlutterError"), kotlinOut: