Skip to content

Commit 4f39ebe

Browse files
authored
Merge pull request #90 from Gustl22/80-spm-support
Add Swift Package Manager Support (closes #80)
2 parents f9f687b + c75abf5 commit 4f39ebe

File tree

11 files changed

+35
-6
lines changed

11 files changed

+35
-6
lines changed

wakelock_plus/ios/Assets/.gitkeep

Whitespace-only changes.

wakelock_plus/ios/wakelock_plus.podspec

+3-3
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@ Plugin that allows you to keep the device screen awake, i.e. prevent the screen
1313
s.license = { :file => '../LICENSE' }
1414
s.author = { 'Flutter Team' => '[email protected]' }
1515
s.source = { :path => '.' }
16-
s.source_files = 'Classes/**/*'
17-
s.public_header_files = 'Classes/**/*.h'
16+
s.source_files = 'wakelock_plus/Sources/wakelock_plus/**/*.{h,m}'
17+
s.public_header_files = 'wakelock_plus/Sources/wakelock_plus/include/**/*.h'
1818
s.dependency 'Flutter'
1919
s.platform = :ios, '11.0'
2020

2121
# Flutter.framework does not contain a i386 slice.
2222
s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES', 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'i386' }
23-
s.resource_bundles = {'wakelock_plus_privacy' => ['Resources/PrivacyInfo.xcprivacy']}
23+
s.resource_bundles = {'wakelock_plus_privacy' => ['wakelock_plus/Sources/wakelock_plus/Resources/PrivacyInfo.xcprivacy']}
2424
end
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
// swift-tools-version: 5.9
2+
// The swift-tools-version declares the minimum version of Swift required to build this package.
3+
4+
import PackageDescription
5+
6+
let package = Package(
7+
name: "wakelock_plus",
8+
platforms: [
9+
.iOS("11.0")
10+
],
11+
products: [
12+
.library(name: "wakelock-plus", targets: ["wakelock_plus"])
13+
],
14+
dependencies: [],
15+
targets: [
16+
.target(
17+
name: "wakelock_plus",
18+
dependencies: [],
19+
resources: [
20+
.process("Resources")
21+
],
22+
cSettings: [
23+
.headerSearchPath("include/wakelock_plus")
24+
]
25+
)
26+
]
27+
)

wakelock_plus/ios/Classes/messages.g.m renamed to wakelock_plus/ios/wakelock_plus/Sources/wakelock_plus/messages.g.m

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Autogenerated from Pigeon (v22.7.0), do not edit directly.
22
// See also: https://pub.dev/packages/pigeon
33

4-
#import "messages.g.h"
4+
#import "./include/wakelock_plus/messages.g.h"
55

66
#if TARGET_OS_OSX
77
#import <FlutterMacOS/FlutterMacOS.h>

wakelock_plus/pigeons/messages.dart

+4-2
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,12 @@ class IsEnabledMessage {
1313
@ConfigurePigeon(PigeonOptions(
1414
dartOut: '../wakelock_plus_platform_interface/lib/messages.g.dart',
1515
dartTestOut: '../wakelock_plus_platform_interface/test/messages.g.dart',
16-
objcHeaderOut: 'ios/Classes/messages.g.h',
17-
objcSourceOut: 'ios/Classes/messages.g.m',
16+
objcHeaderOut:
17+
'ios/wakelock_plus/Sources/wakelock_plus/include/wakelock_plus/messages.g.h',
18+
objcSourceOut: 'ios/wakelock_plus/Sources/wakelock_plus/messages.g.m',
1819
objcOptions: ObjcOptions(
1920
prefix: 'WAKELOCKPLUS',
21+
headerIncludePath: './include/wakelock_plus/messages.g.h',
2022
),
2123
kotlinOptions: KotlinOptions(errorClassName: "WakelockPlusFlutterError"),
2224
kotlinOut:

0 commit comments

Comments
 (0)