@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
22 lines (21 loc) • 740 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.withSpotifyConfigValues = void 0;
const config_plugins_1 = require("@expo/config-plugins");
const IOS_KEYS = [
"clientID",
"host",
"scheme",
];
const withSpotifyConfigValues = (config, spotifyConfig) => (0, config_plugins_1.withInfoPlist)(config, (config) => {
const existing = (config.modResults.ExpoSpotifySDK ?? {});
for (const key of IOS_KEYS) {
const value = spotifyConfig[key];
if (typeof value === "string" && value.length > 0) {
existing[key] = value;
}
}
config.modResults.ExpoSpotifySDK = existing;
return config;
});
exports.withSpotifyConfigValues = withSpotifyConfigValues;