Selecting a specific wallet in Wallectconnect with React-Native - react-native

When developing in react-native dapp based on wallectconnect, I have some issues with selecting wallets. I just want to selecting a specific wallet, such as metamask or coinbase wallet. The sample code is below.
import WalletConnectProvider from '#walletconnect/web3-provider';
import { useWalletConnect } from '#walletconnect/react-native-dapp';
const connector = useWalletConnect();
connector.connect('metamast') // This code is issue.
I just want to connect a metamask wallet without wallet selections. This is possible? or I just use metamask and coinbase SDK for connecting the wallet?

Related

Wallet Android/iOS with EXPO

I'm looking for a lib that allows me to click: add wallet... to be automatically redirected to ios wallet or android wallet and add the ticket to the wallet. Is there any way to do this with expo?

whatsapp cloud api enable whatsapp_business_messaging permission

i have been trying to send whatsapp messages using cloud api, but its expecting to enable whatsapp_business_messaging permission which is by default disabled when associating with any app that has been created.
https://developers.facebook.com/docs/whatsapp/cloud-api/get-started#get-access-token.
i didn't find any documentation pertaining to enable the above mentioned permission. Kindly assist
Edited
WhatsApp cloud API is Now Public!
According to their docs,
To start using it for development prepose
Register as a Meta Developer
Enable two-factor authentication for your account
Create a Meta App: Go to developers.facebook.com > My Apps >
Create App. Select the "Business" type and follow the prompts on
your screen.
From the App Dashboard, click on the app you would like to connect
to WhatsApp. Scroll down to find the "WhatsApp" product and click
Set up.
the onboarding process performs the following actions:
our App is associated with the Business Manager that you chose
A WhatsApp test phone number is added to your business. You can use this test phone number to explore the WhatsApp Business Platform
without registering or migrating a real phone number.
for more info please refer to whatsapp cloud getting started docs
Yes, WhatsApp Cloud API is now public.
With the Cloud API, businesses can directly get access to WhatsApp Business API from Facebook, in minutes.
For more info check out this WhatsApp Cloud API Guide.
I recently made an open-source python wrapper for newly WhatsApp Cloud API to help developers easily get started, You really wanna have a look at it https://github.com/neurotech-HQ/heyoo.
Installation
pip install --upgrade heyoo
Here is the sample code to send a message ;
>>> from heyoo import WhatsApp
>>> messenger = WhatsApp('TOKEN', phone_number_id='104xxxxxx')
>>> messenger.send_template('hello_world', 'your number')
For Javascript developers please have a look into Heyhooh
Installation
npm install heyooh
Here how sending to send messages;
import WhatsApp from heyhooh
let messenger = new WhatsApp('TOKEN', phone_number_id='104xxxxxx')
messenger.send_template("hello_world", "255757xxxxxx")
For PHP Developers whatsappcloud-php
Installation
composer require zepson/whatsappcloud-php
Here how the code to send a message;
<?php
require_once 'vendor/autoload.php';
use zepson\Whatsapp\WhatsappClass;
$token = 'YOUR_META_WHATSAPP_APP_ACCESS_TOKEN';
$phone_number_id = '10726082513218961';
//send message
$tsap = new WhatsappClass( $phone_number_id, $token);
$sendtsap = $tsap->send_template('hello_world', '255654485755');
print_r($sendtsap);

expo-notifications getDevicePushTokenAsync on iOS returns a token that’s not FCM and does not work with firebase

SDK Version: 40
Platforms(Android/iOS/web/all): iOS
Add the appropriate "Tag" based on what Expo library you have a question on.
Hi, I'm using react native with expo and expo-notifications, and send notifications with firebase messages in firebase functions.
The integration works great with android, not so much with iOS, the token that's returned seems to be an apn token not an FCM, and firebase admin rejects the token with "The registration token is not a valid FCM registration token"
I tried to use "https://iid.googleapis.com/iid/v1:batchImport" (following this guide: https://www.thepolyglotdeveloper.com/2017/06/apns-tokens-fcm-tokens-simple-http/) with returns a valid FCM token, and works with Firebase Notification Composer, I can get notifications through that interface, but if I try to do the conversion and send notifications from the generated FCM using firebase i get an error from firebase "SenderId mismatch".
I have the credentials correctly added into firebase iOS client, as proven by the Firebase Notification Composer, but somehow, expo is returning a token that is not signed with the same SenderId as firebase and the admin does a check the Composer does not? No sure what's the case.
In short:
I would like to get a FCM token from Notifications.getDevicePushTokenAsync(), which should be possible, or was possible (at least there are some discussions in the github issues).
The firebase function code is :
return admin
.messaging()
.send({
token: registrationTokens,
data: {...}
and the react native:
token = (await Notifications.getDevicePushTokenAsync()).data;
(both work perfect with Android)
also in expo forum: https://forums.expo.io/t/expo-notifications-getdevicepushtokenasync-on-ios-returns-a-token-thats-not-fcm-and-does-not-work-with-firebase/52155

How can iOS application interact with an Ethereum wallet

I have a dapp for web application. Users have metamask installed in the Chrome browser. They make transactions using metamask. Now I want the same application to be developed in iOS using react-native. How to develop this? For browser when users want to make any transaction simply metamask pop ups and asks for confirmation.
How about in mobile devices? How they are going to install metmask in the devices and make transactions in mobile device. Is is possible to achieve this? How can I develop this app?
Your iOS app can communicate with iOS wallets using WalletConnect mobile linking. This fulfils a similar functionality as MetaMask pop-up on desktop environments.
Yes, you don't need metamask for your application. (And I am yet to see someone use it in an app built in React Native.)
Metamask is essentially a wallet which 'injects' into various services on the web. But it is nothing more than a wallet that manages your identit(y/ies).
The features you'd need in your React app would need:
Managing identities (private and public keys.)
Ability to sign transactions.
Then you might want to use extra features such as:
Importing keys
Updating balances
Recording transasctions, etc.
If you're using web3.js, then you need to start here: web3.eth.accounts and look into wallets on the same page.
For React Native, you can use the Moralis SDK https://moralis.io/
If you're developing a native app with Swift, you can use the v1 WalletConnect SDK https://github.com/WalletConnect/WalletConnectSwift.
Also, I'm working on a package (on top of WC) that already has all the configuration for it: https://github.com/maurovz/Glaip

Can I implement Stripe Connect in IOS App?

I have read all detail about stripe payment section here. https://stripe.com/docs/connect
But unable to understand subscriptions section of this page. Please tell me how to implement stripe connect in ios app using objective-C.
Thanks in Advance.
The difference between Stripe and Stripe Connect is who plays the "merchant" role.
With regular stripe the merchant is the app provider. For example an app created by "Barney's Pizza" - The app can collect payment using Stripe for pizzas. In this case Barney's merchant details are built in to the app.
With Stripe connect the app user can register as the "merchant". For example, you create an app that allows small businesses to invoice clients. After they install the app, the user would configure their Stripe account into the app so that they received the payments. Stripe Connect also allows the app developer to charge a fee that is a percentage of the amount - so your app could be free to download but users would pay you a percentage for every charge they made.
Stripe Connect allows users to create an account with Stripe if they don't already have one, which makes the program flow a bit more complex in an app (On the web, the Stripe web site takes care of it for you, redirecting back to your page once it is done).
This answer suggests one approach to using Stripe Connect in iOS - How to use Stripe Connect in an iOS app