Skip to content

Crash MPAppNotificationHandler - static URL._unconditionallyBridgeFromObjectiveC #352

@AnilVarghese

Description

@AnilVarghese

We are observing a new crash related to MPAppNotificationHandler continueUserActivity:restorationHandler

mParticle-Apple-SDK - 8.30.3

EXC_BREAKPOINT: 

0  Foundation +0x2026b8       static URL._unconditionallyBridgeFromObjectiveC(_:)
1  Glovo β +0x4cd7ebc         -[MPAppNotificationHandler continueUserActivity:restorationHandler:]
2  Glovo β +0x4ddce78         -[MPSurrogateAppDelegate application:continueUserActivity:restorationHandler:]
3  UIKitCore +0x1180d0c       -[UIApplication activityContinuationManager:continueUserActivity:]
4  UIKitCore +0x148f0dc       -[UIActivityContinuationManager _continueUserActivity:]
5  UIKitCore +0x148fd90       ___72-[UIActivityContinuationManager handleActivityContinuation:isSuspended:]_block_invoke_3
6  UIKitCore +0xb7a9ec        -[_UIApplicationModalProgressController _callAndClearDismissalHandlerWasDismissedByUser:]
7  UIKitCore +0xb7adbc        -[_UIApplicationModalProgressController hideAfterMinimumUptimeWithDismissalHandler:]
8  UIKitCore +0x1180a04       -[UIApplication activityContinuationManager:hideProgressUIWithCompletion:]
9  UIKitCore +0x148f07c       -[UIActivityContinuationManager _endCurrentActivityContinuationWithCompletion:]
10 UIKitCore +0x148fb64       ___72-[UIActivityContinuationManager handleActivityContinuation:isSuspended:]_block_invoke_2

Full crash log attached.

I was checking the implementation of the above method, found that this line assumes userActivity.webpageURL to be non nullable. webPageURL is an optional property.

// MPAppNotificationHandler
stateMachine.launchInfo = [[MPLaunchInfo alloc] initWithURL:userActivity.webpageURL options:nil];


// MPLaunchInfo
@objc public init(URL: URL, options: [String : Any]?)  { }

Could you please fix and release a patch. Thank you!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions