我正在播放这样一个控制器的视频:
func playMovie() {
let path = Bundle.main.path(forResource: "xyz", ofType:"mov")
let url = URL(fileURLWithPath: path!)
self.player = AVPlayer(url: url)
let layer: AVPlayerLayer = AVPlayerLayer(player: self.player)
layer.frame = self.view.frame
layer.videoGravity = AVLayerVideoGravityResizeAspectFill
self.view.layer.addSublayer(layer)
self.player.play()
}
Run Code Online (Sandbox Code Playgroud)
即使在控制器被销毁并且不再使用之后,我也会每隔一秒左右收到此日志消息:
AQDefaultDevice (173): skipping input stream 0 0 0x0
Run Code Online (Sandbox Code Playgroud)
我不是问如何隐藏这些日志.我知道如何设置OS_ACTIVITY_MODE为disable(请参阅此内容以了解如何隐藏这些日志).我担心的是即使在控制器被破坏之后,电影仍然可能以某种方式播放.我正在播放电影的方式有什么不对吗?或者我是否需要进行任何额外的清理?
有没有其他人在Xcode 8控制台上出现问题,显示出一堆随机的东西?我不希望所有这些都混乱我的调试消息和日志.有人知道如何关闭它吗?
编辑:发行说明指出控制台可能会为watchOS转储无用的东西,但不适用于iOS.
升级到Swift4.1和Xcode 9.3之后,我得到了上面的运行时消息.在升级之前,我的控制台窗口中没有此消息.
状态栏找不到缓存的时间字符串图像.渲染过程中.
只要我运行App,每隔几分钟就会出现一次.
它看到我没有负面的副作用,我的应用程序运行,像往常一样,我没有看到任何问题.
我使用标准状态栏,没有改变以任何方式修改它.
问题1:在我尚未遇到的情况下,是否会出现此警告的问题?
问题2:有谁知道如何摆脱这个警告?
2016-09-17 15:16:04.386085 appDemo[2371:94976] [] __nwlog_err_simulate_crash simulate crash already simulated **"nw_socket_set_common_sockopts setsockopt SO_NOAPNFALLBK failed: [42] Protocol not available"**
2016-09-17 15:16:04.386676 appDemo[2371:94976] [] nw_socket_set_common_sockopts setsockopt SO_NOAPNFALLBK failed: [42] Protocol not available, dumping backtrace:
[x86_64] libnetcore-856.1.8
0 libsystem_network.dylib 0x0000000112dc780e __nw_create_backtrace_string + 123
1 libnetwork.dylib 0x0000000113bfa194 nw_socket_add_input_handler + 3002
2 libnetwork.dylib 0x0000000113bd7db8 nw_endpoint_flow_attach_protocols + 3768
3 libnetwork.dylib 0x0000000113bd6dd5 nw_endpoint_flow_setup_socket + 563
4 libnetwork.dylib 0x0000000113bd5b34 -[NWConcrete_nw_endpoint_flow startWithHandler:] + 2612
5 libnetwork.dylib 0x0000000113bf0d11 nw_endpoint_handler_path_change + 1261
6 libnetwork.dylib 0x0000000113bf0740 nw_endpoint_handler_start + 570
7 libdispatch.dylib 0x0000000112b44980 _dispatch_call_block_and_release …Run Code Online (Sandbox Code Playgroud) 自从我安装iOS 13.2 beta以来,我一直收到调试控制台错误消息。每当我在情节提要中加载带有WKWebView对象的ViewController时,就会发生这种情况。
然后在显示Web视图时连续显示以下消息...
2019-10-10 12:10:47.867830+0200 (...) [Process] kill() returned unexpected error 1
2019-10-10 12:10:47.908698+0200 (...) [Process] kill() returned unexpected error 1
2019-10-10 12:10:47.908814+0200 (...) [Process] kill() returned unexpected error 1
2019-10-10 12:10:47.934169+0200 (...) [Process] kill() returned unexpected error 1
2019-10-10 12:10:47.947668+0200 (...) [Process] kill() returned unexpected error 1
2019-10-10 12:10:47.964375+0200 (...) [Process] kill() returned unexpected error 1
2019-10-10 12:10:48.193556+0200 (...) [Process] kill() returned unexpected error 1
2019-10-10 12:10:48.193723+0200 (...) [Process] kill() returned unexpected error 1
2019-10-10 12:10:48.193941+0200 …Run Code Online (Sandbox Code Playgroud) 当我使用xcode 8在ios 10中运行我的应用程序时,我在调试控制台中收到以下消息,但一切正常.我的应用程序是使用相机和照片库,我在info.plist中添加了" 隐私 - 相机使用说明 "和" 隐私 - 照片库使用说明 ".任何人都可以告诉我为什么这个消息在即将到来
[MC] systemgroup.com.apple.configurationprofiles路径的系统组容器是/private/var/containers/Shared/SystemGroup/systemgroup.com.apple.configurationprofiles
2016-10-05 13:36:21.383340 MyApp[1867:72704] 0x60000015e350 Copy matching assets reply: XPC_TYPE_DICTIONARY <dictionary: 0x60000015e350> { count = 1, transaction: 0, voucher = 0x0, contents =
"Result" => <int64: 0x600000226fe0>: 29
}
2016-10-05 13:36:21.385076 MyApp[1867:72704] 0x608000556420 Daemon configuration query reply: XPC_TYPE_DICTIONARY <dictionary: 0x608000556420> { count = 2, transaction: 0, voucher = 0x0, contents =
"Dictionary" => <dictionary: 0x6080005566e0> { count = 1, transaction: 0, voucher = 0x0, contents =
"ServerURL" => <dictionary: 0x608000556790> { count = 3, transaction: 0, voucher = 0x0, contents = …Run Code Online (Sandbox Code Playgroud) 最近,我将我的Xcode版本更新为8.当我启动并运行一个全新的项目时,我在终端中收到以下消息.
2016-09-07 15:28:43.759998 App[7932:128675] subsystem: com.apple.UIKit,
category: HIDEventFiltered, enable_level: 0, persist_level: 0,
default_ttl: 0, info_ttl: 0, debug_ttl: 0, generate_symptoms: 0,
enable_oversize: 1, privacy_setting: 2, enable_private_data: 0
2016-09-07 15:28:43.762544 App[7932:128675] subsystem: com.apple.UIKit,
category: HIDEventIncoming, enable_level: 0, persist_level: 0,
default_ttl: 0, info_ttl: 0, debug_ttl: 0, generate_symptoms: 0,
enable_oversize: 1, privacy_setting: 2, enable_private_data: 0
2016-09-07 15:28:43.790817 App[7932:128648] subsystem:
com.apple.BaseBoard, category: MachPort, enable_level: 1,
persist_level: 0, default_ttl: 0, info_ttl: 0, debug_ttl: 0,
generate_symptoms: 0, enable_oversize: 0, privacy_setting: 0,
enable_private_data: 0
2016-09-07 15:28:43.827962 App[7932:128496] subsystem: …Run Code Online (Sandbox Code Playgroud) 我得到一些SSL Errors(这导致我的项目停止/挂起而没有崩溃,因为我DispatchGroup等待请求),我不知道它们是如何引起的,它们是什么,或者该怎么做.
我看过无数的网页大概这个问题,但目前还没有太多的文件或具有相同问题的人.我试过更改info.plist,但似乎没有帮助.两者都是plist这样的:( accounts.spotify.com是访问令牌请求的URL的域)
当我向服务器发出请求时,我可以看到我的代码失败了.(这是我的框架).如前所述,我DispatchGroup等待这个请求但代码停止了.
self.currentToken = try self.spotifyRequest("https://accounts.spotify.com/api/token", method: .post, parameters: parameters)
Run Code Online (Sandbox Code Playgroud)
我的要求方法:
private func spotifyRequest(_ url: URLConvertible, method: HTTPMethod, parameters: Parameters? = nil, headers: HTTPHeaders? = nil) throws -> JSONStandard {
// Create a dispatch group to handle threads
let group = DispatchGroup()
group.enter()
// Status of the request (starts as nil)
var status: JSONStandard?
DispatchQueue.global(qos: .userInitiated).async {
Alamofire.request(url, method: method, parameters: parameters, headers: headers).responseJSON(completionHandler: …Run Code Online (Sandbox Code Playgroud)