import { ExpoConfig } from '@expo/config-types' ; import { createInfoPlistPlugin } from '../plugins/ios-plugins' ; import { InfoPlist } from './IosConfig.types' ; export const withUsesNonExemptEncryption = createInfoPlistPlugin ( setUsesNonExemptEncryption , 'withUsesNonExemptEncryption' ) ; export function getUsesNonExemptEncryption ( config ) { return config ?. ios ?. config ?. usesNonExemptEncryption ?? null ; } export function setUsesNonExemptEncryption ( config , { ITSAppUsesNonExemptEncryption , ... infoPlist } ) { const usesNonExemptEncryption = getUsesNonExemptEncryption ( config ) ; if ( usesNonExemptEncryption === null ) { return infoPlist ; } return { ... infoPlist , ITSAppUsesNonExemptEncryption : usesNonExemptEncryption } ; }