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

Apple warning UIWebView #2535

Closed
2 of 7 tasks
cipriancaba opened this issue Sep 2, 2019 · 34 comments
Closed
2 of 7 tasks

Apple warning UIWebView #2535

cipriancaba opened this issue Sep 2, 2019 · 34 comments
Labels
Type: Stale Issue has become stale - automatically added by Stale bot

Comments

@cipriancaba
Copy link

Issue

Apple started issuing warnings for libs that use the deprecated UIWebView. Firebase Authentication depends on FirAuth that references this old api

Is is to be expected for Apple to start rejecting apps that use this api.

A commit has already been pushed to firebase auth repo
firebase/firebase-ios-sdk#3723

React native discussion
react-native-webview/react-native-webview#819

We should aim to push an updated dependency as soon as Firebase Auth releases a new version


Project Files

iOS

Click To Expand

ios/Podfile:

  • I'm not using Pods
  • I'm using Pods and my Podfile looks like:
pod 'RNFBAuth', :path => "#{nm_path}@react-native-firebase/auth/ios"

Environment

Click To Expand

react-native info output:

react-native info
warn The following packages use deprecated "rnpm" config that will stop working from next release:
  - react-native-maps: https://npmjs.com/package/react-native-maps
Please notify their maintainers about it. You can find more details at https://github.com/react-native-community/cli/blob/master/docs/configuration.md#migration-guide.
info Fetching system and libraries information...
System:
    OS: macOS 10.14.6
    CPU: (12) x64 Intel(R) Core(TM) i9-8950HK CPU @ 2.90GHz
    Memory: 8.65 GB / 32.00 GB
    Shell: 3.2.57 - /bin/bash
  Binaries:
    Node: 12.6.0 - /usr/local/bin/node
    Yarn: 1.16.0 - /usr/local/bin/yarn
    npm: 6.9.0 - /usr/local/bin/npm
    Watchman: 4.9.0 - /usr/local/bin/watchman
  SDKs:
    iOS SDK:
      Platforms: iOS 12.4, macOS 10.14, tvOS 12.4, watchOS 5.3
    Android SDK:
      API Levels: 23, 24, 25, 26, 27, 28
      Build Tools: 23.0.1, 24.0.3, 25.0.2, 25.0.3, 26.0.1, 26.0.2, 26.0.3, 27.0.3, 28.0.1, 28.0.3
      System Images: android-24 | Google APIs Intel x86 Atom, android-27 | Intel x86 Atom_64, android-28 | Google APIs Intel x86 Atom
  IDEs:
    Android Studio: 3.4 AI-183.6156.11.34.5522156
    Xcode: 10.3/10G8 - /usr/bin/xcodebuild
  npmPackages:
    react-native: 0.60.4 => 0.60.4
  • Platform that you're experiencing the issue on:
    • iOS
    • Android
    • iOS but have not tested behavior on Android
    • Android but have not tested behavior on iOS
    • Both
  • react-native-firebase version you're using that has this issue:
    • e.g. 5.4.3
  • Firebase module(s) you're using that has the issue:
    • e.g. Instance ID
  • Are you using TypeScript?
    • Y/N


Think react-native-firebase is great? Please consider supporting all of the project maintainers and contributors by donating via our Open Collective where all contributors can submit expenses. [Learn More]

@Ehesp
Copy link
Member

Ehesp commented Sep 2, 2019

Thanks for the report. Once the SDK version is released we'll get it tested and updated with a release.

@mikehardy
Copy link
Collaborator

I'm not actually sure there is anything to do? Once it's released you just pod outdated to see it and pod update to install it? v6 and v5.x.x of react-native-firebase support the current release line of the underlying SDKs

@mikehardy
Copy link
Collaborator

Just watch here since they cherry-picked to their 6.8.0 pending release. Once you see 6.8.0 install it https://firebase.google.com/support/release-notes/ios

Also, this is an App Store warning, not a fail. They'll keep accepting these submissions for now. It's also affecting react-native-webview and react-native-device-info at minimum.

@cipriancaba
Copy link
Author

I assume that the auth package needs to update this dependency

s.dependency 'Firebase/Auth', '~> 6.5.0'

Re react-native-webview and react-native-device-info they both posted fixes

@Ehesp
Copy link
Member

Ehesp commented Sep 2, 2019

Yeah on v6 we hard set the versions so that will need changing, v5 should be do-able via updating pods yourself.

@mikehardy
Copy link
Collaborator

oh my - I haven't used v6 yet, the dependencies are coded into each subspec in the packages? they are not configurable in the main app podspec 😱

I am sure there are reasons for that design (like, making it so people don't have to think about adding dependencies...) but I'd hack up a pre script in my main app podspec to control the dependencies personally. sorta like this but moving versions or similar https://guides.cocoapods.org/syntax/podfile.html#pre_install - but I'm pretty touchy about being able to control my own versions

@mikehardy
Copy link
Collaborator

also I can't imagine trying to track the ios sdk releases? e.g., firestore 6.7.1 is out and fixes a crash bug, if they release that sdk over the weekend is there some expectation you cut a release to match contemporaneously? or recommend patch-package? 🤔 - seems like a really tight coupling on something otherwise not in control

@Ehesp
Copy link
Member

Ehesp commented Sep 2, 2019

Let me get back to you on the specifics. You can override the RNFB versions yourself though. I'll speak with @Salakar - probably one to document too.

@quachsimon
Copy link

What is the current status of this warning? Our team is also running into this and points to FIRAuth. We are on v5.4.3 of RNFirebase.

Would we simply update the Podfile Firebase/Auth dependency?

@mikehardy
Copy link
Collaborator

They are fixing things on a very rapid basis - for instance a difference between Firebase iOS SDK release 6.8.0 and 6.8.1 was related to this even, https://firebase.google.com/support/release-notes/ios#version_681_-_september_10_2019 - just a few days ago.

My best recommendation is to get completely current, even though I recognize this means ingesting some breaking changes - read the release notes carefully for react-native-firebase v5.5.0 (on your way to v5.5.6 and Pods 6.8.1)

@mikehardy
Copy link
Collaborator

@quachsimon that was for you - I believe the original reporter was for react-native-firebase v6, which just had a "pod overrides" PR proposed by @Ehesp #2589

@quachsimon
Copy link

Thanks @mikehardy. Will look into updating to react-native-firebase v5.5.6.

After that, I can just change my Firebase/Auth pod to 6.8.1? From the docs it suggests to lock in 6.2.0 for v5.5.x. This should be ok?

@mikehardy
Copy link
Collaborator

mikehardy commented Sep 16, 2019

Oh dang - my documentation is in conflict. My goal with v5.x react-native-firebase maintenance is to allow use of the most up to date underlying SDKs, even if that means small breaking changes in RNFB. I'm personally on 6.8.1 and it's okay.

I updated this table to just be '6.x' for the pods https://rnfirebase.io/docs/v5.x.x/getting-started#Supported-versions---React-Native-/-Firebase and I will update that doc to say that it is best to pin your version yes, but also periodically run pod outdated and update the pods assuming they haven't done breaking changes (so, in the 6.x ios pod range)

So TLDR - 6.8.1 should be okay. If you are on react-native 0.60+ you must use the branch v5.x.x from git as there is a patch needed to make it work with AndroidX that we haven't released yet #2476

@mikehardy
Copy link
Collaborator

See if this is more clear: invertase/react-native-firebase-docs#217 - if you like it, you can say so on the PR and I'll merge. Open to any wording suggestions of course

@quachsimon
Copy link

quachsimon commented Sep 16, 2019

Amazing @mikehardy! Will update to the new version and update afterwards!

@LukePenkava
Copy link

@mikehardy Hi, i am on RN 0.59.10 using react-native-firebase ~5.5.5. I am getting the UIWebView warning from Apple as well. I realy cant transfer to RN 0.60 for production reasons. I am just worried if i will update to latest React Native Firebase i will be forced to switch to 0.60. Let me please know if there is some fix for this Apple warning and staying on RN 0.59.10. Thank you.

@mikehardy
Copy link
Collaborator

no worries, I test it with rn59 and I believe it is still working - demonstration here: https://github.com/mikehardy/rnfbdemo/blob/master/make-demo-rn59.sh

You will still have other work to do as well - I maintain react-native-device-info and it isn't fixed with regard to UIWebView until v3.x.x series, react-native-webview also only just recently. I believe both of those made the transition to AndroidX as well but...I also maintain jetifier, and using jetifier -r (for reverse mode) you should be able to stay on RN0.59 for a bit longer. You'll have to move foward soon though - this is a very tough divide to straddle (RN59 / RN60)

@LukePenkava
Copy link

@mikehardy Thanks, yeah, i just need to stay on 0.59.10 since i am like 2 weeks from release. So just to clarify, i should update to 5.5.6 and update my pods right ? I am on these

  pod 'Firebase/Core', '~> 6.3.0'
  pod 'Firebase/Auth', '~> 6.3.0'
  pod 'Firebase/Database', '~> 6.3.0'
  pod 'Firebase/Messaging', '~> 6.3.0'

I am not sure to what version i should update those to. I think you mentioned 6.8.1 is ok with 5.5.6 and RN 0.59.10 ?

@quachsimon
Copy link

@LukePenkava yes, we are on 5.5.6 and have updated our pods to ~> 6.8.1 and on 0.59.10 and everything is working great!

@LukePenkava
Copy link

@quachsimon great, thank you

@mikehardy
Copy link
Collaborator

yep - I've heard no bad reports on 0.59.10 + pods 6.8.1 (or 6.9.0 now) and 5.5.6

only for people that move from rn 0.59.10 to rn 0.60+ they may need an unreleased react-native-firebase patch that is committed to v5.x.x just not out as a 5.5.7 yet

good luck with the release!

@LukePenkava
Copy link

@mikehardy thanks :) I can confirm that it works fine with 5.5.6 and 6.8.1. The issue with UIWebView when uploading to Appstore is still there tho. I searched through my RN project and it seems that all references to UIWebView are gone now ( before a lot of references to Firebase ), yet the Apple still gives the warning. It might be some other completely issue unrelated to React-Native-Firebase, but just wondering if you perhaps know what might be causing the issue.

@mikehardy
Copy link
Collaborator

Hmm - I know of lots of sources of it. For instance I maintain react-native-device-info and that was a big rush fixing it, you need v3.x there. react-native-webview updated. You got the firebase ios sdk updated so that should be settled (unless maybe you need to deep clean your build system with a react-native-clean-project run where you say yes to "wipe iOS build"). If you look at the react-native-webview repo, there is an issue running there where a few people posted good troubleshooting tips to find other sources of UIWebView symbol references

@LukePenkava
Copy link

@mikehardy I will look into finding other sources of UIWebView. If the update should have solved the UIWebView issue for Firebase, then it must be something else. Thanks again.

@stale
Copy link

stale bot commented Oct 25, 2019

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 the community's attention?

This issue will be closed in 15 days if no further activity occurs.
Thank you for your contributions.

@stale stale bot added the Type: Stale Issue has become stale - automatically added by Stale bot label Oct 25, 2019
@mikehardy
Copy link
Collaborator

This is resolved I believe

@stepupithub
Copy link

Installing Firebase (6.14.0)
Installing FirebaseAnalytics (6.1.7)
Installing FirebaseAnalyticsInterop (1.4.0)
Installing FirebaseAuth (6.4.1)
Installing FirebaseAuthInterop (1.0.0)
Installing FirebaseCore (6.5.0)
Installing FirebaseCoreDiagnostics (1.1.2)
Installing FirebaseCoreDiagnosticsInterop (1.1.0)
Installing FirebaseFirestore (1.8.3)
Installing FirebaseInstanceID (4.2.8)
Installing FirebaseMLCommon (0.19.0)
Installing FirebaseMLVision (0.19.0)
Installing FirebaseMLVisionBarcodeModel (0.19.0)
Installing FirebaseMessaging (4.1.10)
Installing FirebaseStorage (3.4.3)

how to change firebaseauth to 6.8.1 ???
package.json
react-native-firebase "~5.5.6"

@stepupithub
Copy link

Installing Firebase (6.14.0)
Installing FirebaseAnalytics (6.1.7)
Installing FirebaseAnalyticsInterop (1.4.0)
Installing FirebaseAuth (6.4.1)
Installing FirebaseAuthInterop (1.0.0)
Installing FirebaseCore (6.5.0)
Installing FirebaseCoreDiagnostics (1.1.2)
Installing FirebaseCoreDiagnosticsInterop (1.1.0)
Installing FirebaseFirestore (1.8.3)
Installing FirebaseInstanceID (4.2.8)
Installing FirebaseMLCommon (0.19.0)
Installing FirebaseMLVision (0.19.0)
Installing FirebaseMLVisionBarcodeModel (0.19.0)
Installing FirebaseMessaging (4.1.10)
Installing FirebaseStorage (3.4.3)

how to change it plzzz...help me @mikehardy

@stepupithub
Copy link

this is my pod file
react-native version 0.59.10

platform :ios, '9.0'

target 'avunja' do

Comment the next line if you don't want to use dynamic frameworks

#use_frameworks!
pod 'React', :path => '../node_modules/react-native', :subspecs => [
'Core',
'CxxBridge',
'DevSupport',
# the following ones are the ones taken from "Libraries" in Xcode:
'RCTAnimation',
'RCTActionSheet',
'RCTBlob',
'RCTGeolocation',
'RCTImage',
'RCTLinkingIOS',
'RCTNetwork',
'RCTSettings',
'RCTText',
'RCTVibration',
'RCTWebSocket'
]

Pods for avunja

pod 'yoga', :path => '../node_modules/react-native/ReactCommon/yoga/Yoga.podspec'
pod 'DoubleConversion', :podspec => '../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec'
pod 'Folly', :podspec => '../node_modules/react-native/third-party-podspecs/Folly.podspec'
pod 'RNFirebase', :path => "../node_modules/react-native-firebase/ios/"
pod 'react-native-camera', path: '../node_modules/react-native-camera', subspecs: [
'BarcodeDetectorMLKit'
]
pod 'Firebase/Auth'
pod 'Firebase/Firestore'
pod 'Firebase/Core'
pod 'Firebase/Messaging'
pod 'Firebase/Storage'

pod 'GoogleTagManager'
pod 'Firebase/MLVision'
pod 'Firebase/MLVisionBarcodeModel'

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

end

post_install do |installer|

rnfirebase = installer.pods_project.targets.find { |target| target.name == 'RNFirebase' }
rnfirebase.build_configurations.each do |config|
config.build_settings['HEADER_SEARCH_PATHS'] = '$(inherited) ${PODS_ROOT}/Headers/Public/**'
end
end

@stepupithub
Copy link

where should i change @mikehardy @LukePenkava

@stepupithub
Copy link

is that okay @mikehardy

Installing BoringSSL-GRPC (0.0.3)
Installing Crashlytics (3.14.0)
Installing DoubleConversion (1.1.6)
Installing Fabric (1.10.2)
Installing Firebase (6.8.1)
Installing FirebaseAnalytics (6.1.1)
Installing FirebaseAnalyticsInterop (1.4.0)
Installing FirebaseAuth (6.2.3)
Installing FirebaseAuthInterop (1.0.0)
Installing FirebaseCore (6.2.3)
Installing FirebaseCoreDiagnostics (1.1.2)
Installing FirebaseCoreDiagnosticsInterop (1.1.0)
Installing FirebaseFirestore (1.5.1)
Installing FirebaseInstanceID (4.2.7)
Installing FirebaseMLCommon (0.18.0)
Installing FirebaseMLVision (0.18.0)
Installing FirebaseMLVisionBarcodeModel (0.18.0)

@mikehardy
Copy link
Collaborator

@stepupithub I get an email every time you comment. Once is good...

Make it look sort of like this https://github.com/mikehardy/rnfbdemo/blob/master/PodfileRN59 except I don't keep up with the versions there, it's too old to spend the time. That said, if you are on react-native-firebase 5.5.6, I think Pods 6.13.0 would work just fine

@stepupithub
Copy link

owe !!! i'm so sorry mike
ok i dont need to specify version for pod right it means 6.14.0 the latest one is ok with react-native-firebase 5.5.6 and react-native 0.59.10
RNHTMLtoPDF i have changed there because it was also using UIWebView and one more thing i'm using react-native-gesture-handler 1.1.3 and "grep" command also shows me that RNGS using UIWebView but i can't find it...plz can you tell me for that which version i can use for react-native 59.10....
appreciate your hard work @mikehardy
thank you for reply
have a good time

@mikehardy
Copy link
Collaborator

As a best practice always specify versions or your build is not reproducible
I have no idea on specific libraries, but in general I would find the latest one and specify that. It should clean things up, but you may need to move forward to current versions of react-native (google "react-native upgrade-helper" to get a site that can help a lot with the upgrade). This is just for react-native-firebase issues, and we're well past UIWebView issues here so there's no relevant work for this module

laurentS added a commit to mapswipe/mapswipe that referenced this issue May 5, 2020
based on invertase/react-native-firebase#2535
these versions should work with our version of RNFB
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Stale Issue has become stale - automatically added by Stale bot
Projects
None yet
Development

No branches or pull requests

6 participants