Something went wrong. Try again.
Mirror — see github.com/blacksky-algorithms/blacksky.community
Something went wrong. Try again.
12345678910111213141516171819202122232425262728293031323334353637383940414243444546const {withInfoPlist} = require('expo/config-plugins')const plist = require('@expo/plist')const path = require('path')const fs = require('fs')
const withClipInfoPlist = (config, {targetName}) => { return withInfoPlist(config, config => { const targetPath = path.join( config.modRequest.platformProjectRoot, targetName, 'Info.plist', )
const newPlist = plist.default.build({ NSAppClip: { NSAppClipRequestEphemeralUserNotification: false, NSAppClipRequestLocationConfirmation: false, }, UILaunchScreen: {}, CFBundleName: '$(PRODUCT_NAME)', CFBundleIdentifier: '$(PRODUCT_BUNDLE_IDENTIFIER)', CFBundleVersion: '$(CURRENT_PROJECT_VERSION)', CFBundleExecutable: '$(EXECUTABLE_NAME)', CFBundlePackageType: '$(PRODUCT_BUNDLE_PACKAGE_TYPE)', CFBundleShortVersionString: config.version, CFBundleIconName: 'AppIcon', UIViewControllerBasedStatusBarAppearance: 'NO', UISupportedInterfaceOrientations: [ 'UIInterfaceOrientationPortrait', 'UIInterfaceOrientationPortraitUpsideDown', ], 'UISupportedInterfaceOrientations~ipad': [ 'UIInterfaceOrientationPortrait', 'UIInterfaceOrientationPortraitUpsideDown', ], })
fs.mkdirSync(path.dirname(targetPath), {recursive: true}) fs.writeFileSync(targetPath, newPlist)
return config })}
module.exports = {withClipInfoPlist}