As of April 12th, you must go to Progress SupportLink to create new support cases or to access existing cases. Please, bookmark the SupportLink URL and use the new portal to contact the support team.
If the same backend serves two iOS applications (two distinct IDs) how can I send push notifications to both?
Best Answer
P
Pranav J
said
almost 7 years ago
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) {
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.
C
Caroline
said
over 9 years ago
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()."
J
Joey Jarosz
said
about 7 years ago
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
P
Pranav J
said
almost 7 years ago
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) {
Michele Longhi
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
- Oldest First
- Popular
- Newest First
Sorted by Oldest FirstCaroline
Caroline
"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()."
Joey Jarosz
Pranav J
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
-
Why do I get "Undefined symbols" errors when building with KinveyKit?
-
How do I register push tokens?
-
When using social login, to perform a log-out, do I need to log out of the social network, Kinvey, o
-
How can I assign additional properties to users?
-
Does KinveyKit support 64-bit ARM devices, such as iPhone 5s?
-
Authorization Token Invalid or Expired
-
BOOL and how it is stored in the database.
-
Offline saving throwing errors
-
Custom endpoint not able to form request object
-
Security through business logic
See all 437 topics