An ATproto social media client -- with an independent Appview.
1const {withXcodeProject} = require('@expo/config-plugins')
2const path = require('path')
3const fs = require('fs')
4
5const withSounds = (config, {extensionName, soundFiles}) => {
6 // eslint-disable-next-line no-shadow
7 return withXcodeProject(config, config => {
8 for (const file of soundFiles) {
9 const soundPath = path.join(config.modRequest.projectRoot, 'assets', file)
10
11 const targetPath = path.join(
12 config.modRequest.platformProjectRoot,
13 extensionName,
14 file,
15 )
16
17 if (!fs.existsSync(path.dirname(targetPath))) {
18 fs.mkdirSync(path.dirname(targetPath), {recursive: true})
19 }
20 fs.copyFileSync(soundPath, targetPath)
21 }
22
23 return config
24 })
25}
26
27module.exports = {withSounds}