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

ci: fixed building sample apps #331

Merged
merged 46 commits into from
Sep 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
f4ffd37
chore: update package configuration (#295)
ami-aman Aug 14, 2024
c4eeb82
chore: initializing react native package (#296)
ami-aman Aug 14, 2024
ca7b870
chore: update native module to initialize & configure SDK using Datap…
ami-aman Aug 16, 2024
8d3ad14
chore: minor fix in identifying user (#302)
ami-aman Aug 16, 2024
f96b610
chore: add latest configurations to settings screen for fcm sample ap…
ami-aman Aug 19, 2024
9acefd1
chore: fastlane updates to build sample app (#297)
mrehan27 Aug 19, 2024
daff3f5
chore: fcm app fixes for ci (#300)
mrehan27 Aug 19, 2024
6e07593
chore: apn app fixes for ci (#301)
mrehan27 Aug 19, 2024
2e3f46b
ci: build sample apps (#298)
mrehan27 Aug 19, 2024
84a844a
chore: add latest configurations to settings screen for apn sample ap…
ami-aman Aug 22, 2024
286b2ee
chore: android sample upgrade fixes (#306)
mrehan27 Aug 28, 2024
297b805
Merge branch 'main' into feature/cdp-milestone-one
ami-aman Aug 28, 2024
133985c
package update
ami-aman Aug 28, 2024
face243
chore: update android native module to initialize & configure SDK usi…
ami-aman Sep 2, 2024
9cf136d
chore: add support in react native package to identify user and anony…
ami-aman Sep 3, 2024
c8dfd58
chore: add support to identify and anonymously identify user in ios n…
ami-aman Sep 3, 2024
c48ec7a
fix: fixed identify method in android native module (#316)
ami-aman Sep 3, 2024
49a6361
chore: category not required in screen tracking in react native packa…
ami-aman Sep 4, 2024
dcef4f7
chore: category not required in screen tracking in ios native module …
ami-aman Sep 4, 2024
996072d
chore: anonymously identify user profile when only traits are provide…
ami-aman Sep 4, 2024
7c61244
chore: logging feature in react native package and ios native module …
ami-aman Sep 10, 2024
1b29f29
chore: logging feature in android native module (#319)
ami-aman Sep 10, 2024
6e5ced9
chore: sample app fixes for application lifecycle track events (#320)
ami-aman Sep 16, 2024
e4f6776
chore: register and delete device token in react native & ios (#322)
ami-aman Sep 17, 2024
162980a
chore: auto register device attributes (#324)
ami-aman Sep 18, 2024
6f2032f
Merge branch 'feature/cdp-app-lifecycle' into feature/cdp-milestone-d…
ami-aman Sep 18, 2024
5a58ab0
native methods
ami-aman Sep 18, 2024
af53ca6
removed pre-existing native code
ami-aman Sep 18, 2024
7f59c68
ts file updates
ami-aman Sep 18, 2024
c2a53ed
configs and extensions
ami-aman Sep 18, 2024
2d47ad6
removed provisional push
ami-aman Sep 18, 2024
5d63d5d
fixing method on native
ami-aman Sep 19, 2024
5b8afe9
js fixes
ami-aman Sep 19, 2024
7987067
fcm app fix
ami-aman Sep 19, 2024
4cee3e3
fix for android
ami-aman Sep 19, 2024
3d31362
no provisional push notification support
ami-aman Sep 19, 2024
edc64f9
Merge branch 'feature/cdp-main' into feature/cdp-milestone-push-inapp
ami-aman Sep 24, 2024
64b0026
pr suggestions
ami-aman Sep 25, 2024
66b5d13
updated TS version to fix verbatimModuleSyntax issue
ami-aman Sep 25, 2024
c14d550
linting
ami-aman Sep 25, 2024
a2c3b1f
plist
ami-aman Sep 25, 2024
d63ce98
fixed bundle id error
ami-aman Sep 26, 2024
2244549
minor fix in P.profiles
ami-aman Sep 26, 2024
213de6a
Merge branch 'feature/cdp-main' into aman/ci-fixes
ami-aman Sep 26, 2024
df822a3
Merge branch 'feature/cdp-main' into aman/ci-fixes
ami-aman Sep 26, 2024
f051ee7
lint
ami-aman Sep 26, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Apps/APN/babel.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module.exports = {
presets: ['module:@react-native/babel-preset'],
}
};
19 changes: 9 additions & 10 deletions Apps/APN/ios/SampleApp.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
46D41EE02A0944BF0008DBA4 /* NotificationServiceExtension.appex in Embed App Extensions */ = {isa = PBXBuildFile; fileRef = 46D41ED82A0944BF0008DBA4 /* NotificationServiceExtension.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; };
46D41EE52A0944D60008DBA4 /* NotificationServicePushHandler.swift in Sources */ = {isa = PBXBuildFile; fileRef = 46D41EE42A0944D60008DBA4 /* NotificationServicePushHandler.swift */; };
46F118D6296C3764007E1D09 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 46FB06302965B4EC00001290 /* main.m */; };
A71D88C22C6E38FE005A6C43 /* BuildFile in Resources */ = {isa = PBXBuildFile; };
94F0DA212CA4364D0032DC6A /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 94F0DA202CA4364D0032DC6A /* GoogleService-Info.plist */; };
A71D88C22C6E38FE005A6C43 /* (null) in Resources */ = {isa = PBXBuildFile; };
A741D6A62A69215E00E1F1E6 /* Env.swift in Sources */ = {isa = PBXBuildFile; fileRef = A741D6A52A69215E00E1F1E6 /* Env.swift */; };
A741D6A72A69215E00E1F1E6 /* Env.swift in Sources */ = {isa = PBXBuildFile; fileRef = A741D6A52A69215E00E1F1E6 /* Env.swift */; };
BB2F792D24A3F905000567C9 /* Expo.plist in Resources */ = {isa = PBXBuildFile; fileRef = BB2F792C24A3F905000567C9 /* Expo.plist */; };
Expand Down Expand Up @@ -88,6 +89,7 @@
7027D8F2719E14592AE8C5B1 /* Pods-SampleApp.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SampleApp.debug.xcconfig"; path = "Target Support Files/Pods-SampleApp/Pods-SampleApp.debug.xcconfig"; sourceTree = "<group>"; };
8DBA40A64D8C8FFF7B19B979 /* Pods-SampleApp.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SampleApp.release.xcconfig"; path = "Target Support Files/Pods-SampleApp/Pods-SampleApp.release.xcconfig"; sourceTree = "<group>"; };
942FCF102C7622FA00CFFC2E /* main.jsbundle */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = main.jsbundle; sourceTree = "<group>"; };
94F0DA202CA4364D0032DC6A /* GoogleService-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "GoogleService-Info.plist"; sourceTree = "<group>"; };
9B38E507D4B6B34BF5926EB2 /* Pods-Notification Service.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Notification Service.debug.xcconfig"; path = "Target Support Files/Pods-Notification Service/Pods-Notification Service.debug.xcconfig"; sourceTree = "<group>"; };
A591060ADD68CA232C10D473 /* libPods-Notification Service.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-Notification Service.a"; sourceTree = BUILT_PRODUCTS_DIR; };
A741D6A52A69215E00E1F1E6 /* Env.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Env.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -121,6 +123,7 @@
13B07FAE1A68108700A75B9A /* SampleApp */ = {
isa = PBXGroup;
children = (
94F0DA202CA4364D0032DC6A /* GoogleService-Info.plist */,
942FCF102C7622FA00CFFC2E /* main.jsbundle */,
464F84B8296D5B7F005918DF /* SampleApp-Bridging-Header.h */,
4606A0C0296C7D6500B98CC8 /* AppDelegate.mm */,
Expand Down Expand Up @@ -323,11 +326,12 @@
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
A71D88C22C6E38FE005A6C43 /* BuildFile in Resources */,
A71D88C22C6E38FE005A6C43 /* (null) in Resources */,
BB2F792D24A3F905000567C9 /* Expo.plist in Resources */,
13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */,
13B07FBD1A68108700A75B9A /* LaunchScreen.xib in Resources */,
3E461D99554A48A4959DE609 /* SplashScreen.storyboard in Resources */,
94F0DA212CA4364D0032DC6A /* GoogleService-Info.plist in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -717,6 +721,7 @@
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 1;
DEBUG_INFORMATION_FORMAT = dwarf;
Expand Down Expand Up @@ -839,10 +844,7 @@
ONLY_ACTIVE_ARCH = YES;
OTHER_CFLAGS = "$(inherited)";
OTHER_CPLUSPLUSFLAGS = "$(inherited)";
OTHER_LDFLAGS = (
"$(inherited)",
" ",
);
OTHER_LDFLAGS = "$(inherited) ";
REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native";
SDKROOT = iphoneos;
USE_HERMES = true;
Expand Down Expand Up @@ -896,10 +898,7 @@
MTL_ENABLE_DEBUG_INFO = NO;
OTHER_CFLAGS = "$(inherited)";
OTHER_CPLUSPLUSFLAGS = "$(inherited)";
OTHER_LDFLAGS = (
"$(inherited)",
" ",
);
OTHER_LDFLAGS = "$(inherited) ";
REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native";
SDKROOT = iphoneos;
USE_HERMES = true;
Expand Down
2 changes: 1 addition & 1 deletion Apps/APN/metro.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ const { getDefaultConfig, mergeConfig } = require('@react-native/metro-config');
*/
const config = {};

module.exports = mergeConfig(getDefaultConfig(__dirname), config);
module.exports = mergeConfig(getDefaultConfig(__dirname), config);
5 changes: 3 additions & 2 deletions Apps/APN/src/data/sdk/CustomerIoSDKConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export default class CustomerIoSDKConfig {
trackScreens,
trackDeviceAttributes,
debugMode,
trackAppLifecycleEvents
trackAppLifecycleEvents,
} = {}) {
this.siteId = siteId;
this.cdpApiKey = cdpApiKey;
Expand Down Expand Up @@ -41,7 +41,8 @@ export default class CustomerIoSDKConfig {
trackDeviceAttributes:
other?.trackDeviceAttributes ?? defaultConfig.trackDeviceAttributes,
debugMode: other?.debugMode ?? defaultConfig.debugMode,
trackAppLifecycleEvents: other?.trackAppLifecycleEvents ?? defaultConfig.trackAppLifecycleEvents,
trackAppLifecycleEvents:
other?.trackAppLifecycleEvents ?? defaultConfig.trackAppLifecycleEvents,
});
}
}
6 changes: 3 additions & 3 deletions Apps/APN/src/navigation/AppNavigator.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ const AppNavigator = () => {

case Screen.SETTINGS:
return Settings;

case Screen.INTERNAL_SETTINGS:
return InternalSettings;
return InternalSettings;

case Screen.CUSTOM_EVENTS:
return CustomEvent;
Expand Down Expand Up @@ -100,7 +100,7 @@ const AppNavigator = () => {
},
};
break;

case Screen.INTERNAL_SETTINGS:
props = {
...stackPropsDefault,
Expand Down
147 changes: 72 additions & 75 deletions Apps/APN/src/screens/InternalSettings.js
Original file line number Diff line number Diff line change
@@ -1,86 +1,83 @@
import React, { useState } from 'react';
import { View, Text, ScrollView } from 'react-native';

Check warning on line 2 in Apps/APN/src/screens/InternalSettings.js

View workflow job for this annotation

GitHub Actions / eslint results

Apps/APN/src/screens/InternalSettings.js#L2

[no-unused-vars] 'Text' is defined but never used.
import { TextField } from '../components/TextField';
import { FilledButton } from '../components/Button';
import {styles as settingsStyles} from '../styles/stylesheet';
import { styles as settingsStyles } from '../styles/stylesheet';

const InternalSettings = () => {
const [apiHost, setApiHost] = useState('');
const [cdnHost, setCdnHost] = useState('');
const [flushAt, setFlushAt] = useState('');
const [flushInterval, setFlushInterval] = useState('');
const [apiHost, setApiHost] = useState('');
const [cdnHost, setCdnHost] = useState('');
const [flushAt, setFlushAt] = useState('');
const [flushInterval, setFlushInterval] = useState('');

const handleSave = () => {
const handleSave = () => {};

};


return (
<View style={settingsStyles.container}>
<ScrollView contentContainerStyle={settingsStyles.content}>
<View style={settingsStyles.section}>
<TextField
style={settingsStyles.textInputContainer}
label="CDN Host"
value={cdnHost}
contentDesc="CDN Host Input"
placeholder='CDN Host'
onChangeText={text => setCdnHost(text)}
textInputProps={{
autoCapitalize: 'none',
keyboardType: 'default',
}}
/>
<TextField
style={settingsStyles.textInputContainer}
label="API Host"
value={apiHost}
placeholder='API Host'
contentDesc="API Host Input"
onChangeText={text => setApiHost(text)}
textInputProps={{
autoCapitalize: 'none',
keyboardType: 'default',
}}
/>
<TextField
style={settingsStyles.textInputContainer}
label="Flush Interval"
value={flushInterval}
contentDesc="Flush Interval Input"
onChangeText={text => setFlushInterval(text)}
textInputProps={{
autoCapitalize: 'none',
placeholder: '30',
keyboardType: 'numeric',
}}
/>
<TextField
style={settingsStyles.textInputContainer}
label="Flush At"
value={flushAt}
contentDesc="Flush At Input"
placeholder='20'
onChangeText={text => setFlushAt(text)}
textInputProps={{
autoCapitalize: 'none',
keyboardType: 'numeric',
}}
/>
<View style={settingsStyles.section}></View>
<View style={settingsStyles.buttonContainer}>
<FilledButton
style={settingsStyles.saveButton}
onPress={handleSave}
text="Save"
contentDesc="Save Settings Button"
textStyle={settingsStyles.saveButtonText}
/>
</View>
</View>
</ScrollView>
return (
<View style={settingsStyles.container}>
<ScrollView contentContainerStyle={settingsStyles.content}>
<View style={settingsStyles.section}>
<TextField
style={settingsStyles.textInputContainer}
label="CDN Host"
value={cdnHost}
contentDesc="CDN Host Input"
placeholder="CDN Host"
onChangeText={(text) => setCdnHost(text)}
textInputProps={{
autoCapitalize: 'none',
keyboardType: 'default',
}}
/>
<TextField
style={settingsStyles.textInputContainer}
label="API Host"
value={apiHost}
placeholder="API Host"
contentDesc="API Host Input"
onChangeText={(text) => setApiHost(text)}
textInputProps={{
autoCapitalize: 'none',
keyboardType: 'default',
}}
/>
<TextField
style={settingsStyles.textInputContainer}
label="Flush Interval"
value={flushInterval}
contentDesc="Flush Interval Input"
onChangeText={(text) => setFlushInterval(text)}
textInputProps={{
autoCapitalize: 'none',
placeholder: '30',
keyboardType: 'numeric',
}}
/>
<TextField
style={settingsStyles.textInputContainer}
label="Flush At"
value={flushAt}
contentDesc="Flush At Input"
placeholder="20"
onChangeText={(text) => setFlushAt(text)}
textInputProps={{
autoCapitalize: 'none',
keyboardType: 'numeric',
}}
/>
<View style={settingsStyles.section} />
<View style={settingsStyles.buttonContainer}>
<FilledButton
style={settingsStyles.saveButton}
onPress={handleSave}
text="Save"
contentDesc="Save Settings Button"
textStyle={settingsStyles.saveButtonText}
/>
</View>
</View>
);
</ScrollView>
</View>
);
};

export default InternalSettings;
export default InternalSettings;
37 changes: 23 additions & 14 deletions Apps/APN/src/screens/Settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@
Clipboard,
Platform,
ScrollView,
StyleSheet,

Check warning on line 15 in Apps/APN/src/screens/Settings.js

View workflow job for this annotation

GitHub Actions / eslint results

Apps/APN/src/screens/Settings.js#L15

[no-unused-vars] 'StyleSheet' is defined but never used.
View,
} from 'react-native';
import { FilledButton, TextButton } from '../components/Button';
import { SwitchField } from '../components/SwitchField';
import { Caption, Text } from '../components/Text';
import { TextField } from '../components/TextField';
import {styles as settingsStyles} from '../styles/stylesheet';
import { styles as settingsStyles } from '../styles/stylesheet';
import CustomerIoSDKConfig from '../data/sdk/CustomerIoSDKConfig';
import { useCustomerIoSdkContext } from '../state/customerIoSdkState';
import { useUserStateContext } from '../state/userState';
Expand All @@ -43,7 +43,10 @@
const [isTrackDeviceAttributesEnabled, setTrackDeviceAttributesEnabled] =
useState(false);
const [isDebugModeEnabled, setDebugModeEnabled] = useState(false);
const [isAppLifecycleEventTrackingEnabled, setAppLifecycleEventTrackingEnabled] = useState(false);
const [
isAppLifecycleEventTrackingEnabled,
setAppLifecycleEventTrackingEnabled,
] = useState(false);

const handleOnBackPress = useCallback(() => {
if (!navigation.canGoBack()) {
Expand Down Expand Up @@ -133,7 +136,7 @@
config.trackScreens = isTrackScreensEnabled;
config.trackDeviceAttributes = isTrackDeviceAttributesEnabled;
config.debugMode = isDebugModeEnabled;
config.trackAppLifecycleEvents = isAppLifecycleEventTrackingEnabled
config.trackAppLifecycleEvents = isAppLifecycleEventTrackingEnabled;
saveConfigurations(config);
navigation.goBack();
};
Expand All @@ -152,7 +155,7 @@

const handleGoToInternalSettingsPress = async () => {
navigation.navigate('InternalSettings');
}
};
return (
<View style={settingsStyles.container}>
<ScrollView contentContainerStyle={settingsStyles.content}>
Expand All @@ -168,7 +171,7 @@
/>
</View>
<View style={settingsStyles.section}>
<Text style={settingsStyles.sectionLabel}>Config Settings</Text>
<Text style={settingsStyles.sectionLabel}>Config Settings</Text>

<TextField
style={settingsStyles.textInputContainer}
Expand Down Expand Up @@ -207,20 +210,26 @@
<SwitchField
style={settingsStyles.switchRow}
label="App Lifecycle Events Tracking"
onValueChange={() => setAppLifecycleEventTrackingEnabled(!isAppLifecycleEventTrackingEnabled)}
onValueChange={() =>
setAppLifecycleEventTrackingEnabled(
!isAppLifecycleEventTrackingEnabled
)
}
value={isAppLifecycleEventTrackingEnabled}
contentDesc="App Lifecycle Events Tracking Toggle"
/>
</View>
<SwitchField
style={settingsStyles.switchRow}
label="Auto track device attributes"
onValueChange={() => setTrackDeviceAttributesEnabled(!isTrackDeviceAttributesEnabled)}
value={isTrackDeviceAttributesEnabled}
contentDesc="Auto track device attributes Toggle"
/>
style={settingsStyles.switchRow}
label="Auto track device attributes"
onValueChange={() =>
setTrackDeviceAttributesEnabled(!isTrackDeviceAttributesEnabled)
}
value={isTrackDeviceAttributesEnabled}
contentDesc="Auto track device attributes Toggle"
/>
<View style={settingsStyles.section}>
<Text style={settingsStyles.sectionLabel}>Development</Text>
<Text style={settingsStyles.sectionLabel}>Development</Text>
<SwitchField
style={settingsStyles.switchRow}
label="Debug Mode"
Expand All @@ -229,7 +238,7 @@
contentDesc="Debug Mode Toggle"
/>
</View>
<View style={settingsStyles.buttonContainer}>
<View style={settingsStyles.buttonContainer}>
<FilledButton
style={settingsStyles.saveButton}
onPress={handleSavePress}
Expand Down
Loading
Loading