xcode新版本加载老版本的xcode发生的代码兼容性问题,导致下面红色字体的编译错误。解决办法如下:
目前已全面升级使用xCode4.2加iOS5.0,以致导入的有些库的使用或多或少会出现些编译错误,就像今天在应用OpenFlow时,就发生以下编译2处警告:
1. warning: Semantic Issue: Writable atomic property 'number' cannot pair a synthesized setter/getter with a user defined
setter/getter 指示在AFItemView.m文件
2.warning: Semantic Issue: Writable atomic property 'numberOfImages' cannot pair a synthesized setter/getter with a user definedsetter/getter 指示在AFOpenFlowView.m文件
查找这两个文件的头文件声明获知,这两个属性声明是这样的:
@propertyintnumber;
@propertyintnumberOfImages;
反正感觉上另类,也就直接更改为以下:
@property(nonatomic)intnumber;
@property(nonatomic)intnumberOfImages;
居然就顺利通过,没有再报警告错误了。此后查找资料,得知可以有以下几种方法解决:
1. 声明属性为nonatomic,即我上面的修改方法。
2. @synthesize合成用getter/setter方法(即自己手动定义getter/setter方法)。
3. 用@dynamic来代替@synthesize。
4. 直接不用属性@property。
分享到:
相关推荐
功能:批量生成属性的懒加载 getter 应用场景 :手写ui代码可以批量生成 github地址:https://github.com/hackxhj/getterMake-Xcode
在iOS 5中,Apple去掉了Window-Based-Application模板,如果是从之前的版本升级而来,如果需要Window-Based-Application,可以下载这个压缩包,解压成文件夹后,在Finder中,放在~/Library/Developer/Xcode 中,...
解决[IOS自动化]Xcode build时报错: Cannot link directly with dylib/framework XcodeDriverAgent文件包,用于替换 /usr/local/lib/node_modules/appium/node_modules/appium-webdriveragent/WebDriverAgent....
路径为:/Applications/Xcode.app/Contents/Developer/Library/Xcode/Templates/File Templates/MultiPlatform/Source/Objective-C File.xctemplate 当然,你也可以从附件中下载这两个文件,放到上面的文件夹里 ...
现在有个插件下载下来直接放到路径:/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/Xcode/Templates/Project Templates/iOS/Application,重新启动xcode即可,欢迎...
FastCoding是一个对Xcode所扩展的插件,主要是根据java的开发工具 eclipse 快速生成属性的getter ,setter 方法有感而发.出于兴趣开发本插件,目前主要功能是根据.h,.m文件声明的属性,自动生成get,set,lazy实例化方法
Xcode自学手册,英文。支持最新版的XCode4.3.2.
每当Xcode升级之后,都会导致原有的Xcode插件不能使用,这是因为每个插件的Info.plist中记录了该插件兼容Xcode版本的DVTPlugInCompatibilityUUID,而每个版本的Xcode的DVTPlugInCompatibilityUUID都是不同的。...
Xcode14.3 File not found libarclite_iphonesimulator.a and libarclite_iphoneos.a,xocde14.3会删除xocde的arc文件夹,致使项目报错,解决办法,把旧版arc包拖入xocde即可
iOS 开发工具Xcode6中没有了空工程模板这一选项了,现在共享一个代码工具按照里面的提示就可以给Xcode6增加空工程模板了
14.0真机调试包 安装路径:/应用程序/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/De
apple-opensource-objc-4-222修改 objc4-222原始代码,Xcode 4.3.2编译通过
用终端打开我们的Xcode.app 然后打开Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/Xcode/Templates/Project Templates/iOS/Application 然后将所需的模板拷贝进去,重新运行Xcode...
Xcode 快速注释 ///注释 实现快速注释 将文件解压后 直接点击 用Xcode 打开 直接run 重启Xcode 即可
Unity导出的Xcode工程合并到现有的Xcode项目实现AR流程及合并中遇到的各种问题解决方法,附demo下载地址
Xcode9更新xcode10以上报错解决方法 将附件的libstdc++.6.0.9.tbd放在那下面,重新编译即可通过 Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/lib
opengl超级宝典第五版 中mac下开发OpenGL,在书中描述的在xcode中需要libGLTool.a文件,由于源代码中没有包含libGLTool.a,只有源码,网上通过其他途径(例如:...希望这个工程对在xcode中学习OpenGL有所帮助。
/应用程序/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/
升级 iOS 13 之后,使用 Xcode 10 真机调试会提示错误: Could not locate device support files. 这是因为 Xcode 10 默认没有自带 iOS 13 的调试包,下载调试包,然后重新打开 Xcode 就可以了。 打开Finder 按下: ...
Xcode 不升级支持真机运行12.1版本信息,具体操作参照我的博客https://mp.csdn.net/postedit/52624583