Skip to content

Conversation

@AktasBedirInsider
Copy link

Before contributing, make sure you have:

  • Resolved all conflicts, if any
  • Rebased your branch PR on top of the latest upstream develop branch
  • Completed Jira Release Notes, Test Case Description & Impact Analysis, Root Cause
  • 🔴 Make sure to delete all of these conditions if you checked them all

🔴 [Mandatory] Description
This PR updates the CordovaDemo application to match feature parity with ReactNativeDemo by upgrading to insider-cordova-plugin 3.0.2 and implementing all available SDK methods. The update includes 13 new methods across user management, events, products, smart recommendations, content optimizer, and in-app messaging features.

🔴 [Mandatory] What's the change?

Package Updates

  • cordova-plugin-insider: ^1.4.0^3.0.2
  • cordova-android: ^10.1.2^14.0.1
  • cordova-ios: ^6.2.0^8.0.0

UI Enhancements

File: www/index.html

Added Buttons (10 total)

User Identifiers

  • Logout Resetting Insider ID
  • Sign Up

Smart Recommender

  • Smart Recommendation with Product IDs
  • Click Smart Recommendation Product

Mobile App Access

  • New section with toggle buttons:
    • True
    • False

Content Optimizer

  • Get Variable Without Cache

In-App Messages

  • Remove In-App

SDK Integration

File: www/js/index.js

New Methods Implemented (13 total)

  1. logoutResettingInsiderID()
    Reset Insider ID on logout

  2. signUpConfirmation()
    Track user registration

  3. setMobileAppAccess()
    Control mobile app access

  4. removeInapp()
    Remove in-app messages

  5. getSmartRecommendationWithProductIDs()
    Fetch smart recommendations using product IDs

  6. clickSmartRecommendationProduct()
    Track smart recommendation product clicks

  7. getContentOptimizerIntWithoutCache()

  8. getContentOptimizerStringWithoutCache()

  9. getContentOptimizerBoolWithoutCache()
    Content Optimizer variable access without cache

  10. addParameterWithStringArray()

  11. addParameterWithNumericArray()
    Event parameters with array support

  12. setCustomAttributeWithStringArray()

  13. setCustomAttributeWithNumericArray()
    Product custom attributes with array support


Refactoring & Improvements

  • Smart Recommendation

    • getSmartRecommendation refactored into smartRecommendation object
    • Object now exposes 3 dedicated methods
  • triggerEvents()

    • Extended with array parameter examples
  • createNewProduct()

    • Extended to support array-based custom attributes

🔴 [Mandatory] Impact Area
Scope: CordovaDemo application only
Platforms: iOS and Android
Dependencies: Cordova plugin ecosystem (android, ios, insider-cordova-plugin)
User Impact: Demo app now showcases all available SDK features from insider-cordova-plugin 3.0.2

- Updated plugins/cordova-plugin-insider from NPM (3.0.2)
- Rebuilt www/ folder with babel to reflect SDK_VERSION: 'CDV-3.0.2'
- Previous version was showing 'CDV-1.4.0' in www/Constants.js
- Downgrade cordova-ios from 8.0.0 to 6.2.0 to maintain notification extensions
- Build Android and iOS platforms with updated plugin version
- Update plugin files in platform directories
- Add notification extension targets to Podfile with proper dependencies
- Update pod versions to 14.0.4 (InsiderMobile), 1.2.3 (InsiderGeofence), 1.7.5 (InsiderHybrid)
- Add NSUserTrackingUsageDescription to Info.plist to fix iOS 14+ crash
- Remove Pods/ and Podfile.lock from repository (auto-generated files)
- Add Pods/ and Podfile.lock to .gitignore
- Restore notification extension targets in Xcode project
- Remove local git clone version
- Install clean NPM package (v3.0.2)
- Removes development files (.github/, devops/, example/)
- Ensures partners get same clean structure as published package
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants