GithubHelp home page GithubHelp logo

Comments (6)

laurenzcodes avatar laurenzcodes commented on June 1, 2024 2

I get the same error in my non-expo project when trying to install this package

Using

"react": "17.0.1",
"react-native": "0.64.2",
[!] Invalid `Podfile` file: 
[!] Invalid `RNFileLogger.podspec` file: undefined method `install_modules_dependencies' for Pod:Module.

 #  from /Users/x/Documents/GIT/proj-react-native/node_modules/react-native-file-logger/RNFileLogger.podspec:21
 #  -------------------------------------------
 #    ## Dependencies needed for new architecture.
 >    install_modules_dependencies(s)
 #  
 #  -------------------------------------------
.

 #  from /Users/x/Documents/GIT/proj-react-native/ios/Podfile:14
 #  -------------------------------------------
 #  
 >    config = use_native_modules!
 #  
 #  -------------------------------------------

This is my Podfile


require_relative '../node_modules/react-native/scripts/react_native_pods'
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'

platform :ios, '11.0'

target 'proj' do

  pod 'Firebase', :modular_headers => true
  pod 'FirebaseCore', :modular_headers => true
  pod 'FirebaseCoreInternal', :modular_headers => true
  pod 'GoogleUtilities', :modular_headers => true

  config = use_native_modules!

  use_react_native!(
    :path => config[:reactNativePath],
    # to enable hermes on iOS, change `false` to `true` and then install pods
    :hermes_enabled => false
  )

  pod 'RNVectorIcons', :path => '../node_modules/react-native-vector-icons'


  target 'projTests' do
    inherit! :complete
    # Pods for testing
  end

  # Enables Flipper.
  #
  # Note that if you have use_frameworks! enabled, Flipper will not work and
  # you should disable the next line.
  use_flipper!()

  post_install do |installer|
    installer.pods_project.targets.each do |target|
      target.build_configurations.each do |config|
        config.build_settings.delete 'IPHONEOS_DEPLOYMENT_TARGET'
      end
    end
    react_native_post_install(installer)
    # __apply_Xcode_12_5_M1_post_install_workaround(installer)
  end
end

I got it working for now by downgrading to "react-native-file-logger": "^0.4.0"

from react-native-file-logger.

fdrault avatar fdrault commented on June 1, 2024 2

Hello,

It seems I have been way too ambitious by publishing the package for new architecture.
Two reasons:

  • install_modules_dependencies is available only on react native 0.71
  • Expo is not handling properly backward compatibility on iOS. Expo call by itself pod install without the flag RCT_NEW_ARCH_ENABLED, but the native code is compiled with RCT_NEW_ARCH_ENABLED. This breaks compilation because the generated TurboModule interface is missing
#ifdef RCT_NEW_ARCH_ENABLED // is true, even if the flag is not turned on

I rollback the release tag to version 0.4.0.

npm install react-native-file-logger should now install [email protected]

Please use this version.

For people who want to try new architecture (or are on react-native >= 0.71), you can install the next version
npm install react-native-file-logger@next. I will update the documentation soon.

Sorry for the inconvenience.

from react-native-file-logger.

fdrault avatar fdrault commented on June 1, 2024 1

I'm using Expo on react-native version 0.72.3 and it fails creating a standalone build for the device... Has anyone encountered this?

❌ Undefined symbols for architecture arm64 ┌─ Symbol: OBJC_CLASS$_MFMailComposeViewController └─ Referenced from: objc-class-ref in RNFileLogger(FileLogger.o)

❌ ld: symbol(s) not found for architecture arm64

❌ clang: error: linker command failed with exit code 1 (use -v to see invocation)

Run script build phase 'Create Symlinks to Header Folders' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'React-debug' from project 'Pods')
Run script build phase 'Create Symlinks to Header Folders' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'fmt' from project 'Pods')
Run script build phase 'Create Symlinks to Header Folders' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'RCT-Folly' from project 'Pods')
Run script build phase 'Create Symlinks to Header Folders' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'React-utils' from project 'Pods')
Run script build phase 'Create Symlinks to Header Folders' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'React-runtimescheduler' from project 'Pods')
Run script build phase 'Create Symlinks to Header Folders' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'ReactCommon' from project 'Pods')
no rule to process file '/Users/willryan/Development/RapidTapping/rapid-tapping-expo-app/node_modules/react-native-agora-chat/native_src/objc/README.md' of type 'net.daringfireball.markdown' for architecture 'arm64' (in target 'react-native-chat-sdk' from project 'Pods')
Run script build phase 'Create Symlinks to Header Folders' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'React-Codegen' from project 'Pods')
Run script build phase '[CP-User] Generate app.config for prebuilt Constants.manifest' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'EXConstants' from project 'Pods')
Run script build phase '[CP-User] Generate app.manifest for expo-updates' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'EXUpdates' from project 'Pods')
Run script build phase 'Start Packager' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'RapidTapping' from project 'RapidTapping')
Run script build phase 'Bundle React Native code and images' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'RapidTapping' from project 'RapidTapping')
Run script build phase '[CP-User] [RNFB] Core Configuration' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'RapidTapping' from project 'RapidTapping')

› 3 error(s), and 14 warning(s)

CommandError: Failed to build iOS project. "xcodebuild" exited with error code 65.

This seems to be a different error. Can you open a new issue so we can track this ?

from react-native-file-logger.

fdrault avatar fdrault commented on June 1, 2024

Hi,

Thank you for reporting this issue.

Usage of install_modules_dependencies is the documented way to hide compilation options of new arch modules (dependency with RCT-Folly, Codegen etc.), while still being backward compatible

Also does this require turbo modules to be enabled? I have it off in my project and looking at the code I am expecting it to fallback to the old NativeModule based FileLogger.

No, turbo modules is not required, react-native-file-logger should be backward compatible

Is this due to npx pod install being an additional step for this package to work correctly? Wouldn't react native auto linking take care of the dependent pod installations automatically?

React-native still take care of auto-linking, which is

  • adding pods dependencies via CocoaPods
  • adding build phase

If you enable new architecture by calling RCT_NEW_ARCH_ENABLED=1 pod install, this add a step:

  • Call Codegen to generate TurboModules interface. This is required only with new architecture, current architecture fallback on a default interface and does not require code generation.

On a bare project, pod install is always required to downloads and build dependencies, but maybe Expo has a different way to process CocoaPods dependencies

I don't have much expertise on Expo, so I am not sure on what broke Expo compatibility but I will look into it.
For the time being, please use the previous version

from react-native-file-logger.

1337mus avatar 1337mus commented on June 1, 2024

Thank you so much for rolling it back. I am going to give this a shot later today and report back. This is a great package.

from react-native-file-logger.

willryanuk avatar willryanuk commented on June 1, 2024

I'm using Expo on react-native version 0.72.3 and it fails creating a standalone build for the device... Has anyone encountered this?

❌ Undefined symbols for architecture arm64
┌─ Symbol: OBJC_CLASS$_MFMailComposeViewController
└─ Referenced from: objc-class-ref in RNFileLogger(FileLogger.o)

❌ ld: symbol(s) not found for architecture arm64

❌ clang: error: linker command failed with exit code 1 (use -v to see invocation)

Run script build phase 'Create Symlinks to Header Folders' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'React-debug' from project 'Pods')
Run script build phase 'Create Symlinks to Header Folders' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'fmt' from project 'Pods')
Run script build phase 'Create Symlinks to Header Folders' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'RCT-Folly' from project 'Pods')
Run script build phase 'Create Symlinks to Header Folders' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'React-utils' from project 'Pods')
Run script build phase 'Create Symlinks to Header Folders' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'React-runtimescheduler' from project 'Pods')
Run script build phase 'Create Symlinks to Header Folders' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'ReactCommon' from project 'Pods')
no rule to process file '/Users/willryan/Development/RapidTapping/rapid-tapping-expo-app/node_modules/react-native-agora-chat/native_src/objc/README.md' of type 'net.daringfireball.markdown' for architecture 'arm64' (in target 'react-native-chat-sdk' from project 'Pods')
Run script build phase 'Create Symlinks to Header Folders' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'React-Codegen' from project 'Pods')
Run script build phase '[CP-User] Generate app.config for prebuilt Constants.manifest' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'EXConstants' from project 'Pods')
Run script build phase '[CP-User] Generate app.manifest for expo-updates' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'EXUpdates' from project 'Pods')
Run script build phase 'Start Packager' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'RapidTapping' from project 'RapidTapping')
Run script build phase 'Bundle React Native code and images' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'RapidTapping' from project 'RapidTapping')
Run script build phase '[CP-User] [RNFB] Core Configuration' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'RapidTapping' from project 'RapidTapping')

› 3 error(s), and 14 warning(s)

CommandError: Failed to build iOS project. "xcodebuild" exited with error code 65.

from react-native-file-logger.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.