Something went wrong. Try again.
Bluesky app fork with some witchin' additions 💫 forked from jollywhoppers.com/witchsky.app
Something went wrong. Try again.
767 B · 31 lines
JavaScript
1234567891011121314151617181920212223242526272829303132const {withXcodeProject} = require('@expo/config-plugins')const path = require('path')const fs = require('fs')
const withExtensionViewController = ( config, {controllerName, extensionName},) => { // eslint-disable-next-line no-shadow return withXcodeProject(config, config => { const controllerPath = path.join( config.modRequest.projectRoot, 'modules', extensionName, `${controllerName}.swift`, )
const targetPath = path.join( config.modRequest.platformProjectRoot, extensionName, `${controllerName}.swift`, )
fs.mkdirSync(path.dirname(targetPath), {recursive: true}) fs.copyFileSync(controllerPath, targetPath)
return config })}
module.exports = {withExtensionViewController}