Skip to content

Latest commit

 

History

History
92 lines (56 loc) · 3.38 KB

File metadata and controls

92 lines (56 loc) · 3.38 KB

iOS Example Project Running Notes

Issue 1: iOS boost Dependency Installation Error

When installing iOS dependencies, you may encounter the following error:

boost Installation Error

Root Cause

This error occurs because CocoaPods performs SHA-256 verification on "downloaded local source code archives", and the result doesn't match the value declared in the podspec file, causing the installation to terminate directly.

Solution

  1. Locate the podspec file

    From the log information, you can find the location of the boost podspec file:

    example/node_modules/react-native/third-party-podspecs/boost.podspec
    

    Fetching podspec file

  2. View current configuration

    The content of this podspec file is as follows:

    boost podspec file content

  3. Modify the download link

    Refer to Error installing boost: Verification checksum was incorrect, expected to modify the link in the podspec file.

    Original link:

    https://boostorg.jfrog.io/artifactory/main/release/1.76.0/source/boost_1_76_0.tar.bz2

    Change to:

    https://archives.boost.io/release/1.76.0/source/boost_1_76_0.tar.bz2
  4. Reinstall dependencies

    After modification, save the file and then go to the example/ios directory to execute:

    pod install

Issue 2: iOS Example Startup Error

When executing yarn example ios from the root directory to run the example project on iOS simulator (or physical device), you may encounter the following error:

iOS project build failure

Root Cause

From the logs, the following error is found:

functional template error

Solution

  1. Locate the problematic file

    Find the file in example/ios:

    example/ios/Pods/Headers/Public/Flipper/FlipperTransportTypes.h
    
  2. Add header file reference

    Add #include <functional> below #include <string>, as shown in the following image:

    Add functional header file

    Reference: FlipperKit 'facebook::flipper::SocketCertificateProvider' (aka 'int') is not a function or function pointer template named 'function' in namespace std

  3. Rerun the project

    Then execute from the root directory again:

    yarn example ios

    This will successfully run the example project on iOS simulator (or physical device).

Reference Links