Skip to content

Provides SPM Support for Appetitive Integration.#19

Open
TheiOSDude wants to merge 5 commits intomparticle-integrations:developmentfrom
gymshark:master
Open

Provides SPM Support for Appetitive Integration.#19
TheiOSDude wants to merge 5 commits intomparticle-integrations:developmentfrom
gymshark:master

Conversation

@TheiOSDude
Copy link

Summary

Adds Package.swift file for SPM support
Fixes from: viewController being nil.

Testing Plan

Integration with SPM

@TheiOSDude
Copy link
Author

@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
- (MPKitExecStatus *)routeEvent:(MPEvent *)event {
NSDictionary *eventValues = event.customAttributes;

UIViewController * rootViewController = [[[[UIApplication sharedApplication] delegate] window] rootViewController];
Copy link
Contributor

@frankus frankus Feb 9, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants