Tre*_*rst 7 xcode objective-c ios
我今天在我的xcode项目中遇到了这个错误...我以前从来没有得到它.自上次成功构建以来我所做的唯一改变是我导入了iAD框架(我在今天早上尝试进行新构建之前做了这个,所以我不确定它是否与它有任何关系.我尽管如此.)所有问题都与NSSet/NSArray/NSDictionary有关,并且都包含在UIKit的UIEvent和CoreImage的CIImage中.如果有人知道这里可能会发生什么,我会很感激输入.
编辑:我忘了提到具体的错误.他们来了:
"类型参数不能应用于非参数化类'NSSet'",
"类型参数可以应用于非参数化类'NSArray'",
"类型参数可以应用于非参数化类'NSDictionary'"
编辑2:我没有意识到应用程序商店自动将xcode从6.4更新到7.0,所以我改为标题以反映正确的xcode版本.
这是UIEvent.h中发生的地方(第50,51,52,53,56,59行):
- (nullable NSSet <UITouch *> *)allTouches;
- (nullable NSSet <UITouch *> *)touchesForWindow:(UIWindow *)window;
- (nullable NSSet <UITouch *> *)touchesForView:(UIView *)view;
- (nullable NSSet <UITouch *> *)touchesForGestureRecognizer: (UIGestureRecognizer *)gesture NS_AVAILABLE_IOS(3_2);
// An array of auxiliary UITouch’s for the touch events that did not get delivered for a given main touch. This also includes an auxiliary version of the main touch itself.
- (nullable NSArray <UITouch *> *)coalescedTouchesForTouch:(UITouch *)touch NS_AVAILABLE_IOS(9_0);
// An array of auxiliary UITouch’s for touch events that are predicted to occur for a given main touch. These predictions may not exactly match the real behavior of the touch as it moves, so they should be interpreted as an estimate.
Run Code Online (Sandbox Code Playgroud)
这是UIResponder.h中发生的地方(第31-34行):
// Generally, all responders which do custom touch handling should override all four of these methods.
// Your responder will receive either touchesEnded:withEvent: or touchesCancelled:withEvent: for each
// touch it is handling (those touches it received in touchesBegan:withEvent:).
// *** You must handle cancelled touches to ensure correct behavior in your application. Failure to
// do so is very likely to lead to incorrect behavior or crashes.
- (void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(nullable UIEvent *)event;
- (void)touchesMoved:(NSSet<UITouch *> *)touches withEvent:(nullable UIEvent *)event;
- (void)touchesEnded:(NSSet<UITouch *> *)touches withEvent:(nullable UIEvent *)event;
- (void)touchesCancelled:(nullable NSSet<UITouch *> *)touches withEvent:(nullable UIEvent *)event;
Run Code Online (Sandbox Code Playgroud)
也发生在UIREsponder.h(第79行):
@interface UIResponder (UIResponderKeyCommands)
@property (nullable,nonatomic,readonly) NSArray<UIKeyCommand *> *keyCommands NS_AVAILABLE_IOS(7_0); // returns an array of UIKeyCommand objects<
@end
Run Code Online (Sandbox Code Playgroud)
这是它在CIImage.h第97行和第102行中发生的地方:
/* Creates a new image from the contents of 'image'. */
+ (CIImage *)imageWithCGImage:(CGImageRef)image;
+ (CIImage *)imageWithCGImage:(CGImageRef)image
options:(nullable CI_DICTIONARY(NSString*,id) *)options;
/* Creates a new image from the contents of 'layer'. */
+ (CIImage *)imageWithCGLayer:(CGLayerRef)layer NS_DEPRECATED_MAC(10_4,10_11);
+ (CIImage *)imageWithCGLayer:(CGLayerRef)layer
options:(nullable CI_DICTIONARY(NSString*,id) *)options NS_DEPRECATED_MAC(10_4,10_11);
Run Code Online (Sandbox Code Playgroud)
我重新审视了这个问题,似乎其他人已经在不同的线程和 github 上解决了这个问题。
问题是我项目中包含的 Parse/Bolts 框架已经过时,并且我将它们保存在项目本地。我的项目中的版本与 xcode 7 冲突。
删除所有本地副本并将“pod 'Parse'”添加到我的 pod 文件并运行“pod install”后,此特定问题得到解决。
对于遇到相关问题的任何人,您应该尝试更新项目中剩余的旧依赖项,并查看哪个可以为您解决此问题。
以下是一些更详细讨论此问题的相关主题:
类型参数不能应用于 PFAnalytics 和 PFObject 中的非参数化类 BFTask
https://github.com/ParsePlatform/Parse-SDK-iOS-OSX/issues/297
| 归档时间: |
|
| 查看次数: |
3980 次 |
| 最近记录: |