我得到了大量的崩溃报告给了Crashlytics.这只发生在iOS 12上,我不知道如何重现这一点.也许用户在WKWebView上并尝试从提示中输入密码31 SafariServices 0x21d216740 __107+[_SFAutomaticPasswordInputViewController inputViewControllerWithAutoFillContext:passwordRules:completion:]_block_invoke.29 + 104
如果有人有类似的崩溃或想法,我们非常感谢.
更新:此问题正在跟踪:https://github.com/firebase/firebase-ios-sdk/issues/2283感谢Igor
Crashed: com.apple.main-thread
0 libsystem_kernel.dylib 0x207743df8 __abort_with_payload + 8
1 libsystem_kernel.dylib 0x20773d838 abort_with_payload_wrapper_internal + 100
2 libsystem_kernel.dylib 0x20773d7d4 abort_with_payload_wrapper_internal + 34
3 libobjc.A.dylib 0x206d7d4b4 _objc_fatalv(unsigned long long, unsigned long long, char const*, char*) + 112
4 libobjc.A.dylib 0x206d7d40c __objc_error + 42
5 libobjc.A.dylib 0x206d94af0 weak_entry_insert(weak_table_t*, weak_entry_t*) + 314
6 libobjc.A.dylib 0x206d95a60 objc_initWeak + 360
7 UIKitCore 0x23457508c -[UIViewController viewDidMoveToWindow:shouldAppearOrDisappear:] + 1628
8 UIKitCore 0x234fcaff8 -[UIView(Internal) …Run Code Online (Sandbox Code Playgroud) 我们的应用程序支持iOS 11及更高版本。在iOS 13中,我们使用SwiftUI+Combine
我们用相应的check 或包裹导入SwiftUI或Combine框架。如果我们在iOS 12下从Xcode 11运行我们的应用程序,则会出现错误#if canImport(SwiftUI)#if canImport(Combine)dyld: Library not loaded: /System/Library/Frameworks/Combine.framework/Combine
我们通过可选地链接来解决SwiftUI的相同问题。
但是我们无法为Combine设置相同的名称,因为甚至无法选择它进行链接
在客户端手机上,相机释放期间很少会发生崩溃
Fatal Exception: NSRangeException
Cannot remove an observer <AVCaptureSession 0x174212170> for the key path "changeSeed" from <AVCaptureConnection 0x17420fa60> because it is not registered as an observer.
Thread : Fatal Exception: NSRangeException
0 CoreFoundation 0x000000018449259c __exceptionPreprocess + 132
1 libobjc.A.dylib 0x0000000194be40e4 objc_exception_throw + 60
2 CoreFoundation 0x00000001844924dc -[NSException initWithCoder:]
3 Foundation 0x00000001852a7e9c -[NSObject(NSKeyValueObserverRegistration) _removeObserver:forProperty:] + 528
4 Foundation 0x00000001852a7954 -[NSObject(NSKeyValueObserverRegistration) removeObserver:forKeyPath:] + 104
5 AVFoundation 0x0000000182d21054 -[AVCaptureSession _removeConnection:] + 192
6 AVFoundation 0x0000000182d206dc -[AVCaptureSession _removeVideoPreviewLayer:] + 120
7 AVFoundation 0x0000000182d300f8 -[AVCaptureVideoPreviewLayer …Run Code Online (Sandbox Code Playgroud) 为什么protocols属性在swift中被翻译为[AnyObject],而不是[P]
@protocol P;
@class C;
@interface TestGenerics: NSObject
@property NSArray<C*>* classes;
@property NSArray<P>* protocols;
@end
Run Code Online (Sandbox Code Playgroud)
在Swift中它看起来像这样:
public class TestGenerics : NSObject {
public var classes: [C]
public var protocols: [AnyObject]
}
Run Code Online (Sandbox Code Playgroud)
更新:找到解决方案
@property NSArray<NSObject<P>*>* protocols;
Run Code Online (Sandbox Code Playgroud)
或者像建议的newacct
@property NSArray<id<P>>* protocols;
Run Code Online (Sandbox Code Playgroud)
被翻译成:
public var protocols: [P]
Run Code Online (Sandbox Code Playgroud) 我用flattenMap转换信号中的任何新值,我想根据某些条件停止进程,而不是错误,但是已完成状态.下面提到的代码不允许这样做.它只是过滤了一些价值.我如何从flattenMap完成?
RACSignal* anySignal = //
[ [ anySignal
flattenMap: ^(id _)
{
return [ RACSignal empty ];
} ]
subscribeCompleted:
^{
NSLog(@"Not Called");
}];
Run Code Online (Sandbox Code Playgroud) iOS经常崩溃,无限递归与下面的堆栈:
#7801 0x01c96241 in _writeJSONValue ()
#7802 0x01c9a660 in ___writeJSONArray_block_invoke ()
#7803 0x04bbad86 in __53-[__NSArrayM enumerateObjectsWithOptions:usingBlock:]_block_invoke ()
#7804 0x04bbac92 in -[__NSArrayM enumerateObjectsWithOptions:usingBlock:] ()
#7805 0x04b37ca5 in -[NSArray enumerateObjectsUsingBlock:] ()
....
#7822 0x04bbac92 in -[__NSArrayM enumerateObjectsWithOptions:usingBlock:] ()
#7823 0x04b37ca5 in -[NSArray enumerateObjectsUsingBlock:] ()
#7824 0x01c9a571 in _writeJSONArray ()
#7825 0x01c96241 in _writeJSONValue ()
#7826 0x01c95f9d in -[_NSJSONWriter dataWithRootObject:options:error:] ()
#7827 0x01c98b57 in +[NSJSONSerialization dataWithJSONObject:options:error:] ()
#7828 0x001a7ec8 in ptrIntPtrParamHandler at /Users/jenkins/workspace/iOS v3 Agent -
Run Code Online (Sandbox Code Playgroud)
编辑,请看屏幕NewRelic生成错误,而不是我的代码
