| 580 | * environment. |
| 581 | */ |
| 582 | export function shouldEnableNativeNagger(userOptions: unknown): boolean { |
| 583 | if (typeof userOptions === 'boolean') { |
| 584 | // User can override the default behavior |
| 585 | return userOptions; |
| 586 | } |
| 587 | |
| 588 | if (Platform.OS === 'web' || Platform.OS === 'windows') { |
| 589 | // We don't want to nag on known platforms that don't support native |
| 590 | return false; |
| 591 | } |
| 592 | |
| 593 | if (isExpoGo()) { |
| 594 | // If the app is running in Expo Go, we don't want to nag |
| 595 | return false; |
| 596 | } |
| 597 | |
| 598 | return true; |
| 599 | } |