fix: [duplicate] Unable to present when a VC is already presented#45
fix: [duplicate] Unable to present when a VC is already presented#45pandeymangg wants to merge 9 commits intomainfrom
Conversation
…r_presenter IOS-6487 Add topMostVC for presenter
…iewcontroller already presented
|
narjes seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account. You have signed the CLA already but the status is still pending? Let us recheck it. |
WalkthroughThis pull request modifies survey presentation and environment configuration in the Formbricks iOS SDK. The 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Tip 💬 Introducing Slack Agent: The best way for teams to turn conversations into code.Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.
Built for teams:
One agent for your entire SDLC. Right inside Slack. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@Sources/FormbricksSDK/Manager/PresentSurveyManager.swift`:
- Around line 17-30: topMostViewController currently follows
viewController.presentedViewController even when that presented VC is
mid-dismissal; change the first branch in topMostViewController(from:) to skip
descending into a presented view controller that isBeingDismissed (i.e. guard
let presented = viewController.presentedViewController,
!presented.isBeingDismissed { return topMostViewController(from: presented) } ),
and if the presented VC is being dismissed return the current viewController so
we don't attempt to present on a mid‑dismissal VC.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro
Run ID: 6ecc45a5-768e-4c16-9e28-59f29eacf1d8
📒 Files selected for processing (2)
Sources/FormbricksSDK/Helpers/FormbricksEnvironment.swiftSources/FormbricksSDK/Manager/PresentSurveyManager.swift
|


Duplicate of #43