mirror of
https://github.com/movie-web/native-app.git
synced 2025-09-13 14:23:28 +00:00
fix: add config plugin to remove notification entitlement during prebuild
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
import type { ExpoConfig } from "expo/config";
|
import type { ExpoConfig } from "expo/config";
|
||||||
|
|
||||||
|
import withRemoveiOSNotificationEntitlement from "./config-plugins/withRemoveiOSNotificationEntitlement";
|
||||||
import { version } from "./package.json";
|
import { version } from "./package.json";
|
||||||
|
|
||||||
const defineConfig = (): ExpoConfig => ({
|
const defineConfig = (): ExpoConfig => ({
|
||||||
@@ -37,6 +38,7 @@ const defineConfig = (): ExpoConfig => ({
|
|||||||
},
|
},
|
||||||
plugins: [
|
plugins: [
|
||||||
"expo-router",
|
"expo-router",
|
||||||
|
[withRemoveiOSNotificationEntitlement as unknown as string],
|
||||||
[
|
[
|
||||||
"expo-screen-orientation",
|
"expo-screen-orientation",
|
||||||
{
|
{
|
||||||
|
@@ -0,0 +1,15 @@
|
|||||||
|
/* eslint-disable @typescript-eslint/no-unsafe-call */
|
||||||
|
/* eslint-disable @typescript-eslint/no-unsafe-return */
|
||||||
|
/* eslint-disable @typescript-eslint/no-unsafe-member-access */
|
||||||
|
/* eslint-disable @typescript-eslint/no-var-requires */
|
||||||
|
/* eslint-disable @typescript-eslint/no-unsafe-assignment */
|
||||||
|
const withEntitlementsPlist = require("@expo/config-plugins").withEntitlementsPlist;
|
||||||
|
|
||||||
|
const withRemoveiOSNotificationEntitlement = (config) => {
|
||||||
|
return withEntitlementsPlist(config, mod => {
|
||||||
|
delete mod.modResults['aps-environment'];
|
||||||
|
return mod;
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
module.exports = withRemoveiOSNotificationEntitlement;
|
Reference in New Issue
Block a user