Skip to content

Commit

Permalink
build: fix sample apps
Browse files Browse the repository at this point in the history
  • Loading branch information
mrehan27 committed Sep 30, 2024
1 parent 55d6145 commit 6610457
Show file tree
Hide file tree
Showing 4 changed files with 489 additions and 2,030 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/build-sample-apps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -127,16 +127,16 @@ jobs:
exit 1
fi
# Update the apiKey in the environment file
# Update keys in the environment file
sd "siteId: '.*'" "siteId: '${{ secrets[format('CUSTOMERIO_{0}_WORKSPACE_SITE_ID', matrix.sample-app)] }}'" "$ENV_FILE"
sd "apiKey: '.*'" "apiKey: '${{ secrets[format('CUSTOMERIO_{0}_WORKSPACE_API_KEY', matrix.sample-app)] }}'" "$ENV_FILE"
sd "cdpApiKey: '.*'" "cdpApiKey: '${{ secrets[format('CUSTOMERIO_{0}_WORKSPACE_CDP_API_KEY', matrix.sample-app)] }}'" "$ENV_FILE"
- name: Setup workspace credentials in iOS environment files
working-directory: Apps/${{ matrix.sample-app }}/ios
run: |
cp "Env.swift.example" "Env.swift"
sd 'siteId: String = ".*"' "siteId: String = \"${{ secrets[format('CUSTOMERIO_{0}_WORKSPACE_SITE_ID', matrix.sample-app)] }}\"" "Env.swift"
sd 'apiKey: String = ".*"' "apiKey: String = \"${{ secrets[format('CUSTOMERIO_{0}_WORKSPACE_API_KEY', matrix.sample-app)] }}\"" "Env.swift"
sd 'cdpApiKey: String = ".*"' "cdpApiKey: String = \"${{ secrets[format('CUSTOMERIO_{0}_WORKSPACE_CDP_API_KEY', matrix.sample-app)] }}\"" "Env.swift"
# Make sure to fetch dependencies only after updating version numbers and workspace credentials

Expand Down
6 changes: 3 additions & 3 deletions Apps/APN/src/services/CustomerIOService.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { CustomerIO, CioLogLevel } from 'customerio-reactnative';
import Env from '../../env';

export const initializeCustomerIoSDK = (sdkConfig) => {
const config = {
cdpApiKey: Env.cdpApiKey, // Mandatory
migrationSiteId: Env.siteId, // For migration
cdpApiKey: sdkConfig.cdpApiKey, // Mandatory
migrationSiteId: sdkConfig.siteId, // For migration
trackApplicationLifecycleEvents: sdkConfig.trackAppLifecycleEvents,
autoTrackDeviceAttributes: sdkConfig.autoTrackDeviceAttributes,
inApp: {
Expand Down
5 changes: 2 additions & 3 deletions Apps/FCM/src/services/CustomerIOService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,11 @@ import {
} from 'customerio-reactnative';
import User from '../data/models/user';
import CustomerIoSDKConfig from '../data/sdk/CustomerIoSDKConfig';
import Env from '../../env';

export const initializeCustomerIoSDK = (sdkConfig: CustomerIoSDKConfig) => {
const config = {
cdpApiKey: Env.cdpApiKey, // Mandatory
migrationSiteId: Env.siteId, // For migration
cdpApiKey: sdkConfig.cdpApiKey, // Mandatory
migrationSiteId: sdkConfig.siteId, // For migration
trackApplicationLifecycleEvents: sdkConfig.trackAppLifecycleEvents,
autoTrackDeviceAttributes: sdkConfig.trackDeviceAttributes,
inApp: {
Expand Down
Loading

0 comments on commit 6610457

Please sign in to comment.