0

I am trying to get this simple request to work but i get 2 errors in Xcode.

Undefined symbols for architecture x86_64: "_OBJC_CLASS_$_UNIRest", referenced from: objc-class-ref in ViewController.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation)

    NSDictionary* headers = @{@"accept": @"application/json"};
    NSDictionary* parameters = @{@"parameter": @"value", @"foo": @"bar"};

    UNIHTTPJsonResponse *response = [[UNIRest post:^(UNISimpleRequest *request) {
      [request setUrl:@"http://httpbin.org/post"];
      [request setHeaders:headers];
      [request setParameters:parameters];
    }] asJson];
  • This code works: `NSDictionary* headers = @{@"accept": @"application/json"}; NSDictionary* parameters = @{@"parameter": @"value", @"foo": @"bar"}; UNIHTTPJsonResponse *response;` – Frank Novello Sep 18 '15 at 18:42
  • Whenever I alloc init a class from the unirest library it gives me an error please help me. – Frank Novello Sep 18 '15 at 19:22

0 Answers0