Skip to content

Commit

Permalink
clean up tv sample app (#259)
Browse files Browse the repository at this point in the history
* clean up tv sample app

* eslint
  • Loading branch information
namidan authored Sep 27, 2023
1 parent ad44d27 commit b994519
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 8 deletions.
6 changes: 3 additions & 3 deletions examples/TestNamiTV/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ android {
release {
// Caution! In production, you need to generate your own keystore file.
// see https://facebook.github.io/react-native/docs/signed-apk-android.
signingConfig null
signingConfig signingConfigs.release
minifyEnabled enableProguardInReleaseBuilds
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
}
Expand Down Expand Up @@ -227,8 +227,8 @@ dependencies {
implementation "com.facebook.react:react-native:+" // From node_modules
implementation 'com.github.jeziellago:compose-markdown:0.3.0'

amazonImplementation "com.namiml:sdk-amazon::3.1.13"
playImplementation "com.namiml:sdk-android::3.1.13"
amazonImplementation "com.namiml:sdk-amazon:3.1.13"
playImplementation "com.namiml:sdk-android:3.1.13"

if (enableHermes) {
def hermesPath = "../../node_modules/hermes-engine/android/";
Expand Down
2 changes: 1 addition & 1 deletion examples/TestNamiTV/config/getInitialConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export const getInitialConfig = () => {
);
case 'ios':
return JSON.stringify(
flavor !== 'production'
flavor === 'production'
? initAppleProductionConfig
: initAppleStageConfig,
);
Expand Down
13 changes: 11 additions & 2 deletions examples/TestNamiTV/config/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,14 @@ export function getConfigObject() {
namiCommands: ['useStagingAPI'],
initialConfig: getInitialConfig(),
};
case 'production':
return {
'appPlatformID-apple': 'APPLE_PROD_APP_PLATFORM_ID',
'appPlatformID-android': 'UNUSED',
logLevel: 'DEBUG',
namiCommands: ['useStagingAPI'],
initialConfig: getInitialConfig(),
};
case 'stagingAmazon':
return {
'appPlatformID-apple': 'UNUSED',
Expand All @@ -22,7 +30,7 @@ export function getConfigObject() {
namiCommands: ['useStagingAPI'],
initialConfig: getInitialConfig(),
};
case 'stagingGoogle':
case 'stagingPlay':
return {
'appPlatformID-apple': 'UNUSED',
'appPlatformID-android': 'GOOGLE_PROD_APP_PLATFORM_ID',
Expand All @@ -38,7 +46,7 @@ export function getConfigObject() {
namiCommands: ['useStagingAPI'],
initialConfig: getInitialConfig(),
};
case 'productionGoogle':
case 'productionPlay':
return {
'appPlatformID-apple': 'UNUSED',
'appPlatformID-android': 'GOOGLE_PROD_APP_PLATFORM_ID',
Expand All @@ -51,6 +59,7 @@ export function getConfigObject() {
'appPlatformID-apple': 'APPLE_PROD_APP_PLATFORM_ID',
'appPlatformID-android': 'GOOGLE_PROD_APP_PLATFORM_ID',
logLevel: 'DEBUG',
namiCommands: ['useStagingAPI'],
initialConfig: getInitialConfig(),
};
}
Expand Down
2 changes: 1 addition & 1 deletion examples/TestNamiTV/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const Root = () => {
const [isConfigurationComplete, setIsConfigurationComplete] = useState();
useEffect(() => {
Nami.configure(configDict, (resultObject) => {
setIsConfigurationComplete(resultObject.success);
setIsConfigurationComplete(true);
});
// eslint-disable-next-line @typescript-eslint/no-empty-function
return () => {};
Expand Down
2 changes: 1 addition & 1 deletion examples/TestNamiTV/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"react-native-nami-sdk": "file:../../",
"react-native-reanimated": "^2.3.1",
"react-native-safe-area-context": "^3.3.2",
"react-native-screens": "^3.20.0"
"react-native-screens": "3.18.0"
},
"devDependencies": {
"@babel/core": "^7.16.5",
Expand Down

0 comments on commit b994519

Please sign in to comment.