Skip to main content

Hello,

 

I want to receive an event when the user forcefully shuts down the app.

 

But, The code I wrote doesn't work.

Isn't there a good way?

 

code : 

    func applicationWillTerminate(_ application: UIApplication) {

        print("applicationWillTerminate")

        AmplitudeHelper.shared.sendEvent(eventString: "app_exit")

}

Hi @hmbaa ,

 

Thanks for writing in! Which SDK are you using to send your data to Amplitude? We have developer docs here that can provide help with implementing your SDK, depending which one you are using. 

 

I am not aware of any SDK that has 

        AmplitudeHelper.shared.sendEvent(eventString: "app_exit")

Can you elaborate on what you are using to send the events? Thank you!


Hi @hmbaa, I hope all is well 😃 I wanted to follow up here. Were you able to make progress? Please keep us posted! 


Reply