Skip to content

Update testing app for SDK v2.0.0#24

Merged
steffanc merged 5 commits intomainfrom
update-testing-app-sdk-v2
Feb 25, 2026
Merged

Update testing app for SDK v2.0.0#24
steffanc merged 5 commits intomainfrom
update-testing-app-sdk-v2

Conversation

@steffanc
Copy link
Contributor

Summary

  • Migrate all testing app screens to the CloudX Flutter SDK v2.0.0 API (widget ads, fullscreen ads, programmatic ads, targeting)
  • Add rewarded ad screen and 7-tab NavigationBar layout
  • Update Android native SDK deps to 2.0.0, iOS Podfile deployment target and pods
  • Remove unused dependencies, update README

Test plan

  • Build and run on Android — verify SDK initializes
  • Build and run on iOS — verify SDK initializes
  • Test banner and MREC widget-based ads load and auto-refresh toggles work
  • Test interstitial load → isReady → show flow
  • Test rewarded ad load → show → reward callback
  • Test programmatic banner/MREC with different positions
  • Verify settings screen saves and loads all ad unit IDs including rewarded

🤖 Generated with Claude Code

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>
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment on lines +36 to +37
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'
Copy link

Copilot AI Feb 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
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'

Copilot uses AI. Check for mistakes.
Comment on lines 48 to 50
_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');

Copy link

Copilot AI Feb 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
Comment on lines +109 to 110
CloudX.setHashedUserId('user_12345');
_addLog(' ✓ User ID: user_12345');
Copy link

Copilot AI Feb 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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).

Suggested change
CloudX.setHashedUserId('user_12345');
_addLog(' ✓ User ID: user_12345');
const hashedUserId = '4e4f0b8e2f7c4e6299c3e9b419911a7c';
CloudX.setHashedUserId(hashedUserId);
_addLog(' ✓ Hashed User ID: $hashedUserId');

Copilot uses AI. Check for mistakes.
@@ -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
Copy link

Copilot AI Feb 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)).

Suggested change
minSdk = flutter.minSdkVersion // Required by CloudX Android SDK
minSdk = maxOf(flutter.minSdkVersion, 23) // Ensure compatibility with CloudX Android SDK

Copilot uses AI. Check for mistakes.
steffanc and others added 4 commits February 25, 2026 14:09
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>
@steffanc steffanc merged commit 5d37d3a into main Feb 25, 2026
2 checks passed
@steffanc steffanc deleted the update-testing-app-sdk-v2 branch February 25, 2026 22:43
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