alpha0010 / react-native-file-access

Filesystem access for React Native
MIT License
298 stars 18 forks source link

Build fail on iOS after update v3.0.2, react-native 0.71.8 , expo 48 #66

Closed meabed closed 1 year ago

meabed commented 1 year ago

Hey 👋 Thank you for releasing the update, while updating the package I encountered a build failure, please find the details:

react-native: 0.71.8 react-native-file-access: 3.0.2 Platform: iOS

Bug Build Fail when compiling the app

› Copying   @react-native-firebase/crashlytics RNFBCrashlytics/RNFBCrashlytics.framework/Headers/RNFBCrashlytics-umbrella.h ➜ ios/Pods/Target/ Support/ Files/RNFBCrashlytics/RNFBCrashlytics-umbrella.h
› Compiling react-native-file-access Pods/ReactNativeFileAccess » ReactNativeFileAccess_vers.c
› Compiling react-native-file-access Pods/ReactNativeFileAccess » ReactNativeFileAccess-dummy.m
› Compiling react-native-file-access Pods/ReactNativeFileAccess » FileAccess.mm

❌  (node_modules/react-native-file-access/ios/FileAccess.mm:2:9)

  1 | #import "FileAccess.h"
> 2 | #import <ReactNativeFileAccess-Swift.h>
    |         ^ 'ReactNativeFileAccess-Swift.h' file not found
  3 |
  4 | @implementation FileAccess
  5 | FileAccessImpl *impl;

› Compiling @react-native-firebase/app Pods/RNFBApp » RCTConvert+FIRApp.m
› Signing   react-native Pods/React-hermes » reacthermes.framework

To reproduce Install the packages and run the ios app

alpha0010 commented 1 year ago

Hmm, that file is supposed to be generated by Xcode automatically. To confirm I understand correctly, this only occurs with expo, not plain RN?

meabed commented 1 year ago

Ah i see, I use expo and pre-build to react-native, so it's not expo-go its similar plain RN.

it's working on the version 2 -

I will reproduce and share example repo.

meabed commented 1 year ago

@alpha0010 Here is repo that contains the code to re-produce the issue: https://github.com/meabed/rxdb-react-native-demo

I think it's happening when using plugins with expo - I will test and post the updates here

meabed commented 1 year ago

@alpha0010 so i figured this is happening when you use static framework in pod file ( which is needed for firebase and crashlytics ) so maybe this is the reason this file was not generated.

  useFrameworks: 'static',

https://github.com/meabed/rxdb-react-native-demo/blob/master/ios/Podfile#L45

image
alpha0010 commented 1 year ago

Thanks for your detailed analysis of this bug. As you can tell from commit history, launching new arch support has been rougher than I hoped.

meabed commented 1 year ago

Thank you 😊