Skip to content

Documentation needs update for Swift AppDelegate (React Native 0.77+) #422

@Ritikepicvision

Description

@Ritikepicvision

The current documentation for react-native-health only provides setup instructions for Objective-C AppDelegate files. However, React Native 0.77+ defaults to Swift AppDelegate files, making the current setup instructions incompatible with newer React Native projects.

Current Documentation Issue
The current iOS setup documentation shows:
objc

#import "AppDelegate.h"

/* Add the library import at the top of AppDelegate.m */
#import "RCTAppleHealthKit.h"

@implementation AppDelegate

- (BOOL)application:(UIApplication *)application
    didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
    
  /* Add Background initializer for HealthKit  */
  [[RCTAppleHealthKit new] initializeBackgroundObservers:bridge];
  
  return YES;
}

Expected Solution

The documentation should include Swift AppDelegate setup instructions for React Native 0.77+ projects, which use AppDelegate.swift by default.

Suggested Fix

Add a new section to the iOS setup documentation for Swift AppDelegate
Include both standard RCTAppDelegate and custom AppDelegate scenarios
Update the README with clear instructions for React Native 0.77+ projects

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions