diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index fc04329..5472009 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -40,6 +40,21 @@ jobs: } EOF + - name: Patch Track Player Plugin (Safe) + run: | + # Чиним только app.plugin.js, без вмешательства в исходники либы + PLUGIN_PATH="node_modules/react-native-track-player/app.plugin.js" + cat << 'EOF' > "$PLUGIN_PATH" + const { withInfoPlist } = require('@expo/config-plugins'); + module.exports = function(config) { + return withInfoPlist(config, (config) => { + if (!config.modResults.UIBackgroundModes) config.modResults.UIBackgroundModes = []; + if (!config.modResults.UIBackgroundModes.includes('audio')) config.modResults.UIBackgroundModes.push('audio'); + return config; + }); + }; + EOF + - name: Expo prebuild run: npx expo prebuild --platform ios --clean --no-install @@ -52,7 +67,6 @@ jobs: --dev false \ --bundle-output ios/BurmaldaMusic/main.jsbundle \ --assets-dest ios/BurmaldaMusic - # Это создаст бандл заранее, чтобы Xcode не упал на его генерации - name: Install CocoaPods run: cd ios && pod install --repo-update && cd .. @@ -62,7 +76,6 @@ jobs: WORKSPACE_PATH=$(find ios -maxdepth 1 -name "*.xcworkspace" | head -1) SCHEME_NAME=$(basename "$WORKSPACE_PATH" .xcworkspace) - # Прописываем пути к ноде для Xcode export NODE_BINARY=$(which node) xcodebuild build \ @@ -77,7 +90,6 @@ jobs: ENABLE_BITCODE=NO \ SKIP_BUNDLING=YES \ | xcpretty - # SKIP_BUNDLING=YES говорит Xcode использовать наш готовый бандл - name: Package IPA run: |