alpha0010 / react-native-file-access

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

iOS: pod install throws error: 'react-native-file-access' does not specify a Swift version #48

Closed SpectreWulf closed 2 years ago

SpectreWulf commented 2 years ago

react-native v0.61.5 react-native-file-access v1.7.1

My react native project successfully installs all the dependencies during pod install, but in the end throws an error for react-native-file-access saying:

'react-native-file-access' does not specify a Swift version and none of the targets ('ProjectName') integrating it has the 'SWIFT_VERSION' attribute set. Please contact the author or set the 'SWIFT_VERSION' in at least one of the targets that integrate this pod.

Am I missing some configuration in the Build Settings?

alpha0010 commented 2 years ago

If your app does not already use Swift, could you try using Xcode to create and add a blank .swift file to your main project?

SpectreWulf commented 2 years ago

If your app does not already use Swift, could you try using Xcode to create and add a blank .swift file to your main project?

Thanks for your quick reply!

I have already figured out the solution myself and forgot to update here! :3 I will close this issue now.

For anyone facing this issue follow these steps to resolve it:

  1. Add a .swift file to your react native project project in Xcode. This will trigger XCode to add configurations to your project so that it is Swift compatible. You can delete this file after that.
  2. In your podfile add this line as a global context: use_frameworks!
  3. Uninstall all of your pod installations using: pod deintegrate
  4. Install the pods again using: pod install