解析仪表板设置

时间:2016-06-24 19:05:29

标签: ios swift parse-platform apple-push-notifications parse-server

我在Heroku上使用Parse Server Dashboard和我的iOS应用程序,我想配置推送通知。我知道我可以在App Settings中配置它,但在仪表板中我只能看到Core和Push。在线截图我看到有另一个标签,但在我的仪表板中没有出现。

enter image description here

我错过了什么吗?

感谢您的帮助!

1 个答案:

答案 0 :(得分:1)

由于我们必须使用Parse Server,因此更改app等应用设置的方式不同。以前,它已内置到其仪表板界面中,但现在您必须在 index.js 文件中手动输入该信息。参考this文章,它应该如下所示:

var api = new ParseServer({
    databaseURI: databaseUri || 'mongodb://localhost:27017/dev',
    cloud: process.env.CLOUD_CODE_MAIN || __dirname + '/cloud/main.js',
    appId: 'MYAPPID',
    clientKey: 'myclientKey',  
    masterKey: 'myMasterKey',
    push: {
        android: {
            senderId: '', // The Sender ID of GCM
            apiKey: '' // The Server API Key of GCM
        },
        ios: {
            pdx: 'certs/mycert.p12', // the path and filename to the .p12 file you exported earlier. 
            bundleId: '', // The bundle identifier associated with your app
            production: true
        }
    }
});

您必须自己从每个提供商那里获取证书信息,并且只需在您的index.js附近的某处包含.p12证书文件即可。