Bjarne Knutzen bb2968e943
Some checks failed
CI / lint (push) Has been cancelled
CI / test (push) Has been cancelled
CI / build-library (push) Has been cancelled
CI / build-android (push) Has been cancelled
CI / build-ios (push) Has been cancelled
first commit
2026-01-16 09:17:49 +01:00

4.4 KiB
Raw Blame History

WebID Meta Plugin React Native Proof of Concept

Disclaimer

This repository contains an example iOS application and React Native plugin integration provided solely as a proof of concept and for technical evaluation.
It is experimental, not formally approved, not officially released, not published as an npm package, and not endorsed by WebID for production use.

The setup described below includes non-standard workarounds and temporary configuration adjustments that are required due to current tooling and dependency constraints.


Overview

This repository contains an example iOS application demonstrating integration of the WebID Meta Plugin in a React Native environment.

Due to:

  • mixed minimum iOS deployment targets,
  • vendored dynamic XCFrameworks,
  • React Native / CocoaPods integration constraints,

additional manual steps are currently required to successfully build and run the app.


Prerequisites

  • macOS with Xcode installed
  • Node.js + Yarn
  • CocoaPods
  • Xcode Command Line Tools

Running the example app

Create and Configure the .env File

Navigate to the example project and create the environment file:

cd example
cp .env.example .env

Edit the .env file and add your username and API key.

The provided CERT_BASE64 value is preconfigured for the test system and is valid until 2026-02-21. In most cases, this value does not need to be modified if you intend to test against the test environment.

Install dependencies

From the repository root:

yarn install

This is required to install JavaScript dependencies and must be run before installing iOS pods or running the example app.

Install pods

Navigate to the iOS example project:

cd example/ios
pod install

Post-install Notes

Duplicate PrivacyInfo.xcprivacy

After running pod install, the Xcode project may contain duplicate PrivacyInfo.xcprivacy files.

Steps to resolve:

  • Open the Xcode workspace
  • Remove the duplicate reference from the project navigator

Special Configuration Notes

WebIdPayOnServer Dependency Handling

If the WebIdPayOnServer product is included, some of its transitive dependencies currently require manual configuration to avoid build and runtime issues.

iOS Deployment Target Adjustment

In the Pods Xcode project, set the iOS Deployment Target to iOS 13.0 for the following targets (Targets -> Select appropriate Target -> Build Settings -> iOS Deployment Target):

  • KeychainAccess

  • NVActivityIndicatorView

  • SwiftyJSON

  • XS2AiOS

⚠️ These targets may default to iOS 13.4 and must be adjusted manually.

Rationale:

The React Native version used by this project requires a minimum iOS version of 13.4 The libraries listed above are compiled from source during the Xcode build and therefore inherit the 13.4 minimum. The WebID SDK, however, is compiled against iOS 13.0 and expects its dependencies to match this deployment target. The example projects Podfile explicitly forces these libraries to be built as dynamic frameworks, as required by the WebID SDK. This mismatch otherwise leads to compiler errors or runtime crashes.

Build the Plugin (optional)

From the repository root:

yarn prepare

This step builds the plugin and generates TypeScript definitions.

You only need to run this if:

  • you are developing or modifying the plugin itself, or
  • you encounter missing build artifacts under lib/

It is not required to run the example application.

Running the App

Then navigate to the iOS example project:

cd example/ios
yarn ios

or run yarn start from the example dir. Note: If you adjust the values in the .env file, you might need to run yarn start --reset-cache in order for these changes to be applied!

Core files to inspect:

  • react-native-web-id-meta-plugin.podspec
  • example/ios/Podfile
  • example/src/App.tsx
  • ios/WebIdMetaPlugin.swift

Additional notes

When the example Xcode project was setup initially, all WebID libraries aswell as the transitive AhoyKit depedency had to be manually embedded as frameworks under Targets -> Frameworks, Libraries and Embedded Content. In a Cocoapods setup, this should usually not be necessary as it should be handlded by the "[CP] Embed Pods Frameworks" build phase. But in this case, the app always crashed because required dynamic libraries where missing when not adding them manually.