acoomans / simulatorremotenotifications Goto Github PK
View Code? Open in Web Editor NEWLibrary to send mock remote notifications to the iOS simulator
License: BSD 2-Clause "Simplified" License
Library to send mock remote notifications to the iOS simulator
License: BSD 2-Clause "Simplified" License
Is there a Cordova/Phonegap available?
How easy/hard would it be to use it in Cordova apps?
at 44 line in UIApplication+SimulatorRemoteNotifications.m
How about change
__buffer[size] = NULL;
to
__buffer[size] = '\0';
for turn of [ Incompatible pointer to integer conversion assigning to 'char' from 'void *' ] warning ?
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)
Hi, thanks a lot for this library !
didReceiveRemoteNotification: fetchCompletionHandler is called even if the app is in background when I send a notification from your iOS Simulator Notifications. (on 4s 9.0)
In your documentation, you said:
Note that if you send a notification while the app is in the background, application:didReceiveRemoteNotification:fetchCompletionHandler: will only be called when you bring the app to the foreground.
How to call it only when I bring the app to the foreground ?
My application is written in React Native. How should I bind this library with my app? Any clue?
It seems that it does not work in IOS7. My environment is MAC OSX 10.9/Xcode5.0.2/IOS7.
I excited the commands in terminal but nothing happened,why?
Is that could be possible awake my App after i end it, just like a Apple push server?
I send two JSON's:
echo -n '{"aps":{"alert" : "message","badge" : 99,"sound" : "default"},"storeId" : 5475878}' | nc -4u -w1 localhost 9930
echo -n '{"aps":{"alert" : "message","badge" : 99,"sound" : "default"},"storeId" : 54758}' | nc -4u -w1 localhost 9930
Difference only in storeId. First works fine, but second causes error:
SimulatorRemoteNotification: error = Error Domain=NSCocoaErrorDomain Code=3840 "The operation couldn’t be completed. (Cocoa error 3840.)" (Garbage at end.) UserInfo=0xb23dc90 {NSDebugDescription=Garbage at end.}
I tried to resolve this issue but failed:
When we take string from buffer in second case string looks like this:
{"aps":{"alert" : "message","badge" : 99,"sound" : "default"},"storeId" : 54758 }}
Two braces instead of one in first case.
I don't understand how could it be.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.