简体   繁体   English

调试时Xcode中的无效ObjC对象错误

[英]invalid ObjC Object error in Xcode while debugging

As in screenshot, the debugger has last two object named [0] which is my two NSString *variables.. 如屏幕截图所示,调试器的最后两个对象名为[0] ,这是我的两个NSString *变量。

在此处输入图片说明

Both variable can not be assigned.. (i have initialised both..) 这两个变量都不能分配..(我已经初始化了两个..)

inquiryId=[NSString stringWithFormat:@"%@",[dictObj objectForKey:@"inquiry_id"]];

I am assigning from dictionary but it stays [0] 我正在从字典中分配,但仍保持[0]

when i print the variable in log then it display as shown in image 当我在日志中打印变量时,它将如图所示

I dont know which type of error is this..!! 我不知道这是哪种错误.. !!

可能是因为您正在将对象分配给NSString,请尝试以下代码:

inquiryId=[NSString stringWithFormat:@"%@",[dictObj valueForKey:@"inquiry_id"]];

I got solution on this issue.!!! 我在这个问题上得到了解决方案。

I just Remove reference of My Viewcontroller & add it again... 我只是Remove reference My Viewcontroller Remove reference并再次添加...

That problem was related to something linking issue.!! 这个问题与链接问题有关!!

It works now..!! 现在可以用了!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 在Xcode中编译Titanium项目时出现错误:-dynamic未指定,以下标志无效:-ObjC - Getting error while compiling Titanium project within Xcode: -dynamic not specified the following flags are invalid: -ObjC 在调试时查看Xcode中的对象/属性状态 - View object/property state in Xcode while debugging XCode 9-导入#import时出错 <objc/runtime.h> -仅适用于模拟器 - XCode 9 - Error while importing #import <objc/runtime.h> - for Simulator Only Xcode错误:_OBJC_CLASS _ $ _ GrowingTextView“,在我编译时引用 - Xcode Error: _OBJC_CLASS_$_GrowingTextView", referenced from, while I am compiling Xcode 在调试时一直暂停 - Xcode keeps pausing while debugging 尝试通过XCode上传二进制文件时出现“映像路径无效”错误 - “Invalid image path” error while trying to upload a binary via XCode “目标文件格式无法识别,无效或不适合”Xcode错误 - “object file format unrecognized, invalid, or unsuitable” Xcode error 将@objc标志添加到方法时的Xcode编译器错误 - Xcode compiler error when adding @objc flag to method 模块&#39;FBAudienceNetwork&#39;在Xcode 7.3中需要&#39;objc_arc&#39;功能 - module 'FBAudienceNetwork' requires feature 'objc_arc' error in Xcode 7.3 “_OBJC_CLASS _ $ _”,引自:xcode 4.3.2中的错误 - “_OBJC_CLASS_$_”, referenced from: error in xcode 4.3.2
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM