I can track/record event from container app by Amplitude. I use the code bellow
Amplitude.instance().logEvent("Launch")
but when I write the bellow line
Amplitude.instance().logEvent("Share Catmoji Keyboard Extension")
in keyboard extension
The event does not record in amplitude dashboard.
Can anyone faced this issue? please help me.
Yes you can log events from App Extensions. I know this works in share extensions in production. You have to initialize Amplitude in the
viewDidLoad
of the principal view controller. According to the Amplitude docs this should work for all App Extensions except WatchOS, so I would imagine if you intialize Amplitude in yourUIInputViewController
subclass'sviewDidLoad
method it would work:Amplitude.instance().initializeApiKey("{YOUR_API_KEY}")