wip: build for tv
20
app.json
@@ -36,10 +36,6 @@
|
||||
"icon": "./assets/images/icon-ios-liquid-glass.icon",
|
||||
"appleTeamId": "MWD5K362T8"
|
||||
},
|
||||
"tvos": {
|
||||
"icon": "./assets/images/icon.png",
|
||||
"bundleIdentifier": "com.fredrikburmester.streamyfin"
|
||||
},
|
||||
"android": {
|
||||
"jsEngine": "hermes",
|
||||
"versionCode": 92,
|
||||
@@ -59,7 +55,20 @@
|
||||
"googleServicesFile": "./google-services.json"
|
||||
},
|
||||
"plugins": [
|
||||
"@react-native-tvos/config-tv",
|
||||
[
|
||||
"@react-native-tvos/config-tv",
|
||||
{
|
||||
"appleTVImages": {
|
||||
"icon": "./assets/images/icon-tvos.png",
|
||||
"iconSmall": "./assets/images/icon-tvos-small.png",
|
||||
"iconSmall2x": "./assets/images/icon-tvos-small-2x.png",
|
||||
"topShelf": "./assets/images/icon-tvos-topshelf.png",
|
||||
"topShelf2x": "./assets/images/icon-tvos-topshelf-2x.png",
|
||||
"topShelfWide": "./assets/images/icon-tvos-topshelf-wide.png",
|
||||
"topShelfWide2x": "./assets/images/icon-tvos-topshelf-wide-2x.png"
|
||||
}
|
||||
}
|
||||
],
|
||||
"expo-router",
|
||||
"expo-font",
|
||||
"./plugins/withExcludeMedia3Dash.js",
|
||||
@@ -125,6 +134,7 @@
|
||||
["./plugins/withAndroidManifest.js"],
|
||||
["./plugins/withTrustLocalCerts.js"],
|
||||
["./plugins/withGradleProperties.js"],
|
||||
["./plugins/withTVOSAppIcon.js"],
|
||||
[
|
||||
"./plugins/withGitPod.js",
|
||||
{
|
||||
|
||||
BIN
assets/images/icon-tvos-small-2x.png
Normal file
|
After Width: | Height: | Size: 36 KiB |
BIN
assets/images/icon-tvos-small.png
Normal file
|
After Width: | Height: | Size: 15 KiB |
BIN
assets/images/icon-tvos-topshelf-2x.png
Normal file
|
After Width: | Height: | Size: 193 KiB |
BIN
assets/images/icon-tvos-topshelf-wide-2x.png
Normal file
|
After Width: | Height: | Size: 222 KiB |
BIN
assets/images/icon-tvos-topshelf-wide.png
Normal file
|
After Width: | Height: | Size: 92 KiB |
BIN
assets/images/icon-tvos-topshelf.png
Normal file
|
After Width: | Height: | Size: 81 KiB |
BIN
assets/images/icon-tvos.png
Normal file
|
After Width: | Height: | Size: 70 KiB |
@@ -133,6 +133,7 @@ const _InfoRow: React.FC<{ label: string; value: string }> = ({
|
||||
</View>
|
||||
);
|
||||
|
||||
// Export as both ItemContentTV (for direct requires) and ItemContent (for platform-resolved imports)
|
||||
export const ItemContentTV: React.FC<ItemContentTVProps> = React.memo(
|
||||
({ item, itemWithSources }) => {
|
||||
const [api] = useAtom(apiAtom);
|
||||
@@ -608,3 +609,6 @@ export const ItemContentTV: React.FC<ItemContentTVProps> = React.memo(
|
||||
);
|
||||
},
|
||||
);
|
||||
|
||||
// Alias for platform-resolved imports (tvOS auto-resolves .tv.tsx files)
|
||||
export const ItemContent = ItemContentTV;
|
||||
|
||||
31
plugins/withTVOSAppIcon.js
Normal file
@@ -0,0 +1,31 @@
|
||||
const { withXcodeProject } = require("@expo/config-plugins");
|
||||
|
||||
const withTVOSAppIcon = (config) => {
|
||||
// Only apply for TV builds
|
||||
if (process.env.EXPO_TV !== "1") {
|
||||
return config;
|
||||
}
|
||||
|
||||
return withXcodeProject(config, async (config) => {
|
||||
const xcodeProject = config.modResults;
|
||||
|
||||
const buildConfigurations = xcodeProject.pbxXCBuildConfigurationSection();
|
||||
|
||||
for (const key in buildConfigurations) {
|
||||
const buildConfig = buildConfigurations[key];
|
||||
if (
|
||||
typeof buildConfig === "object" &&
|
||||
buildConfig.buildSettings &&
|
||||
buildConfig.buildSettings.PRODUCT_NAME
|
||||
) {
|
||||
// Set the tvOS app icon
|
||||
buildConfig.buildSettings.ASSETCATALOG_COMPILER_APPICON_NAME =
|
||||
"TVAppIcon";
|
||||
}
|
||||
}
|
||||
|
||||
return config;
|
||||
});
|
||||
};
|
||||
|
||||
module.exports = withTVOSAppIcon;
|
||||