<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi all,<div><br></div><div>I am getting error while saving my response object to my store. Here are my codes:</div><div><br></div><div><br></div><div><div>AGPipeline *pipeline = [AGPipeline pipelineWithBaseURL:[NSURL URLWithString:@"localhost"]];</div><div><br></div><div>id<AGPipe> dataPipe = [pipeline pipe:^(id<AGPipeConfig> config) {</div><div> [config setName:@"persons"];</div><div> [config setEndpoint:@"get_persons.php"];</div><div> }];</div><div> </div><div>AGDataManager *dm = [AGDataManager manager];</div><div><br></div><div>id<AGStore> dataStore = [dm store:^(id<AGStoreConfig> config) {</div><div> [config setName:@"persons"];</div><div> [config setType:@"PLIST"];</div><div> }];</div><div> </div><div>[dataPipe read:^(id responseObject) {</div><div> NSError *error;</div><div> if (![dataStore save:responseObject error:&error])</div><div> NSLog(@"Save: An error occured during save! \n%@", error);</div><div> </div><div> } failure:^(NSError *error) {</div><div> NSLog(@"An error has occured during read! \n%@", error);</div><div> }];</div><div> </div><div> </div><div>And I am getting this log output:</div><div><br></div><div>Save: An error occured during save! </div><div>Error Domain=org.aerogear.stores.save Code=0 "error on save" UserInfo=0x727a6e0 {NSLocalizedDescription=error on save}</div><div><br></div><div><br></div><div>here is my "get_persons.php"</div><div><br></div><div><?php<span class="Apple-tab-span" style="white-space:pre">        </span></div><div> $result_array = array(array(</div><div> "id" => 1,</div><div> "name" => "yavuz",</div><div> "mail" => "<a href="mailto:yavuzsel@buffalo.edu">yavuzsel@buffalo.edu</a>",</div><div> "telephone" => NULL</div><div> ),</div><div> array(</div><div> "id" => 2,</div><div> "name" => "yavuzsel",</div><div> "mail" => "<a href="mailto:yavuzsel@buffalo.edu">yavuzsel@buffalo.edu</a>",</div><div> "telephone" => "001234"</div><div> ));</div><div> header('HTTP/1.1 200 OK');</div><div> header('content-type: application/json');</div><div> echo json_encode($result_array);</div><div>?></div><div><br class="webkit-block-placeholder"></div><div><br class="webkit-block-placeholder"></div><div apple-content-edited="true">
<div style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; ">Any help or direction is appreciated.</div><div style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><br></div><div style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; ">Cheers,</div><div style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><br class="Apple-interchange-newline">---</div><div style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; ">Yavuz Selim Yilmaz</div><div style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; ">SUNY at Buffalo</div><div style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; ">Computer Science and Engineering</div><div style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; ">PhD Candidate</div>
</div>
<br></div></body></html>