Skip to content

AB#280444 - Add GamifyWidget SDK module#140

Draft
dmytro-b-optimove wants to merge 2 commits intomasterfrom
feature/280444-gamify-widget-ios
Draft

AB#280444 - Add GamifyWidget SDK module#140
dmytro-b-optimove wants to merge 2 commits intomasterfrom
feature/280444-gamify-widget-ios

Conversation

@dmytro-b-optimove
Copy link
Copy Markdown

@dmytro-b-optimove dmytro-b-optimove commented Apr 13, 2026

Summary

  • Adds GamifyWidgetSDK — public entry point with initialize(widgetUrl:) and open(from:userId:token:) that presents a modal sheet
  • Adds GamifyWidgetViewController — internal UIKit view controller hosting a WKWebView with JS bridge (READY → INIT → CLOSE handshake), loading spinner, and error state
  • Adds GamifyWidgetSDKTests — unit tests for URL initialisation

iOS equivalent of Android SDK PR #91 (AB#280444). No changes to Package.swift — new files sit inside the existing OptimoveSDK target source path.

JS Bridge

Widget fires READY → native responds with INIT (userId/token) via window.postMessage. Widget calls window.webkit.messageHandlers.nativeBridge.postMessage to close. Token is redacted in logs.

Test plan

  • cmd+U on OptimoveSDK scheme — GamifyWidgetSDKTests pass
  • cmd+B on iOS scheme — clean build, no errors or warnings
  • Run QA app, navigate to Gamify Widget, fill tenant + userId, tap Open Widget — sheet opens and close button dismisses

@dmytro-b-optimove dmytro-b-optimove marked this pull request as draft April 13, 2026 23:41
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.

1 participant