Cannot send Chinese characters notification

0 votes
Hi sir,
 
I need to send Chinese character notifications on my IOS device.  I've tried the following block of code:
 
    @try
    {
        NSMutableDictionary *pushDictionary = [NSMutableDictionary dictionary];
        [pushDictionary setObject:@"你好" forKey:@"alert"];
        [pushDictionary setObject:@"default" forKey:@"sound"];
        [pushDictionary setObject:@"2" forKey:@"badge"];
 
        PushNotificationService *pushObj=[App42API buildPushService];
        NSMutableDictionary *dict = [NSMutableDictionary dictionaryWithObjectsAndKeys:@"true", @"dataEncoding", nil];
        [pushObj setOtherMetaHeaders:dict];
        [pushObj sendPushMessageToChannel:pushChannel withMessageDictionary:pushDictionary];
//        [pushObj release];
    }
    @catch (App42Exception *exception)
    {
        NSLog(@"Reason = %@",exception.reason);
    }
    @finally
    {
    }
 
But still give me this error:
 and it does not work.  It still gives me this error message: {"app42Fault":{"httpErrorCode":401,"appErrorCode":1401,"message":"UnAuthorized Access","details":"Client is not authorized"}}
 
Note:  If the "alert" is in English, it can be sent out without problem.
 
Kindly please advise, many thanks!
 
Daryl
related to an answer for: Push Notification Service in non-English
asked Jun 15, 2014 in App42 Cloud API-BaaS by darylng1009 (15 points)

1 Answer

0 votes
 
Best answer

Hi,

I guess you are using older version of the SDK. You can download the latest version(V_2.7) from our github repo.

Thanks.

answered Jun 15, 2014 by rajeev.etc (1,660 points)
selected Jun 17, 2014 by darylng1009
Hi,
Push services are operating normally now. Please check your Push logs for any error messages in case push is not getting delivered.
Thanks.
Hi, Thanks!  You mean there was service interruption in the past hours?  No wonder!  However, was bad luck that I just changed the framework version and some codes.  Thought that it my code's problem.  But also like to know, why did this happen and how often it happens?
Thanks!
Darylng, I hope upgrading your SDK sorted out your Chinese characters problem. Yesterday there was delay in Push Notification Server due to heavy traffic for some time. This has been sorted out and more servers are added. We do not expect this thing to happen again even for 40X traffic.
Thanks.
Thanks.  Hope this delay issue can be avoided in the future.  One thing now is very interesting, when I send one notification to one of my IOS device (from ShepHertz portal), my IOS device will receive around 3 to 5 previous notifications every time.  I've deleted the subscription and resubscribed it again but problem persist, please advise how to fix it.  
Thanks again.
There may be a case that multiple users are registered with same deviceToken and all are subscribed to the channel. Then if you call "sendPushMessageToChannel" it will send push to all users subscribed to the channel.
As deviceToken is same for multiple users then same device will receive N number of push if it is registered with N number of users.

That you can check on AppHQ Dashboard under PushNotification-> Users.

Thanks.
Download Widgets
Welcome to ShepHertz Product line forum, where you can ask questions and receive answers from the community. You can also reach out to us on support@shephertz.com
...