-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Provides SPM Support for Appetitive Integration. #19
base: development
Are you sure you want to change the base?
Conversation
@peterjenkins Gymshark required this integration via SPM. Hope this helps others. Thanks @bolshedvorsky for the work. |
…ns/mparticle-apple-integration-apptentive into mparticle-integrations-development # Conflicts: # mParticle-Apptentive/MPKitApptentive.m
Mparticle integrations development
@@ -270,10 +268,14 @@ - (nonnull MPKitExecStatus *)logBaseEvent:(nonnull MPBaseEvent *)event { | |||
|
|||
- (MPKitExecStatus *)routeEvent:(MPEvent *)event { | |||
NSDictionary *eventValues = event.customAttributes; | |||
|
|||
UIViewController * rootViewController = [[[[UIApplication sharedApplication] delegate] window] rootViewController]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I might be missing something, but this case should already be handled by the Apptentive SDK.
Passing nil
results in a nil presentingViewController
property on the InteractionPresenter
instance (see https://github.com/apptentive/apptentive-kit-ios/blob/97ba45ba650f742be956a5e33fc1c4f31a626574/Sources/ApptentiveKit/Interactions/InteractionPresenter.swift#L168), which will walk up the view controller stack of the application's keyWindow
. It also handles the (surprisingly common) case where an interaction tries to present on a view controller that is being dismissed.
Summary
Adds Package.swift file for SPM support
Fixes
from: viewController
being nil.Testing Plan
Integration with SPM