React Native 0.60: Autolinking, CocoaPods Integration, and Hermes JS engine previews

Modernizing mobile builds. We explore autolinking libraries, CocoaPods integrations, and the Hermes JS engine.

VP
SHIVAM ITCS
·31 July 2019·10 min read·1 views

Technical Overview & Strategic Context

While React Native simplified cross-platform mobile development, managing native dependencies remained a challenge: adding libraries required running link commands and configuring Gradle and Xcode settings manually. The release of React Native 0.60 in mid-2019 resolved this by introducing Autolinking, integrating CocoaPods by default, and adding the Hermes JS engine preview, optimizing mobile builds.

Architectural Principle: Use autolinking to manage native dependencies dynamically. Enable the Hermes JS engine to compile JavaScript ahead-of-time, improving app startup speeds.

Core Concepts & Architectural Blueprint

Autolinking automatically resolves native dependencies during builds, eliminating the need to run react-native link commands. CocoaPods integration standardizes dependency management for iOS, while the new Hermes JS engine compiles JavaScript to bytecode ahead-of-time, reducing memory usage and accelerating startup speeds.

Performance & Capability Comparison

Dependency ModelPre-React Native 0.60React Native 0.60 StandardBuild Benefit
Library LinkingManual linking (react-native link)Automated Autolinking enginePrevents native config conflicts
iOS IntegrationManual Xcode framework additionsDefault CocoaPods integrationStandardizes iOS library setups
JS CompilerStandard JavaScriptCore engineHermes JS compiler (Ahead-of-Time)Reduces memory and speeds up startup

Implementation & Code Pattern

To configure autolinking and compile iOS apps under React Native 0.60 standards, follow these steps:

  • Add native dependencies to package.json using package managers.
  • Run pod install in the iOS directory to resolve native frameworks.
  • Verify that autolinking handles native configurations dynamically.
  • Enable the Hermes compiler flag inside iOS Podfiles.
rubycode
# Podfile configuration with Hermes support enabled in React Native 0.60 (2019)
platform :ios, '9.0'
require_relative '../node_modules/react-native/scripts/react_native_pods'

target 'SchoolMobile' do
  # Resolve dependencies dynamically via autolinking
  use_react_native!(
    :path => "../node_modules/react-native",
    # Enable Hermes compiler engine to compile JS ahead-of-time
    :hermes_enabled => true
  )

  target 'SchoolMobileTests' do
    inherit! :search_paths
  end
end

Operational Governance & Future Outlook

React Native 0.60's introduction of autolinking, CocoaPods integration, and the Hermes compiler engine simplified mobile development. Ahead-of-Time compilation helps optimize memory usage and speed up app startup.

VP
Vijay Paliwal
Founder, SHIVAM ITCS · 18+ years enterprise & AI engineering
MCA · Ex-HiveGPT USA · Ex-Social27 Seattle
React Native 0.60: Autolinking, CocoaPods Integration, and Hermes JS engine previews | SHIVAM ITCS Blog | SHIVAM ITCS