microsoft / appcenter-sdk-react-native

Development repository for the App Center SDK for React Native

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Pods removed with React Native 0.69.0

cam-shaw opened this issue · comments

Description

iOS pods are removed in a RN 0.69.0 project.

Repro Steps

Please list the steps used to reproduce your issue.

  1. Create a fresh React Native project based on 0.69.0 (e.g. use the npx react-native init, and then the upgrade command to go to 0.69.0 because as of writing, react-native init won't give v0.69.0)
  2. yarn add appcenter appcenter-analytics appcenter-crashes --exact
  3. cd ios -> pod install

You will notice the SDK pods are not added. If you add the appcenter packages PRIOR to upgrading to 0.69.0 (e.g. if you do it on 0.68.2), the pod installation will remove the app center pods.

Details

  1. Which version of the App Center SDK are you using?
    4.4.4

This is because when upgrading to 0.69, a new version of the cli is also used and now react-native-community/cli#1537 gets enforced.

All of appcenter, apacentar-analytics & appcenter-crashes should now conform to https://github.com/react-native-community/cli/blob/master/docs/autolinking.md, basically removing the platforms.ios.podspecPath config.

I also ran into this problem today.

@AnatolyPristensky Any update on this issue ?

I have same issue!!!

Hi there, thanks for reporting this.
I'm marking it as feature request, we'll let you know when the SDK will be ready for usage with RN 0.69. Thanks

@MatkovIvan Nice. thank you.

Hello there! Is this updated or is something else needed? As I'm trying to run my project with RN 0.69 but I'm still getting AppCenterReactNative.h' file not found that crashes the app. I need to do some extra step to make AppCenter runs fine with the new version? Thank youu

waiting for new version !!

commented

Hi folks, as a temporary workaround until the release is out, you can use these packages: https://github.com/microsoft/appcenter-sampleapp-react-native/tree/master/appcenter-sdk-packages.

Please note, that it is not an official release, so use it only if the current issue is blocker for you and you need a quick solution.

hi, alternate solution i used, patch-packageed changes from this PR #981

Hello,
is there an estimation to when this problem will be solved ?

Hello @omarDtp, release with the fix is planned for this month.

Hello @AnatolyPristensky . May be we can release the fix ?

When will the new version be released 😭

Hello there,

until releasing the new version you can use this workaround
add it before the target of your project

install! 'cocoapods', :deterministic_uuids => false

Hello there,

until releasing the new version you can use this workaround add it before the target of your project

install! 'cocoapods', :deterministic_uuids => false

this does not help

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

platform :ios, '13.0'
use_frameworks! :linkage => :static

install! 'cocoapods', :deterministic_uuids => false

target 'TheHub' do
  pod 'GoogleMaps'
  pod 'Google-Maps-iOS-Utils'

  config = use_native_modules!

  # Convert all permission pods into static libraries
pre_install do |installer|
  Pod::Installer::Xcode::TargetValidator.send(:define_method, :verify_no_static_framework_transitive_dependencies) {}

  installer.pod_targets.each do |pod|
    if pod.name.eql?('RNPermissions') || pod.name.start_with?('Permission-')
      def pod.build_type;
        # Uncomment the line corresponding to your CocoaPods version
        Pod::BuildType.static_library # >= 1.9
        # Pod::Target::BuildType.static_library # < 1.9
      end
    end
  end
end


  # Flags change depending on the env values.
  flags = get_default_flags()
  
  use_react_native!(
    :path => config[:reactNativePath],
    # to enable hermes on iOS, change `false` to `true` and then install pods
    :hermes_enabled => flags[:hermes_enabled],
    :fabric_enabled => flags[:fabric_enabled],
    # An absolute path to your application root.
    :app_path => "#{Pod::Config.instance.installation_root}/.."
  )
  
  
  permissions_path = '../node_modules/react-native-permissions/ios'
  pod 'Permission-LocationWhenInUse', :path => "#{permissions_path}/LocationWhenInUse"
  pod 'Permission-Contacts', :path => "#{permissions_path}/Contacts"


  # use_flipper!()

  post_install do |installer|
    react_native_post_install(installer)
    __apply_Xcode_12_5_M1_post_install_workaround(installer)
  end
end

here is my podfile.

Hello,
Release with the fix is available - 4.4.5