Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: CustomerIO wrapper rewrite #279

Draft
wants to merge 2 commits into
base: feature/cdp/native-logging
Choose a base branch
from

Conversation

Ahmed-Ali
Copy link

@Ahmed-Ali Ahmed-Ali commented Jun 23, 2024

This PR introduces the core CustomerIO wrapper rewrite. These changes includes:

  • The config parsing logic, which is mostly delegated to Swift's decodable type and RN object to json serialization. As long as the native struct matches the JS object, no more manual (de)serializing is needed.
  • Setting up the native logger bridge
  • Initializing CDP and in-app, if it is enabled.
  • The typescript/native CDP APIs
  • Typescript still points to native in-app and push in the same way it used to before

Context

We are rebuilding our React Native (RN) SDK to support Customer.io's Data Pipelines.

Public Changes

  • SDK Changes
    • Modernized our RN package to use the latest configurations and dependencies available in RN version 0.74.2.
    • Simplified our configuration to provide the minimum number of settings that make sense for our customers.
    • Added support to view native debug logs directly in the console alongside other console.* logs.
  • Example Apps
    • Created customer-oriented example apps where you can build, run, debug, and see the SDK usage in the App.tsx file.

Internal Changes

  • SDK Dev Environment Setup
    • Removed the pre-push hook that runs lint, as it can be challenging when lint fails before a push in a PR stack setup. Linting has been moved to the pre-commit hook.
    • Implemented yarn workspace for easier management of example apps.
    • Configured example apps to point to local paths for all native CIO pods, facilitating easier debugging and validation of native changes.
    • Made the native iOS repo a git submodule of this repo, simplifying the process of starting and validating relevant native changes within the RN repo.
    • Unified the example app codebase for both APN and FCM configurations, making it easier to maintain.
    • Included yarn release to ensure a consistent development experience.
    • Added yarn.lock to .gitignore.

QA Setup

  • Dev endpoints for QA can still be set in the example apps with a long-press on the settings button. This allows us to perform QA configurations without affecting customer-oriented examples.

PR Stack:

@Ahmed-Ali Ahmed-Ali force-pushed the feature/cdp/cio-wrapper branch from 7fe98a0 to b78b398 Compare June 24, 2024 09:32
@Ahmed-Ali Ahmed-Ali force-pushed the feature/cdp/native-logging branch from e7499d6 to 5410957 Compare June 24, 2024 09:32
@Ahmed-Ali Ahmed-Ali changed the title Feature/cdp/cio wrapper chore: CustomerIO wrapper rewrite Jun 24, 2024
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