react-native-firebase icon indicating copy to clipboard operation
react-native-firebase copied to clipboard

[🐛] Error on Mac Catalyst - FirebaseFirestore has a minimum deployment target

Open tommycarpi opened this issue 1 year ago • 1 comments

I'm struggling with an error I seem not to be able to solve.

Context:

  • React Native app that uses Firebase Auth and Firestore
  • Firebase versione 20.4
  • on iOS (both simulator and device) it works perfectly
  • on mac Catalyst it does not compile

this is the error: Compiling for iOS 13.1, but module 'FirebaseFirestore' has a minimum deployment target of iOS 13.4: <...> /Build/Products/Debug-maccatalyst/FirebaseFirestore/FirebaseFirestore.framework/Modules/FirebaseFirestore.swiftmodule/arm64-apple-ios-macabi.swiftmodule

I've tried everything, from changing the XCode version to 13.4, to specify it in the Podfile as specified here:

min_ios_versions_supported = ['13.4', min_ios_version_supported]
index_of_max = min_ios_versions_supported.each_with_index.max_by { |number, _| number.to_f }[1]
platform :ios, min_ios_versions_supported[index_of_max]

....

deployment_target = '13.4'

post_install do |installer|
    # https://github.com/facebook/react-native/blob/main/packages/react-native/scripts/react_native_pods.rb#L197-L202
    react_native_post_install(
      installer,
      config[:reactNativePath],
      :mac_catalyst_enabled => true
    )
    installer.generated_projects.each do |project|
      project.targets.each do |target|
          target.build_configurations.each do |config|
              config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = deployment_target
          end
      end
      project.build_configurations.each do |config|
          config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = deployment_target
      end
    end
end

I've also tried to downgrade to v19.3, still the same issue.

Any help?

tommycarpi avatar Aug 28 '24 04:08 tommycarpi

Try this at top of file:

platform :ios, '13.4'

russellwheatley avatar Aug 28 '24 08:08 russellwheatley

@russellwheatley unfortunately didn't work. I tried to put it on top commenting my line: platform :ios, min_ios_versions_supported[index_of_max] and then executing pod install

still same error when compiling Catalyst 🥲

tommycarpi avatar Aug 28 '24 21:08 tommycarpi

Have you cleaned Pods out? Try:

cd ios/
rm -rf Pods && rm Podfile.lock
pod install

russellwheatley avatar Aug 29 '24 08:08 russellwheatley

Tried but still.

But I think is a bug for Catalyst, I mean the version is correct here.

Screenshot 2024-08-29 at 16 43 35

On iOS it works, on Catalyst throws this ...

Screenshot 2024-08-29 at 16 44 56

tommycarpi avatar Aug 29 '24 20:08 tommycarpi

The issue was with the XCode Beta. Using XCode v15.4 does not cause the issue.

This one does instead, for unknown reasons.

Screenshot 2024-08-30 at 00 44 50

tommycarpi avatar Aug 30 '24 04:08 tommycarpi

Hello 👋, to help manage issues we automatically close stale issues.

This issue has been automatically marked as stale because it has not had activity for quite some time.Has this issue been fixed, or does it still require attention?

This issue will be closed in 15 days if no further activity occurs.

Thank you for your contributions.

github-actions[bot] avatar Sep 30 '24 11:09 github-actions[bot]