【发布时间】:2019-10-18 03:43:03
【问题描述】:
我正在使用fastlane打包我的应用程序,我在我的应用程序中编写了一些ios 13支持的类,例如UIStatusBarManager类,然后它打包失败了,我该怎么办?
我已经将 fastlane 更新到最新版本,但 xcode 仍然是 xcode10。
这是我使用fastlane打包时遇到的错误:
[11:04:05]: ▸ ❌ /Users/wanghq/jenkins_workspaces/workspace/mobile-ios-teacher-ipa/Teacher_iOS/Train/Record/Utils/ZFPlayer/ZFPlayerView.m:909:9: use of undeclared identifier 'UIStatusBarManager'
[11:04:05]: ▸ UIStatusBarManager *statusBarManager = [UIApplication sharedApplication].keyWindow.windowScene.statusBarManager;
[11:04:05]: ▸ ^
[11:04:05]: ▸ ❌ /Users/wanghq/jenkins_workspaces/workspace/mobile-ios-teacher-ipa/Teacher_iOS/Train/Record/Utils/ZFPlayer/ZFPlayerView.m:909:29: use of undeclared identifier 'statusBarManager'
[11:04:05]: ▸ UIStatusBarManager *statusBarManager = [UIApplication sharedApplication].keyWindow.windowScene.statusBarManager;
[11:04:05]: ▸ ^
[11:04:05]: ▸ ❌ /Users/wanghq/jenkins_workspaces/workspace/mobile-ios-teacher-ipa/Teacher_iOS/Train/Record/Utils/ZFPlayer/ZFPlayerView.m:909:92: property 'windowScene' not found on object of type 'UIWindow *'
[11:04:05]: ▸ UIStatusBarManager *statusBarManager = [UIApplication sharedApplication].keyWindow.windowScene.statusBarManager;
[11:04:05]: ▸ ^
[11:04:05]: ▸ ❌ /Users/wanghq/jenkins_workspaces/workspace/mobile-ios-teacher-ipa/Teacher_iOS/Train/Record/Utils/ZFPlayer/ZFPlayerView.m:910:14: use of undeclared identifier 'statusBarManager'
[11:04:05]: ▸ if ([statusBarManager respondsToSelector:@selector(createLocalStatusBar)]) {
[11:04:05]: ▸ ^
[11:04:05]: ▸ ** ARCHIVE FAILED **
[11:04:05]: ▸ The following build commands failed:
[11:04:05]: ▸ CompileC /Users/wanghq/Library/Developer/Xcode/DerivedData/Teacher_iOS-faqbabrkmkezsveufzeljjrkqytg/Build/Intermediates.noindex/ArchiveIntermediates/Teacher_iOS/IntermediateBuildFilesPath/Teacher_iOS.build/Debug-iphoneos/Teacher_iOS.build/Objects-normal/armv7/ZFPlayerView.o /Users/wanghq/jenkins_workspaces/workspace/mobile-ios-teacher-ipa/Teacher_iOS/Train/Record/Utils/ZFPlayer/ZFPlayerView.m normal armv7 objective-c com.apple.compilers.llvm.clang.1_0.compiler
[11:04:05]: ▸ (1 failure)
[11:04:05]: ▸ ❌ /Users/wanghq/jenkins_workspaces/workspace/mobile-ios-teacher-ipa/Teacher_iOS/Train/Record/Utils/ZFPlayer/ZFPlayerView.m:911:40: use of undeclared identifier 'statusBarManager'
这是构建环境:
+---------------+-------------------------+
| Build environment |
+---------------+-------------------------+
| xcode_path | /Applications/Xcode.app |
| gym_version | 2.134.0 |
| export_method | development |
| sdk | iPhoneOS12.2.sdk |
+---------------+-------------------------+
请帮帮我,谢谢!
【问题讨论】: