Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

React-native 0.67.2 #4

Open
ciaoamigoschat opened this issue Feb 19, 2022 · 7 comments
Open

React-native 0.67.2 #4

ciaoamigoschat opened this issue Feb 19, 2022 · 7 comments

Comments

@ciaoamigoschat
Copy link

Hi, I wasn't able to install the library with:
-RECT Native V0.67.2.
-Xcode v13.2.1.
Can anyone help and tell me the steps to follow? Or an example app?

Thank you

@nsotelo
Copy link
Owner

nsotelo commented Feb 20, 2022

What error are you seeing? If it's a missing folly header, you should locate the affected file in node_modules and remove this code.

@ciaoamigoschat
Copy link
Author

ciaoamigoschat commented Feb 20, 2022

Thank you very much for the reply you are saving my life.
I tried two ways, one using the example and the other starting from scratch.
This using your example.
Steps:

  • yarn install
  • cd ios
  • pod install
    gives me this error:
Analyzing dependencies
Fetching podspec for `DoubleConversion` from` ../ node_modules / react-native / third-party-podspecs / DoubleConversion.podspec`
Fetching podspec for `RCT-Folly` from` ../ node_modules / react-native / third-party-podspecs / RCT-Folly.podspec`
Fetching podspec for `boost` from` ../ node_modules / react-native / third-party-podspecs / boost.podspec`
Fetching podspec for `glog` from` ../ node_modules / react-native / third-party-podspecs / glog.podspec`
Fetching podspec for `linphone-sdk` from` ../ linphone-sdk.podspec`
[!] Failed to load 'react-native-sip-phone' podspec:
[!] Invalid `react-native-sip-phone.podspec` file: No such file or directory @ rb_sysopen - /Users/Pippo/Downloads/react-native-sip-master/../react-native/package.json .
# from /Users/Pippo/Downloads/react-native-sip-master/react-native-sip-phone.podspec:5
 # -------------------------------------------
 #
 > reactVersion = JSON.parse (File.read (File.join (__ dir__, "..", "react-native", "package.json"))) ["version"]

Installing the library from scratch:

  • npx react-native init voice
  • yarn add react-native-sip-phone
  • cd ios
  • pod install
    gives me this error:
    [!] Unable to find a specification forlinphone-sdk depended upon by react-native-sip-phone``

@ciaoamigoschat
Copy link
Author

Suggestions?

@nsotelo
Copy link
Owner

nsotelo commented Feb 22, 2022

I have been travelling for the past couple of days so couldn't get back to you.

The latest updates are in github and can be installed from npm too, these should give you the missing files. If not you can also copy it manually from the root of this repository.

@ciaoamigoschat
Copy link
Author

ciaoamigoschat commented Feb 27, 2022

Hi, sorry if I write to you again, this is my podfile:

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

platform :ios, '11.0'

target 'voice' do
  config = use_native_modules!
  use_react_native!(
    :path => config[:reactNativePath],
    # to enable hermes on iOS, change `false` to `true` and then install pods
    :hermes_enabled => false
  )

  target 'voiceTests' do
    inherit! :complete
    # Pods for testing
  end

  # Enables Flipper.
  #
  # Note that if you have use_frameworks! enabled, Flipper will not work and
  # you should disable the next line.
  use_flipper!()

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

When I run pod install it gives me this error:
[!] Unable to find a specification for linphone-sdk depended upon by react-native-sip-phone

@nsotelo
Copy link
Owner

nsotelo commented Mar 5, 2022

Try adding this:

 target 'voice' do
   config = use_native_modules!

+ pod 'linphone-sdk', :podspec => '../node_modules/react-native-sip-phone/third_party_podspecs/linphone-sdk.podspec'

   use_react_native!(
     :path => config[:reactNativePath],
     # to enable hermes on iOS, change `false` to `true` and then install pods
     :hermes_enabled => false
   )

And if it fails to compile don't forget to modify the Config.h file like I mentioned in my first comment.

For an example of how to use this library in javascript, an example application is included. It should work without any modifications in Android, but I don't think it does for iOS. Nevertheless I am using this library for both operating systems in production and it definitely works.

@ciaoamigoschat
Copy link
Author

ciaoamigoschat commented Mar 7, 2022

Perfect, thanks now work ..
Another question how do I use the proxy when creating account, in IOS.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants