Skip to content
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

[modified] on headings ? #653

Closed
dungnguyen10989 opened this issue Oct 15, 2018 · 6 comments
Closed

[modified] on headings ? #653

dungnguyen10989 opened this issue Oct 15, 2018 · 6 comments

Comments

@dungnguyen10989
Copy link

dungnguyen10989 commented Oct 15, 2018

I push nofitication with structure:

{
	"app_id": "appid",
	"contents": { "en": "Test message one signal" },
	"filters": [
	  	{"field": "tag", "key": "userId", "relation": "=", "value": 1}
	],
	"headings": {"en":"test headings"},
	"ios_badgeType": "Increase",
	"ios_badgeCount": 1,
}

But the headings contain a tag [modified], it show on ios 12, but does not show on ios 9 ? How to fix it ?
44077169_533593840401849_1463818175526207488_n

@Nightsd01
Copy link
Contributor

@dungnguyen10989 Please check your NotificationService.m and make sure you replaced it with the contents from our docs.

And please note that the notification service extension only works in iOS 10 and later.

@filiponegrao
Copy link

I have the same problem, but using another platform. How could you solve it?

@ilkerkesici
Copy link

ilkerkesici commented Aug 31, 2019

I have the same problem. I solve this problem this way.
Open your project on XCode. Then, right click YourNotificaitonServiceExtension > Build Phases > Compile Source > NotificationService.m, then click Open as > Source Code. On the 'self.bestAttemptContent.title = [NSString stringWithFormat:@"%@ [modified]",' line, remove [modified] string. Then problem solved for me.

@IceProgrammer15
Copy link

IceProgrammer15 commented Feb 13, 2020

Having [modified] in notification title is not a bug or issue to fix.
It is for debugging purposes to confirm that Notification Service Extension is running properly (because service extension is a separate project than the App), so having [modified] in notification title is a sign that your Service Extension works.

More info here:
https://documentation.onesignal.com/docs/troubleshooting-ios#section-debug-the-notification-service-extension

better approach is to make it conditional :

    #ifdef DEBUG
      self.bestAttemptContent.title = [NSString stringWithFormat:@"%@ [modified]",    self.bestAttemptContent.title];
    #endif

Or you can remove it completely if not using service extension.

@alhassan233
Copy link

@Nightsd01 I have the same problem. Unfortunately I can't remove the [modified] string from my NotificationService.m because that string isn't present at all in the Swift code. it's only present in Objective C code (which i don't use. i use swift). But the [modified] string still appears in my headings.

@elitemobile
Copy link

Remove the line with "[modified]" from NotificationService.swift or NotificationService.m file

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants