pushy / pushy-react-native

The official Pushy SDK for React Native apps.
Apache License 2.0
16 stars 20 forks source link

Pod Install error - target has transitive dependencies that include statically linked binaries #50

Closed andredtr closed 4 years ago

andredtr commented 4 years ago

I trying to add Pushy to an existing React Native App using version 0.61.5 of RN,

I followed all the steps on the docs https://pushy.me/docs/additional-platforms/react-native but Im getting an error after adding use_frameworks to my Podfile and running Pod install, I got the following error:

[!] The 'Pods-MyApp' target has transitive dependencies that include statically linked binaries: (/Users/adutra/MyApp/app/ios/Pods/AppCenterReactNativeShared/AppCenterReactNativeShared/AppCenterReactNativeShared.framework)

Here is the full Podfile:

platform :ios, '9.0'
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'
permissions_path = '../node_modules/react-native-permissions/ios'

target 'MyApp' do
  # Pods for MyApp
  pod 'Firebase/Analytics'
  pod 'FBLazyVector', :path => "../node_modules/react-native/Libraries/FBLazyVector"
  pod 'FBReactNativeSpec', :path => "../node_modules/react-native/Libraries/FBReactNativeSpec"
  pod 'RCTRequired', :path => "../node_modules/react-native/Libraries/RCTRequired"
  pod 'RCTTypeSafety', :path => "../node_modules/react-native/Libraries/TypeSafety"
  pod 'React', :path => '../node_modules/react-native/'
  pod 'React-Core', :path => '../node_modules/react-native/'
  pod 'React-CoreModules', :path => '../node_modules/react-native/React/CoreModules'
  pod 'React-Core/DevSupport', :path => '../node_modules/react-native/'
  pod 'React-RCTActionSheet', :path => '../node_modules/react-native/Libraries/ActionSheetIOS'
  pod 'React-RCTAnimation', :path => '../node_modules/react-native/Libraries/NativeAnimation'
  pod 'React-RCTBlob', :path => '../node_modules/react-native/Libraries/Blob'
  pod 'React-RCTImage', :path => '../node_modules/react-native/Libraries/Image'
  pod 'React-RCTLinking', :path => '../node_modules/react-native/Libraries/LinkingIOS'
  pod 'React-RCTNetwork', :path => '../node_modules/react-native/Libraries/Network'
  pod 'React-RCTSettings', :path => '../node_modules/react-native/Libraries/Settings'
  pod 'React-RCTText', :path => '../node_modules/react-native/Libraries/Text'
  pod 'React-RCTVibration', :path => '../node_modules/react-native/Libraries/Vibration'
  pod 'React-Core/RCTWebSocket', :path => '../node_modules/react-native/'
  pod 'Permission-LocationAlways', :path => "#{permissions_path}/LocationAlways.podspec"
  pod 'Permission-LocationWhenInUse', :path => "#{permissions_path}/LocationWhenInUse.podspec"
  pod 'Permission-Camera', :path => "#{permissions_path}/Camera.podspec"
  pod 'Permission-PhotoLibrary', :path => "#{permissions_path}/PhotoLibrary.podspec"
  pod 'Permission-MediaLibrary', :path => "#{permissions_path}/MediaLibrary.podspec"
  pod 'Permission-Notifications', :path => "#{permissions_path}/Notifications.podspec"
  pod 'React-cxxreact', :path => '../node_modules/react-native/ReactCommon/cxxreact'
  pod 'React-jsi', :path => '../node_modules/react-native/ReactCommon/jsi'
  pod 'React-jsiexecutor', :path => '../node_modules/react-native/ReactCommon/jsiexecutor'
  pod 'React-jsinspector', :path => '../node_modules/react-native/ReactCommon/jsinspector'
  pod 'ReactCommon/jscallinvoker', :path => "../node_modules/react-native/ReactCommon"
  pod 'ReactCommon/turbomodule/core', :path => "../node_modules/react-native/ReactCommon"
  pod 'Yoga', :path => '../node_modules/react-native/ReactCommon/yoga'
  pod 'DoubleConversion', :podspec => '../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec'
  pod 'glog', :podspec => '../node_modules/react-native/third-party-podspecs/glog.podspec'
  pod 'Folly', :podspec => '../node_modules/react-native/third-party-podspecs/Folly.podspec'
  pod 'RNReanimated', :path => '../node_modules/react-native-reanimated'
  pod 'RNVectorIcons', :path => '../node_modules/react-native-vector-icons'
  pod 'react-native-splash-screen', :path => '../node_modules/react-native-splash-screen'
  pod 'RNInputMask', :path => '../node_modules/react-native-text-input-mask/ios/InputMask'
  pod 'RealmJS', :path => '../node_modules/realm'

  pod 'PushyRN', :path => '../node_modules/pushy-react-native'

  target 'MyAppTests' do
    inherit! :search_paths
    # Pods for testing
  end

  use_native_modules!
  use_frameworks!
end
pushy commented 4 years ago

@and-dutra Thanks for your patience as we investigated this issue report further.

We've completed updating our docs and the Pushy RN SDK to support the latest versions of React Native, which have removed support for Swift dynamic frameworks.

To fix the error you are facing: 1) Install the latest version of Pushy RN by running:

npm install pushy-react-native@1.0.15 --save
react-native link pushy-react-native

2) Edit ios/Podfile and remove the use_frameworks! declaration 3) Run pod install to update your workspace to use static libraries instead of dynamic frameworks 4) Open the workspace in Xcode by running open *.xcworkspace 5) Try to build and run your project on a real device 6) Continue integration by following the instructions here:

https://pushy.me/docs/additional-platforms/react-native

Please let us know if you face any issues.