将Objective-C iOS应用程序迁移到自托管Parse-Server的问题

时间:2016-11-22 08:25:50

标签: ios objective-c parse-server

我将Objective-C iOS应用程序从Parse.com移动到自托管的Parse-Server。

我正在阅读this document

    [Parse initializeWithConfiguration:[ParseClientConfiguration
                                        configurationWithBlock:^(id<ParseMutableClientConfiguration> configuration) {
        configuration.applicationId = @"MY_APP_ID";
        configuration.clientKey = @"";
        configuration.server = @"https://my_app.herokuapp.com/parse";
    }]];

但问题是,当我使用此代码时,我收到此错误消息:

.....] Reachability Flag Status: WR t------ networkStatusForFlags
.....] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: ''clientKey' should not be nil.'

有谁知道该怎么做?

1 个答案:

答案 0 :(得分:0)

只需在解析服务器上包含服务器和applicationID即可。不再需要clientkey,根本就不包含它。

[Parse initializeWithConfiguration:[ParseClientConfiguration
                                    configurationWithBlock:^(id<ParseMutableClientConfiguration> configuration) {
    configuration.applicationId = @"MY_APP_ID";
//        configuration.clientKey = @""; 
    configuration.server = @"https://my_app.herokuapp.com/parse";
}]];