in appcenter-link-scripts/src/ios/AppDelegate.js [17:34]
throw Error(`
Could not find line '#import "AppDelegate.h"' in file AppDelegate.m.
Update AppDelegate.m so that text is present, as we match on it and insert '${header}' after for AppCenter SDK integration.
`);
}
const existingLine = match[0];
this.appDelegateContents = this.appDelegateContents.replace(existingLine, `${existingLine}${header}\n`);
debug('Added header', header, 'to file', this.appDelegatePath);
} else {
debug(`"${header}"" header already added to AppDelegate.m`);
}
};
AppDelegate.prototype.addInitCode = function (code, oldCodeRegExp) {
const oldCodeMatches = oldCodeRegExp ? this.appDelegateContents.match(oldCodeRegExp) : null;
if (oldCodeMatches && oldCodeMatches.length > 1) {
for (let i = 1; i < oldCodeMatches.length; i++) {