iOS notifications (sandbox mode)

32 views
Skip to first unread message

isaac

unread,
Jul 14, 2016, 6:28:39 AM7/14/16
to BaasBox
Hi!,
I'm trying to use notifications, I think I correctly did everything (certificates etc.)
But when I try to send a test message I receive this:

do you have any hint on what I did wrong?


{
  "result": "ok",
  "data": [
    "Payload received: {\"users\":[\"a1\"],\"message\":\"This is a test message!\"}",
    "Payload message received: This is a test message!",
    "users: [\"a1\"]",
    "Users extracted: a1",
    "profiles: null",
    "Profiles computed: 1",
    "Profiles validation: true",
    "Processing user a1 ...",
    "... system properties _BB_UserAttributes#14:49{login_info:[0],signUpDate:Fri Jul 08 19:34:09 UTC 2016,_allow:[2]} v1 ...",
    "... the message will be sent to 0 device(s)...",
    "... retrieving device(s) info...",
    "... retrieving app(s) push configurations and sending notifications...",
    "...... profile 1 ...",
    ".... profile: 1 ",
    "...... configuration: {IOS_CERTIFICATE=<hidden>, APPLE_TIMEOUT=0, IOS_SANDBOX=true, IOS_CERTIFICATE_PASSWORD=aspirina, ANDROID_API_KEY=<hidden>} ",
    "......... sending to 0 iOS device(s)...",
    "......... sending to 0 Android device(s)...",
    "Service result: false, false, false, false, false, false"
  ],
  "http_code": 200
}

atoscano

unread,
Sep 16, 2016, 3:29:50 AM9/16/16
to BaasBox
It seems that you're user & device aren´t enabled to receive PUSH, you've to add this after LOGIN or REGISTER:

BAAClient *client = [BAAClient sharedClient];

    [client askToEnablePushNotifications];


Then, the baasbox console message must change this:

"... the message will be sent to 0 device(s)...",


I'm not receiving the PUSH in SANDBOX but it must be for another reason



isaac

unread,
Sep 29, 2016, 4:47:34 PM9/29/16
to BaasBox
Thanks,
I already had " [client askToEnablePushNotifications];"
The problem was that I was using a sandbox certificate when using TestFlight, where it's needed a production certificate.
I solved. 
Thanks,
1s44c

Reply all
Reply to author
Forward
0 new messages