I'm handling the error APNS send back after I write a notification.
According to the documentation, the error code should be 1-10 or 255.
Link: https://developer.apple.com/library/ios/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/Chapters/CommunicatingWIthAPS.html
However, I got the package back:
080b00000000
The command is 8 which fits the documentation but b = 11 which is not documented
Does anyone encounter this before as well?
Thank you!
It happens to me too.
My 'Notification identifier' item in the frame wasn't well formed.
The 'Item data length' must be the size of the binary version of your identifier.
Related
while running my iOS app i get the message:
2017-11-04 15:33:02.873595+0100 DagBoek[71486:4321269] ***
-[NSKeyedUnarchiver initForReadingWithData:]: data is NULL
in the XCODE console
DagBoek[71486:4321269] What do the numbers between the brackets mean ?
Can they help me to find where in my code the problem is ?
Thanks
No, they don't really help much. The first number, 71486 in your example, is the process ID (PID). The second number (4321269) is a thread ID of sorts, but Apple's diagnostic and debugging tools seem to use different thread ID schemes in different contexts, so it's mostly useless.
I am using cordova push plugin where I am getting notification and all data I needed, but also I want to set badge as per the unread notification or the number i am getting into count of push notification but I am not sure why I am not getting this count as a badge into app icon of iOS device
Here is the json format I am getting into push notification success function
{
"count":"1",
"sound":"default",
"additionalData":{
"foreground":true,
"product_id":"19",
"user_id":"2",
"coldstart":false,
"notificationstatus":"like"
},
"message":"Username likes your product"
}
Sound and message both were working perfect but not count.
Any suggestion ?
I noticed that, there is a string value of count in the response, and it was the mistake.
Count value must be an integer.
Hope this will help others too.
what you receiving is ok but one key is wrong. the key count should be badge. This is the problem i think. Try to change the key and reply the result.
reference - https://developer.apple.com/library/content/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/Chapters/TheNotificationPayload.html
I'm using libjingle_peerconnection installed with cocoapods. When I receive SDP offer through signaling server from my caller, I'm trying to set this as a remote description, which triggers RTCSessionDescriptionDelegate peerConnection:didSetSessionDescriptionWithError:
with error:
Error Domain=RTCSDPError Code=-1 "(null)" UserInfo={error=Failed to set remote answer sdp: Called in wrong state: STATE_INIT}.
My code is:
- (void)transportChanell:(TransportChannel *)channel didReceivedSignalWithSessionDescription:(NSString *)sessionDescription withType:(NSString *)type {
RTCSessionDescription *remoteDesc = [[RTCSessionDescription alloc] initWithType:#"answer" sdp:sessionDescription];
[_peerConnection setRemoteDescriptionWithDelegate:self sessionDescription:remoteDesc];
}
I've investigated the problem quite a lot and found in webRTC source code the place, as I suppose, this error comes from BadRemoteSdp(type, BadStateErrMsg(state()), err_desc); and all possible states of WebRtcSession are:
STATE_INIT = 0,
STATE_SENTOFFER, // Sent offer, waiting for answer.
STATE_RECEIVEDOFFER, // Received an offer. Need to send answer.
STATE_SENTPRANSWER, // Sent provisional answer. Need to send answer.
STATE_RECEIVEDPRANSWER, // Received provisional answer, waiting for answer.
STATE_INPROGRESS, // Offer/answer exchange completed.
STATE_CLOSED, // Close() was called.
Any suggestions, please, what could I missed in caller or callee side?
The offer seems to be marked as an "answer" according to the error message. It fails because it then expects you to be in the STATE_SENTOFFER state.
If you have created an offer and sent it to the other party, you may have forgotten to call setLocalDescription first. If you did not send an offer from the failing client, the other party should be changed to send an offer instead of an answer.
In the event this helps anyone coming here from Google:
I ran into this problem myself, and it turned out I'd hastily copy-pasted some code from the offerer I'd written. So I was init'ing RTCSessionDescription with type RTCSdpTypeAnswer instead of RTCSdpTypeOffer.
Make sure when allocating your RTCSessionDescription that you're using the right type!
I am developing integration with Simperium, the integration is complete and has been running on test machines for sometime, I am starting to get this error on one of the devices and it keeps repeating constantly any ideas?
MeetingPad[891:1103] Simperium error (ActionLinks82), received an invalid change for (a18852011efe4964a6fdeb1853c790f3)
2013-02-07 10:07:05:277 MeetingPad[891:1103] Simperium client ios-7f43b434754d882923e966df5d885755 received change (ActionLinks82) ios-4176925448fa8ae0a2f1d0937627aa6b: {
ccids = (
3f3b4550b23147d49e194038feea09a6
);
clientid = "ios-4176925448fa8ae0a2f1d0937627aa6b";
cv = 5112df4b37a401031dcc5be1;
ev = 2;
id = 9ca0b7ad04314ab9888d75691be784b5;
o = "-";
}
If this occured on a user account what would be the guidance?
One thing to check is that you're using the latest version of the code. The repository was recently open sourced on GitHub. There used to be a bug related to nil values that could cause an invalid diff to appear in your change stream, but it should be fixed now.
Assuming you're using the latest code though, does the error repeat continuously for the same "id" value, or are there different values?
Looking at the Simperium code where this error occurs, it's possible it could be displayed if you've deleted an object locally and remotely at around the same time. In your app, might ActionLinks fit that pattern, i.e. are you creating and deleting a lot of them across multiple clients?
If that is indeed the cause, then the error is innocuous and we should patch the code. Let me know what you discover.
APNS returns the following status codes in error response packets when using the enhanced notification format.
0 - No errors encountered
1 - Processing error
2 - Missing device token
3 - Missing topic
4 - Missing payload
5 - Invalid token size
6 - Invalid topic size
7 - Invalid payload size
8 - Invalid token
255 - None (unknown)
I want to know which of these status codes actually indicate that the issue is actually with the device token (ie: I can mark that particular device token in my database as invalid or inactive). I am sure that I can safely do that when I receive a value of 8 as status code. Also, I am pretty sure about what status codes 2, 4, 5 and 7 indicate and when exactly are they returned.
But for the rest of the status codes, I am pretty much in the dark. Apple's website does not contain much information about them either.
Can anybody please enlighten me about each of these status codes in detail. Many thanks in advance.
You're right about the 2, 4, 5, 7, and 8.
0 is good news obviously.
We're left with:
1 - Processing error
3 - Missing topic
6 - Invalid topic size
10 - Shutdown
255 - None (unknown)
1 is a problem on Apple's side, not related to the token.
3 is, according to Apple :
The topic is currently the bundle identifier of the target application on an iOS device.
6 is related to 3.
10 is out of your control but good to handle as well.
And obviously, 255 will not be able to help you define if the token is the problem.
If your goal is to determine a token that was valid at some point and no longer is, you should really refer to the Feedback Service API.