import { ExpoConfig } from '@expo/config-types' ; import { createInfoPlistPlugin } from '../plugins/ios-plugins' ; import { InfoPlist } from './IosConfig.types' ; export const withVersion = createInfoPlistPlugin ( setVersion , 'withVersion' ) ; export const withBuildNumber = createInfoPlistPlugin ( setBuildNumber , 'withBuildNumber' ) ; export function getVersion ( config ) { return config . version || '1.0.0' ; } export function setVersion ( config , infoPlist ) { return { ... infoPlist , CFBundleShortVersionString : getVersion ( config ) } ; } export function getBuildNumber ( config ) { return config . ios ?. buildNumber ? config . ios . buildNumber : '1' ; } export function setBuildNumber ( config , infoPlist ) { return { ... infoPlist , CFBundleVersion : getBuildNumber ( config ) } ; }