Skip to content

Commit

Permalink
Use sharedDarwinSource
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanheise committed Feb 4, 2025
1 parent 23af1c5 commit 7ca84be
Show file tree
Hide file tree
Showing 14 changed files with 47 additions and 92 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
#if TARGET_OS_OSX
#import <FlutterMacOS/FlutterMacOS.h>
#else
#import <Flutter/Flutter.h>
#endif

@interface AudioServicePlugin : NSObject<FlutterPlugin>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
#
# To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html.
# Run `pod lib lint audio_service.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 = 'audio_service'
s.version = '0.14.1'
s.version = '0.0.1'
s.summary = 'Flutter plugin to play audio in the background while the screen is off.'
s.description = <<-DESC
Flutter plugin to play audio in the background while the screen is off.
Expand All @@ -13,10 +12,12 @@ Flutter plugin to play audio in the background while the screen is off.
s.license = { :file => '../LICENSE' }
s.author = { 'Ryan Heise' => '[email protected]' }
s.source = { :path => '.' }
s.source_files = 'Classes/**/*'
s.dependency 'FlutterMacOS'

s.platform = :osx, '10.12.2'
s.source_files = 'Classes/**/*'
s.public_header_files = 'Classes/**/*.h'
s.ios.dependency 'Flutter'
s.osx.dependency 'FlutterMacOS'
s.ios.deployment_target = '12.0'
s.osx.deployment_target = '10.14'
s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES' }
s.swift_version = '5.0'
end

7 changes: 4 additions & 3 deletions audio_service/example/ios/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
PODS:
- audio_service (0.0.1):
- Flutter
- FlutterMacOS
- audio_session (0.0.1):
- Flutter
- device_info_plus (0.0.1):
Expand All @@ -22,7 +23,7 @@ PODS:
- FMDB (>= 2.7.5)

DEPENDENCIES:
- audio_service (from `.symlinks/plugins/audio_service/ios`)
- audio_service (from `.symlinks/plugins/audio_service/darwin`)
- audio_session (from `.symlinks/plugins/audio_session/ios`)
- device_info_plus (from `.symlinks/plugins/device_info_plus/ios`)
- Flutter (from `Flutter`)
Expand All @@ -38,7 +39,7 @@ SPEC REPOS:

EXTERNAL SOURCES:
audio_service:
:path: ".symlinks/plugins/audio_service/ios"
:path: ".symlinks/plugins/audio_service/darwin"
audio_session:
:path: ".symlinks/plugins/audio_session/ios"
device_info_plus:
Expand All @@ -57,7 +58,7 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/sqflite/ios"

SPEC CHECKSUMS:
audio_service: f509d65da41b9521a61f1c404dd58651f265a567
audio_service: eceebb7d8a01ae86951af4ca913b2483efd7d953
audio_session: 088d2483ebd1dc43f51d253d4a1c517d9a2e7207
device_info_plus: c6fb39579d0f423935b0c9ce7ee2f44b71b9fce6
Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7
Expand Down
19 changes: 13 additions & 6 deletions audio_service/example/macos/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
PODS:
- audio_service (0.14.1):
- audio_service (0.0.1):
- Flutter
- FlutterMacOS
- audio_session (0.0.1):
- FlutterMacOS
- device_info_plus (0.0.1):
- FlutterMacOS
- flutter_tts (0.0.1):
- FlutterMacOS
- FlutterMacOS (1.0.0)
Expand All @@ -18,8 +21,9 @@ PODS:
- FMDB (>= 2.7.5)

DEPENDENCIES:
- audio_service (from `Flutter/ephemeral/.symlinks/plugins/audio_service/macos`)
- audio_service (from `Flutter/ephemeral/.symlinks/plugins/audio_service/darwin`)
- audio_session (from `Flutter/ephemeral/.symlinks/plugins/audio_session/macos`)
- device_info_plus (from `Flutter/ephemeral/.symlinks/plugins/device_info_plus/macos`)
- flutter_tts (from `Flutter/ephemeral/.symlinks/plugins/flutter_tts/macos`)
- FlutterMacOS (from `Flutter/ephemeral`)
- just_audio (from `Flutter/ephemeral/.symlinks/plugins/just_audio/macos`)
Expand All @@ -32,9 +36,11 @@ SPEC REPOS:

EXTERNAL SOURCES:
audio_service:
:path: Flutter/ephemeral/.symlinks/plugins/audio_service/macos
:path: Flutter/ephemeral/.symlinks/plugins/audio_service/darwin
audio_session:
:path: Flutter/ephemeral/.symlinks/plugins/audio_session/macos
device_info_plus:
:path: Flutter/ephemeral/.symlinks/plugins/device_info_plus/macos
flutter_tts:
:path: Flutter/ephemeral/.symlinks/plugins/flutter_tts/macos
FlutterMacOS:
Expand All @@ -47,15 +53,16 @@ EXTERNAL SOURCES:
:path: Flutter/ephemeral/.symlinks/plugins/sqflite/macos

SPEC CHECKSUMS:
audio_service: b88ff778e0e3915efd4cd1a5ad6f0beef0c950a9
audio_service: eceebb7d8a01ae86951af4ca913b2483efd7d953
audio_session: dea1f41890dbf1718f04a56f1d6150fd50039b72
device_info_plus: 5401765fde0b8d062a2f8eb65510fb17e77cf07f
flutter_tts: 64651204e5d276ffea5a910f942d5e9785a96085
FlutterMacOS: 57701585bf7de1b3fc2bb61f6378d73bbdea8424
FlutterMacOS: 8f6f14fa908a6fb3fba0cd85dbd81ec4b251fb24
FMDB: 2ce00b547f966261cd18927a3ddb07cb6f3db82a
just_audio: 9b67ca7b97c61cfc9784ea23cd8cc55eb226d489
path_provider_macos: 160cab0d5461f0c0e02995469a98f24bdb9a3f1f
sqflite: a5789cceda41d54d23f31d6de539d65bb14100ea

PODFILE CHECKSUM: 0d3963a09fc94f580682bd88480486da345dc3f0

COCOAPODS: 1.10.1
COCOAPODS: 1.15.2
13 changes: 8 additions & 5 deletions audio_service/example/macos/Runner.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
archiveVersion = 1;
classes = {
};
objectVersion = 51;
objectVersion = 54;
objects = {

/* Begin PBXAggregateTarget section */
Expand Down Expand Up @@ -202,7 +202,7 @@
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 0920;
LastUpgradeCheck = 0930;
LastUpgradeCheck = 1510;
ORGANIZATIONNAME = "The Flutter Authors";
TargetAttributes = {
33CC10EC2044A3C60003C045 = {
Expand Down Expand Up @@ -285,6 +285,7 @@
"${BUILT_PRODUCTS_DIR}/FMDB/FMDB.framework",
"${BUILT_PRODUCTS_DIR}/audio_service/audio_service.framework",
"${BUILT_PRODUCTS_DIR}/audio_session/audio_session.framework",
"${BUILT_PRODUCTS_DIR}/device_info_plus/device_info_plus.framework",
"${BUILT_PRODUCTS_DIR}/flutter_tts/flutter_tts.framework",
"${BUILT_PRODUCTS_DIR}/just_audio/just_audio.framework",
"${BUILT_PRODUCTS_DIR}/path_provider_macos/path_provider_macos.framework",
Expand All @@ -295,6 +296,7 @@
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FMDB.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/audio_service.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/audio_session.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/device_info_plus.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/flutter_tts.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/just_audio.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/path_provider_macos.framework",
Expand All @@ -307,6 +309,7 @@
};
3399D490228B24CF009A79C7 /* ShellScript */ = {
isa = PBXShellScriptBuildPhase;
alwaysOutOfDate = 1;
buildActionMask = 2147483647;
files = (
);
Expand Down Expand Up @@ -416,7 +419,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.11;
MACOSX_DEPLOYMENT_TARGET = 10.14;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = macosx;
SWIFT_COMPILATION_MODE = wholemodule;
Expand Down Expand Up @@ -500,7 +503,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.11;
MACOSX_DEPLOYMENT_TARGET = 10.14;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = macosx;
Expand Down Expand Up @@ -547,7 +550,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.11;
MACOSX_DEPLOYMENT_TARGET = 10.14;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = macosx;
SWIFT_COMPILATION_MODE = wholemodule;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1000"
LastUpgradeVersion = "1510"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
6 changes: 5 additions & 1 deletion audio_service/example/macos/Runner/AppDelegate.swift
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
import Cocoa
import FlutterMacOS

@NSApplicationMain
@main
class AppDelegate: FlutterAppDelegate {
override func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool {
return true
}

override func applicationSupportsSecureRestorableState(_ app: NSApplication) -> Bool {
return true
}
}
1 change: 1 addition & 0 deletions audio_service/example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,5 @@ dev_dependencies:
flutter_lints: ^3.0.1

flutter:
disable-swift-package-manager: true
uses-material-design: true
Empty file removed audio_service/ios/Assets/.gitkeep
Empty file.
45 changes: 0 additions & 45 deletions audio_service/ios/Classes/AudioServicePlugin.h

This file was deleted.

1 change: 0 additions & 1 deletion audio_service/ios/Classes/AudioServicePlugin.m

This file was deleted.

21 changes: 0 additions & 21 deletions audio_service/ios/audio_service.podspec

This file was deleted.

1 change: 0 additions & 1 deletion audio_service/macos/Classes/AudioServicePlugin.m

This file was deleted.

2 changes: 2 additions & 0 deletions audio_service/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,9 @@ flutter:
pluginClass: AudioServicePlugin
ios:
pluginClass: AudioServicePlugin
sharedDarwinSource: true
macos:
pluginClass: AudioServicePlugin
sharedDarwinSource: true
web:
default_package: audio_service_web

0 comments on commit 7ca84be

Please sign in to comment.