Parse和Xcode:块不会自动完成。

时间:2015-04-16 08:38:25

标签: ios xcode parse-platform

Parse(1.7.1)和Xcode(6.3)的最后一个版本我无法自动完成解析API的块。这真的很烦人。还有其他人有这个问题吗?

之前,与其他每个块一样,您可以选项卡突出显示它,然后按Enter键。

     [query findObjectsInBackgroundWithBlock:^(NSArray *objects, NSError *error)
     {

     }];

现在当我按下回车时,会发生这种情况:

[query findObjectsInBackgroundWithBlock:(nullable PFArrayResultBlock(nullable )block

3 个答案:

答案 0 :(得分:0)

我修复了它,对解析时的标题略有改动,这只是暂时被黑客攻击,为了使块工作,我上传新版本后重置这些更改。在解析1.7.4和xcode 6.3.2

上验证了这一点

在PFConstants.h中,删除" PF_NULLABLE_S"的所有实例。 并在PFQuery.h中,删除" PF_NULLABLE"," PF_NULLABLE_S"," PF_ASSUME_NONNULL_BEGIN"的所有实例。和" PF_ASSUME_NONNULL_END"

你会得到警告" Nullability Issue"但是在我的测试工作很棒的时候,我也会在上传新版本时重置这个标题。

答案 1 :(得分:0)

我如何解决问题的方法是使用旧样式自动填充#include <SPI.h> #include <Ethernet.h> #include <SoftwareSerial.h> // XBee's DOUT (TX) is connected to pin 2 (Arduino's Software RX) // XBee's DIN (RX) is connected to pin 3 (Arduino's Software TX) SoftwareSerial XBee(2, 3); // RX, TXint ReadingNumber=0; // Enter a MAC address and IP address for your controller below. // The IP address will be dependent on your local network: byte mac[] = { 0x90, 0xA2, 0xDA, 0x0D, 0xA8, 0x6B }; IPAddress ip(192, 168, 1, 101); // Initialize the Ethernet server library // with the IP address and port you want to use // (port 80 is default for HTTP): EthernetServer server(8081); void setup() { // Open serial communications and wait for port to open: Serial.begin(9600); XBee.begin(9600); while (!Serial) { ; // wait for serial port to connect. Needed for Leonardo only } // start the Ethernet connection and the server: Ethernet.begin(mac, ip); server.begin(); Serial.print("server is at "); Serial.println(Ethernet.localIP()); } void loop() { // listen for incoming clients EthernetClient client = server.available(); if (client) { Serial.println("new client"); // an http request ends with a blank line boolean currentLineIsBlank = true; while (client.connected()) { if (client.available()) { char c = client.read(); Serial.write(c); // if you've gotten to the end of the line (received a newline // character) and the line is blank, the http request has ended, // so you can send a reply if (c == '\n' && currentLineIsBlank) { client.println("HTTP/1.1 200 OK"); client.println("Content-Type: text/html"); client.println("Connection: close"); // the connection will be closed after completion of the response client.println("Refresh: 5"); // refresh the page automatically every 5 sec client.println(); client.println("<!DOCTYPE HTML>"); client.println("<html>"); if (XBee.available()) { if (c == '\n' && currentLineIsBlank) { client.println (XBee.read()); } } break; } else if (c != '\r') { // you've gotten a character on the current line currentLineIsBlank = false; } } } // give the web browser time to receive the data delay(1); // close the connection: client.stop(); Serial.println("client disconnected"); } } 并创建一个代码段。创建代码段的方法是选择文本并将其拖到代码段库(您可以将其谷歌)。

我知道,它不是&#39;修复&#39;但它至少完成了这项工作:)

答案 2 :(得分:0)

尝试使用cocoapods实现它,自动完成功能将起作用。

我尝试通过拖放导入Parse SDK,自动完成不会工作,但代码将运行。但是,当您通过pod安装添加库时,它将起作用。

请参阅此处的cocoapod安装部分

http://shaideru.com/?p=223