Cache behavior using Firestore in Flutter and Native Code - android

I was wondering if FlutterFire's Firestore uses the same cache as the Android and iOS native Firestore libraries.
Current setup:
We have the app written for Android and iOS separately using the native Android/iOS client library for the platform.
Future setup:
We still have most parts of the app written in Android and iOS using the native libraries, but some parts may be written in Flutter to start sharing more and more code.
We would like to use FlutterFire in the Flutter parts.
Now I'm wondering if the Firestore Flutter SDK will share the cache with the native SDKs, so we don't accidentally cache the same things twice on one device, just because of the dual setup of Flutter with existing native code.

The Flutter SDK for Firestore is just a wrapper around the native SDKs for Android and iOS, so I'm fairly certain that direct access from the native SDK is effectively the same as access via Flutter, and they will use the same local cache.

Related

React Native Android Brotli support

I would like to use brotli for network requests (fetch) in my React Native App, but it works only for iOS (not Android). I'v upgraded RN to the latest version 0.68.1, tested different REST APIs with brotli support and used a fresh RN project with no success. It just can't decode, even if I use the 'Accept-Encoding' : 'br' header.
I would appreciate any additional informations like: how to enable brotli with fetch in React Native, why isn't it supported in Android although Google created it?

Do we need Android SDK , IOS SDK separately along with flutter SDK for flutter applications

I'm new to flutter so I really wanted to know do we need android SDK, ios SDK along with flutter SDK to develop flutter applications? As flutter SDK converts code directly into native/machine code so why I am really curious to know if we need android SDK and ios sdk? Yes I know when we make android native applications We need Android SDK but do not know if we need it in flutter apps as well if we need it then what would be the role of android SDK and flutter SDK
Short answer Yes.
Reasons for this is that the flutter SDK only handles the flutter side of compilations such as Dart. technically each flutter app is inside of a native app Shell. flutter uses various native code modules under the hood to make the app work in all the supported platforms and provide Platform dependent functionality such as File System, Camera, etc...
for example, how file systems work in iOS and Android are different, so flutter uses separate native code to work with the file systems in those 2 OSes. So, to compile those two native codes, flutter needs each OSes SDKs such as iOS SDK and Android SDK.
Best example: https://github.com/flutter/plugins/tree/main/packages/path_provider
You can see how this plugin is implemented differently on each supported platforms.
Of course, you do need an SDK in order to build whether an Android or an IOS. To perform certain tasks like accessing a camera, storage, etc.

How to use module in kotlin Mutliplatform moblie

Hey I am learning Kotlin Multiplatform mobile. I starting learning from the doc. I successfully run the module in android and ios platform, without any problem. Now I want to implement this in real project. I successfully created the module inside my pre-existing android directory. According to this Make your cross-platform application work on iOS we can only use module inside the android directory. I work as android developer and my other team have ios developer. So the problem is we have different system for android and ios. So how can I share this module to the Ios team. Please guide me how to achieve this. I read somewhere ios need XCFramework. But I am not sure, how can I achieved this. Can someone guide me step wise? Thanks
In general, Kotlin Multiplatform Mobile provides you with an ability to build frameworks for iOS. It can be delivered in several ways:
Simple ModuleName.framework file ready to be imported into your teammate's app,
CocoaPods integration, providing your teammate with the ability to rebuild this framework from sources and to use third-party libraries from Kotlin code,
Universal (fat) framework and XCFramework. These two are designed to provide the framework user with the ability to build the result app for different CPU architectures. This would be helpful when publishing the app.
If your aim is to just show the iOS team an example of Kotlin Multiplatform Mobile power, I think it would be enough to declare the framework, build it by executing the appropriate gradle task and share the result file.
If they would also like to put some code into the iOS-specific part of your module, adding the CocoaPods integration will be a good idea.

Does every flutter app contain Flutter engine?

I am trying to digest the following information from Flutter site.
How does Flutter run my code on Android?
The engine’s C and C++ code are compiled with Android’s NDK. The Dart
code (both the SDK’s and yours) are ahead-of-time (AOT) compiled into
native, ARM, and x86 libraries. Those libraries are included in a
“runner” Android project, and the whole thing is built into an APK.
When launched, the app loads the Flutter library. Any rendering,
input, or event handling, and so on, is delegated to the compiled
Flutter and app code. This is similar to the way many game engines
work.
Is each Flutter app (more precisely each Android app that is created with Flutter) published with Flutter engine attached?
Yes, it is included in every app. There is no code sharing between apps on Android/iOS. Also each app could have a different version of the engine (depending on when it was compiled)
Note that the with the upcoming Flutter 1.0, the overhead (on Android) is less than 5M, which is not bad. I believe the overhead is similar on iOS.
libflutter.so is 27.1MB on my emulator for each of a full / production app and a hello world app.

How to integrate braintree to iOS or Android app using flutter?

I'm new to flutter. I've tried to build other hybrid apps using Ionic and cordova, we can use cordova plugins to add native functions.
In flutter, there's pub packages for braintree drop-in but it only supports android in the mean time.
Is it possible to use the iOS framework for Braintree together with Flutter?
I feel a little reluctant to switch to flutter since there's limited pub packages at the moment (especially for iOS platform). Simple app which requires only REST api calls seems to be more suitable to use flutter.
The pub you posted is discontinued. Please move to this. Anyway, it's possible :)

Categories

Resources