@wwdrew/expo-apple-music 1.1.2 → 1.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wwdrew/expo-apple-music",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.3",
|
|
4
4
|
"description": "Apple MusicKit wrapper for Expo",
|
|
5
5
|
"main": "build/index.js",
|
|
6
6
|
"types": "build/index.d.ts",
|
|
@@ -81,9 +81,7 @@
|
|
|
81
81
|
"./package.json": "./package.json"
|
|
82
82
|
},
|
|
83
83
|
"peerDependencies": {
|
|
84
|
-
"
|
|
85
|
-
"expo": "^56.0.0",
|
|
86
|
-
"expo-modules-core": "*",
|
|
84
|
+
"expo": "*",
|
|
87
85
|
"react": "*",
|
|
88
86
|
"react-native": "*"
|
|
89
87
|
}
|
|
@@ -38,6 +38,32 @@ const withIosDeploymentTargetXcodeProject = (config) => {
|
|
|
38
38
|
});
|
|
39
39
|
};
|
|
40
40
|
exports.DEFAULT_MUSIC_USAGE = "Allow $(PRODUCT_NAME) to access Apple Music.";
|
|
41
|
+
const ALLOW_BACKUP_REPLACE_KEY = "android:allowBackup";
|
|
42
|
+
/** musickitauth AAR sets allowBackup=true; host apps may differ — merge via tools:replace. */
|
|
43
|
+
const withAndroidAllowBackupToolsReplace = (config) => {
|
|
44
|
+
return (0, config_plugins_1.withAndroidManifest)(config, (c) => {
|
|
45
|
+
const mainApplication = c.modResults?.manifest?.application?.[0];
|
|
46
|
+
if (!mainApplication?.$) {
|
|
47
|
+
return c;
|
|
48
|
+
}
|
|
49
|
+
const existing = mainApplication.$["tools:replace"];
|
|
50
|
+
if (!existing) {
|
|
51
|
+
mainApplication.$["tools:replace"] = ALLOW_BACKUP_REPLACE_KEY;
|
|
52
|
+
return c;
|
|
53
|
+
}
|
|
54
|
+
const keys = [
|
|
55
|
+
...new Set(existing
|
|
56
|
+
.split(",")
|
|
57
|
+
.map((key) => key.trim())
|
|
58
|
+
.filter(Boolean)),
|
|
59
|
+
];
|
|
60
|
+
if (!keys.includes(ALLOW_BACKUP_REPLACE_KEY)) {
|
|
61
|
+
keys.push(ALLOW_BACKUP_REPLACE_KEY);
|
|
62
|
+
}
|
|
63
|
+
mainApplication.$["tools:replace"] = keys.join(",");
|
|
64
|
+
return c;
|
|
65
|
+
});
|
|
66
|
+
};
|
|
41
67
|
const withAndroidMusicKitAars = (config, { androidMusicKitAarDir } = {}) => {
|
|
42
68
|
return (0, config_plugins_1.withDangerousMod)(config, [
|
|
43
69
|
"android",
|
|
@@ -62,6 +88,7 @@ const withExpoAppleMusic = (config, props) => {
|
|
|
62
88
|
config = withIosDeploymentTargetPodfile(config);
|
|
63
89
|
config = withIosDeploymentTargetXcodeProject(config);
|
|
64
90
|
config = withAndroidMusicKitAars(config, { androidMusicKitAarDir });
|
|
91
|
+
config = withAndroidAllowBackupToolsReplace(config);
|
|
65
92
|
return (0, config_plugins_1.withInfoPlist)(config, (c) => {
|
|
66
93
|
const current = c.modResults.NSAppleMusicUsageDescription;
|
|
67
94
|
const hasCurrent = typeof current === "string" && current.trim().length > 0;
|