Skip to content

NSURL leading to app crash #1161

Closed
@BPerlakiH

Description

@BPerlakiH

We have a specific app crash on production:

Image

From my investigation so far it seems that in some very rare cases (depending on the url value) the NSURL Foundation class cannot find the lastPathComponent.

Looking into the documentation:
https://developer.apple.com/documentation/foundation/nsurl/lastpathcomponent?language=objc

it seems that the Objective-C implementation is using underneath a deprecated method:
https://developer.apple.com/documentation/foundation/nsstring/replacingpercentescapes(using:)?language=objc

This is (so far) the only reason I've found, that might cause either the NSURL itself or the returned lastpathcomponent to be nil.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions