简体   繁体   English

将Objective-C iOS应用迁移到自托管的Parse-Server时出现问题

[英]Issue migrating an Objective-C iOS app to a self-hosted Parse-Server

On my way moving an Objective-C iOS app from Parse.com to a self-hosted Parse-Server. 在将Objective-C iOS应用程序从Parse.com移至自托管的Parse-Server的途中。

I am reading this document . 我正在阅读这份文件

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

But the problem is that when I use this code, I get this error message: 但是问题是,当我使用此代码时,出现以下错误消息:

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

Does anyone know what to do here? 有人知道在这里做什么吗?

You only need to include the server and applicationID once you are on parse-server. 一旦位于parse-server上,您只需包括服务器和applicationID。 The clientkey is no longer needed, simply do not included it at all. 不再需要clientkey,根本不包含它。

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM