Conversation
Migrate all screens and build configs to the new SDK API: - Widget ads: CloudXBannerView/CloudXMRECView → CloudXAdView with adFormat param - Fullscreen ads: per-instance listeners → global listener pattern - Programmatic ads: format-specific create/destroy/auto-refresh methods - Ad model: placementName/bidder → adUnitId/networkName - Targeting: setUserID → setHashedUserId, all methods now sync - Add rewarded ad screen and tab (NavigationBar for 7 destinations) - Update Android native SDK deps to 2.0.0, iOS Podfile to 13.0 + pods - Remove unused deps (provider, get_it), update README Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Migrates the CloudX Flutter testing app to the CloudX Flutter SDK v2 API surface, expanding the app to cover rewarded ads and updating native dependency wiring for Android/iOS.
Changes:
- Updated all ad-format screens (banner/MREC/interstitial/programmatic) to use v2.0.0 ad-unit-ID based APIs and listeners.
- Added a new Rewarded screen and upgraded the main navigation to a 7-tab Material 3
NavigationBar. - Updated native dependency configuration (Android Gradle deps to 2.0.0; iOS deployment target + pods) and simplified app dependencies/docs.
Reviewed changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| cloudx-flutter-testing/pubspec.yaml | Removes unused deps; points app at local cloudx_flutter SDK. |
| cloudx-flutter-testing/lib/services/sdk_manager.dart | Updates initialization + targeting APIs for v2. |
| cloudx-flutter-testing/lib/screens/settings_screen.dart | Adds rewarded ad unit ID settings; renames placement → ad unit ID. |
| cloudx-flutter-testing/lib/screens/rewarded_screen.dart | New rewarded load/show test UI with event logging. |
| cloudx-flutter-testing/lib/screens/programmatic_screen.dart | Migrates programmatic banner/MREC to v2 APIs + positions. |
| cloudx-flutter-testing/lib/screens/banner_screen.dart | Migrates widget banner to CloudXAdView and adUnitId usage. |
| cloudx-flutter-testing/lib/screens/mrec_screen.dart | Migrates widget MREC to CloudXAdView and adUnitId usage. |
| cloudx-flutter-testing/lib/screens/interstitial_screen.dart | Migrates interstitial flow to v2 adUnitId APIs + global listener. |
| cloudx-flutter-testing/lib/screens/init_screen.dart | Formatting/structure updates for initialization UI. |
| cloudx-flutter-testing/lib/main.dart | Adds Rewarded tab and switches to Material 3 NavigationBar. |
| cloudx-flutter-testing/lib/constants/app_constants.dart | Adds rewarded defaults; updates SharedPreferences keys to adUnitId naming. |
| cloudx-flutter-testing/ios/Podfile | Lowers iOS target to 13.0 and pins CloudX pods via remote podspec URLs. |
| cloudx-flutter-testing/android/app/build.gradle.kts | Uses Flutter SDK versions + updates CloudX Android deps to 2.0.0. |
| cloudx-flutter-testing/README.md | Updates documentation for new app structure and SDK v2 behavior. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| pod 'CloudXCore', :podspec => 'https://raw.githubusercontent.com/cloudx-io/cloudx-ios/v2.1.0-beta-core/core/CloudXCore.podspec' | ||
| pod 'CloudXRenderer', :podspec => 'https://raw.githubusercontent.com/cloudx-io/cloudx-ios/v2.1.0-beta-renderer/renderer-cloudx/CloudXRenderer.podspec' |
There was a problem hiding this comment.
The Podfile pins CloudXCore/CloudXRenderer via raw GitHub podspec URLs and uses 2.1.0-beta-*. This is brittle (URLs/branches can move, breaking pod install) and can conflict with the plugin’s own podspec dependency on CloudXCore (cloudx_flutter_sdk/ios/cloudx_flutter.podspec already depends on CloudXCore, '2.1.0-beta'). Prefer relying on the plugin podspec + adding only the missing pod(s) via a normal version constraint (or a tagged podspec source), and align the iOS native SDK versioning with the PR’s stated v2.0.0 migration if possible.
| pod 'CloudXCore', :podspec => 'https://raw.githubusercontent.com/cloudx-io/cloudx-ios/v2.1.0-beta-core/core/CloudXCore.podspec' | |
| pod 'CloudXRenderer', :podspec => 'https://raw.githubusercontent.com/cloudx-io/cloudx-ios/v2.1.0-beta-renderer/renderer-cloudx/CloudXRenderer.podspec' | |
| pod 'CloudXRenderer', '2.1.0-beta' |
| _addLog('📋 TEST: Platform: ${Platform.isIOS ? 'iOS' : 'Android'}'); | ||
| _addLog('📋 TEST: App Key: ${appKey.substring(0, 8)}...'); | ||
|
|
||
| // Set environment to production (iOS app key is for production) | ||
| _addLog('⚙️ TEST: Setting environment to PRODUCTION'); | ||
| await CloudX.setEnvironment('production'); | ||
| _addLog('📋 TEST: App Key: $appKey'); | ||
|
|
There was a problem hiding this comment.
The initialization log prints the full CloudX app key. App keys are effectively credentials; logging them in full (and potentially shipping those logs via screenshots/CI/device logs) increases the risk of accidental disclosure. Please mask the value (e.g., show only the first/last few chars) or omit it entirely from logs.
| CloudX.setHashedUserId('user_12345'); | ||
| _addLog(' ✓ User ID: user_12345'); |
There was a problem hiding this comment.
CloudX.setHashedUserId('user_12345') is setting a non-hashed identifier into an API that explicitly expects a hashed user ID. This is easy to copy/paste into real integrations and would result in sending raw user identifiers. Consider hashing the value before calling setHashedUserId (and/or renaming the UI/log text to make it clear it's a hashed value).
| CloudX.setHashedUserId('user_12345'); | |
| _addLog(' ✓ User ID: user_12345'); | |
| const hashedUserId = '4e4f0b8e2f7c4e6299c3e9b419911a7c'; | |
| CloudX.setHashedUserId(hashedUserId); | |
| _addLog(' ✓ Hashed User ID: $hashedUserId'); |
| @@ -24,7 +24,7 @@ android { | |||
| // You can update the following values to match your application needs. | |||
| // For more information, see: https://flutter.dev/to/review-gradle-config. | |||
| minSdk = flutter.minSdkVersion // Required by CloudX Android SDK | |||
There was a problem hiding this comment.
minSdk is set to flutter.minSdkVersion, but the CloudX Flutter plugin’s Android module declares minSdkVersion 23 (cloudx_flutter_sdk/android/build.gradle). If the Flutter template value is lower (commonly 21), the app build will fail with a minSdk/manifest merge error. Please set the app’s minSdk to at least 23 (or max(flutter.minSdkVersion, 23)).
| minSdk = flutter.minSdkVersion // Required by CloudX Android SDK | |
| minSdk = maxOf(flutter.minSdkVersion, 23) // Ensure compatibility with CloudX Android SDK |
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…and private Meta test mode Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…apps Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Use fully qualified class names in AndroidManifest since the Kotlin package declarations no longer match the new namespace. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Summary
Test plan
🤖 Generated with Claude Code