Posts

Post not yet marked as solved
14 Replies
I encountered the same issue.Fatal Exception: NSRangeException*** -[NSPathStore2 characterAtIndex:]: index (42) beyond bounds (42)0 CoreFoundation 0x1f1d4298c __exceptionPreprocess1 libobjc.A.dylib 0x1f0f1b9f8 objc_exception_throw2 CoreFoundation 0x1f1c4cbc0 -[NSCache init]3 Foundation 0x1f26a2054 -[NSPathStore2 characterAtIndex:]4 libswiftCore.dylib 0x22016b1a4 specialized _StringGuts.foreignErrorCorrectedUTF16CodeUnit(at:)5 libswiftCore.dylib 0x22016b248 specialized _StringGuts.foreignScalarAlign(_:)6 AsiaPlayKit 0x1045eef20 specialized URLParser.parseVideoId(from:) (<compiler-generated>)...Tried .prefix(upTo: ), and the issue remain the same.As workaround, I switch the whole project from Optimization for Speed to for Size.
Post not yet marked as solved
6 Replies
I'm doing a little different approach here.Upon showing the logn form, I check iCloud Keychian first with SecRequestSharedWebCredential. If the closure returns a credentials, which means user's intent is to login with it, then I automatically login for him/her. Otherwise, make the login text filed becomeFirstResponder().This approach does not support third-party password manager, but most people use iCloud Keychain I believe.