CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/npm-expo-application

A universal module that gets native application information such as its ID, app name, and build version at runtime

Overall
score

98%

Overview
Eval results
Files

task.mdevals/scenario-5/

Push Notification Environment Checker

Build a React Native utility that determines the Apple Push Notification (APN) service environment for an iOS application. This is useful for routing notifications to the correct APN endpoint and debugging push notification configurations.

Capabilities

Environment Detection

  • Returns 'development' when the app is configured for development push notifications @test
  • Returns 'production' when the app is configured for production push notifications @test
  • Returns null when running in iOS simulator (where push notifications are unavailable) @test
  • Throws an error when called on non-iOS platforms (Android, web) @test

Implementation

@generates

API

/**
 * Gets the Apple Push Notification service environment for the iOS app.
 *
 * @returns Promise that resolves to the APN environment ('development' or 'production'),
 *          or null if unavailable (e.g., running in simulator)
 * @throws Error when called on non-iOS platforms
 */
export async function getApnEnvironment(): Promise<string | null>;

Dependencies { .dependencies }

expo-application { .dependency }

Provides access to native application information including push notification service environment.

@satisfied-by

Install with Tessl CLI

npx tessl i tessl/npm-expo-application

tile.json