I recently was trying to upgrade my react-native app to use react-native 0.5.0 and firebase. According to this article the react-native sockets are working and the full firebase sdk should be available.
I was previously using firebase-debug and #badfortrains react-native fork with success following the example project https://github.com/badfortrains/wsExample.
Since upgrading to I now am getting this error
When looking at the issues on the react-native repo I came across this https://github.com/sjmueller/firebase-react-native/issues/1
#stephenplusplus says he pushed a bunch of buttons and activated magic. Any idea what he is referencing??
There is also this other SO question Error creating user: { [Error: There are no login transports available for the requested method.] code: 'TRANSPORT_UNAVAILABLE' }
Any help on understanding the issue between using badfortrains with firebase-debug and the newest version of react-native with firebase would be appreciated.
I don't know if I am implementing something incorrectly or if the article mentioned above is a bit overzealous.
Thoughts???
Thanks.
Oddly enough starting a new project from scratch using the react-native-cli generator I was able to copy and paste all of my components over to the new project and have everything work perfectly.
I am not sure where the problem is but I will assume for now that there is an issue with the xcode project settings when trying to upgrade. Despite cleaning the project, resetting xcode to default settings, removing all derived data, restarting the package bundler, nothing worked until I created a new project.
This should prove there is nothing wrong with the JavaScript frameworks but rather it is some obscure xcode project setting. I will continue to look for a solution other than spinning a new project but for now it works.
Related
I installed the FBAudienceNetwork (version 4.26.0) with CocoaPods (version 1.3.1). I followed the official manual as published at https://developers.facebook.com/docs/audience-network/ios, but the Xcode still not recognized the framework.
Just to be clear - I opened the project from xcworkspace file.
I tried the following steps with no success:
Install the framework manually, adding the ~/Documents/FacebookSDK path to Framework Search Path
Make sure that the pods project compiled using Swift 4
Added also FBSDKCoreKit (with Bolts) and FBSDKShareKit (both frameworks imported successfully)
Clean the project, delete DerivedData and also clean the pods cache and reinstalling the pods
Nothing worked so far. Anyone faced the same issue and know the reason?
Fixed in v4.27.0
Another solution that uses latest SDK (until Facebook fixes this) is to add a line to your Objc bridging header:
#import <FBAudienceNetwork/FBAudienceNetwork.h>
Of course this assumes you are using a bridging header, and if you're not then you could add one but that defeats the point of using modules. Hopefully Facebook fixes this soon.
I'm also seeing the same problem. I'm watching the Facebook bug report, but it's already been closed so I don't have high hopes of it being fixed anytime soon. Facebook suggested adding "$(SRCROOT)" to your Framework Search Paths as a work around, but it didn't work for me.
For now, I've manually locked my "FBAudienceNetwork" pod to version 4.25.0 with the following line in my Podfile:
pod 'FBAudienceNetwork', '4.25.0'
Try this solution it will fix your issue.
You need to rename FBAudienceNetwork.modulemap to module.modulemap in FBAudienceNetwork.framework/Modules folder.
v4.26
From the audience network installation guide
Good luck
Following this post:
https://developers.facebook.com/bugs/185968218614056/
and after downgrade to version 4.23 (supported by MoPub mediation as written here: https://github.com/mopub/mopub-ios-sdk/wiki/Integrating-Native-Third-Party-Ad-Networks) the integration is working (by adding the framework manually).
This is a bug in 4.26 version, so anyone that encourage the same issue, you have to wait for Facebook fixing this bug. I recommend to subscribe and follow the discussion I posted.
It works when I'm using only the framework within the "static" folder.
I'm using react-native fbsdk in my react-native app. I have followed every step carefully, but somehow it seems like the linking has not been done properly.
When I run the project I get the following errors in the debugger console.
I have wrapped my head around this problem for too long but failed to find a solution.
Already tried deleting node_modules, reinstalling all packages, linking etc.
So I tried implementing Facebook Login and followed all the steps accordingly. After having errors with FBSDKcorekit/FBSDKcorekit.h' file not found, I decided to pivot over to working on other components.
Lo' and behold, I have this error giving me trouble now. I followed along with this video: https://www.youtube.com/watch?v=rAXVKapP5cM&t=458s where I used the react-native install react-native-fbsdk and react-native link react-native-fbsdk commands in my terminal.
If it helps, I'm getting the following compile error in my terminal:
The following build commands failed:
CompileC /Users/someUser/desiredProject/ios/build/Build/Intermediates/RCTFBSDK.build/Debug-iphonesimulator/RCTFBSDK.build/Objects-normal/x86_64/RCTFBSDKGraphRequestManager.o RCTFBSDK/core/RCTFBSDKGraphRequestManager.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)
I'm not sure if it was the tinkering around with the react-native-fbsdk or making links to it that caused this error. Note my project was working before I was trying to implement Facebook Login and using the link command.
What's going on here?
Thanks in advance for your time and patience.
edit: Also I did not implement any of the Facebook login code yet since I couldn't get a successful build on Xcode.
#kdizzle Make sure you have the right packager running in the terminal, sometimes you may have a packager associated with another react native project running, this happens because when you stop running an xcode RN project, it doesn't stop the packager in the terminal, and when you start/open another RN project in xcode, it simply checks if a packager is running, doesn't check if it's associated with the current project. So make sure you stop all of the packager instances in the terminal and then open the RN project again.
This may happen when upgrading a project to a newer version of react-native. To fix it,
Stop your packager.
Quit your iOS/android simulator.
Reinstall your modules: rm -rf node_modules && npm install
Restart your packager and simulator, e.g. react-native run-ios
I had this issue and it happened when I changed Hardware within the simulator. To fix it I had to kill the packager and run 'react-native run-ios' again. It didn't happen all the time but when it did this fixed it for me!
Another use is in a Brownfield App. Check your iOS and/or Android react-native versions. If they don't match exactly you will see this error screen too.
For example: I had a react native instance running 0.45.1 while Android had 0.45.0 installed. The solution for me was to make sure everything was running the same version.
None of the above answers have worked for me, so I researched the 'react-native' options a little and ended up:
Deleting the iOS and android folders from the app directory altogether
Running 'react-native eject'
Re-running 'react-native run-ios'
After that the iPhone emulator seemed to have no problem with the app.
This problem would appear when React Native libraries in ios project can not found.
I happend to meet this problem when i update my react-native version from 0.42 to 0.44, and cause that a file named RCTConvert+Map disappear in 0.44, so i update my pod.
command: pod update
When I try to use the Firebase framework with tvOS (via cocoapods) I get the following error:
Target 'Pods-Portal TV' of project 'Pods' was rejected as an implicit dependency for 'Pods_Portal_TV.framework' because it doesn't contain platform 'appletvsimulator' in its SUPPORTED_PLATFORMS 'iphonesimulator, iphoneos'
I 'tricked' cocoapods to install the framework due to it not recognizing tvOS as a supported platform, by declaring the target as :ios.
So it's easy to see what the problem is. My question: Is it possible to work around this until Firebase officially supports tvOS?
EDIT (8/5/17): tvOS support is being added to the open source Firebase SDK in issue #10. Please follow along there and contribute!
Firebase developer here.
I've built a beta version of the Firebase framework for tvOS, and I'm happy to share with folks so they can give feedback. Please email me at mcdonald firebase com for access.
EDIT (7/28/16): Given the date on this post and the huge Firebase release at Google I/O 2016, there are a few extra caveats I should add to what this library does.
This is a version of the 2.x client and will work with the database on all projects. Authentication however, will not work with projects created after 5/18/2016.
This client is not compatible with Nest, as Nest only supports the 1.x Firebase clients.
EDIT (8/27/16): Please fill out this form to let us know you'd like support for Firebase on other platforms (macOS, tvOS, watchOS).
EDIT (10/29/21): Firebase 8.9.0 introduces official beta support for macOS, tvOS, and Catalyst. watchOS continues to be community supported.
Ok, so I got it working, albeit, a bit flaky.
This is a very quick guide as to how, at the time of writing.
First you need to setup CocoaPods to use unreleased features and get the master branch of cocoapods / cocoapods-core
Then you need to create a private spec repo or use mine
Remember to set your xcode path to your beta version of xcode sudo xcode-select -s /Applications/Xcode-Beta.app/Contents/Developer otherwise the spec won't build.
Then set your source to your spec file, and set the platform to platform :tvos, '9.0' in your Podfile, then pod install.
Your Project should then build and run, but with about 155 warnings:
ld: warning: URGENT: building for tvOS simulator, but linking in object file (/Users/..../..../.... /tvOS/Pods/Firebase/Firebase.framework/Firebase(FPendingPut.o)) built for iOS. Note: This will be an error in the future.
So obviously not a solid solution. Definately not a production solution. But hopefully Firebase will add support in the future. I spoke to Frank from the Firebase team who said that he will take it up at the next feature discussion to see if they want to include it. Here's to hoping they will :)
Also, I had to Comment out the Accounts/Accounts.h import statement in the FAuthData.h for some reason? I don't know if anyone can elaborate on that
Getting some progress from the open source community lately, I just got auth/database working after one or two hours, mostly fighting with the podfile. Seems to work, check out https://github.com/firebase/firebase-ios-sdk#community-supported-efforts
I'm having a problem where cordova is failing to start the camera app on iOS. A simple case works fine, but in my app, not so much.
So I'd like to debug into the Cordova.framework to see what the problem is.
But I can't figure out how to do it. I've built the Cordova project that's sitting next to the installed framework, and I've replaced my framework reference in my project to point at it. That seems to be fine. But I can't step in or set breakpoints.
With the cordova project, i"m building UniversalFramework and it looks like it's set to debug in the scheme config, even though it always builds to release (this seems to be in the script), I see --DDEBUG in the clang output, so I think it's debug. I'm fairly new to xcode so I don't know if it's building a symbol file or how to verify it's a debug framework, etc.
Latest Cordova (2.0.0) has it like a seperate project and linked as static library.
Use that version, you can put breakpoints in the library code.