diff --git a/CHANGELOG.md b/CHANGELOG.md index eaa2d5a..29489d1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,10 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [1.2.0] - 2025-3-25 + +- Use custom openhiit_audioplayers and openhiit_audioplayers_darwin packages to prevent other background audio from stopping on iOS due to the background process audio. + ## [1.1.0] - 2025-3-11 - Switch from soundpool to audioplayers package. diff --git a/example/ios/Podfile.lock b/example/ios/Podfile.lock index a3c8e0b..b0268bc 100644 --- a/example/ios/Podfile.lock +++ b/example/ios/Podfile.lock @@ -1,6 +1,4 @@ PODS: - - audio_session (0.0.1): - - Flutter - device_info_plus (0.0.1): - Flutter - Flutter (1.0.0) @@ -8,28 +6,29 @@ PODS: - Flutter - flutter_local_notifications (0.0.1): - Flutter - - shared_preferences_foundation (0.0.1): + - openhiit_audioplayers_darwin (0.0.1): + - Flutter + - path_provider_foundation (0.0.1): - Flutter - FlutterMacOS - - soundpool (0.0.1): + - shared_preferences_foundation (0.0.1): - Flutter + - FlutterMacOS - sqflite_darwin (0.0.4): - Flutter - FlutterMacOS DEPENDENCIES: - - audio_session (from `.symlinks/plugins/audio_session/ios`) - device_info_plus (from `.symlinks/plugins/device_info_plus/ios`) - Flutter (from `Flutter`) - flutter_background_service_ios (from `.symlinks/plugins/flutter_background_service_ios/ios`) - flutter_local_notifications (from `.symlinks/plugins/flutter_local_notifications/ios`) + - openhiit_audioplayers_darwin (from `.symlinks/plugins/openhiit_audioplayers_darwin/ios`) + - path_provider_foundation (from `.symlinks/plugins/path_provider_foundation/darwin`) - shared_preferences_foundation (from `.symlinks/plugins/shared_preferences_foundation/darwin`) - - soundpool (from `.symlinks/plugins/soundpool/ios`) - sqflite_darwin (from `.symlinks/plugins/sqflite_darwin/darwin`) EXTERNAL SOURCES: - audio_session: - :path: ".symlinks/plugins/audio_session/ios" device_info_plus: :path: ".symlinks/plugins/device_info_plus/ios" Flutter: @@ -38,23 +37,25 @@ EXTERNAL SOURCES: :path: ".symlinks/plugins/flutter_background_service_ios/ios" flutter_local_notifications: :path: ".symlinks/plugins/flutter_local_notifications/ios" + openhiit_audioplayers_darwin: + :path: ".symlinks/plugins/openhiit_audioplayers_darwin/ios" + path_provider_foundation: + :path: ".symlinks/plugins/path_provider_foundation/darwin" shared_preferences_foundation: :path: ".symlinks/plugins/shared_preferences_foundation/darwin" - soundpool: - :path: ".symlinks/plugins/soundpool/ios" sqflite_darwin: :path: ".symlinks/plugins/sqflite_darwin/darwin" SPEC CHECKSUMS: - audio_session: 088d2483ebd1dc43f51d253d4a1c517d9a2e7207 - device_info_plus: bf2e3232933866d73fe290f2942f2156cdd10342 + device_info_plus: 21fcca2080fbcd348be798aa36c3e5ed849eefbe Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7 - flutter_background_service_ios: e30e0d3ee69e4cee66272d0c78eacd48c2e94aac - flutter_local_notifications: df98d66e515e1ca797af436137b4459b160ad8c9 - shared_preferences_foundation: fcdcbc04712aee1108ac7fda236f363274528f78 - soundpool: c7f4422ca206e77f8900ed3c4ee6a6ff5a0e38a9 - sqflite_darwin: 5a7236e3b501866c1c9befc6771dfd73ffb8702d + flutter_background_service_ios: 00d31bdff7b4bfe06d32375df358abe0329cf87e + flutter_local_notifications: 395056b3175ba4f08480a7c5de30cd36d69827e4 + openhiit_audioplayers_darwin: f35507d2bc072e85ec1666b6623bc947897d07a2 + path_provider_foundation: 080d55be775b7414fd5a5ef3ac137b97b097e564 + shared_preferences_foundation: 9e1978ff2562383bd5676f64ec4e9aa8fa06a6f7 + sqflite_darwin: 20b2a3a3b70e43edae938624ce550a3cbf66a3d0 PODFILE CHECKSUM: 30f8ec3cb135c39a41dbdc3f40009442f2639040 -COCOAPODS: 1.15.2 +COCOAPODS: 1.16.2 diff --git a/example/ios/Runner.xcodeproj/project.pbxproj b/example/ios/Runner.xcodeproj/project.pbxproj index c4c129d..b71bde5 100644 --- a/example/ios/Runner.xcodeproj/project.pbxproj +++ b/example/ios/Runner.xcodeproj/project.pbxproj @@ -9,13 +9,13 @@ /* Begin PBXBuildFile section */ 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; 331C808B294A63AB00263BE5 /* RunnerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 331C807B294A618700263BE5 /* RunnerTests.swift */; }; - 3338C4180C2B7F349E240857 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 05F1A56161F5F85F6E112B0F /* Pods_Runner.framework */; }; 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; - 84111ED8F8E9EE48BFADBF46 /* Pods_RunnerTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 831F944023EA1308E52A0CB3 /* Pods_RunnerTests.framework */; }; + 7590AEEF052585539B7264DA /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8CBE0A6465D90DC6DD630D9C /* Pods_Runner.framework */; }; 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; + BC52E1C827397EBA19AA86FC /* Pods_RunnerTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 833408DBA0D232F31A5FDA5C /* Pods_RunnerTests.framework */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -42,7 +42,8 @@ /* End PBXCopyFilesBuildPhase section */ /* Begin PBXFileReference section */ - 05F1A56161F5F85F6E112B0F /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 03D5F2A6D259CE9773A6BA20 /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = ""; }; + 0C865A14C6B78B49AB0984D9 /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = ""; }; 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; 331C807B294A618700263BE5 /* RunnerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RunnerTests.swift; sourceTree = ""; }; @@ -51,8 +52,9 @@ 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; }; 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; - 831F944023EA1308E52A0CB3 /* Pods_RunnerTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_RunnerTests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 930A3F0C1D449F10AF9A250F /* Pods-RunnerTests.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.profile.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.profile.xcconfig"; sourceTree = ""; }; + 7C9DEA1D49A72631D2658489 /* Pods-RunnerTests.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.profile.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.profile.xcconfig"; sourceTree = ""; }; + 833408DBA0D232F31A5FDA5C /* Pods_RunnerTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_RunnerTests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 8CBE0A6465D90DC6DD630D9C /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; @@ -60,11 +62,9 @@ 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - A099F1374C0275E90967CE38 /* Pods-RunnerTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.debug.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.debug.xcconfig"; sourceTree = ""; }; - A3714B84805B508BAD21601E /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = ""; }; - E4E91917E029DADEEF24C90F /* Pods-RunnerTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.release.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.release.xcconfig"; sourceTree = ""; }; - EE823BA2DBCF867F3F91F8F1 /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = ""; }; - F18A6C6A70ECC5E38E436AFB /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = ""; }; + AF8934384F9D06EE4ED2CB72 /* Pods-RunnerTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.release.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.release.xcconfig"; sourceTree = ""; }; + DD3D680979A28E5C19D228FD /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = ""; }; + E0AD7E889E614C85F63AB581 /* Pods-RunnerTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.debug.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.debug.xcconfig"; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -72,7 +72,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 84111ED8F8E9EE48BFADBF46 /* Pods_RunnerTests.framework in Frameworks */, + BC52E1C827397EBA19AA86FC /* Pods_RunnerTests.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -80,7 +80,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 3338C4180C2B7F349E240857 /* Pods_Runner.framework in Frameworks */, + 7590AEEF052585539B7264DA /* Pods_Runner.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -90,12 +90,12 @@ 090AF66368B97FD280F22516 /* Pods */ = { isa = PBXGroup; children = ( - EE823BA2DBCF867F3F91F8F1 /* Pods-Runner.debug.xcconfig */, - A3714B84805B508BAD21601E /* Pods-Runner.release.xcconfig */, - F18A6C6A70ECC5E38E436AFB /* Pods-Runner.profile.xcconfig */, - A099F1374C0275E90967CE38 /* Pods-RunnerTests.debug.xcconfig */, - E4E91917E029DADEEF24C90F /* Pods-RunnerTests.release.xcconfig */, - 930A3F0C1D449F10AF9A250F /* Pods-RunnerTests.profile.xcconfig */, + 03D5F2A6D259CE9773A6BA20 /* Pods-Runner.debug.xcconfig */, + 0C865A14C6B78B49AB0984D9 /* Pods-Runner.release.xcconfig */, + DD3D680979A28E5C19D228FD /* Pods-Runner.profile.xcconfig */, + E0AD7E889E614C85F63AB581 /* Pods-RunnerTests.debug.xcconfig */, + AF8934384F9D06EE4ED2CB72 /* Pods-RunnerTests.release.xcconfig */, + 7C9DEA1D49A72631D2658489 /* Pods-RunnerTests.profile.xcconfig */, ); path = Pods; sourceTree = ""; @@ -108,6 +108,15 @@ path = RunnerTests; sourceTree = ""; }; + 8A200012085EEADC69E9E3BB /* Frameworks */ = { + isa = PBXGroup; + children = ( + 8CBE0A6465D90DC6DD630D9C /* Pods_Runner.framework */, + 833408DBA0D232F31A5FDA5C /* Pods_RunnerTests.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; 9740EEB11CF90186004384FC /* Flutter */ = { isa = PBXGroup; children = ( @@ -127,7 +136,7 @@ 97C146EF1CF9000F007C117D /* Products */, 331C8082294A63A400263BE5 /* RunnerTests */, 090AF66368B97FD280F22516 /* Pods */, - 9B5905129DD96CAC43BF480C /* Frameworks */, + 8A200012085EEADC69E9E3BB /* Frameworks */, ); sourceTree = ""; }; @@ -155,15 +164,6 @@ path = Runner; sourceTree = ""; }; - 9B5905129DD96CAC43BF480C /* Frameworks */ = { - isa = PBXGroup; - children = ( - 05F1A56161F5F85F6E112B0F /* Pods_Runner.framework */, - 831F944023EA1308E52A0CB3 /* Pods_RunnerTests.framework */, - ); - name = Frameworks; - sourceTree = ""; - }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */ @@ -171,7 +171,7 @@ isa = PBXNativeTarget; buildConfigurationList = 331C8087294A63A400263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */; buildPhases = ( - 6BE7E02E49E18F9C049F72EF /* [CP] Check Pods Manifest.lock */, + E5E51014BD5E5B6FBAF872D6 /* [CP] Check Pods Manifest.lock */, 331C807D294A63A400263BE5 /* Sources */, 331C807F294A63A400263BE5 /* Resources */, 92AE367D6CD52DE847C82BC9 /* Frameworks */, @@ -190,14 +190,14 @@ isa = PBXNativeTarget; buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; buildPhases = ( - 11887E3D8033FC3009916612 /* [CP] Check Pods Manifest.lock */, + 9266C742B487792BB567035B /* [CP] Check Pods Manifest.lock */, 9740EEB61CF901F6004384FC /* Run Script */, 97C146EA1CF9000F007C117D /* Sources */, 97C146EB1CF9000F007C117D /* Frameworks */, 97C146EC1CF9000F007C117D /* Resources */, 9705A1C41CF9048500538489 /* Embed Frameworks */, 3B06AD1E1E4923F5004D2608 /* Thin Binary */, - 94A268F485E47DCBEB0BCE3B /* [CP] Embed Pods Frameworks */, + 9BBCA50399F9E9ED03402FB5 /* [CP] Embed Pods Frameworks */, ); buildRules = ( ); @@ -269,28 +269,6 @@ /* End PBXResourcesBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */ - 11887E3D8033FC3009916612 /* [CP] Check Pods Manifest.lock */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - ); - inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", - ); - name = "[CP] Check Pods Manifest.lock"; - outputFileListPaths = ( - ); - outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; - showEnvVarsInLog = 0; - }; 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { isa = PBXShellScriptBuildPhase; alwaysOutOfDate = 1; @@ -307,7 +285,7 @@ shellPath = /bin/sh; shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin"; }; - 6BE7E02E49E18F9C049F72EF /* [CP] Check Pods Manifest.lock */ = { + 9266C742B487792BB567035B /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -322,14 +300,29 @@ outputFileListPaths = ( ); outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-RunnerTests-checkManifestLockResult.txt", + "$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; showEnvVarsInLog = 0; }; - 94A268F485E47DCBEB0BCE3B /* [CP] Embed Pods Frameworks */ = { + 9740EEB61CF901F6004384FC /* Run Script */ = { + isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Run Script"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; + }; + 9BBCA50399F9E9ED03402FB5 /* [CP] Embed Pods Frameworks */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -346,20 +339,27 @@ shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n"; showEnvVarsInLog = 0; }; - 9740EEB61CF901F6004384FC /* Run Script */ = { + E5E51014BD5E5B6FBAF872D6 /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; - alwaysOutOfDate = 1; buildActionMask = 2147483647; files = ( ); + inputFileListPaths = ( + ); inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; + outputFileListPaths = ( ); - name = "Run Script"; outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-RunnerTests-checkManifestLockResult.txt", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + showEnvVarsInLog = 0; }; /* End PBXShellScriptBuildPhase section */ @@ -485,7 +485,7 @@ }; 331C8088294A63A400263BE5 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = A099F1374C0275E90967CE38 /* Pods-RunnerTests.debug.xcconfig */; + baseConfigurationReference = E0AD7E889E614C85F63AB581 /* Pods-RunnerTests.debug.xcconfig */; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; CODE_SIGN_STYLE = Automatic; @@ -503,7 +503,7 @@ }; 331C8089294A63A400263BE5 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = E4E91917E029DADEEF24C90F /* Pods-RunnerTests.release.xcconfig */; + baseConfigurationReference = AF8934384F9D06EE4ED2CB72 /* Pods-RunnerTests.release.xcconfig */; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; CODE_SIGN_STYLE = Automatic; @@ -519,7 +519,7 @@ }; 331C808A294A63A400263BE5 /* Profile */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 930A3F0C1D449F10AF9A250F /* Pods-RunnerTests.profile.xcconfig */; + baseConfigurationReference = 7C9DEA1D49A72631D2658489 /* Pods-RunnerTests.profile.xcconfig */; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; CODE_SIGN_STYLE = Automatic; diff --git a/example/pubspec.lock b/example/pubspec.lock index 4f34335..a675999 100644 --- a/example/pubspec.lock +++ b/example/pubspec.lock @@ -26,10 +26,10 @@ packages: dependency: transitive description: name: args - sha256: bf9f5caeea8d8fe6721a9c358dd8a5c1947b27f1cfaa18b39c301273594919e6 + sha256: d0481093c50b1da8910eb0bb301626d4d8eb7284aa739614d2b394ee09e3ea04 url: "https://pub.dev" source: hosted - version: "2.6.0" + version: "2.7.0" async: dependency: transitive description: @@ -41,66 +41,68 @@ packages: audioplayers: dependency: transitive description: - name: audioplayers - sha256: "76a65e82c29df1be72bf1b1dbe9600c181dda10b5e00ef2a5b7fb91c37a773e2" - url: "https://pub.dev" - source: hosted - version: "6.3.0" + path: "packages/audioplayers" + ref: test3 + resolved-ref: c87f19822e07d5c98ed094088e15b499e6b5d2b3 + url: "https://github.com/a-mabe/audioplayers.git" + source: git + version: "6.4.0" audioplayers_android: dependency: transitive description: name: audioplayers_android - sha256: "5e8444166ad34820c214f822b6327b434347ede76458e24a08db5492ad97fc76" + sha256: f8c90823a45b475d2c129f85bbda9c029c8d4450b172f62e066564c6e170f69a url: "https://pub.dev" source: hosted - version: "5.1.0" + version: "5.2.0" audioplayers_darwin: dependency: transitive description: - name: audioplayers_darwin - sha256: "064bc321f7460c46945d3363a99f9e33bd8d64eb494db412a2e616fdb3d746a1" - url: "https://pub.dev" - source: hosted - version: "6.1.1" + path: "packages/audioplayers_darwin" + ref: test3 + resolved-ref: c87f19822e07d5c98ed094088e15b499e6b5d2b3 + url: "https://github.com/a-mabe/audioplayers.git" + source: git + version: "6.2.0" audioplayers_linux: dependency: transitive description: name: audioplayers_linux - sha256: "7f9b41c8b60b320041248617fca8f6f93da53899bd100c6d16fb225b5a91c138" + sha256: "7e0d081a6a527c53aef9539691258a08ff69a7dc15ef6335fbea1b4b03ebbef0" url: "https://pub.dev" source: hosted - version: "4.1.1" + version: "4.2.0" audioplayers_platform_interface: dependency: transitive description: name: audioplayers_platform_interface - sha256: c0683ae22a53c4680862fc55c672d4b6046e9f7c156075c9eb6b182644bf200c + sha256: "77e5fa20fb4a64709158391c75c1cca69a481d35dc879b519e350a05ff520373" url: "https://pub.dev" source: hosted - version: "7.0.1" + version: "7.1.0" audioplayers_web: dependency: transitive description: name: audioplayers_web - sha256: "1a02a0d9aa84c0786cd7977edb224f0c9dc49181259a45ff6b0fa41b3d3c0c4c" + sha256: bd99d8821114747682a2be0adcdb70233d4697af989b549d3a20a0f49f6c9b13 url: "https://pub.dev" source: hosted - version: "5.0.2" + version: "5.1.0" audioplayers_windows: dependency: transitive description: name: audioplayers_windows - sha256: "733bf3cb6169f17ef4c79cc645be73e6b21753bb2c8822e48191d34afbd48b47" + sha256: "871d3831c25cd2408ddc552600fd4b32fba675943e319a41284704ee038ad563" url: "https://pub.dev" source: hosted - version: "4.1.1" + version: "4.2.0" background_hiit_timer: dependency: "direct main" description: path: ".." relative: true source: path - version: "1.0.5" + version: "1.1.0" boolean_selector: dependency: transitive description: @@ -458,10 +460,10 @@ packages: dependency: transitive description: name: package_config - sha256: "92d4488434b520a62570293fbd33bb556c7d49230791c1b4bbd973baf6d2dc67" + sha256: f096c55ebb7deb7e384101542bfba8c52696c1b56fca2eb62827989ef2353bbc url: "https://pub.dev" source: hosted - version: "2.1.1" + version: "2.2.0" path: dependency: transitive description: diff --git a/lib/background_timer.dart b/lib/background_timer.dart index 101d01f..28df2ce 100644 --- a/lib/background_timer.dart +++ b/lib/background_timer.dart @@ -1,7 +1,7 @@ import 'dart:async'; import 'dart:io'; import 'dart:ui'; -import 'package:audioplayers/audioplayers.dart'; +import 'package:openhiit_audioplayers/openhiit_audioplayers.dart'; import 'package:background_hiit_timer/background_timer_controller.dart'; import 'package:background_hiit_timer/models/interval_type.dart'; import 'package:background_hiit_timer/utils/database.dart'; @@ -226,6 +226,10 @@ class CountdownState extends State with WidgetsBindingObserver { SharedPreferences preferences, TimerState timerState, ) async { + await AudioPlayer.global.setAudioContext( + AudioContextConfig(focus: AudioContextConfigFocus.mixWithOthers) + .build()); + if (service is AndroidServiceInstance) { service.on('setAsForeground').listen((event) { service.setAsForegroundService(); @@ -260,19 +264,6 @@ class CountdownState extends State with WidgetsBindingObserver { }); final player = AudioPlayer(); - player.setAudioContext(AudioContext( - android: AudioContextAndroid( - contentType: AndroidContentType.sonification, - audioFocus: AndroidAudioFocus.none, - usageType: AndroidUsageType.media, - ), - iOS: AudioContextIOS( - category: AVAudioSessionCategory.playback, - options: { - AVAudioSessionOptions.mixWithOthers, - }, - ), - )); player.audioCache = AudioCache(prefix: 'packages/background_hiit_timer/assets/'); diff --git a/lib/utils/utils.dart b/lib/utils/utils.dart index ad5cf70..996417e 100644 --- a/lib/utils/utils.dart +++ b/lib/utils/utils.dart @@ -1,4 +1,4 @@ -import 'package:audioplayers/audioplayers.dart'; +import 'package:openhiit_audioplayers/openhiit_audioplayers.dart'; import 'package:background_hiit_timer/utils/log.dart'; import 'package:shared_preferences/shared_preferences.dart'; diff --git a/pubspec.yaml b/pubspec.yaml index 3b7a506..1d1c858 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: background_hiit_timer description: Flutter background timer package developed for HIIT timers. Designed to run in the background and play audio cues on Android and iOS. -version: 1.1.0 +version: 1.2.0 repository: https://github.com/a-mabe/background_hiit_timer funding: @@ -22,7 +22,7 @@ dependencies: sqflite: ^2.4.0 path: ^1.9.0 flutter_local_notifications: ^18.0.0 - audioplayers: ^6.1.2 + openhiit_audioplayers: ^1.0.0 # For information on the generic Dart part of this file, see the # following page: https://dart.dev/tools/pub/pubspec