Starter Packs (#4332)
Co-authored-by: Dan Abramov <dan.abramov@gmail.com> Co-authored-by: Paul Frazee <pfrazee@gmail.com> Co-authored-by: Eric Bailey <git@esb.lol> Co-authored-by: Samuel Newman <mozzius@protonmail.com>
This commit is contained in:
parent
35f64535cb
commit
f089f45781
115 changed files with 6336 additions and 237 deletions
38
plugins/starterPackAppClipExtension/withClipInfoPlist.js
Normal file
38
plugins/starterPackAppClipExtension/withClipInfoPlist.js
Normal file
|
@ -0,0 +1,38 @@
|
|||
const {withInfoPlist} = require('@expo/config-plugins')
|
||||
const plist = require('@expo/plist')
|
||||
const path = require('path')
|
||||
const fs = require('fs')
|
||||
|
||||
const withClipInfoPlist = (config, {targetName}) => {
|
||||
// eslint-disable-next-line no-shadow
|
||||
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',
|
||||
})
|
||||
|
||||
fs.mkdirSync(path.dirname(targetPath), {recursive: true})
|
||||
fs.writeFileSync(targetPath, newPlist)
|
||||
|
||||
return config
|
||||
})
|
||||
}
|
||||
|
||||
module.exports = {withClipInfoPlist}
|
Loading…
Add table
Add a link
Reference in a new issue