[英]How to connect to local Parse Server from the Parse iOS SDK?
如何從運行Parse iOS SDK的iOS設備連接到本地安裝的Parse Server? 我嘗試輸入本地服務器的IP地址,但一直出現“ Network connection failed
錯誤。
[Parse initializeWithConfiguration:[ParseClientConfiguration configurationWithBlock:^(id<ParseMutableClientConfiguration> configuration) {
configuration.applicationId = @"myAppId";
configuration.clientKey = @"";
configuration.server = @"http://10.0.1.26:1337";
}]];
我僅在我的開發環境中需要它。
您可以使用ngrok 。 如果您使用的是Mac,則可以使用brew install ngrok
。
安裝后,只需使用ngrok http 1337
,其中1337是本地parse-server安裝的端口號。 ngrok將為您提供一個隨機生成的URL,例如https://8ccea37e.ngrok.io
。 使用此URL更新本地安裝的parse-server和iOS應用。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.