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

Updated notification payload size for iOS >= 8 #11

Open
Dev-iL opened this issue Oct 4, 2015 · 3 comments
Open

Updated notification payload size for iOS >= 8 #11

Dev-iL opened this issue Oct 4, 2015 · 3 comments

Comments

@Dev-iL
Copy link

Dev-iL commented Oct 4, 2015

Hello!
First of all, I'd like to thank you for this nice tool!

I'm trying to simulate some notifications on an iOS 9 device, which supports a new payload size limit of either 2KB or 4KB. However, SimulatorRemoteNotification seems to truncate the payload after a certain amount of bytes (256?), which results in the following error:

SimulatorRemoteNotification: error = Error Domain=NSCocoaErrorDomain Code=3840
"Unterminated string around character 313." UserInfo={NSDebugDescription=Unterminated
 string around character 313.}

I tried multiplying the values of the following constants by 8, but this seemed to have no effect:

UIApplication+SimulatorRemoteNotifications.m\SimulatorRemoteNotificationsBufferLength
ACSimulatorRemoteNotificationsService.m\SimulatorRemoteNotificationsServiceBufferLength

How can the code be modified to support the increased payload size?

P.S.
I know the payload I'm testing is valid because it gets delivered successfully through APNS when testing with a real device.

(Edit: updated the link to the documentation where the payload size is discussed)

@panupan
Copy link

panupan commented Jul 3, 2016

@Dev-iL I tried changing SimulatorRemoteNotificationsBufferLength in both UIApplication+SimulatorRemoteNotifications.m and ACSimulatorRemoteNotificationsService.m to 2048 and was able to successfully receive larger payloads.

Maybe try cleaning your project / deleting your derived data before rebuilding?

@Dev-iL
Copy link
Author

Dev-iL commented Jul 10, 2016

@panupan I'll try it again. Did you also try it with the 4KB payload alternative?

@panupan
Copy link

panupan commented Jul 14, 2016

@Dev-iL Nope, only tried with 2KB which was working perfectly.

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

2 participants