mirror of
https://github.com/streamyfin/streamyfin.git
synced 2026-03-21 00:36:24 +00:00
refactor(tv): simplify user profile management with automatic sandboxing
This commit is contained in:
21
plugins/withTVUserManagement.js
Normal file
21
plugins/withTVUserManagement.js
Normal file
@@ -0,0 +1,21 @@
|
||||
const { withEntitlementsPlist } = require("expo/config-plugins");
|
||||
|
||||
/**
|
||||
* Expo config plugin to add User Management entitlement for tvOS profile linking
|
||||
*/
|
||||
const withTVUserManagement = (config) => {
|
||||
return withEntitlementsPlist(config, (config) => {
|
||||
// Only add for tvOS builds (check if building for TV)
|
||||
// The entitlement is needed for TVUserManager.currentUserIdentifier to work
|
||||
config.modResults["com.apple.developer.user-management"] = [
|
||||
"runs-as-current-user",
|
||||
"get-current-user",
|
||||
];
|
||||
|
||||
console.log("[withTVUserManagement] Added user-management entitlement");
|
||||
|
||||
return config;
|
||||
});
|
||||
};
|
||||
|
||||
module.exports = withTVUserManagement;
|
||||
Reference in New Issue
Block a user