Start a new topic
Answered

multiple push certificates in single backend

If the same backend serves two iOS applications (two distinct IDs) how can I send push notifications to both?


Best Answer
Joey,

I understand that you need to access an environments data from other environment. You could do this by adding a custom endpoint in one environment and then use the request module to make REST API calls  to the other environment.

for e.g:
function onRequest(request, response, modules) {
 
 var req = modules.request;

  var uriString = 'https://baas.kinvey.com/appdata/other_env_id/collection';
  var opts = {
    uri: uriString,
    method: 'GET',
   
    headers: {
      'Authorization': ‘you can get this from the Kinvey API Console'
    },
    json: true,
    contentType: 'application/json'
  };
 
 modules.request.get(opts, function( err, resp, body ) {
    if(err) {response.body = err.response;}
    else{
              modules.logger.info("Got the data");
               response.body = resp.body;
               response.complete();
           }
        });
   
}

Let me know if this helps.

Thanks,
Pranav
Kinvey Support

 


Hey Michele, Kinvey doesn't currently support creating more than one push certificate per backend. I know that this is problematic if you want to use the same backend for your "free" and your "paid" versions of an app, so we're investigating creative alternatives.
From Brian's answer on another thread:

"As for the multiple account issue, Kinvey stores the device_token with each user that may receive remote notifications. Those device_tokens are tied to a specific provisioning profile which is tied to both your developer cert and the bundle ID, which are tied to the push cert that's uploaded to the console.



We've chosen to optimize around the one bundle ID per app, and using the dev vs. prod certs in different environments. If you need to support multiple bundle IDs you can use a dedicated environment for the second bundle ID and then use custom endpoints to manually register devices tokens to the correct environment and then manually mange the tokens in your user object. In the custom endpoint that's responsible for actually sending the push you would manually build the user object to pass to push.send()."
Am evaluating Kinvey as a replacement for Parse for several clients of mine. One of the features they rely on is the ability to have several push certs for the same backend. Can you provide an example of how to manually handle the user and token issue in a separate environment? Alternatively, is it possible to share data objects across two environments? Joey
Answer
Joey,

I understand that you need to access an environments data from other environment. You could do this by adding a custom endpoint in one environment and then use the request module to make REST API calls  to the other environment.

for e.g:
function onRequest(request, response, modules) {
 
 var req = modules.request;

  var uriString = 'https://baas.kinvey.com/appdata/other_env_id/collection';
  var opts = {
    uri: uriString,
    method: 'GET',
   
    headers: {
      'Authorization': ‘you can get this from the Kinvey API Console'
    },
    json: true,
    contentType: 'application/json'
  };
 
 modules.request.get(opts, function( err, resp, body ) {
    if(err) {response.body = err.response;}
    else{
              modules.logger.info("Got the data");
               response.body = resp.body;
               response.complete();
           }
        });
   
}

Let me know if this helps.

Thanks,
Pranav
Kinvey Support

 

Login or Signup to post a comment