问题描述
我已经将项目更新为iOS 9,我的podfile和所有必需的文件,但是无法生成.我的悲伤根源在以下错误消息中:
I've updated my project to iOS 9, my podfile, and all necessary files, but it will not build. The source of my grief is in the following error message:
Type arguments cannot be applied to non-parameterized class 'BFTask'
这是唯一显示的错误,但是在PFAnalytics.h
和更重要的是PFObject.h
中都显示多次.
This is the only error that shows, but it shows up multiple times in both PFAnalytics.h
and probably more importantly PFObject.h
.
有人可以告诉我这是什么意思,请提出解决方案?希望我提供了足够的信息,但是如果没有,请告诉我!
Could someone tell me what this means and please suggest a solution? I hope I have provided enough information, but if not, let me know!
代码示例如下:在PFObject.h
和PFAnalytics.h
中,到处都有以下内容:
The code samples are as follows: In PFObject.h
and PFAnalytics.h
, everywhere there is the following:
(BFTask PF_GENERIC(XXSOMECLASS *)*) someMethod;
引发错误.这不是我的代码,如前所述是PFObject.h
和PFAnalytics.h
.以下是在PFObject.h
中引发错误的函数的示例
the error is thrown. This is no code of mine, it is PFObject.h
and PFAnalytics.h
as stated before. Examples of the functions throwing the error in PFObject.h
are below
- (BFTask PF_GENERIC(NSNumber *)*)saveInBackground;
- (BFTask PF_GENERIC(NSNumber *)*)saveEventually;
- (BFTask PF_GENERIC(NSNumber *)*)deleteInBackground;
+ (BFTask PF_GENERIC(NSNumber *)*)saveAllInBackground:(PF_NULLABLE NSArray *)objects;
+ (BFTask PF_GENERIC(NSNumber *)*)deleteAllInBackground:(PF_NULLABLE NSArray *)objects;
// .... etc
当点击停车标志时,建议删除PF_GENERIC(NSNumber *),从而得到这样的方法
when clicking on the stop sign the suggestion is to delete PF_GENERIC(NSNumber *), resulting in a method like this
- (BFTask *)xxsomeMethod;
但这无济于事,因为它变得更加混乱
but that doesn't help as it just gets a lot messier
更新02:我的Podfile
的内容:
# Uncomment this line to define a global platform for your project
# platform :ios, '8.0'
target: 'BMR' do
pod 'AFNetworking', '~> 2.6'
pod 'ParseFacebookUtils', '~> 1.8'
pod 'Parse'
pod 'ParseUI', '~> 1.1'
pod 'FBSDKCoreKit', '~> 4.6'
pod 'FBSDKLoginKit', '~> 4.6'
pod 'JSQMessagesViewController', '~> 7.2'
pod 'IDMPhotoBrowser', '~> 1.7'
pod 'RNGridMenu', '~> 0.1'
pod 'APHorizontalMenu', '~> 1.3'
pod 'ASIHTTPRequest', '~> 1.8'
pod 'AutoScrollLabel', '~> 0.4'
pod 'CJAMacros', '~> 2.1'
pod 'CrittercismSDK', '~> 5.3'
end
推荐答案
请确保您没有Bolts.framework的重复版本.
Make sure that you don't have a duplicate version of the Bolts.framework.
如果同时使用Parse SDK和Facebook SDK,则会遇到一个问题,其中Parse SDK包含较旧版本的Bolts(当前为1.1.5),而FB SDK具有最新版本的Bolts SDK(> = 1.2.2) )
If you are using both Parse SDK and Facebook SDK you will encounter a problem where Parse SDK contains an older version of Bolts (currently 1.1.5) and the FB SDK has the newest version of Bolts SDK (>= 1.2.2)
一旦删除了Parse SDK随附的Bolt.framework
的旧版本,就可以了.
Once you remove an older version of the Bolt.framework
that comes with Parse SDK you should be fine.
要检查Bolts.SDK的版本,只需转到Bolts.framework
文件,右键单击并选择获取信息".
To check what version of Bolts.SDK you have simply go to the Bolts.framework
file, right - click and choose "Get Info".
这篇关于类型参数不能应用于PFAnalytics和PFObject中的非参数化类BFTask的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!