Skip to content

Add Swift Package Manager Support (closes #80) #90

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 3 commits into from
Apr 17, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file removed wakelock_plus/ios/Assets/.gitkeep
Empty file.
6 changes: 3 additions & 3 deletions wakelock_plus/ios/wakelock_plus.podspec
Original file line number Diff line number Diff line change
@@ -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
27 changes: 27 additions & 0 deletions wakelock_plus/ios/wakelock_plus/Package.swift
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: "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")
]
)
]
)
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -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 <FlutterMacOS/FlutterMacOS.h>
6 changes: 4 additions & 2 deletions wakelock_plus/pigeons/messages.dart
Original file line number Diff line number Diff line change
@@ -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: