UNPKG

@wwdrew/expo-spotify-sdk

Version:

Expo module wrapping the native Spotify iOS (v5) and Android (v4) SDKs for OAuth authentication and App Remote playback control

21 lines (20 loc) 849 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.withSpotifyURLScheme = void 0; const config_plugins_1 = require("@expo/config-plugins"); const withSpotifyURLScheme = (config, { scheme }) => { return (0, config_plugins_1.withInfoPlist)(config, (config) => { const bundleId = config.ios?.bundleIdentifier; const urlTypes = config.modResults.CFBundleURLTypes ?? []; const alreadyDeclared = urlTypes.some((entry) => entry.CFBundleURLSchemes?.includes(scheme)); if (!alreadyDeclared) { urlTypes.push({ CFBundleURLName: bundleId ?? "", CFBundleURLSchemes: [scheme], }); config.modResults.CFBundleURLTypes = urlTypes; } return config; }); }; exports.withSpotifyURLScheme = withSpotifyURLScheme;