Problems with Dapp Development with Flutter and web3 - flutter

I need to clarify a doubt in the development of Dapp, when creating a mobile app with flutter can I use web3 to connect with the wallet and the blockchain?

[Edit 2021-12-02] I just found this https://pub.dev/packages/flutter_web3, it is web only but seems to be compatible with WalletConnect QR codes connection, so it is probably worth a try.
Original answer:
I believe you can check out flutter_web3_provider but it only works for web.
I believe you can also use WalletConnect to support mobile wallets like these ones, but I haven't found a wrapper/implementation for flutter so you would need to implement that. But the good news is you would be able to use it in native apps. I see there is a react-native implementation so hopefully somebody will write the flutter implementation soon. You can support/like the request here.
Also you can directly sign and send transactions to an RPC server (a more direct gate to the blockchain) using web3dart, but of course you would need to ask for and/or store the user's private key, which is probably not what you want.

Related

Can Flutter Web replace doing regular websites?

So I'm having a client that wants an online-coaching website , and I'm an flutter app developer , I've never used flutter web, and I was wondering if I can do the work in Flutter Web instead of learning Angular or Reactjs etc , because I'm familiar with flutter and it will take less time to grasp the concepts .
Answer:
YES, 100%, it will work very well. No need to learn anything new. Same code will also create a website.
Guidelines are here
Exceptions:
In case you are using packages, double-check that those are compatible with "web" (most are compatible but otherwise, you can avoid those)
Bonus information:
You can publish to Firebase... It is free and very fast.
Guidelines here.

Which one is good RevenueCat or in_app_purchase library for Flutter In app purchases?

I have an application published in the Appstore and Google Play Store. Which one should I use for this?
Well, while the in_app_purchase package is the official package from flutter, you have to write a complete backend that communicates with the Google Play server and the Apple Appstore server to verify your subscriptions and consumables/non-consumables what is really important to protect your app from fraud.
However RevenueCat's servers handle that validation process for you.
I personally always prefer using official packages, but if your app is generating lower revenue/has not so much users/... its probably worth it to use RevenueCat's Plugin in the beginning as you save a lot of time and it is free to use up to a monthly revenue of 10,000$
Later if your app is generating higher revenue you can consider writing your own backend.

Is it possible to gather other apps data in swift?

I'm building an web application with react-native.
In this app I need to gather some information about users.
One of them is how much time they spend on other apps installed on their phone.
I couldn't find any library for this job, so I've decided to write the native code my self.
For android, apparently there is this UsageStatsManager that can help me achieve what I want.
But when I searched for sth similar in ios, I found lots of old forums saying that this is not possible.
But I recently I saw this:
It is asking for permission to gather other apps data. SO IT IS POSSIBLE?
Any suggestion is appreciated. How am I supposed to this?
There is no API by apple itself for retrieving data of third party applications. This is called "Sandboxing" where applications are restricted from changing the device settings or retrieving/changing other apps data. Hence, why iphones are secure.
What you have shown in your screenshots is to track application data for personalised ads and such. This can be achieved using the AppTrackingTransparency framework provided by apple. You can read more about the framework here.
TL;DR - You can use AppTrackingTransparency for personalisation

PhoneGap Cordova Browser based and app

Let say were starting a website from the ground up and want to also create apps.
Could you just create the website with a REST API's and have it work on browser and PhoneGap? Would there be a conflict with Cordova plugins you may use?
So the design is responsive and its all HTML, CSS and Javascript and connects to a REST API (log in, reg, messages, db calls, etc) for the browser website and apps.
This way you can use the same code for everything and can still use some of the great Cordova plugins for the app to make it more flexible.
Would this work?
I posted this answer else where but I think it is relevant here.
Unfortunately for your app to pass Apple App store approval it will have to provide some basic functions and display correctly without an internet connection. This means at a minimum, if you plan to generate content on a server you will probably need the Cordova plugin for network information:
https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-network-information/
I would make sure you are familiar with the Apple Human Interface Guidelines:
https://developer.apple.com/ios/human-interface-guidelines/overview/design-principles/
You will probably also need to bundle any JavaScript. Apple is very picky about apps that download code (this can include JavaScript).
This is a section from the iOS developer Agreement.
3.3.2 Except as set forth in the next paragraph, an Application may not download or install executable code. Interpreted code may only be used in an Application if all scripts, code and interpreters are packaged in the Application and not downloaded. The only exceptions to the foregoing are scripts and code downloaded and run by Apple's built-in WebKit framework or JavascriptCore, provided that such scripts and code do not change the primary purpose of the Application by providing features or functionality that are inconsistent with the intended and advertised purpose of the Application as submitted to the App Store.
Another big concern is performance. How will your app handle a poor 3G or even 2G connection? Do you need to cache the responses from the API and only download them if they have changed on the server?
If a user is browsing your website on a browser they know they need an internet connection, if they are using your app they want it to work when online and offline.
Edit
Apple commonly uses this reason for rejection for website only apps.
We found that the experience your app provides is not sufficiently different from a web browsing experience, as it would be by incorporating native iOS functionality.
While your app content may differ from your web site or other existing sites, the experience it provides does not differ significantly from the general experience of using Safari, as required by the App Store Review Guidelines.

If I Implement The iOS 5 Twitter Framework Does my App Contain Encryption?

Does anyone know if I use the Twitter Framework will my app contain encryption?
Frameworks are not included in your app. They are in the device's firmware and are not copied into your app. So even if an iOS framework had encryption in it, it is not included in your app, you just make function or method calls to it, and are not distributing encryption software.
I think no one really answered your question directly; they were merely inferring your intent. The Twitter framework docs only mention HTTP for API requests. The Twitter docs on this say that SSL is optional though encouraged. So I'd imagine that iOS is handling user authentication via SSL in the background, but that all API requests by developers are done over HTTP using oauth. This is only speculation -- to verify you'd want to run a packet sniffer on your local network and check out the transactions when you call the framework methods.
Regarding the export controls mentioned in other comments here, I'd advise you to look at the iTunes Connect FAQ dealing with export controls within the Dev Center. Apple makes it very clear in that document that using encryption integrated into the iOS frameworks still requires you to apply for an ERN with the US Dept. of Commerce. (I won't quote it due to NDA) The other comments currently on this page are simply wishful thinking. I'm sure some developers were confused (and it is confusing), or perhaps have outright lied and have apps in the store which are violating US law. IANAL; I'll leave that choice up to you.
Having said that, there have been some exemptions added to these requirements, as outlined here.