-
Notifications
You must be signed in to change notification settings - Fork 198
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[question]: Automated OneSignalServiceExtension needs adaption for version 3.3.2 or 5.0.x, help possible? #990
Comments
I got it working, finally. I opened the .xcworkspace manually in Xcode and added the missing framework dependency. Then I did a file comparison on the .pbxproj File inside .xcproject with an older one. A lot of fiddling around, because at first the local build was successful, but delivering the .ipa failed with I tried back and forth... |
Final script version `#!/usr/bin/env node var fs = require('fs'); var parser = new xml2js.Parser(); module.exports = function (context) { const log = '\t'; try { } catch (e) { let config_xml = path.join(rootdir, 'config.xml'); let bundleId; var info = fs.readFileSync(path.join(project, appName, appName + '-Info.plist'), 'utf8'); var config = []; var appVersion = config['CFBundleShortVersionString']; var cnt = fs.readFileSync(path.join(project, appName + '.xcodeproj/project.pbxproj'), 'utf8'); if (cnt.indexOf('NotificationService.m') > -1) {
} // Entitlements
}); // Dir // Files fs.writeFileSync(path.join(onesignalDir, 'NotificationService.h'), @interface NotificationService : UNNotificationServiceExtension @end`); fs.writeFileSync(path.join(onesignalDir, 'NotificationService.m'), #import "NotificationService.h" @interface NotificationService () @Property (nonatomic, strong) void (^contentHandler)(UNNotificationContent *contentToDeliver); @implementation NotificationService
@end`); console.log('[OneSignal - Notification Service Extension] - Installation finished\n'); |
Sorry for markdown not showing code correctly. |
How to use it? I'm facing the same errors "CFBundleIdentifier Collision"... How and when should I run this script? |
I've found a "partial" solution. If do not use rich notifications, you should not use OneSignalServiceExtension. As I only use text in the notifications, I've deleted the OneSignalServiceExtension, and the problem is gone! |
How can we help?
The brilliant script of @ludufre (see #537 (comment)) is broken, since we try to use a newer version of OneSignal.
The commandline xcode-build fails with fatal error: 'OneSignal/OneSignal.h' file not found, due to the fact that paths within the OneSignal SDK Framework have changed, I suppose.
Did anyone also encounter this and has a solution?
We are using the script for Jenkins automation of our app build process to add a OneSignalServiceExtension to each app and it worked perfectly since we found it.
We have to change the OneSignal Version for being able to generate Privacy Manifest Data.
Code of Conduct
The text was updated successfully, but these errors were encountered: