expo-wakeword
Version:
Voice/Wake-word detection library for Expo (React Native)
21 lines • 732 B
JavaScript
;
const { withAppDelegate } = require('@expo/config-plugins');
const { mergeContents } = require('@expo/config-plugins/build/utils/generateCode');
const withWakewordDetectionIOS = config => {
return withAppDelegate(config, config => {
config.modResults.contents = applyImport(config.modResults.contents);
return config;
});
};
function applyImport(src) {
return mergeContents({
tag: 'react-native-wakeword-import',
src,
newSrc: `#import <KeyWordDetection/KeyWordDetection-Swift.h>`,
anchor: /#import "AppDelegate\.h"/,
offset: 1,
comment: '//',
}).contents;
}
module.exports = withWakewordDetectionIOS;
//# sourceMappingURL=iOSPlugin.js.map