未知类型名称';UIBackgroundTaskIdentifier';swift中的错误

未知类型名称';UIBackgroundTaskIdentifier';swift中的错误,swift,Swift,你知道为什么我会在这段代码中得到一个“未知类型名UIBackgroundTaskIdentifier”吗 我基本上是将外部obj-c类添加到现有项目中。我添加了桥接头.h文件。不知道我还能做什么 @property (nonatomic,assign) __block UIBackgroundTaskIdentifier _backgroundTask; 在下面的一行中,我得到了“使用未声明的标识符'UIApplication'”这个错误 [[UIApplication sharedAppl

你知道为什么我会在这段代码中得到一个“未知类型名UIBackgroundTaskIdentifier”吗

我基本上是将外部obj-c类添加到现有项目中。我添加了桥接头.h文件。不知道我还能做什么

@property (nonatomic,assign) __block UIBackgroundTaskIdentifier _backgroundTask;
在下面的一行中,我得到了“使用未声明的标识符'UIApplication'”这个错误

 [[UIApplication sharedApplication] endBackgroundTask: self._backgroundTask];
    self._backgroundTask = UIBackgroundTaskInvalid;
如果我导入这两行,那么

#import <UIKit/UIKit.h>
#import <Foundation/Foundation.h>
#导入
#进口
我得到“架构x86_64的1个重复符号”错误