This is related to Messaging

Explore Related Topics

Popular New Releases in Messaging

dubbo

dubbo-3.0.7

taro

chore(release): publish 3.4.7

EventBus

EventBus 3.3.1

celery

5.2.6

python-telegram-bot

v13.11

Popular Libraries in Messaging

dubbo

by apache doticonjavadoticon

star image 37142 doticonApache-2.0

Apache Dubbo is a high-performance, java based, open source RPC framework.

uni-app

by dcloudio doticonjavascriptdoticon

star image 36431 doticonApache-2.0

uni-app 是使用 Vue 语法开发小程序、H5、App的统一框架

taro

by NervJS doticontypescriptdoticon

star image 30875 doticonMIT

开放式跨端跨框架解决方案,支持使用 React/Vue/Nerv 等框架来开发微信/京东/百度/支付宝/字节跳动/ QQ 小程序/H5/React Native 等应用。 https://taro.zone/

EventBus

by greenrobot doticonjavadoticon

star image 23725 doticonApache-2.0

Event bus for Android and Java that simplifies communication between Activities, Fragments, Threads, Services, etc. Less code, better quality.

ItChat

by littlecodersh doticonpythondoticon

star image 21699 doticonNOASSERTION

A complete and graceful API for Wechat. 微信个人号接口、微信机器人及命令行微信,三十行即可自定义个人号机器人。

kafka

by apache doticonjavadoticon

star image 21667 doticonApache-2.0

Mirror of Apache Kafka

celery

by celery doticonpythondoticon

star image 19164 doticonNOASSERTION

Distributed Task Queue (development branch)

python-telegram-bot

by python-telegram-bot doticonpythondoticon

star image 18256 doticonNOASSERTION

We have made you a wrapper you can't refuse

PHPMailer

by PHPMailer doticonphpdoticon

star image 18018 doticonLGPL-2.1

The classic email sending library for PHP

Trending New libraries in Messaging

data-science-interviews

by alexeygrigorev doticonhtmldoticon

star image 5065 doticonCC-BY-4.0

Data science interview questions and answers

venom

by orkestral doticonjavascriptdoticon

star image 3775 doticonApache-2.0

Venom is the most complete javascript library for Whatsapp, 100% Open Source.

fosscord

by fosscord doticonjavascriptdoticon

star image 3576 doticonAGPL-3.0

Fosscord is a free open source selfhostable discord compatible communication platform

LogiKM

by didi doticonjavadoticon

star image 3451 doticonApache-2.0

一站式Apache Kafka集群指标监控与运维管控平台

redpanda

by vectorizedio doticonc++doticon

star image 3320 doticon

Redpanda is the real-time engine for modern apps. Kafka API Compatible; 10x faster 🚀 See more at redpanda.com

CrewLink

by ottomated doticontypescriptdoticon

star image 3159 doticonGPL-3.0

Free, open, Among Us Proximity Chat

tmpmail

by sdushantha doticonshelldoticon

star image 2789 doticonMIT

A temporary email right from your terminal written in POSIX sh

Logi-KafkaManager

by didi doticonjavadoticon

star image 2639 doticonApache-2.0

一站式Apache Kafka集群指标监控与运维管控平台

script-commands

by raycast doticonshelldoticon

star image 2351 doticonMIT

Script Commands let you tailor Raycast to your needs. Think of them as little productivity boosts throughout your day.

Top Authors in Messaging

1

getweapp

86 Libraries

star icon1233

2

apache

65 Libraries

star icon121059

3

TwilioDevEd

40 Libraries

star icon494

4

laravel-notification-channels

34 Libraries

star icon2254

5

GetStream

32 Libraries

star icon3521

6

microsoft

27 Libraries

star icon2625

7

confluentinc

27 Libraries

star icon16029

8

IBM

26 Libraries

star icon1012

9

lensesio

26 Libraries

star icon2587

10

wechaty

26 Libraries

star icon14368

1

86 Libraries

star icon1233

2

65 Libraries

star icon121059

3

40 Libraries

star icon494

5

32 Libraries

star icon3521

6

27 Libraries

star icon2625

7

27 Libraries

star icon16029

8

26 Libraries

star icon1012

9

26 Libraries

star icon2587

10

26 Libraries

star icon14368

Trending Kits in Messaging

Two-factor authentication (2FA) is a multifactor security process where users must authenticate their identity with two different means. This ensures better protection of secured assets and information.

Traditional username and password combinations are prone to hacking and getting hacked has been on the rise. Implementing 2FA authentication will prevent hackers from accessing your accounts even if your password is stolen. 2FA is a recommended practice for securing all your online accounts and devices to protect sensitive information losses.

You will need a different set of components with features ranging from creating the secret codes, accessing and authenticating.

OTP:

Time-based One-Time Password involves generating a one-time password from a shared secret key and the current timestamp using cryptographic algorithms. These libraries will help you generate secrete one-time passwords

SMS

Typically the OTP codes are sent to the user's mobile phone using SMS. This also helps to validate the user's mobile number correctness. The user can then enter the secret code into the application to complete the multifactor authentication. The below libraries will help in sending SMS from your application.

Email

The unique generated one-time password is sent via email to the user. The user uses the code from the email and enters the code into the application to confirm the authentication.

Biometric Authentication

Using Biometrics for authentication has been made easy with mobile devices. Biometrics can include different choices, such as using fingerprints, voice, and face as the secondary authentication mechanism.

Push Notifications

Typically, push notifications are sent to your mobile app to authorize login requests. It will include the details of the access device details and once authorized, the login to the application is allowed. Below libraries help in implementing the push notification-based authorization.

Python Machine Learning libraries help develop supervised and unsupervised learning, data pre-processing, feature extraction tools, and deep learning. 

 

Following are the top use cases of these shortlisted libraries for Python Machine Learning,

  • Pre-processing of data that includes data cleaning and feature engineering tasks such as normalization, imputation, missing value treatment, and outlier detection.
  • Model selecting and optimizing, such as cross-validation, hyperparameter tuning, and model selection metrics.
  • Visualizations to understand data and results. This includes visualizing data distributions, feature importance, and model performance.
  • Developing algorithms, including supervised learning algorithms (e.g. linear regression, logistic regression, support vector machines, decision trees, random forests, and neural networks) as well as unsupervised learning algorithms (e.g. clustering, dimensionality reduction, and anomaly detection).
  • Calculating performance metrics such as accuracy, precision, recall, and F1 score.

 

The following is a list of the 18 most popular open-source Python libraries for Machine Learning,

keras:  

  • It provides a high-level API for building and training deep neural networks.   
  • Keras allows you to define and incorporate custom layers and loss functions.    
  • Configure Keras to run on top of deep learning frameworks like TensorFlow, etc.

Scikit-Learn:  

  • It is an essential library in the field of machine learning and data science.  
  • It provides tools for cross-validation, hyperparameter tuning, and model selection.    
  • The library runs on top of other scientific Python libraries like NumPy and SciPy.   

Pandas:  

  • It is a popular Python library for data manipulation and analysis.   
  • It offers tools for data cleaning. This includes handling missing values, data alignment, and data type conversion.   
  • It supports time series data, making it valuable for financial analysis and forecasting.   

YOLOv5:  

  • "You Only Look Once version 5," is a popular computer vision model for object detection. 
  • It is popular for its real-time object detection capabilities. 
  • It has improved upon the accuracy of its predecessors while maintaining its speed. 

Ray:  

  • It is an open-source distributed computing framework used in Python.   
  • It enables you to parallelize and distribute Python applications.   
  • It helps with low-latency, high-throughput computing tasks.   

ML-From-Scratch:  

  • This helps you gain a deep understanding of the underlying algorithms and mathematics.   
  • This allows you to customize it for your specific problem and data. This makes it more effective and efficient.   
  • Building models from scratch provides insight into optimization techniques.   

examples:  

  • It helps in AI, ML, DL, Pytorch, TensorFlow applications.   
  • This library in PyTorch is essential for working with computer vision tasks.   
  • You can access pre-trained models like ResNet, VGG, and AlexNet through "torchvision.models".   

Paddle:  

  • It is an open-source deep learning platform developed by Baidu.  
  • It is a powerful deep learning framework, like TensorFlow and PyTorch.   
  • It focuses on simplicity and efficiency.  

rasa:  

  • It is an open-source Python library designed for building conversational AI apps.   
  • It provides tools for creating and managing conversational flows.  
  • It supports many languages and can helps in a global context.  

horovod:  

  • It is a popular library in Python used for distributed deep learning.   
  • It enables you to scale your DL models to many GPUs and even across many machines.   
  • It supports various deep learning frameworks like TensorFlow, PyTorch, and MXNet.   

mlflow:  

  • It is an open-source platform for managing the end-to-end machine learning lifecycle.  
  • It allows you to log and compare experiments.  
  • It provides tools for packaging models in a standard format.

imgaug:  

  • It is an important tool for image augmentation. It is especially used in machine learning and computer vision tasks.   
  • It allows you to customize augmentation pipelines to suit your specific needs.    
  • It works well with other popular libraries like OpenCV and NumPy.  

ChatterBot:  

  • It provides a framework and pre-built components. That makes it easier to create chatbots.   
  • This library often includes NLP capabilities. This allows chatbots to understand and generate human-like text responses.  
  • These libraries offer options for customizing the behavior and responses of chatbots.

nni:  

  • NNI handles distributed training, making it suitable for large-scale experiments.  
  • NNI is important for streamlining and improving the machine learning model development process.  
  • It automates and optimizes ML model selection and hyperparameter tuning.    

numpy-ml:  

  • It is a fundamental library in the Python ecosystem. It is especially used in the context of machine learning and data science.  
  • It is open-source and has a large and active community.  
  • It is crucial for performing efficient numerical and array-based operations.  

tpot: 

  • It is a Python library for automated machine learning (AutoML).  
  • This includes feature selection, data preprocessing, and the choice of models.
  • It employs techniques like cross-validation to reduce the risk of overfitting.    

autokeras:  

  • It is an open-source library for automated machine learning (AutoML).  
  • It simplifies the process of building and training machine learning models.  
  • It is accessible to both beginners and experienced ML practitioners.  

pattern:  

  • It is often referred to as a design pattern library.   
  • It is a collection of reusable solutions to common software design problems.
  • These patterns help developers create more efficient, maintainable, and scalable code.  

FAQ 

1. What is scikit-learn?  

It is an ML library for Python. That provides simple and efficient tools for data analysis and modeling. It offers a wide range of algorithms for classification, regression, clustering, and more.    

 

2. What is PyTorch?   

PyTorch is an open-source machine learning library. It is developed by Facebook's AI Research lab. It helps with deep learning and provides dynamic computation graphs. This makies it popular among researchers.    

 

3. What is Keras?   

Keras is an open-source deep learning API. That runs on top of other deep learning frameworks like TensorFlow and Theano. It's designed to be and allows for rapid prototyping of neural networks.   

 

4. How do I install these libraries?  

You can install these libraries using Python's package manager, pip. For example, you can install scikit-learn with pip install scikit-learn. Also, install TensorFlow with pip install tensorflow, and PyTorch with pip install torch.    

 

5. What is the difference between a tensor and an array in TensorFlow?  

In TensorFlow, a tensor is a multi-dimensional array. This array can be placed on GPU for accelerated computation. It is like NumPy arrays but optimized for deep learning tasks. 

The smtplib module will define an SMTP client session object which we can use for sending email to any machine connected to the internet with an ESMTP or SMTP listener daemon. 


We can use Python for sending an email in many ways, like an email with an attachment, an HTML/Markdown-formatted email message, or plain text. Many third-party libraries are available in the market, like EmailReplyParser for parsing the response from email threads, EmailMessage module in Python’s Standard Library, Mailgun-py, which is an official and actively maintained library, and Flanker which is a parsing and validation library. 


We have handpicked the top 15 Python Email Libraries in 2024 which fulfill all the developer requirements: 

GHunt

  • Is an offensive Google Framework that is designed to evolve effectively.  
  • Is fully asynchronous and uses CLI & modules.  
  • Will automatically use venvs to avoid dependency conflicts with other projects. 

mailinabox

  • Helps us in taking back control of our email by defining an easy-to-deploy, one-click SMTP+everything else server: a mail server in a box. 
  • Promotes innovation, privacy, and decentralization on the web. 
  • Has auditable, idempotent, and automated configuration. 

Mailpile

  • Is a fast web-mail client, modern, with user-friendly privacy and encryption features.  
  • Places emphasize providing an elegant user interface and a clean and pleasant user experience. 
  • Allows email to be organized with tags and lets us automatically configure tag incoming email depending on Bayesian classifiers or static rules. 

theHarvester

  • Is a simple yet powerful tool designed for use during the reconnaissance stage of a penetrated or a red team assessment test. 
  • Performs Open Source Intelligence (OSINT) by gathering help in determining a domain’s external threat landscape. 
  • Gathers emails, subdomains, URLs, names, and IPs with the help of multiple public resources. 

pyWhat

  • Will easily let you identify IP addresses, emails, and more. 
  • Helps in filtering outputs, exporting, and sorting according to your requirements. 
  • Supports filters like bug bounties and many more. 

sync-engine

  • Offers a RESTful API on top of a powerful email sync platform to make it easier to build apps on top of the email. 
  • The API service will provide a REST API to help interact with your data. 
  • The sync engine will automatically begin synchronizing your account with your current provider. 

yagmail

  • Is an SMTP/GMAIL client which aims to make sending emails the simplest and easiest task. 
  • With yagmail, sending emails to many people by offering a list of email strings rather than mentioning a single string is possible. 
  • Is a wrapper library on top of smtplib that is a standard library to send emails using Python. 

mailin

  • Is an SMTP server that listens to emails, parses them, and posts them in json format to the URL you choose.  
  • Checks incoming email’s spf, spam score, and dkim to tell you the language in which it is written.  
  • Can be used as a standalone application embedded inside a node application or directly from the command line. 

offlineimap

  • Is software that helps download your email mailbox or mailboxes as local Maildirs.  
  • OfflineIMAP will synchronize both sides using IMAP.  
  • Allows you to read your email offline without requiring your mail reader to support your IMAP operations. 

gmail

  • Is a Pythonic interface for Google’s Gmail with all the necessary tools.  
  • Will search, archive, delete, read, and send multipart emails, manage labels, and mark as read/unread emails. 
  • Connects with live Gmail for accessing real-time data. 

flanker

  • Is an open source parsing library in Python which contains an address and a MIME parsing library.  
  • Both can parse addresses, validate them, and convert headers to Unicode, which detects and preserves encodings when possible. 
  • Stores the message in a single string, tracks changes, and returns unchanged parts during serialization. 

inbox.py

  • Is an asynchronous simplest SMTP server.  
  • Can handle one instance of over one thousand emails per second.  
  • Is a library for managing email inboxes that provides an API for creating, deleting, reading, and retrieving emails. 

django-anymail

  • Let's send and receive an email in Django with your choice of transactional Email Service Provider (ESPs). 
  • Includes integration to each ESP’s sending APIs into Django’s built-in email package, simplified inline images from HTML email, and ‘Batch Transactional’ sends with your ESP’s merging and templating features.  
  • Maintains compatibility with all Django versions and is extensively tested on all Python versions which Django supports. 

python-o365

  • Aims in making interact with Office 365 and Microsoft Graph in a Pythonic and easy way. 
  • Helps with access to Calendar, OneDrive, Email, and Contacts. 
  • Provides automatic handling between local and server datetimes. 

SimplyEmail

  • Is an email recon that is easy and quick using the framework built on.  
  • Uses built-in Parsers for the rawest results.  
  • Multiprocessing Queue for modules and Results Queue for easy Email data handling. 

FAQ:  

1. What is the email module used for in Python programming?  

The Python 'email' module can create, send, receive, and manage email messages. It helps you with email messages, different email types, and functionalities. You can use the 'email' module to write and send plain text and HTML emails. It also lets you handle headers and add attachments.  


Key Features:  

  • Message Composition: It helps create and format email messages with various MIME types. It includes plain text, attachments, and HTML.  
  • Header Manipulation: It provides methods to manipulate and add headers to email messages. Headers are crucial to route and identify emails correctly.  
  • MIME types: It supports different MIME types. It allows you to send emails with rich content like video, audio, and images.  
  • SMTP Integration: You can use the 'smtplib' module with the 'email' module to send emails over an SMTP server.  
  • Message Parsing: You can use the module to parse incoming email messages. It can be helpful when you need to extract information from received emails.  
  • Internationalization: It supports international character encodings. It provides features to send emails in various languages and character sets.  
  • Attachment Handling: You can add files to your email using the 'email' module. This is useful for sending documents, images, or other files along with your emails.  

  

2. How does the listener daemon work in Python's email libraries?  

Python's email libraries do not include a dedicated concept for listening to demons. But you may want to make a program that listens for emails using 'imaplib' and 'email.  


Here is how it works:  

Checking for New Emails:   

The program connects to the IMAP server using 'imaplib.' To start, log in using the right login information. Then, choose the mailbox you want and look for new or unread emails. Once you find new emails, you can use the 'email' module to parse and process the content of these emails.  

Internet Message Access Protocol:  

IMAP is a protocol to access and manage email messages stored on a mail server. POP3 usually downloads emails to the device and deletes them from the server. It allows you to manage emails on the server itself. Python's 'imaplib' module provides a way to interact with IMAP servers.  

Listener Setup:  

To create an email listener in Python, you typically use the 'imaplib' module to connect to an IMAP server. It periodically checks for new emails in a specified mailbox (folder) on the server.  

  

3. What does the smtplib module include in its features?  

The 'smtplib' module in Python provides a way to send emails using SMTP. SMTP server uses it to deliver email messages. It offers several features and functionalities that facilitate sending emails programmatically.  


Here are the key features included within the 'smtplib' module:  

SMTP Connection Management:  

  • SMTP (host, port): Using the constructor to create an SMTP instance. It provides the hostname and port of the server.  
  • Login (user, password): Authenticates with the server using the specified username and password.  
  • starttls(): Initiates a secure TLS connection with the server.  


Debugging and Logging:  

  • has_extn(name): Checks if the server supports a specific extension.  
  • set_debugLevel(level): Sets the debug output level for the SMTP connection.  


Email Sending:  

  • quit(): Closes the SMTP connection.  
  • sendmail (from_addr, to_addrs, msg): The function sendmail sends an email. It takes three arguments: from_addr, to_addrs, and msg.  
  • send_message(msg): Sends an email message object directly using the SMTP connection.  


Exception Handling:   

  • SMTPConnectError: Raised if the connection to the SMTP server fails.  
  • SMTPException: Base class for exceptions raised by the 'smtplib' module.  
  • SMTPAuthenticationError: Raised if authentication with the SMTP server fails.  


Authentication and Security:  

  • starttls(): Initiates a TLS/SSL encrypted session to secure communication.  
  • login (user, password): Enter your username and password to log in. This will allow you to authenticate with the SMTP server.  

  

4. How do Multipurpose Internet Mail Extensions (MIME) help with mail transmission?  

MIME helps emails send more than just plain text by including multimedia content. It is important for mail transmission. Email messages follow an Internet standard. This standard allows for character encodings, attachments, and content types. It enhances the capabilities of email messages. It makes them more versatile and capable of handling rich content.  


Here is how MIME helps with mail transmission:  

  • Support for Non-Text Content  
  • Attachments  
  • Content Type Identification  
  • Content-Encoding  
  • Compatibility  
  • Header Information  
  • Message Structure  
  • Multi-Part Messages  
  • Inline Images and Styling  


MIME improves email messages by consistently handling various content types. Emails can carry multimedia attachments, styled HTML content, and other non-text elements. It makes email communication more versatile and expensive.  

  

5. What should you consider when selecting an email service provider for Python apps?  

It would help to consider many things when picking an email service for Python apps. Make sure your chosen provider meets your application's needs and requirements.  


Here are some key considerations:  

  • API Documentation and Support  
  • Email Deliverability  
  • Ease of Integration  
  • Email Sending Limits  
  • Authentication and Security  
  • Scalability  
  • Template Support  
  • Cost and Pricing Model  
  • Analytics and Tracking  
  • Geographical Coverage  
  • Vendor Lock-in  
  • Compliance and Regulations  
  • Customization and Branding  
  • Service Uptime and Reliability  

  

6. How can I create an SMTP client session object to send emails through a server?  

To create an SMTP client session object to send emails through a server, you can use the 'smtplib' module. Here are the steps to make an SMTP client session and send emails using the module: 

  • Import the 'smtplib' module: Import the 'stmplib' module. It provides methods and classes to send emails using the SMTP protocol.  
  • Create an SMTP connection: Use the 'SMTP' class to show a connection with the server. You should provide the hostname and port number of the SMTP server. The standard ports are 25 (unencrypted) and 587 (encrypted with STARTTLS). If you use SSL/TLS, you might need to use a different port.  
  • Start TLS Encryption: Use the 'starttls()' method to make a secure connection. Use it if your email server has TLS encryption.  
  • Login to the server: Authenticate with the SMTP server using your email credentials. Replace ‘your_email@example.com' and 'your_password' with your actual email and password.  
  • Create an Email message: Use the 'email' module to create an email message. This could include setting the sender, subject, recipients, and message body. You can also attach files and format the email content.  
  • Send the email: Use the 'sendmail()' method to send the email. Provide the sender's email address, the message content, and the recipient's email address.  
  • Quit the SMTP connection: To end the SMTP connection, close it after sending emails.  

Most Python Discord API libraries offer various features, making it easier to develop Discord bots and interact with the Discord API. Most Python Discord API libraries offer an effortless way of creating and managing bots on the Discord Platform. These libraries often offer functionality for handling events like a user joining a server, a reaction added to a message, or a message received.  


These libraries offer effortless ways to handle commands from the Discord server users. It can handle audio and voice functionalities, like streaming video, joining voice channels, and more. These support Discord’s new slash commands that offer an easy-to-use interface for users to interact with bots. It has a built-in caching mechanism for reducing the number of API requests to Discord and improving its performance. It offers methods for easily making requests to the Discord API and handling responses. It supports Discord webhooks by letting bots send messages and interact with Discord outside a server.  


Here is the list of the top 8 Python Discord API libraries that are handpicked to help developers: 

discord.py: 

  • Is an easy-to-use, asynchronous-ready, modern, and feature-rich API wrapper for Discord written in Python.  
  • Offers a simple and intuitive API to build Discord bots, making it accessible for developers of all skill sets.  
  • Has robust support for audio and voice, like streaming audio, joining voice channels, and many more.  

modmail: 

  • Is a Python library to build a moderation system within Discord servers. 
  • Allows users to contact server administration and moderators privately without having to share their messages publicly in a channel.  
  • Tracks user data like their conversation and messages history, making it easier for moderators to handle ongoing issues. 

nextcord: 

  • Is a Python library to build Discord bots that are forked from the original discord.py.  
  • Offers similar functionality as discord.py with certain improvements and changes.  
  • Has support for Discord’s new slash commands that offers an easy-to-use for users to interact with bots. 

hikari: 

  • Is a Python library to build Discord bots that aim to offer a modern and efficient API compared to other Python Discord libraries. 
  • Is designed with modern Python features like type hints and async/await. 
  • Is optimized for performance and uses asyncio for handling requests and events. 

interactions.py: 

  • Is a Python library that is a highly extensible, complete feature, and easy-to-use bot framework for Discord.  
  • Our HTTP client implements preemptive rate limit avoidance, so your bot is guaranteed never to hit HTTP 429.  
  • Each HTTP request and Gateway event made is cached if needed, so you never have to save information yourself. 

disnake: 

  • Is a fast, efficient, and modern Python library to build Discord bots, a fork of the discord.py library with many improvements.  
  • Is optimized for performance and uses asyncio to handle requests and events, making it one of the fastest Discord libraries.  
  • Discord’s components are supported in disnake, allowing more engaging and interactive bot experiences. 

jishaku: 

  • Is a debugging and testing extension for Discord.py, a popular Python library for creating Discord bots. 
  • Offers various utilities for debugging and testing Discord.py applications, like an interactive shell for running code snippets and functionality and commands for inspecting the current state of the server and bot.  
  • Advanced error handling and reports with detailed information about the cause of errors and how to fix them. 

Raid-Toolbox: 

  • A Python library is a big toolkit of raiding, token management, and spamming tools for Discord.  
  • Includes custom themes or skins, token checker, message spammer, and mass mentioner. 
  • Also includes DM spammer, Group DM spammer, image spammer, embed spammer, and Ascii spammer. 

Today data has generated constantly, and business needs the latest data to be used for business decisions via intelligent applications. This requires constantly processing data in a streaming fashion to get the lower latency. This will also allow optimum usage of the resources and get the up-to-date data loaded into the systems.

Stream processing involves multiple processing steps in near real-time as the data is produced, transported, and received at the target location. Some examples of such processing requirements processing data in motion are from continuous streams from sensors in IT infrastructure, machine sensors, health sensors, stock trade activities, etc

To create an end-to-end stream processing, you will need components performing different tasks stitched together in a pipeline and workflow.

Streaming

Using the below libraries, you can build you own correct concurrent and scalable streaming applications.

Stream processing engine

The below open-source stream processing framework provide you with stream processing capabilities.

Data Pipeline

Below libraries help in defining both batch and parallel processing pipelines running in a distributed processing backends.

Mailchimp recently agreed to be acquired by Intuit for $12 billion. The company founded by Ben Chestnut and Dan Kurzius in 2001 hit possibly the highest sale amount ever of a privately bootstrapped company, and is an inspiration to all startups on building a company ground up. I found three interesting strategic decisions in Mailchimp’s journey. Mailchimp was one of the earliest providers to introduce micropayments of $5 a month in their early days. Freemium and micropayments have become a template for SaaS today. Secondly, they focused on small businesses, when most tech was geared towards the enterprise. Lastly, they pivoted the company away from just email into social media and marketing. Kudos to Ben and Dan on this fantastic journey. The $12 Billion valuation does indicate a massive potential in Email marketing! Did you know there are over 100,000 libraries in open source for email automation and marketing? You could look to build the next unicorn in email automation! kandi kit for Email Marketing Solutions showcases open source libraries across Email Marketing Automation, Core Email Platforms, Gathering and Processing Email Addresses, and engaging Email Templates.

Email Marketing Automation

Open source and public reusable libraries that automate most parts of Email marketing.

Gathering and Processing Email Addresses

Open source and public reusable libraries that gather and process Email addresses.

Email Platform Libraries

Platforms that implement core Email functions if you are looking to implement a bespoke solution.

Email Templates

Open source and public reusable libraries that provide Email templates to achieve meaningful engagement with customers.

Python encryption libraries provide base chunks of pre-written code that can be repurposed to develop a unique encryption-decryption system.

These libraries offer a long list of primitives a developer can build upon, choosing from cipher-decipher algorithms like AES, RSA, DES, etc. It allows developers to deal with sideline attacks better. Open-source Python libraries, not being a part of the standard package, can be installed using the PIP function. Python encryptions systems are not web-exclusive; the language allows a developer the flexibility of cross-platform use, unlike other popular coding languages like, say, PHP.


The list below summarizes our top open-source python libraries, consisting of ready-to-incorporate code components for designing encrypted security. Certbot acquires SSL certificates from the open-source certificate authority, Let's Encrypt. It also gives the developer the option to automatically enable HTTPS protocol and to act as a client for certificate authorities running on the ACME protocol. Mailpile, a web-mail client, focuses on the overall experience by providing a clean user interface. While being a web-based interface, it also provides an API and a command-line interface for developers. Ciphey employs artificial intelligence to assess the type of encryption and decipher the input text fast. It is minimalistic and precise.

certbot:  

  • It is a command-line tool for managing SSL/TLS certificates.   
  • It is often used in conjunction with Python web servers, such as Nginx or Apache.   
  • It enables secure communication over HTTPS.  

Ciphey:  

  • Ciphey is a Python library used in Institutions, Education, Security, and Cryptography applications.  
  • It is a tool designed for automatic decryption of ciphers and codes.  
  • It aims to simplify the process of deciphering encrypted messages. This detects the encryption method and provides the decrypted result.  

Mailpile:  

  • Mailpile helps in Institutions, Learning, Administration, Public Services, Messaging, and Email applications.  
  • It provides an interface for managing and encrypting emails.  
  • Its primary user interface is web-based. It also offers a basic command-line interface and an API for developers.

byob:  

  • BYOB in Python generally refers to "Bring Your Own Bytes" or "Bring Your Own Key," depending on the context.  
  • It allows users to provide their own cryptographic keys. Rather than relying on default or generated keys.  
  • BYOB enables customization to meet these needs.

cryptography:  

  • It is a Python library used in Security, Cryptography applications.  
  • It exposes cryptographic primitives and recipes to Python developers.  
  • It ensures data confidentiality, integrity, and authenticity.

acme-tiny:  

  • acme-tiny is a Python encryption library.  
  • It helps with Security, Encryption, and Docker applications.  
  • You can install using 'pip install acme-tiny' or download it from GitHub, PyPI. It is used as a tiny script to issue and renew TLS certs from Let's Encrypt.

yadm:  

  • yadm is a Python library used in Devops, Configuration Management applications.  
  • yadm is a tool for managing dotfiles.  
  • It helps ensure consistency and ease of setup by keeping track of configurations.

ssh-audit:  

  • ssh-audit is a Python library.  
  • It is a tool used to audit the security configurations of SSH servers.  
  • It identifies potential vulnerabilities and weaknesses in the SSH configuration.

PyBitmessage:  

  • PyBitmessage is a Python library used in Telecommunications, Media, Telecom, Networking applications.  
  • It is a P2P communication protocol used to send encrypted messages to another person.  
  • It aims to hide metadata from passive eavesdroppers.

RsaCtfTool:  

  • RsaCtfTool is a Python library used in Security and Cryptography applications.  
  • It is a Python-based tool designed for solving RSA Capture the Flag (CTF) challenges.  
  • It plays a crucial role in CTF competitions. Its participants often encounter RSA-related problems. 

pycrypto:  

  • PyCrypto is important for several reasons in the context of encryption.  
  • PyCrypto supports various encryption algorithms, hashing functions, and random number generators.  
  • PyCrypto facilitates interoperability by supporting used cryptographic standards.

EQGRP_Lost_in_Translation:  

  • EQGRP_Lost_in_Translation is a Python library.   
  • It helps in Programming Style applications.  
  • It decrypts content of odd.tar.xz.gpg, swift.tar.xz.gpg and windows.tar.xz.gpg.

asyncssh:  

  • asyncssh is a Python library that provides an asynchronous framework for SSH communication.  
  • SSH relies on encryption algorithms to secure data transmission.  
  • asyncssh supports various encryption algorithms, providing a secure means of communication over networks.

Cloakify:  

  • Cloakify is a Python library used in Testing and Security Testing applications.  
  • It is a tool designed to obfuscate or "cloak" data in various formats, making it less conspicuous.  
  • This is useful for hiding sensitive information in plain sight.

demiguise:  

  • demiguise is a Python encryption library.  
  • It helps in Security, Encryption applications.  
  • It is an HTA encryption tool for RedTeams.

Crypton:  

  • Crypton is a Python library used in Security, Cryptography applications.  
  • Crypton is an educational library to learn and practice Offensive and Defensive Cryptography.  
  • It is an explanation of all the existing vulnerabilities on various Systems.

xortool:  

  • It is a tool used for analyzing and breaking simple XOR-based encryption.  
  • XOR is a bitwise operation that helps in encryption.  
  • It is a tool used to analyze multi-byte xor cipher.

tf-encrypted:  

  • tf-encrypted is a Python library that extends TensorFlow.   
  • TansorFlow extends to enable privacy-preserving machine learning using encrypted data.  
  • It aims to make privacy-preserving machine learning available, without requiring expertise in cryptography.

GlobaLeaks:  

  • GlobaLeaks is a Python library used in Security, Encryption applications.  
  • It is an open-source whistleblowing framework designed for secure and anonymous communication.  
  • It provides tools for organizations to set up their own secure whistleblowing platforms.

server:  

  • servers enable secure connections, like HTTPS. HTTPs are vital for protecting sensitive information during data transmission over networks.  
  • It ensures the confidentiality and integrity of data by handling encryption keys.  
  • It provides a central point for managing cryptographic operations.

ssl_logger:  

  • ssl_logger is a Python library used in Security, TLS applications.  
  • It helps in identifying potential vulnerabilities, debugging handshake problems, and ensuring secure communication.  
  • It Decrypts and logs a process's SSL traffic.

simp_le:  

  • simp_le is a Python library that helps with encryption.  
  • It Encrypts Client. It has no bugs and has no vulnerabilities.  
  • simp_le can download it from GitHub.

featherduster:  

  • FeatherDuster is a Python library designed for educational purposes.  
  • It is to help users understand various aspects of cryptography.   
  • It helps in penetration testing scenarios. It assesses the security of cryptographic components in apps and systems.

hawkpost:  

  • featherduster is a Python library used in Security, Cryptography applications.  
  • It is an online service that allows users to create encrypted messages with a sharable link.  
  • Cryptanalib is the moving part behind FeatherDuster, and helps with FeatherDuster.

tfc:  

  • tfc is a Python library used in Networking, Router applications.  
  • It helps developers install privacy-preserving machine-learning techniques.   
  • It is a Tinfoil Chat - Onion-routed, endpoint secure messaging system.

pyopenssl:  

  • pyOpenSSL is a Python wrapper around the OpenSSL library.   
  • It provides support for secure sockets (SSL/TLS) and cryptographic functions.  
  • It allows Python apps to establish secure connections over the internet. It uses the SSL/TLS protocol.

nucypher:  

  • NuCypher is provides a decentralized key management system.  
  • It allows for proxy re-encryption, enabling data sharing without exposing sensitive keys.  
  • This is valuable for apps requiring secure and decentralized access control in blockchain. 

RAASNet:  

  • RAASNet is a Python Encryption library.  
  • It helps with Testing and Security Testing applications.  
  • It is an Open-Source Ransomware as a Service for Linux, MacOS and Windows.

dnsrobocert:  

  • dnsrobocert is a Python library used in Security, TLS, Docker applications.  
  • It obtains SSL/TLS certificates through an automated process.   
  • It integrates with DNS challenges for verification.

Xeexe-TopAntivirusEvasion:  

  • Xeexe-TopAntivirusEvasion is a Python library used in Security, Firewall applications.  
  • It is an Undetectable & Xor encrypting with custom KEY.  
  • It bypasses Top Antivirus like BitDefender, Malwarebytes, Avast, ESET-NOD32, AVG, & Add ICON and MANIFEST to excitable.

Decentralized-Internet:  

  • A decentralized internet can enhance security in Python encryption libraries. It reduces the reliance on central authorities.  
  • This enhances the robustness of encryption implementations.  
  • It can contribute to user privacy by minimizing the collection of sensitive data.

PacketWhisper:  

  • PacketWhisper is a Python library used in Testing, Security Testing applications.  
  • PacketWhisper helps to address specific needs or vulnerabilities in network communication.  
  • It could be valuable for scenarios where secure packet transmission is crucial.

python-paillier:  

  • Python-Paillier is a library that implements the Paillier cryptosystem in Python.  
  • In machine learning, Python-Paillier applies to build privacy-preserving models.  
  • Python-Paillier, being an open-source library, encourages collaboration and contributions from the community.

covertutils:  

  • covertutils is a Python encryption library   
  • It helps with Testing and Security Testing applications.  
  • It is a framework for Backdoor development.

decrypt:  

  • It is crucial for retrieving original data from encrypted content.  
  • It ensures data confidentiality. It allows authorized users to access and understand the information.  
  • It is essential in scenarios were sensitive data needs transmission or storage.

nufhe:  

  • nufhe is a Python library used in Security, Encryption applications.  
  • It is a NuCypher homomorphic encryption (NuFHE) library implemented in Python.  
  • You can install using 'pip install nufhe' or download it from GitHub, PyPI.  

rsa-wiener-attack:  

  • rsa-wiener-attack is a Python library used in Security, Cryptography applications.  
  • A Python version of the Wiener attack targeting the RSA public-key encryption system.  
  • It targets cases where the private exponent is small. It allows an attacker to factorize the modulus.

an2linuxserver:  

  • an2linuxserver is a Python encryption library.  
  • It helps in Security, Encryption applications.  
  • It is a Sync Android notification encrypted to a Linux desktop.

python-rsa:  

  • It provides functionality for working with RSA encryption, a used public-key cryptosystem.  
  • python-rsa helps ensure the confidentiality and integrity of data during transmission.  
  • It provides tools for managing RSA keys, including key generation, serialization, and storage.

NXcrypt:  

  • NXcrypt is a Python library used in Artificial Intelligence, Machine Learning applications.  
  • It is a polymorphic 'python backdoors' crypter written in python by Hadi Mene (h4d3s).  
  • NXcrypt can inject malicious Python files into a normal file using a multi-threading system.

gpgsync:  

  • GPG in Python, it's crucial for key management, encryption, and digital signatures.  
  • GPG provides a way to secure communication and data integrity.   
  • It can enhance the security of your apps. It helps in dealing with sensitive information.

ShellcodeWrapper:  

  • ShellcodeWrapper is a Python encryption library, used in Security and Hacking applications.  
  • Wrappers help organize code by encapsulating related functionalities.  
  • Wrappers often serve as a convenient interface or encapsulation for underlying functionality.

nfreezer:  

  • nfreezer is a Python library used in Security, Encryption applications.  
  • nFreezer (for encrypted freezer) is an encrypted-at-rest backup tool.  
  • It helps in the cases with untrusted destination servers.

oscrypto:  

  • oscrypto is a Python library that provides a high-level interface to cryptographic operations.  
  • It is built on top of the cryptography library. It aims to simplify the use of cryptographic functions in Python.  
  • Its ability to offer a consistent API for various cryptographic tasks.

encrypted-dns:  

  • Encrypted DNS (Domain Name System) in Python encryption libraries.  
  • It is crucial for enhancing the security and privacy of internet communication.  
  • It integrated with encrypted DNS. It ensures the process of resolving domain names to IP addresses is secure.

simple-crypt:  

  • It provides a simple interface for symmetric encryption and decryption.  
  • It can serve as an educational tool. This tool helps individuals who are learning about encryption.  
  • It allows developers to install basic encryption. It enables them to focus on other aspects of their projects.

privy:  

  • privy is a Python encryption library.  
  • It helps in Security, Encryption applications.  
  • It is an easy, fast lib to password-protect your data. 

FAQ 

1.What is encryption?  

It is the process of converting plaintext data into a secure and unreadable form. It is also known as ciphertext, to protect sensitive information.  

 

2.Why should I use encryption in Python?  

Encryption helps secure data during transmission or storage, preventing unauthorized access. It's crucial for protecting sensitive information like passwords, personal data, or confidential files.  

 

3.Which encryption libraries to use in Python?  

Popular encryption libraries in Python include cryptography, PyCryptodome, and cryptography. This library provides high-level cryptographic primitives.  

 

4.How do I install a Python encryption library?  

You can install most libraries using a package manager like pip. For example, to install the cryptography library, run pip install cryptography.  

 

5.What types of encryption algorithms are supported?  

Python encryption libraries often support various algorithms. It includes AES (Advanced Encryption Standard), RSA (Rivest-Shamir-Adleman), and others. Check the documentation for the specific library to see which algorithms are supported.

Data validation is a necessary step that allows for saving time and effort of a user when filling out forms on the web. Verify the field in two ways. 


By using built-in HTML elements (which have limited custom validation capabilities) or by using JavaScript validation libraries. JavaScript libraries provide pre-coded packages, which support legacy browsers that do not have a built-in validation framework. One major advantage of using JavaScript libraries is that it takes the extra load of data verification and error return off from the server-side. This enhances user experience and smoothens out the form-filling process. 


Listed below are some of the most popular form validation libraries based on JavaScript. The JSON-schema-validator is a code package that focuses on form field correctness and efficiency. AwesomeValidation is another JavaScript-based form validation library developed for use in Android, shrinking down validation to three steps only. Epubcheck is a code-package developed specifically for validation in e-book format files. Use these libraries to develop a flawless form on a web application.

android-saripaar  

  • Saripaar is a validation library for Android that allows you to add form validation.  
  • It provides a simple and extensible API for adding validation rules to your UI component.  
  • Saripaar uses annotations to define validation rules for your UI components.  

json-schema-validator  

  • JSON Schema is a standard for defining JSON data structure.  
  • JSON is a process that ensures that JSON data complies with a specified schema.  
  • It's a Java implementation of the JSON Schema specification and provides features.  


validator  

  • Validators are tools or components that ensure that data or input adheres to rules.  
  • JavaScript frameworks like Angular and React often have built-in forms.  
  • This can include data types, lengths, and constraints.  


epubcheck  

  • EPUBCheck is a tool used to validate EPUB-Electronic Publication files.  
  • EPUB is a digital eBook format widely used for eBooks, digital magazines, and others.  
  • EPUBCheck can catch errors and issues that might affect the display or functionality.  


AwesomeValidation  

  • AwesomeValidation is a validation library for Android that makes it easy to verify.  
  • It's designed to be easy to use and integrate into your Android projects.  
  • The library provides a variety of pre-defined validation rules and allows to create


simple-java-mail  

  • Simple Java Mail simplifies sending emails in Java applications.  
  • It provides a high-level API for composing and sending emails.  
  • This library aims to make email handling in Java straightforward to use.  


VerticalStepperForm  

  • The VerticalStepperForm is a UI component used in Android development to install it.  
  • It allows users to progress through a series of steps, entering information or making it.  
  • This type of UI is commonly used in onboarding processes, setup wizards, or any scenario.  


fluent-validator  

  • Fluent Validator is a Java library that provides a fluent interface for building.  
  • It makes validation code more expressive and readable by allowing it to chain.  


governator  

  • Governator is a library for building and managing Java applications.  
  • The name Governator plays on the words Guice and governance.  
  • It supports dynamic configuration updates without requiring a restart.  

  


json-schema  

  • JSON Schema is a specification for describing the structure of JSON data.  
  • It defines the elements that may appear in a JSON document and their relationships.  
  • It describes the expected structure and constraints of other JSON documents.  

  


android-submit-credit-card-flow  

  • It creates a credit card submission flow in an Android app that involves collecting it.  
  • This usually includes fields for the card number, expiration date, and CVVs.  
  • This ensures to handle sensitive information securely on a server that complies.  


kafka-spark-consumer  

  • This is a combination of Apache Kafka and Apache Spark. It is a popular architecture for processing and analyzing.  
  • Kafka acts as a distributed message broker, and Spark helps with stream processing  
  • This involves installing Kafka, starting a Kafka broker, and creating Kafka topics.  


Masked-Edittext  

  • A Masked EditText is a specialized form of an EditText in Android that enforces a specific input.  
  • It's commonly used when you want to guide users in entering data in a certain way.  
  • There are various libraries available in the Android ecosystem that provide Masked EditText.  


yavi  

  • Yavi focuses on providing a simple and expressive API for validating objects.  
  • Yavi is type-safe, which means it leverages Java's type system to catch it.  
  • This allows developers to create concise and readable validation code.  

docs-archive  

  • docs-archive is a Java library used in User Interface, Form, and Xamarin applications.  
  • It has no vulnerabilities, and it has low support.  
  • It has a neutral sentiment in the developer community.  


dss  

  • A Digital Signature Service (DSS) is a system or service that provides the capability.  
  • Digital signatures are cryptographic techniques used to verify authenticity and integrity.  
  • They ensure the security of electronic transactions and documents.  


android-validation-komensky  

  • android-validation-komensky is a Java library typically used in Utilities Validation applications.  
  • It has no vulnerabilities and has a build file available.  
  • It has a Permissive License, and it has low support.  

  


HtmlBuilder  

  • It's associated with a programming concept or library that helps in building HTML.  
  • HtmlBuilder is a Java library typically used in Mobile and Android applications.  
  • HtmlBuilder has no bugs or vulnerabilities.  


Android-Validator  

  • Android-Validator is a library for Android development that provides functionality for validating input.  
  • This library simplifies adding validation to Android forms by providing it.  
  • The library allows you to create custom validation rules by implementing the Rules.  


ParticlesDrawable  

  • ParticlesDrawable is an open-source library for Android that draws random flying particles.  
  • It has no vulnerabilities; it has built files available.  
  • ParticlesDrawable code analysis shows 0 unresolved vulnerabilities.  


FormsFX  

  • FormsFX is a Java library for building forms in JavaFX applications.  
  • It simplifies the process of creating and handling forms by providing a set of utilities.  
  • The library supports data binding, allowing you to bind form components to data.  


json-schema-validator  

  • JSON Schema Validator refers to a tool or library that validates JSON data against a JSON.  
  • JSON Schema is a standard defining the content, structure, and format of JSON form.  
  • It provides a way to describe the expected properties, their types, and constraints.  


xssValidator  

  • XSS is a security vulnerability that occurs when an application allows untrusted input.  
  • To mitigate XSS attacks, input validation and proper output encoding are crucial.  
  • Ensure that input adheres to expected formats and does not contain malicious content.  


android-json-form-wizard  

  • Android Material Json Form Wizard is a library for creating beautiful form-based wizards.  
  • Developed by Vijay Rawat, it is available on GitHub.  
  • The library creates form-based wizards with ease and speed, and it is based on the Material


rave  

  • RAVE is a Microsoft service that provides a platform for hosting and managing virtual events.  
  • Rave has no vulnerabilities and has built-in files available.  


data-binding-validator  

  • Data Binding Validator is an Android library that provides a quick way of validation.  
  • The library offers a range of validation types, such as minimum/maximum length.  
  • data-binding-validator is a Java library typically used in Utilities and Validation applications.  


android-card-form  

  • Android Card Form is a library that provides a ready-made card form layout used in an Android App.  
  • Developed by Braintree, it is available on GitHub.  
  • The library is open-source and free to use.  


FAQ

1. What is Java form validation?  

Java form validation ensures that the data entered meets the criteria. It helps maintain data integrity and improve the user experience by preventing invalid.  

  

2. How does form validation work in Java applications?  

Java form validation typically involves defining rules or constraints for each form field. Validation libraries provide annotations, APIs, or configuration options to express these rules. The validation framework checks the input against the defined rules and reports.  

  

3. Can I use annotations for form validation in Java?  

Yes, many Java form validation libraries, such as Hibernate Validator and Spring Validation. Annotations apply to fields or methods within Java beans to specify constraints. It required fields of maximum length or custom validation logic.  

  

4. Are there any lightweight form validation libraries for Java?  

Yes, there are lightweight validation libraries like Yavi. It aims to provide a simple and expressive API for validation without introducing. It focuses on being lightweight and efficient.  

  

5. Are Java form validation libraries suitable for client-side validation?  

Java form validation libraries primarily focus on server-side validation. For client-side validation, it may use JavaScript-based validation libraries. This is used in conjunction with server-side validation to provide a seamless.  

Since the release of Siri in 2011, voice assistants have become a new trend in mobile apps. Most of people think that creating a voice assistant like Siri and Alexa is very complicated, but it is not. So today we will see some of the best Python AI Assistant libraries. An Assistant library is a collection of routines that allow the user to build software. It is an application programming interface (API), which provides building blocks for developing software applications for a specific purpose or multiple purposes. Assistant libraries are not standalone programs. Instead, they are called from programs written in Python or other languages. Build your own Virtual AI assistant with NLP, speech analysis, command retrieval, and more. In this kit, we recommend you some of the best python AI assistant libraries available in 2022 including Mycroft Core - the Mycroft Artificial Intelligence platform; Jarvis - Personal Assistant for Linux and macOS; Kalliope - framework that will help you to create your own personal assistant.

An email has become an inevitable method of personal and business communications. Implementing Email API to applications make it fast, cheap, and accessible. Email helps firms as it provides efficient and effective ways to transmit all kinds of electronic data. Small, medium & large-scale businesses use web applications that require constant user inputs and outputs in product launch, manufacturing, customer outreach, and maintenance. Email plays a critical role in providing these inputs and outputs. Email API libraries are available to integrate and make this feature adapt to your web application. You can customize, integrate and implement Email API using reusable libraries.

Automated Email Sender is a powerful tool that is used in new generation marketing technology. Email Automation lets us send the right email to the right people at right time. Automate email sender provides flexibility, reduces the complexity, and saves the precious time of the sender. Email Automation is also been a strong platform and gives strong communication between sender and receiver. Use the following best-in class libraries to create your own automated email sender.


Streaming is the continuous transmission of data from a server to a client. These streaming data can be processed, stored, analyzed, and acted upon in real-time using stream processing technology. The common applications of streaming data process include IoT sensors, server logs etc. to find bugs/anomalies in real-time.


Anomaly Detection is the process of identification of suspicious/rare events by monitoring their significant difference from the standard behavioral pattern of data. In this solution, we identify anomaly in real-time streaming data by Machine Learning techniques.


The Streaming architecture and processing is handled by Kafka and Zookeeper.


A representative output of the execution of the Producer and consumer parts of files is provided below. The left pane is a command prompt which runs the producer file (which sends the data stream) and the right pane is a command prompt which runs the consumer file (which receives the data stream).



Libraries used in this solution


Streaming


Streaming libraries are essential for transmission of data in real-time.

Machine Learning


Machine learning libraries and frameworks here are helpful in providing state-of-the-art solutions using Machine learning.

Support


For any support, you can reach us at OpenWeaver Community Support

kandi 1-Click Install

Here are some of the famous Java ChatGpt Libraries. Java ChatGpt Libraries use cases include Online customer service, Educational use, Mobile applications, Automated marketing. 


Java chatbot libraries are libraries of pre-written code that allow developers to create virtual chatbot applications for a variety of purposes. These libraries are designed to allow developers to quickly and easily create chatbots that can respond to user input in natural language. They can be used to create chatbots for customer service, marketing, entertainment, and more. 


Let us have a look at some of the famous Java ChatGpt Libraries in detail below. 

im-server

  • Can handle large numbers of users and messages without any performance degradation.
  • Platform-independent, meaning it can be used on any operating system that supports Java.
  • Provides secure communication by using SSL encryption for all data transmission.

Smack

  • Provides a Java-based XMPP protocol stack.
  • Supports a wide range of protocols related to chat.
  • Simple and extensible architecture makes it easy to customize and extend for custom needs.

mqtt-client

  • Open standard that is supported by a wide range of different vendors.
  • Provides a secure way to communicate, with data encrypted in transit and authentication methods.
  • Requires minimal bandwidth and resources for communication, making it idea for applications with limited resources.

InChat

  • Built from the ground up using JavaFX.
  • Supports multiple chatrooms, allowing users to create their own private or public chatrooms.
  • Provides a customizable interface, allowing users to change the look and feel of the interface.

chatgpt-java

  • Supports both text and voice-based interactions.
  • Supports a variety of text-based user interfaces, such as buttons, menus, and text prompts.
  • Built-in natural language understanding (NLU) engine that can easily be trained to recognize intents and entities.

PircBot

  • Sophisticated event-driven architecture.
  • Support for SSL connections.
  • Supports proxies.

SGPT

  • Provides advanced features such as presence, message routing, and message delivery.
  • Provides advanced analytics and monitoring capabilities.
  • Built-in support for social networks, allowing for integration with popular services

Here are some of the famous Nodejs WhatsApp API Libraries. These Libraries are used for Creating interactive bots, Creating chatbots, Sending automated messages, and Integrating with other applications.


Node.js WhatsApp API Libraries are libraries that allow developers to create applications and services that interact with the WhatsApp messaging service. These libraries provide access to the WhatsApp API, allowing developers to create custom tools and applications that communicate with WhatsApp users. These libraries can be used to build bots, create custom chat experiences, and more.


Let us look at these libraries in detail below.

whatsapp-web.js

  • Auto-detection of incoming messages, allowing developers to respond quickly.
  • Built-in media upload and download support.
  • Built-in webhooks for automated responses.

Chat-API

  • Allows developers to build applications that integrate with multiple messaging platforms.
  • Provides support for multi-user chat rooms.
  • Allows developers to receive notifications whenever messages are sent or received.

sulla

  • Offers a wide range of analytics and reporting capabilities.
  • Integrates with other third-party services, such as Slack.
  • Powerful set of APIs for automating the WhatsApp messaging experience.

whats2api

  • Full control over incoming messages.
  • Event-driven notifications.
  • Flexible API calls and built-in security features.

whatsapi

  • Highly secure and provides end-to-end encryptions for all messages sent and received.
  • Provides a comprehensive set of features for managing contacts, groups, and conversations.
  • Allows developers to access and control the WhatsApp API directly from their applications.

wasapbot

  • Easy-to-use platform that allows you to quickly build a WhatsApp bot without the need to write any code.
  • Provides a user-friendly interface with a drag-and-drop editor to create sophisticated chatbots.
  • Handle complex conversations and can work with multiple users at the same time.

whatbot

  • Allows users to customize their conversations using a variety of built-in templates.
  • Provides an intuitive interface to set up automated messages and bot responses.
  • Ability to process incoming messages, and send and receive images and videos etc.

Here are the top Javascript libraries for displaying alerts on your websites. All these libraries are customizable and user-friendly; they are the perfect replacement for boring alert boxes.  


The alert() function is a helpful built-in JavaScript feature. When you want the information to reach the user, you utilize the alert() method. This feature will show text in a popup dialogue box on the screen. Unlike every text or message on the screen, the alert box is unique. A message or text is displayed in a popup with an "OK" button. The user cannot perform any tasks when an alert box is displayed on the screen until they hit the "OK" button. Events cause JavaScript functions to be called. There are three diverse types of popup boxes available in JavaScript: alert, confirm, and prompt.  


The greatest alert libraries in Javascript are presented below, carefully reviewed, and approved to benefit users inevitably. The above-mentioned alert() method can be customized, and the dialog box can be designed according to our needs using the libraries. 

sweetalert2- 

  • A responsive and highly customizable Javascript library. 
  • Comprehensible (WAI-ARIA) alternative to JavaScript's popup boxes. 
  • No dependencies required.

notie- 

  • Simple notification, input, and selection suite for javascript. 
  • Alert users and confirm user choices. 
  • Allow users to input information and select choices. 
  • Allow users to select dates. 

tinycon- 

  • Can manipulate favicon, add alert bubbles, and change images. 
  • Adds a single object to the global namespace, and no initialization required. 
  • All attributes of the alert bubble are optimizable.

alertify.js- 

  • Can be integrated with many Javascript frameworks. 
  • Several built-in themes and additional features like asynchronous call-backs are supported. 
  • It is an effective alert or notification system built using javascript. 

AlertifyJS- 

  • a javascript framework for creating visually appealing browser dialogues and warnings. 
  • No external dependencies required. 
  • It is extensible, responsive, and can develop Unobtrusive notifications.

react-native-flash-message- 

  • A react native module for creating flash notifications as well as alerts. 
  • All components are built for global use. 
  • By default, all messages will be shown with transitions. 

smoke.js- 

  • Customized alert system for javascript that is independent of frameworks. 
  • This alert system uses CSS animations and background and, thus, is lightweight. 
  • It is simple to set up and simpler to change the style. 

bootbox- 

  • Uses Twitter’s Bootstrap framework. 
  • JavaScript alert(), confirm(), and other customizable window wrappers. 
  • It is built with the help of Bootstrap and jQuery. 

ChatGPT is a variant of the GPT-3 language model for conversational language generation.


Here are the top Python ChatGPT libraries that you can use for

  • text generation based on a prompt or seed text,
  • text completion,
  • text classification,
  • question answering,
  • virtual assistants,
  • customer service chatbots,
  • knowledge management systems,
  • machine translation,
  • named-entry recognition,
  • summarization, and more. 


A large-scale language generation model is ChatGPT. Based on a prompt or context that the user offers, ChatGPT produces writing that resembles a human. ChatGPT has received widespread adoption in NLP and is employed in several applications. 


The top 15 Python ChatGPT libraries are shown below. Here is a detailed review of libraries:

ChatGPT:

  • Is a lightweight package to interact with ChatGPT’s API created by OpenAI.
  • Uses reverse engineering official API. 
  • Is a deep learning model that pertains to a large text corpus that is fine-tuned for natural language generation tasks. 
  • Help open an OpenAI API key for working on your Python programming skills.  

nonebot2:

  • Is a Python framework for building chatbots on different messaging platforms like Telegram, Discord, and QQ. 
  • Offers a high-level interface to create chatbots.
  • Helps focus on writing bot logic without worrying about low-level details.
  • Supports plugin-based architecture to extend and customize the bot’s functionalities.

PyChatGPT:

  • ChatGPT API will help with conversation tracking, auto token regeneration, and proxy support. 
  • Offers proxy support and saves conversations to a file.
  • Resumes conversations even after closing the program.
  • Allows you to automatically grab Access Token and log in without involving a browser.

chatgpt-wrapper:

  • Is an open source unofficial Python API, Flask API, and Power CLI, which lets you interact with ChatGPT. 
  • Let you use the powerful ChatGPT bot on the command line or your Python Scripts.
  • Will make leveraging its functionality in your projects easy. 
  • Is an API that helps interact with ChatGPT using Python and Shell.

chatgpt-mirai-qq-bot:

  • Is a Python library used to create a chatbot using the OpenAI GPT model
  • Integrates it with QQ, a popular messaging platform in China. 
  • Allows you to create a chatbot to generate natural language responses for user inputs. 
  • We can integrate the bot with QQ, allowing users to interact with the bot through chat messages.

chatGPT-discord-bot:

  • Is a Python library for creating a chatbot using the OpenAI GPT model
  • Integrats ot with Discord, a popular voice and messaging platform.  
  • Allows us to create a chatbot to generate natural language responses for user inputs. 
  • The OpenAI GPT model pertained to a massive corpus of text and fine-tuned it for language generation tasks.

QChatGPT:

  • Offers support for black and white list system, user management, custom word style
  • And also, persona, rate limiting, and private and group chats.
  • Support sensitive word filtering to avoid account risks; replies will fit perfectly with the context. 
  • Offers perfect multi-API-key management, automatic switching of excess quota,
  • Supports present command texts.  

ChineseAIDungeonChatGPT:

  • Is a Python library that uses an AI dungeon with ChatGPT for creating a storytelling model. 
  • Designed to be used with a game, ‘AI Dungeon’, which will allow players to generate text-based game scenarios using the GPT models.  
  • Offers a high-level interface to create chatbots.
  • Help you generate natural language responses for user inputs. 

Openaibot:

  • Is a Python library for creating chatbots using the OpenAI GPT model
  • Offers a high-level interface to build chatbots which generate natural language responses.
  • Offers an easy-to-use interface that will help interact with the OpenAI API to start building chatbots. 
  • Includes built-in support for handling request throttling and user authentication.

chatgpt-api: 

  • Is an unofficial ChatGPT API based on Daniel Gross’s WhatsApp GPT. 
  • Uses chromium and playwright for opening browser and parsing HTML. 
  • Used for development purposes only. 

chatgpt-python: 

  • Is an unofficial Python SDK for OpenAI’s ChatGPT. 
  • Is a library which will allow developers to easily integrate the ChatGPT into their Python based projects.  
  • Generates error codes for explaining what went wrong with the ChatGPT. 

chatgpt-conversation: 

  • Let us have a conversation with ChatGPT with our voice and let it talk back to us.  

stackexplain: 

  • Is a Python library which is used in Server and Runtime Environment applications.  

TextRL:

  • Can do text generation with reinforcement learning with the help of huggingface’s transformer.
  • Reinforcement Learning with Human Feedback’s implementation of ChatGPT of human interaction
  • For improving generation model with reinforcement learning.

Here are the top JavaScript Discord API libraries. It provides sophisticated tools and frameworks for developers. It helps communicate with the Discord platform and create feature-rich bots and applications.  

 

Developers can create, manage, and personalize Discord bots with these libraries. They can integrate the Discord API into JavaScript projects. The JavaScript Discord API libraries serve as the base for developing Discord bots. It provides abstractions for bot authentication, event handling, message sending, and server administration. Developers can use libraries to receive and process messages from users and servers. They give mechanisms for bots to read and reply to messages. It allows them to handle commands and initiate operations. It provides information based on user input. Discord API libraries aid in the management of many Discord server events. It can be user join/leave, message edits/delete, and channel changes. Developers and particular actions can define event listeners. It can be taken when these events occur. It enables dynamic and interactive bot behavior.  

 

These Discord API libraries allow you to integrate Discord's Rich Presence functionality.  

discord.js   

  • The Discord API has been thoroughly covered.  
  • A system with an event-driven design. It enables programmers to handle and react to various Discord occurrences quickly.  
  • It includes voice support.  
  • Intuitive and easy-to-use interface.  

eris  

  • Lightweight JavaScript library for interacting with Discord API.  
  • A versatile command handling system. It enables bot creators to write and control their custom commands.  
  • Developers have control over low-level API operations.  
  • It is also event-driven and supports voice.  

discord.js-light

  • Light-weight version of discord.js library.
  • Smaller package size and dependency, suitable to minimise resource usage.
  • Provides tools for authenticating with API and interacting with Discord servers.
  • Maintains compatibility with discord.js library.

discord-akairo

  • A potent command framework for creating Discord bots.
  • It offers a structured and modular method to writing and handling commands.
  • Makes it simpler to organise and maintain bot functionality.

RPC

  • Enables Discord users to update their presence information in real-time.
  • It offers many options for customising the presence information.
  • Compatible with multiple platforms.

Discordeno

  • Popular typescript library to interact with discord API
  • Support for Discord gateway and is event-driven.
  • It is extendable and customizable.

Discordie

  • Provides high-level API interaction.
  • Create interactive and feature-rich Discord bots and applications.
  • Provides hooks and event listeners to extend its capabilities.

React toast libraries offer various options to create and customize toast notifications. They provide a convenient way to display various messages. It displays success notifications, error alerts, warning messages, and informational pop-ups.  

 

Different react toast libraries range from lightweight and minimalistic options. It has more comprehensive and feature-rich solutions. Developers can choose the library that best suits their project requirements.  

 

React toast libraries provide customizable appearance, positioning options, timeout duration, and transition effects. It supports adding custom icons, buttons, or progress bars to the toast notifications. They offer flexibility in styling the toasts to match the design and branding.  

 

Tips for using a react toast library include: 

  • setting up the library in the project, 
  • understanding the available options and API, 
  • handling toast events and callbacks, and 
  • utilizing the library's documentation and examples for guidance. 


React toast libraries can be used in various applications. It is from simple websites or single-page applications to more complex projects. They provide a convenient way to communicate notifications or important information. It helps users in an appealing and non-intrusive manner.  

 

Developers can leverage their features to create applications to make the most of libraries. This includes using appropriate toast types for different scenarios. It provides clear and concise messages, utilizing customization options. It matches the application's style and considers accessibility guidelines for inclusive user experiences.  

 

Writing about these libraries helps cover libraries, features, and customization options. Explaining their benefits enhances user experience and provides real-time feedback. It helps improve usability and can showcase their value to developers.  

 

React toast libraries offer a reliable solution for displaying notifications in React applications. They have become an integral part of many projects with their customizable features. Developers appreciate them for their ability to enhance the user experience. It provides timely information to users.

react-toastify:  

  • This library is used for displaying toast notifications in React applications.  
  • It provides a simple API to create and customize various toasts.  
  • It customizes success messages, error alerts, and informational pop-ups.  
  • It helps improve user experience by providing real-time feedback. 
  • It helps notify users of completed actions and displays important updates or errors.  

react-hot-toast:  

  • This library focuses on simplicity and ease of use. 
  • It allows developers to create and manage toast notifications in React.  
  • It offers a straightforward API with intuitive methods for displaying and dismissing toasts.  
  • It needs a lightweight toast library without sacrificing essential features and customization options.  

react-toast-notifications:  

  • This library offers a lightweight and customizable solution for toast notifications in React.  
  • It supports different notification types, positioning options, and animation effects.  
  • It is suitable for applications that need flexible and appealing toast notifications. 
  • It provides users with timely information and feedback. 

react-native-root-toast:  

  • This library is designed for React Native applications. 
  • It provides toast notification functionalities optimized for mobile development.  
  • It supports customizable toast components with different positions and styles. 
  • It allows developers to deliver relevant and timely notifications to mobile app users.  

react-notifications-component:  

  • This library provides versatile notification components. 
  • It includes toast notifications, alert messages, and dismissible banners.  
  • It supports various configuration options, including timeout duration, appearance, and positioning.  
  • It is useful to communicate important messages or updates to users.  

react-native-sweet-alert:  

  • This library is designed for creating beautiful and customizable alerts and notifications.  
  • It offers various pre-designed templates, animation effects, and customization options.  
  • It can create eye-catching and informative toast notifications, alerts, or confirmation prompts. 
  • It helps enhance the user experience.  

react-bootstrap-toast:  

  • This library integrates Bootstrap styles with toast notifications in React.  
  • It provides a seamless way to display consistent and responsive toast notifications. 
  • It matches the design of a Bootstrap-themed application.  
  • It benefits projects that already use Bootstrap. 
  • It helps maintain a consistent look and feel across their toast notifications.  

react-notistack:  

  • This library focuses on stacking and managing many toast notifications.  
  • It allows developers to enqueue notifications. 
  • It helps control their appearance and behavior and manage the display order.  
  • It generates many notifications and needs an organized and controlled display approach. 

FAQ 

1. What is a simple and customizable React notifications system?  

React notifications system refers allows developers to display notifications in their applications. These systems are designed to be easy to use and customizable. It enables developers to tailor the appearance and behavior of the notifications. It helps suit their specific requirements.  

 

2. How does the React Toast library provide a Delightful and customizable React Component?  

The React Toast library provides a customizable React component for displaying toast notifications. It offers a comprehensive set of options and features. It allows customization of the toast notifications' appearance, position, animation, and behavior. The customization ensures that the notifications integrate with the application's design and user experience.  

 

3. How do I install my project's React toastify npm package?  

To install the React toastify npm package, you can use npm or yarn, package managers used. In your terminal or command prompt, navigate to your directory and run the command:  

npm install react-toastify  

 

4. What examples of notification snackbars can be implemented with this library?  

React Toast libraries provide notification snackbars that your project can implement. These snackbars can include success messages, error alerts, warning notifications, or informational pop-ups. For example, you can display a successful snackbar. It helps notify the user of a successful operation. It helps an error snackbar to alert them of an error or failure or a warning snackbar. It helps provide important warnings or reminders.  

 

5. What kind of toast message options are available in this package?  

The React toastify package offers various toast message options for flexibility and customization. You can define properties like content, appearance, duration, position, transition effect, and sound. These options allow control of your application's toast message appearance and behavior.  

 

6. How do I integrate the Toast Library into my React JS project?  

Integrating the Toast Library into a React JS project involves a few steps. First, import the components from the react-toastify package into your desired component file. You can use components to create and display toast notifications based on events. The Toast Library provides a straightforward API and documentation. It guides you on utilizing the library in your React project. Following the documentation, you can integrate the Toast Library. It helps display notifications in your React application. 

React notification libraries allow developers to add notifications to React applications. Notifications can inform users of events, such as when a task is complete, or an error has occurred. Notification libraries provide various customization options. It includes styling and custom logic for when we display notifications.  

Different types of react available notification libraries:  

Simple React Notifications (SRN):  

SRN is a simple library for adding notifications to React applications. SRN supports alert, info, success, and error styling. It provides a callback when we dismiss a notification.  

React-Notification-System:  

This library is a more comprehensive solution for adding notifications to React applications. It allows complex logic to determine when we display the notifications. It allows for custom styling notifications and adding buttons (with callbacks).  

React-Toastify:  

React Toastify is a simple notification library for React apps. It features custom styling and several built-in animations for displaying notifications.  

React Notiflix:  

React Notiflix is a comprehensive library for adding notifications to React applications. It includes various options for customizing and styling notifications. It will support many different types of notifications.  

React Notification Redux:  

React Notification Redux is another comprehensive library for adding notifications to React applications. It includes many different features for customizing and styling the notifications. It includes support for many types of notifications.  

 

Toastify Package is a non-blocking notifications component for React apps. It provides a complete and customizable toast notification system for React applications. With Toastify, users can pause toasts and adjust the order of toasts using the toastId. Toastify offers other features like custom icons and progress bar/loading indicators. Thus, Toastify is for anyone looking for a scalable server's state management library for their app development. This library offers users a Spec compliant notification for user devices. To install Toastify, use the following command in your terminal: npm install react-toastify.  

 

Firebase Cloud Messaging is a cross-platform messaging solution. It provides rich support for developing and delivering secure notifications to users' devices. It is suitable for the web, Android, iOS, and others.  

Different features that are available in react notification libraries: 

  • Alerts:  

These simple notifications usually pop up with a message, action button, or link.  

  • Messages:  

Messages provide detailed notifications. It usually appears near the bottom of a page or window and includes a message and a link or action button.  

  • Tooltips:  

Tooltips are mini notifications that usually appear when a user hovers over an element. They usually provide a brief explanation.  

  • Popup Windows:  

Popup windows provide more comprehensive notifications that can alert or inform a user. These often prompt a user for extra information or a specific action.  

  • Pages:  

Pages are notifications that cover an entire page of the application. They usually provide more detailed information about a notification or action.  

  • System Tray:  

System tray notifications are comprehensive notifications. It can inform or remind users of an action.  

  • Sticky Notifications:  

Sticky notifications are notifications we display until the user dismisses them. They can provide useful reminders.  

  • React Native Notifications:  

React Native Notifications provide platform-specific notifications for both the application and the browser.  

 

React notification libraries are from simple alerts informing change users to complex notifications. We can inform users of new or changed web services and APIs. We can use APIs to identify API executions and validate data updates.  

 

Simple alert notifications can allow users to take immediate action. They can help alert users to system events or errors and inform users of changes to web content. It provides feedback on user interactions.  

 

More sophisticated notifications help notify users of web services and APIs. These notifications can improve user experience and protect against potential security threats. It helps track API executions, receive real-time system events, and validate data updates. It helps track API usage for analytics.  

 

Notifications can generate detailed reports of user interactions and data updates. It can improve system performance and user experience. This detailed reporting can provide insights into the usability of applications and APIs. It allows developers to identify areas for improvement and optimize user experiences.  

Tips for setting up and using a react notification library: 

1. Make sure you have the necessary libraries installed.  

2. If you use a create-react-app for setting up your project, you can install the libraries using npm:  

 ```npm install react-notifications-component```  

3. Integrate your library into your React project.  

4. You can then use the library to create notifications with your message and styling. The react-notifications component has several helpful methods for creating notifications. You can create success, info, warning, and error.  

Pointers on how to best use React notification libraries in your applications: 

1. Understand how your users enjoy notifications 

Ensure you have a firm grasp of the needs of your users, which will inform how we should use notifications.  

2. Decide on the type of notifications 

React notification libraries offer both simple alerts and full-fledged notification hubs.  

3. Define user options 

Consider allowing users the choice of which notifications they receive. This can involve prompt alerts for notifications and a hub for important tidbits.  

4. Utilise persistent notifications 

Consider utilizing persistent notifications to bring attention back to a certain area. It happens if the user needs to respond or interact with a notification.  

5. Use customized notifications  

Differentiate various notifications with customized color, text size, and sound features.  

6. Make notifications actionable 

Don't make a notification a passive element on the screen. Allow users to act further on notifications, such as marking them as read or opening a URL.  

7. Incorporate testing  

Using any library involves testing it within your project. Use unit tests to ensure your notifications every time you change your codebase.  

When writing about these Libraries, it is important to cover the following key points:  

  • Different types of libraries available:  

Different React Notifications Libraries provide components that we can use for notifications.  

  • Integrations with external services:  

We can integrate React Notifications Libraries with external services for sending real-time notifications.  

  • Examples of implementation:  

It is important to provide examples and practical implementations. It helps readers to understand how to use them.  

  • Using and customizing components:  

It provides tutorials for using and customizing components from React Notification Libraries.  

  • Information on sound and visual elements:  

It provides information on enabling sound and visual elements for libraries.  

 

Snackbar notification messages are short messages that alert or provide information to users. They appear at the bottom part of the device screen and can contain a brief message, an action, or both. They are used for new releases and changes to settings, user account updates, or errors.  

 

React has libraries for snackbar notifications, like Toastify, Notifications, and React-Equity Notification. These libraries allow users to build icons, progress bars, indicators, and close buttons. Many JavaScript libraries can be integrated with React applications.  

 

Popup boxes are a common feature found in most react notification libraries. The popup box can contain a close button, a progress bar, loading indicators, and custom icons.  

 

React notification libraries provide developers with a straightforward and versatile solution. It helps in alerting users of the app or website changes. Developers can create notifications with custom positioning, animations, and sound effects with code. Notifications can be triggered, AJAX requests, or from the component's state.  

 

Using React notification libraries can help developers create dynamic user experiences. They should do so without wasting time writing boilerplate code. Notification libraries can be customized and enhanced with extra features. It provides developers with plenty of flexibility when crafting their applications.  

 

Let's look at each library in detail. The links allow you to access package commands, installation notes, and code snippets.  

sweetalert2  

  • It offers a wide range of customization options according to your needs.  
  • It has a range of animated transitions, making it appealing and fun to use.  
  • Provides support for many inputs, allowing users to include various information.  

react-toastify  

  • Offers four different positions for toast notifications.  
  • Developers can use a progress bar to represent the progress of a task.  
  • Suspends the toast notifications for mobile viewports. So they don't obstruct the user's view.  

react-native-push-notifications  

  • It is lightweight and has no setup or maintenance time required.  
  • Supports cloud message delivery. It makes ensuring your messages reach their intended destinations even easier.  
  • Offers robust targeting capabilities.  

notie  

  • It has no external dependencies, making it lightweight and easy to use.  
  • It is built with native UI elements. It supports enhanced user experience in mobile and touch interaction devices.  
  • Provides easy customization of color, animation speed, labels, dismiss delay, and more.  

react-toast-notifications  

  • It is device responsive.  
  • It adopts a modular approach, making it extendable and customizable.  
  • It uses React Hooks, giving developers more flexibility when dealing with toast notifications.  

react-notifications-component  

  • It can be integrated into any React app with minimal effort.  
  • Users can receive real-time notifications when an event is triggered in the app.  
  • It can be completely customized and styled to match the look and feel of an existing app.  

react-s-alert  

  • Supports different types of alerts such as success, warning, and error.  
  • Features a very straightforward setup process.  
  • It alerts as per the device's width.  

FAQ 

What is the react-toastify library, and how does it work?  

React-Toastify library provides customizable notification messages (or "toasts") to web applications. Toasts can display success and error messages without taking up screen real estate. It works by providing a component for rendering toast. It helps in letting you display them with a single function call. You can customize toast properties such as position, timing, and styling. It allows them to fit into your web application.  

 

How can I use this library to create non-blocking notifications within an application?  

The library provides a React component to create non-blocking notifications. First, install the library using yarn or NPM within a React application. Next, import the Notification component into a React file. After that, create the non-blocking notifications within the render function. Include the props for creating the notifications, like 'message', 'type', 'title', and 'onClose'. Finally, add the component to the application and pass the props. This will enable the application to make non-blocking notifications.  

 

What features does Scalable Server State Management Library offer for toast notification messages?  

The Scalable Server State Management Library has the features for toast notification messages:  

  • Push notifications – The library lets us push timely client updates. It informs the user in real-time.  
  • Persistent notifications – Toast notifications can be recurrent. They don't disappear after a user action, reminding users of their activities.  
  • Customizable display – Toast notifications are customizable text, image, and color. We can tailor it to any brand or language.  
  • Targeting – Toast notifications can reach specific audiences or segments. It allows users to receive relevant messages.  
  • Segmentation – Toast notifications can separate segments of users. It helps send it to different user groups that can receive tailored messages.  
  • Analytics – The library allows for the collection and analysis of user data. It helps understand user behavior and determine where notifications are most effective.  
  •  

Is there a comprehensive guide on how to use Cloud Messaging with a React app?  

Yes, a comprehensive guide is available online. It was created by the React team on how to use Cloud Messaging with a React app.  

 

How would an experienced user rate the notification library available in the market?  

Notifications are becoming a more important part of the application experience. The experienced user would rate the current notification libraries available in the market. Current libraries generally offer a good selection of features. Those are designed to make notification management and customization very convenient. Many popular libraries are well-tested so users can get up and running.  

 

What are the best practices and tips for creating snackbar notification messages?  

  • First, identify the type of action. It needs to be conveyed by the notification and determine the appropriate text and style to go with it. Aim for short messages with clear language. Also, avoid using jargon or technical terminology.  
  • Ensure the message is written and contains a call to action.  
  • Use a consistent location for the snackbar to appear. It ensures that it doesn't interfere with the layout or flow of the app.  
  • Make sure the snackbar is visible and within reach of the user.  
  • If complete success isn't guaranteed, use phrases like "Entity updated " or "Task completed".  
  • Set a reasonable timeout so that the message will be visible for an adequate time.  
  • Place a close icon or an appropriate action next to the message for the user to dismiss it. They offer appropriate feedback for possible errors or failures.  
  • If snackbars appear, consider collapsing rules where we can combine many snackbars.  
  • Use snackbars to inform users of updates, changes, or other pertinent information. Aim to provide a consistent and pleasant experience when using snackbars.  
  • Test out the notifications with alternative user scenarios. It helps ensure that the user experience is not disadvantaged.  
  •  

Can Cloud Messaging send notifications from one system to another in an application?  

Yes, cloud messaging can send notifications from one system to another in the application. FCM is a free and reliable service hosted by Google. It enables developers to send messages and notifications.  

 

Are there any alternatives or competitors of the react-toastify library? Will they provide similar functionality and benefits to this library?  

Other alternatives for react-toastify include Toastr, Redux toastr, Sweetalert2, and React Notifications. Each library provides its unique advantages, so it is up to you to decide which one best suits your needs.  

 

Can I create customizable components using the react-toastify library for my React app?  

Yes, creating completely customizable components using the react-toastify library is possible. The library allows great customization when creating components. It includes customizing the toast position, adding animations, and customizing styling options.  

 

How does react-toastify compare with other popular notification libraries available today?  

React-Toastify is among the popular notification libraries available. It has become popular due to its ease of use. It offers various features to customize notifications with minimal code. React-toastify can be used with big data sets due to its use of virtual DOM to keep track of its components. Performance has been benchmarked at higher speeds than some of its competitors. React-Toastify also has built-in accessibility features, which follow many accessibility standards. In general, React-Toastify is an ideal library for creating notifications. It offers a great alternative to some of the other popular options available today. 

Here are the top python telegram API libraries that any developer can access to simplify the creation and maintenance of telegram bots and other services.   


The messaging service Telegram provides two diverse types of APIs for programmers to use. Using the Bot API, you may quickly make software that uses Telegram messages as an interface. You can create your own uniquely designed Telegram clients using the TDLib and Telegram API. Many uses for the Telegram Bot API are possible, ranging from systems that control notifications to video or image editing. Creating interactive games or providing individualized news updates is an additional potential use for the Telegram Bot API.  


The best Python Telegram API libraries are presented below, precisely categorized, and picked based on reviews and features. 

python-telegram-bot- 

  • Asynchronous interface for telegram bot API. 
  • Featuring high-level classes for easy implementation. 
  • Optional 3rd party dependencies are available.

Telethon- 

  • Interacting with telegram becomes easy with this python library. 
  • It is an MTProto library. 
  • Can also be used with telegram bots. 

pyTelegramBotAPI- 

  • Extensible python API for Telegram bot. 
  • Contains message handlers and makes function names customizable.  
  • It is an HTTP-based interface. 

aiogram- 

  • Written with asyncio and aiohttp. 
  • The framework is completely asynchronous. 
  • The client/server framework is concurrent. 

pyrogram- 

  • Interact with the main telegram API through a user account. 
  • Easy install using pip. 
  • It's asynchronous but can be used synchronously if needed.

telegramscraper- 

  • Many accounts are supported at the same time. 
  • Telegram scrapper and adder. 
  • Scrapping is possible for public groups in bulk. 

pytgcalls- 

  • Exclusive for telegram group calls. 
  • Uses NodeJS’s WebRTC library. 
  • Support Pyrogram and Telethon clients. 

opentele- 

  • For switching between tdata and telethon sessions. 
  • Real data can be used to randomize device info. 
  • Bot detection can be avoided. 

telemirror- 

  • Client API for telegram message forwarding. 
  • Message filters to identify incoming messages. 
  • Mapping of source and target channels.

python-telegram-handler- 

  • Handles logs using telegram bot API. 
  • Easy use with registering and obtaining the authentication token.  
  • If an exception, the handler retrieves chat_id. 

aiotg- 

  • Easy and declarative API. 
  • Hassle-free setup - no need for SSL certificates or static IP. 
  • Built-in support for analytics via chatbase.com. 
  • Automatic handling of Telegram API throttling or timeouts. 

Trending Discussions on Messaging

Error APNS device token not set before retrieving FCM Token for Sender ID

java.lang.NoSuchMethodError: No virtual method setSkipClientToken(Z)V in class Lcom/facebook/GraphRequest;

How to register ServiceBusClient for dependency injection?

uploaded an APK which has an activity,activity alias,service or broadcast receiver with intentfilter, but without 'android : exported' property set

How to solve FirebaseError: Expected first argument to collection() to be a CollectionReference, a DocumentReference or FirebaseFirestore problem?

Mandatory Consent for Admob User Messaging Platform

MissingPluginException(No implementation found for method Messaging#requestPermission on channel firebase_messaging

Error in retrieving notification_key for group messaging in FCM

Firestore Push Notification "time out" error Notification doesn't always get sent

Google AdMob new SDK setup for iOS : SKAdNetworkItems, NSUserTrackingUsageDescription, ATTrackingManager. Guideline 5.1.2 - Legal - Privacy - Data Use

QUESTION

Error APNS device token not set before retrieving FCM Token for Sender ID

Asked 2022-Mar-01 at 17:08

I am receiving messages from firebase for notifications with APNs. In firebase, I have the certificate of APNs key, with the same id in the Xcode project in Firebase that is extracted from Apple Developer.

But I don't know why this could be happening and I get this error and it is registering two tokens in the Messaging extension:

1extension AppDelegate : MessagingDelegate {
2  func messaging(_ messaging: Messaging, didReceiveRegistrationToken fcmToken: String?) {}}
3

APNS device token not set before retrieving FCM Token for Sender ID '########'. Notifications to this FCM Token will not be delivered over APNS.Be sure to re-retrieve the FCM token once the APNS device token is set.

Added what I have in the AppDelegate

1extension AppDelegate : MessagingDelegate {
2  func messaging(_ messaging: Messaging, didReceiveRegistrationToken fcmToken: String?) {}}
3import Firebase
4import MasivPushIosSdk
5
6@UIApplicationMain
7class AppDelegate: UIResponder, UIApplicationDelegate{
8
9    var firebaseToken: String = ""
10    
11    func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
12
13        FirebaseApp.configure()
14        self.registerForFirebaseNotification(application: application)
15        Messaging.messaging().delegate = self
16        return true
17    }
18    
19    func application(_ application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data) {
20        Messaging.messaging().apnsToken = deviceToken
21    }
22
23    func registerForFirebaseNotification(application: UIApplication) {
24        if #available(iOS 10.0, *) {
25            // For iOS 10 display notification (sent via APNS)
26            UNUserNotificationCenter.current().delegate = self
27
28            let authOptions: UNAuthorizationOptions = [.alert, .badge, .sound]
29            UNUserNotificationCenter.current().requestAuthorization(
30                options: authOptions,
31                completionHandler: {_, _ in })
32        } else {
33            let settings: UIUserNotificationSettings =
34                UIUserNotificationSettings(types: [.alert, .badge, .sound], categories: nil)
35            application.registerUserNotificationSettings(settings)
36        }
37
38        application.registerForRemoteNotifications()
39    }
40    
41}
42
43extension AppDelegate: MessagingDelegate, UNUserNotificationCenterDelegate {
44
45//MessagingDelegate
46    func messaging(_ messaging: Messaging, didReceiveRegistrationToken fcmToken: String?) {
47        self.firebaseToken = fcmToken!
48        print("Firebase token: \(fcmToken)")
49    }
50
51    //UNUserNotificationCenterDelegate
52    func application(_ application: UIApplication, didReceiveRemoteNotification userInfo: [AnyHashable : Any], fetchCompletionHandler completionHandler: @escaping (UIBackgroundFetchResult) -> Void) {
53        print("APNs received with: \(userInfo)")
54     }
55}
56

ANSWER

Answered 2021-Oct-26 at 05:58

This is a simulator only log. You can safely ignore it. The reason you get this is that Firebase tries to create a mapping from the FCM token to the APNS token so it can send the APNS messages to the iOS devices. However, there is no APNS token on the simulator so the mapping fails.

Try testing it on an actual device to see if you still get the error.

Source https://stackoverflow.com/questions/69485088

QUESTION

java.lang.NoSuchMethodError: No virtual method setSkipClientToken(Z)V in class Lcom/facebook/GraphRequest;

Asked 2022-Feb-25 at 23:22

It was working fine before I have done nothing, no packages update, no gradle update no nothing just created new build and this error occurs. but for some team members the error occur after gradle sync.

The issue is that build is generating successfully without any error but when opens the app it suddenly gets crash (in both debug and release mode)

Error

1    E/AndroidRuntime: FATAL EXCEPTION: AsyncTask #3
2        java.lang.NoSuchMethodError: No virtual method setSkipClientToken(Z)V in class Lcom/facebook/GraphRequest; or its super classes (declaration of 'com.facebook.GraphRequest' appears in /data/app/~~aLf3pfLySq5u7zpIAr2Hlg==/com.package-name-99h4GcP3GNx2sMs76AXGvA==/base.apk)
3            at com.facebook.marketing.internal.RemoteConfigManager.getRemoteConfigQueryResponse(RemoteConfigManager.java:87)
4            at com.facebook.marketing.internal.RemoteConfigManager.access$000(RemoteConfigManager.java:43)
5            at com.facebook.marketing.internal.RemoteConfigManager$1.run(RemoteConfigManager.java:64)
6            at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
7            at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
8            at java.lang.Thread.run(Thread.java:923)
9

gradle-wrapper.properties

1    E/AndroidRuntime: FATAL EXCEPTION: AsyncTask #3
2        java.lang.NoSuchMethodError: No virtual method setSkipClientToken(Z)V in class Lcom/facebook/GraphRequest; or its super classes (declaration of 'com.facebook.GraphRequest' appears in /data/app/~~aLf3pfLySq5u7zpIAr2Hlg==/com.package-name-99h4GcP3GNx2sMs76AXGvA==/base.apk)
3            at com.facebook.marketing.internal.RemoteConfigManager.getRemoteConfigQueryResponse(RemoteConfigManager.java:87)
4            at com.facebook.marketing.internal.RemoteConfigManager.access$000(RemoteConfigManager.java:43)
5            at com.facebook.marketing.internal.RemoteConfigManager$1.run(RemoteConfigManager.java:64)
6            at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
7            at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
8            at java.lang.Thread.run(Thread.java:923)
9distributionBase=GRADLE_USER_HOME
10distributionPath=wrapper/dists
11distributionUrl=https\://services.gradle.org/distributions/gradle-6.9-all.zip
12zipStoreBase=GRADLE_USER_HOME
13zipStorePath=wrapper/dists
14

build.gradle

1    E/AndroidRuntime: FATAL EXCEPTION: AsyncTask #3
2        java.lang.NoSuchMethodError: No virtual method setSkipClientToken(Z)V in class Lcom/facebook/GraphRequest; or its super classes (declaration of 'com.facebook.GraphRequest' appears in /data/app/~~aLf3pfLySq5u7zpIAr2Hlg==/com.package-name-99h4GcP3GNx2sMs76AXGvA==/base.apk)
3            at com.facebook.marketing.internal.RemoteConfigManager.getRemoteConfigQueryResponse(RemoteConfigManager.java:87)
4            at com.facebook.marketing.internal.RemoteConfigManager.access$000(RemoteConfigManager.java:43)
5            at com.facebook.marketing.internal.RemoteConfigManager$1.run(RemoteConfigManager.java:64)
6            at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
7            at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
8            at java.lang.Thread.run(Thread.java:923)
9distributionBase=GRADLE_USER_HOME
10distributionPath=wrapper/dists
11distributionUrl=https\://services.gradle.org/distributions/gradle-6.9-all.zip
12zipStoreBase=GRADLE_USER_HOME
13zipStorePath=wrapper/dists
14// Top-level build file where you can add configuration options common to all sub-projects/modules.
15
16buildscript {
17  ext {
18      buildToolsVersion = "30.0.2"
19      minSdkVersion = 21
20      compileSdkVersion = 30
21      targetSdkVersion = 30
22      ndkVersion = "21.4.7075529"
23  }
24  repositories {
25      google()
26      mavenCentral()
27      jcenter()
28      // maven {
29      //    url 'https://maven.fabric.io/public'
30      // }
31      maven { url "https://www.jitpack.io" }
32  }
33  dependencies {
34      classpath("com.android.tools.build:gradle:4.2.2")
35      classpath 'com.google.gms:google-services:4.2.0'  // Google Services plugin
36      // Add the Fabric Crashlytics plugin.
37      // classpath 'io.fabric.tools:gradle:1.31.2'
38      // firebase performance sdk
39      classpath 'com.google.firebase:perf-plugin:1.4.0'
40      classpath 'com.google.firebase:firebase-crashlytics-gradle:2.7.1'
41
42
43      // NOTE: Do not place your application dependencies here; they belong
44      // in the individual module build.gradle files
45  }
46}
47
48allprojects {
49  repositories {
50      mavenCentral()
51      mavenLocal()
52      maven {
53          // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
54          url("$rootDir/../node_modules/react-native/android")
55      }
56      maven {
57          // Android JSC is installed from npm
58          url("$rootDir/../node_modules/jsc-android/dist")
59      }
60
61      google()
62      jcenter()
63      maven { url 'https://www.jitpack.io' }
64  }
65}
66
67
68subprojects {
69  afterEvaluate {project ->
70      if (project.hasProperty("android")) {
71          android {
72              buildToolsVersion "28.0.3"
73              compileSdkVersion 28
74          }
75      }
76  }
77}
78
79subprojects {
80  afterEvaluate {project ->
81      if (project.hasProperty("android")) {
82          android {
83              compileSdkVersion 29
84              buildToolsVersion '29.0.3'
85          }
86      }
87  }
88}
89

packages

1    E/AndroidRuntime: FATAL EXCEPTION: AsyncTask #3
2        java.lang.NoSuchMethodError: No virtual method setSkipClientToken(Z)V in class Lcom/facebook/GraphRequest; or its super classes (declaration of 'com.facebook.GraphRequest' appears in /data/app/~~aLf3pfLySq5u7zpIAr2Hlg==/com.package-name-99h4GcP3GNx2sMs76AXGvA==/base.apk)
3            at com.facebook.marketing.internal.RemoteConfigManager.getRemoteConfigQueryResponse(RemoteConfigManager.java:87)
4            at com.facebook.marketing.internal.RemoteConfigManager.access$000(RemoteConfigManager.java:43)
5            at com.facebook.marketing.internal.RemoteConfigManager$1.run(RemoteConfigManager.java:64)
6            at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
7            at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
8            at java.lang.Thread.run(Thread.java:923)
9distributionBase=GRADLE_USER_HOME
10distributionPath=wrapper/dists
11distributionUrl=https\://services.gradle.org/distributions/gradle-6.9-all.zip
12zipStoreBase=GRADLE_USER_HOME
13zipStorePath=wrapper/dists
14// Top-level build file where you can add configuration options common to all sub-projects/modules.
15
16buildscript {
17  ext {
18      buildToolsVersion = "30.0.2"
19      minSdkVersion = 21
20      compileSdkVersion = 30
21      targetSdkVersion = 30
22      ndkVersion = "21.4.7075529"
23  }
24  repositories {
25      google()
26      mavenCentral()
27      jcenter()
28      // maven {
29      //    url 'https://maven.fabric.io/public'
30      // }
31      maven { url "https://www.jitpack.io" }
32  }
33  dependencies {
34      classpath("com.android.tools.build:gradle:4.2.2")
35      classpath 'com.google.gms:google-services:4.2.0'  // Google Services plugin
36      // Add the Fabric Crashlytics plugin.
37      // classpath 'io.fabric.tools:gradle:1.31.2'
38      // firebase performance sdk
39      classpath 'com.google.firebase:perf-plugin:1.4.0'
40      classpath 'com.google.firebase:firebase-crashlytics-gradle:2.7.1'
41
42
43      // NOTE: Do not place your application dependencies here; they belong
44      // in the individual module build.gradle files
45  }
46}
47
48allprojects {
49  repositories {
50      mavenCentral()
51      mavenLocal()
52      maven {
53          // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
54          url("$rootDir/../node_modules/react-native/android")
55      }
56      maven {
57          // Android JSC is installed from npm
58          url("$rootDir/../node_modules/jsc-android/dist")
59      }
60
61      google()
62      jcenter()
63      maven { url 'https://www.jitpack.io' }
64  }
65}
66
67
68subprojects {
69  afterEvaluate {project ->
70      if (project.hasProperty("android")) {
71          android {
72              buildToolsVersion "28.0.3"
73              compileSdkVersion 28
74          }
75      }
76  }
77}
78
79subprojects {
80  afterEvaluate {project ->
81      if (project.hasProperty("android")) {
82          android {
83              compileSdkVersion 29
84              buildToolsVersion '29.0.3'
85          }
86      }
87  }
88}
89"dependencies": {
90  "@eva-design/eva": "^2.1.0",
91  "@react-native-async-storage/async-storage": "^1.15.14",
92  "@react-native-community/blur": "^3.6.0",
93  "@react-native-community/checkbox": "^0.5.0",
94  "@react-native-community/netinfo": "^6.0.1",
95  "@react-native-community/toolbar-android": "^0.1.0-rc.2",
96  "@react-native-firebase/analytics": "^10.3.1",
97  "@react-native-firebase/app": "^10.3.0",
98  "@react-native-firebase/auth": "^10.3.1",
99  "@react-native-firebase/crashlytics": "^10.3.1",
100  "@react-native-firebase/dynamic-links": "^10.3.1",
101  "@react-native-firebase/firestore": "^10.3.1",
102  "@react-native-firebase/iid": "^10.3.1",
103  "@react-native-firebase/in-app-messaging": "^10.3.1",
104  "@react-native-firebase/messaging": "^10.3.1",
105  "@react-native-firebase/perf": "^10.3.1",
106  "@react-native-firebase/remote-config": "^10.3.1",
107  "@react-native-firebase/storage": "^10.3.1",
108  "@react-native-picker/picker": "^2.1.0",
109  "@react-navigation/bottom-tabs": "^6.0.9",
110  "@react-navigation/native": "^6.0.6",
111  "@react-navigation/stack": "^6.0.11",
112  "@types/react-native": "^0.65.5",
113  "@ui-kitten/components": "^5.1.0",
114  "axios": "^0.19.0",
115  "i18n-js": "^3.5.1",
116  "moment": "^2.24.0",
117  "native-base": "2.13.8",
118  "react": "17.0.2",
119  "react-content-loader": "^4.3.4",
120  "react-native": "0.66.0",
121  "react-native-actions-sheet": "^0.5.6",
122  "react-native-adjust": "^4.28.0",
123  "react-native-amplitude-analytics": "^0.2.7",
124  "react-native-animatable": "^1.3.3",
125  "react-native-code-push": "^7.0.4",
126  "react-native-config": "^1.3.3",
127  "react-native-contacts": "^5.0.7",
128  "react-native-dots-pagination": "^0.2.0",
129  "react-native-fbsdk-next": "^6.2.0",
130  "react-native-fingerprint-scanner": "^6.0.0",
131  "react-native-floating-action": "^1.22.0",
132  "react-native-geocoding": "^0.4.0",
133  "react-native-geolocation-service": "^5.2.0",
134  "react-native-gesture-handler": "^1.5.2",
135  "react-native-get-random-values": "^1.4.0",
136  "react-native-html-to-pdf-lite": "^0.11.0",
137  "react-native-image-base64": "^0.1.4",
138  "react-native-image-pan-zoom": "^2.1.11",
139  "react-native-image-picker": "^4.1.2",
140  "react-native-image-resizer": "^1.2.0",
141  "react-native-in-app-review": "^2.1.7",
142  "react-native-linear-gradient": "^2.5.6",
143  "react-native-loading-spinner-overlay": "^1.1.0",
144  "react-native-material-menu": "^1.0.0",
145  "react-native-material-textfield": "^0.16.1",
146  "react-native-modal": "^13.0.0",
147  "react-native-phone-call": "^1.0.9",
148  "react-native-ratings": "^7.3.0",
149  "react-native-reanimated": "^1.13.0",
150  "react-native-safe-area-context": "^3.3.2",
151  "react-native-screens": "^3.9.0",
152  "react-native-share": "^7.2.1",
153  "react-native-smooth-pincode-input": "^1.0.9",
154  "react-native-sms-retriever": "https://github.com/sarmad1995/react-native-sms-retriever.git",
155  "react-native-snap-carousel": "^3.9.1",
156  "react-native-splash-screen": "^3.2.0",
157  "react-native-svg": "^12.1.1",
158  "react-native-version-check": "^3.4.2",
159  "react-native-version-number": "^0.3.6",
160  "react-native-view-shot": "^3.1.2",
161  "react-native-walkthrough-tooltip": "^1.3.0",
162  "react-redux": "^7.1.3",
163  "redux": "^4.0.4",
164  "redux-logger": "^3.0.6",
165  "redux-persist": "^6.0.0",
166  "redux-thunk": "^2.3.0",
167  "rn-fetch-blob": "^0.12.0",
168  "urbanairship-react-native": "^12.0.0",
169  "uuid": "^8.3.0"
170},
171

ANSWER

Answered 2022-Feb-25 at 23:22

We have fixed the issue by replacing

1    E/AndroidRuntime: FATAL EXCEPTION: AsyncTask #3
2        java.lang.NoSuchMethodError: No virtual method setSkipClientToken(Z)V in class Lcom/facebook/GraphRequest; or its super classes (declaration of 'com.facebook.GraphRequest' appears in /data/app/~~aLf3pfLySq5u7zpIAr2Hlg==/com.package-name-99h4GcP3GNx2sMs76AXGvA==/base.apk)
3            at com.facebook.marketing.internal.RemoteConfigManager.getRemoteConfigQueryResponse(RemoteConfigManager.java:87)
4            at com.facebook.marketing.internal.RemoteConfigManager.access$000(RemoteConfigManager.java:43)
5            at com.facebook.marketing.internal.RemoteConfigManager$1.run(RemoteConfigManager.java:64)
6            at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
7            at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
8            at java.lang.Thread.run(Thread.java:923)
9distributionBase=GRADLE_USER_HOME
10distributionPath=wrapper/dists
11distributionUrl=https\://services.gradle.org/distributions/gradle-6.9-all.zip
12zipStoreBase=GRADLE_USER_HOME
13zipStorePath=wrapper/dists
14// Top-level build file where you can add configuration options common to all sub-projects/modules.
15
16buildscript {
17  ext {
18      buildToolsVersion = "30.0.2"
19      minSdkVersion = 21
20      compileSdkVersion = 30
21      targetSdkVersion = 30
22      ndkVersion = "21.4.7075529"
23  }
24  repositories {
25      google()
26      mavenCentral()
27      jcenter()
28      // maven {
29      //    url 'https://maven.fabric.io/public'
30      // }
31      maven { url "https://www.jitpack.io" }
32  }
33  dependencies {
34      classpath("com.android.tools.build:gradle:4.2.2")
35      classpath 'com.google.gms:google-services:4.2.0'  // Google Services plugin
36      // Add the Fabric Crashlytics plugin.
37      // classpath 'io.fabric.tools:gradle:1.31.2'
38      // firebase performance sdk
39      classpath 'com.google.firebase:perf-plugin:1.4.0'
40      classpath 'com.google.firebase:firebase-crashlytics-gradle:2.7.1'
41
42
43      // NOTE: Do not place your application dependencies here; they belong
44      // in the individual module build.gradle files
45  }
46}
47
48allprojects {
49  repositories {
50      mavenCentral()
51      mavenLocal()
52      maven {
53          // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
54          url("$rootDir/../node_modules/react-native/android")
55      }
56      maven {
57          // Android JSC is installed from npm
58          url("$rootDir/../node_modules/jsc-android/dist")
59      }
60
61      google()
62      jcenter()
63      maven { url 'https://www.jitpack.io' }
64  }
65}
66
67
68subprojects {
69  afterEvaluate {project ->
70      if (project.hasProperty("android")) {
71          android {
72              buildToolsVersion "28.0.3"
73              compileSdkVersion 28
74          }
75      }
76  }
77}
78
79subprojects {
80  afterEvaluate {project ->
81      if (project.hasProperty("android")) {
82          android {
83              compileSdkVersion 29
84              buildToolsVersion '29.0.3'
85          }
86      }
87  }
88}
89"dependencies": {
90  "@eva-design/eva": "^2.1.0",
91  "@react-native-async-storage/async-storage": "^1.15.14",
92  "@react-native-community/blur": "^3.6.0",
93  "@react-native-community/checkbox": "^0.5.0",
94  "@react-native-community/netinfo": "^6.0.1",
95  "@react-native-community/toolbar-android": "^0.1.0-rc.2",
96  "@react-native-firebase/analytics": "^10.3.1",
97  "@react-native-firebase/app": "^10.3.0",
98  "@react-native-firebase/auth": "^10.3.1",
99  "@react-native-firebase/crashlytics": "^10.3.1",
100  "@react-native-firebase/dynamic-links": "^10.3.1",
101  "@react-native-firebase/firestore": "^10.3.1",
102  "@react-native-firebase/iid": "^10.3.1",
103  "@react-native-firebase/in-app-messaging": "^10.3.1",
104  "@react-native-firebase/messaging": "^10.3.1",
105  "@react-native-firebase/perf": "^10.3.1",
106  "@react-native-firebase/remote-config": "^10.3.1",
107  "@react-native-firebase/storage": "^10.3.1",
108  "@react-native-picker/picker": "^2.1.0",
109  "@react-navigation/bottom-tabs": "^6.0.9",
110  "@react-navigation/native": "^6.0.6",
111  "@react-navigation/stack": "^6.0.11",
112  "@types/react-native": "^0.65.5",
113  "@ui-kitten/components": "^5.1.0",
114  "axios": "^0.19.0",
115  "i18n-js": "^3.5.1",
116  "moment": "^2.24.0",
117  "native-base": "2.13.8",
118  "react": "17.0.2",
119  "react-content-loader": "^4.3.4",
120  "react-native": "0.66.0",
121  "react-native-actions-sheet": "^0.5.6",
122  "react-native-adjust": "^4.28.0",
123  "react-native-amplitude-analytics": "^0.2.7",
124  "react-native-animatable": "^1.3.3",
125  "react-native-code-push": "^7.0.4",
126  "react-native-config": "^1.3.3",
127  "react-native-contacts": "^5.0.7",
128  "react-native-dots-pagination": "^0.2.0",
129  "react-native-fbsdk-next": "^6.2.0",
130  "react-native-fingerprint-scanner": "^6.0.0",
131  "react-native-floating-action": "^1.22.0",
132  "react-native-geocoding": "^0.4.0",
133  "react-native-geolocation-service": "^5.2.0",
134  "react-native-gesture-handler": "^1.5.2",
135  "react-native-get-random-values": "^1.4.0",
136  "react-native-html-to-pdf-lite": "^0.11.0",
137  "react-native-image-base64": "^0.1.4",
138  "react-native-image-pan-zoom": "^2.1.11",
139  "react-native-image-picker": "^4.1.2",
140  "react-native-image-resizer": "^1.2.0",
141  "react-native-in-app-review": "^2.1.7",
142  "react-native-linear-gradient": "^2.5.6",
143  "react-native-loading-spinner-overlay": "^1.1.0",
144  "react-native-material-menu": "^1.0.0",
145  "react-native-material-textfield": "^0.16.1",
146  "react-native-modal": "^13.0.0",
147  "react-native-phone-call": "^1.0.9",
148  "react-native-ratings": "^7.3.0",
149  "react-native-reanimated": "^1.13.0",
150  "react-native-safe-area-context": "^3.3.2",
151  "react-native-screens": "^3.9.0",
152  "react-native-share": "^7.2.1",
153  "react-native-smooth-pincode-input": "^1.0.9",
154  "react-native-sms-retriever": "https://github.com/sarmad1995/react-native-sms-retriever.git",
155  "react-native-snap-carousel": "^3.9.1",
156  "react-native-splash-screen": "^3.2.0",
157  "react-native-svg": "^12.1.1",
158  "react-native-version-check": "^3.4.2",
159  "react-native-version-number": "^0.3.6",
160  "react-native-view-shot": "^3.1.2",
161  "react-native-walkthrough-tooltip": "^1.3.0",
162  "react-redux": "^7.1.3",
163  "redux": "^4.0.4",
164  "redux-logger": "^3.0.6",
165  "redux-persist": "^6.0.0",
166  "redux-thunk": "^2.3.0",
167  "rn-fetch-blob": "^0.12.0",
168  "urbanairship-react-native": "^12.0.0",
169  "uuid": "^8.3.0"
170},
171implementation 'com.facebook.android:facebook-marketing:[4,5)'
172

by

1    E/AndroidRuntime: FATAL EXCEPTION: AsyncTask #3
2        java.lang.NoSuchMethodError: No virtual method setSkipClientToken(Z)V in class Lcom/facebook/GraphRequest; or its super classes (declaration of 'com.facebook.GraphRequest' appears in /data/app/~~aLf3pfLySq5u7zpIAr2Hlg==/com.package-name-99h4GcP3GNx2sMs76AXGvA==/base.apk)
3            at com.facebook.marketing.internal.RemoteConfigManager.getRemoteConfigQueryResponse(RemoteConfigManager.java:87)
4            at com.facebook.marketing.internal.RemoteConfigManager.access$000(RemoteConfigManager.java:43)
5            at com.facebook.marketing.internal.RemoteConfigManager$1.run(RemoteConfigManager.java:64)
6            at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
7            at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
8            at java.lang.Thread.run(Thread.java:923)
9distributionBase=GRADLE_USER_HOME
10distributionPath=wrapper/dists
11distributionUrl=https\://services.gradle.org/distributions/gradle-6.9-all.zip
12zipStoreBase=GRADLE_USER_HOME
13zipStorePath=wrapper/dists
14// Top-level build file where you can add configuration options common to all sub-projects/modules.
15
16buildscript {
17  ext {
18      buildToolsVersion = "30.0.2"
19      minSdkVersion = 21
20      compileSdkVersion = 30
21      targetSdkVersion = 30
22      ndkVersion = "21.4.7075529"
23  }
24  repositories {
25      google()
26      mavenCentral()
27      jcenter()
28      // maven {
29      //    url 'https://maven.fabric.io/public'
30      // }
31      maven { url "https://www.jitpack.io" }
32  }
33  dependencies {
34      classpath("com.android.tools.build:gradle:4.2.2")
35      classpath 'com.google.gms:google-services:4.2.0'  // Google Services plugin
36      // Add the Fabric Crashlytics plugin.
37      // classpath 'io.fabric.tools:gradle:1.31.2'
38      // firebase performance sdk
39      classpath 'com.google.firebase:perf-plugin:1.4.0'
40      classpath 'com.google.firebase:firebase-crashlytics-gradle:2.7.1'
41
42
43      // NOTE: Do not place your application dependencies here; they belong
44      // in the individual module build.gradle files
45  }
46}
47
48allprojects {
49  repositories {
50      mavenCentral()
51      mavenLocal()
52      maven {
53          // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
54          url("$rootDir/../node_modules/react-native/android")
55      }
56      maven {
57          // Android JSC is installed from npm
58          url("$rootDir/../node_modules/jsc-android/dist")
59      }
60
61      google()
62      jcenter()
63      maven { url 'https://www.jitpack.io' }
64  }
65}
66
67
68subprojects {
69  afterEvaluate {project ->
70      if (project.hasProperty("android")) {
71          android {
72              buildToolsVersion "28.0.3"
73              compileSdkVersion 28
74          }
75      }
76  }
77}
78
79subprojects {
80  afterEvaluate {project ->
81      if (project.hasProperty("android")) {
82          android {
83              compileSdkVersion 29
84              buildToolsVersion '29.0.3'
85          }
86      }
87  }
88}
89"dependencies": {
90  "@eva-design/eva": "^2.1.0",
91  "@react-native-async-storage/async-storage": "^1.15.14",
92  "@react-native-community/blur": "^3.6.0",
93  "@react-native-community/checkbox": "^0.5.0",
94  "@react-native-community/netinfo": "^6.0.1",
95  "@react-native-community/toolbar-android": "^0.1.0-rc.2",
96  "@react-native-firebase/analytics": "^10.3.1",
97  "@react-native-firebase/app": "^10.3.0",
98  "@react-native-firebase/auth": "^10.3.1",
99  "@react-native-firebase/crashlytics": "^10.3.1",
100  "@react-native-firebase/dynamic-links": "^10.3.1",
101  "@react-native-firebase/firestore": "^10.3.1",
102  "@react-native-firebase/iid": "^10.3.1",
103  "@react-native-firebase/in-app-messaging": "^10.3.1",
104  "@react-native-firebase/messaging": "^10.3.1",
105  "@react-native-firebase/perf": "^10.3.1",
106  "@react-native-firebase/remote-config": "^10.3.1",
107  "@react-native-firebase/storage": "^10.3.1",
108  "@react-native-picker/picker": "^2.1.0",
109  "@react-navigation/bottom-tabs": "^6.0.9",
110  "@react-navigation/native": "^6.0.6",
111  "@react-navigation/stack": "^6.0.11",
112  "@types/react-native": "^0.65.5",
113  "@ui-kitten/components": "^5.1.0",
114  "axios": "^0.19.0",
115  "i18n-js": "^3.5.1",
116  "moment": "^2.24.0",
117  "native-base": "2.13.8",
118  "react": "17.0.2",
119  "react-content-loader": "^4.3.4",
120  "react-native": "0.66.0",
121  "react-native-actions-sheet": "^0.5.6",
122  "react-native-adjust": "^4.28.0",
123  "react-native-amplitude-analytics": "^0.2.7",
124  "react-native-animatable": "^1.3.3",
125  "react-native-code-push": "^7.0.4",
126  "react-native-config": "^1.3.3",
127  "react-native-contacts": "^5.0.7",
128  "react-native-dots-pagination": "^0.2.0",
129  "react-native-fbsdk-next": "^6.2.0",
130  "react-native-fingerprint-scanner": "^6.0.0",
131  "react-native-floating-action": "^1.22.0",
132  "react-native-geocoding": "^0.4.0",
133  "react-native-geolocation-service": "^5.2.0",
134  "react-native-gesture-handler": "^1.5.2",
135  "react-native-get-random-values": "^1.4.0",
136  "react-native-html-to-pdf-lite": "^0.11.0",
137  "react-native-image-base64": "^0.1.4",
138  "react-native-image-pan-zoom": "^2.1.11",
139  "react-native-image-picker": "^4.1.2",
140  "react-native-image-resizer": "^1.2.0",
141  "react-native-in-app-review": "^2.1.7",
142  "react-native-linear-gradient": "^2.5.6",
143  "react-native-loading-spinner-overlay": "^1.1.0",
144  "react-native-material-menu": "^1.0.0",
145  "react-native-material-textfield": "^0.16.1",
146  "react-native-modal": "^13.0.0",
147  "react-native-phone-call": "^1.0.9",
148  "react-native-ratings": "^7.3.0",
149  "react-native-reanimated": "^1.13.0",
150  "react-native-safe-area-context": "^3.3.2",
151  "react-native-screens": "^3.9.0",
152  "react-native-share": "^7.2.1",
153  "react-native-smooth-pincode-input": "^1.0.9",
154  "react-native-sms-retriever": "https://github.com/sarmad1995/react-native-sms-retriever.git",
155  "react-native-snap-carousel": "^3.9.1",
156  "react-native-splash-screen": "^3.2.0",
157  "react-native-svg": "^12.1.1",
158  "react-native-version-check": "^3.4.2",
159  "react-native-version-number": "^0.3.6",
160  "react-native-view-shot": "^3.1.2",
161  "react-native-walkthrough-tooltip": "^1.3.0",
162  "react-redux": "^7.1.3",
163  "redux": "^4.0.4",
164  "redux-logger": "^3.0.6",
165  "redux-persist": "^6.0.0",
166  "redux-thunk": "^2.3.0",
167  "rn-fetch-blob": "^0.12.0",
168  "urbanairship-react-native": "^12.0.0",
169  "uuid": "^8.3.0"
170},
171implementation 'com.facebook.android:facebook-marketing:[4,5)'
172implementation 'com.facebook.android:facebook-marketing:latest.release'
173

in android/app/build.gradle file.

Posted this so someone out there facing the same problem will find the solution easily. It took me and my team around one and a half day to figure it out as there is no clear solution out there.

Solution Ref: here

Source https://stackoverflow.com/questions/71256006

QUESTION

How to register ServiceBusClient for dependency injection?

Asked 2022-Feb-08 at 14:11

I’m trying to register ServiceBusClient from the new Azure.Messaging.ServiceBus package for dependency injection as recommended in this article using ServiceBusClientBuilderExtensions, but I can’t find any documentation or any help online on how exactly to go about this.

I'm trying to add as below

1public override void Configure(IFunctionsHostBuilder builder)
2{
3    ServiceBusClientBuilderExtensions.AddServiceBusClient(builder, Typsy.Domain.Configuration.Settings.Instance().Connections.ServiceBusPrimary);
4}
5

but I'm getting the error

The type 'Microsoft.Azure.Functions.Extensions.DependencyInjection.IFunctionsHostBuilder' must be convertible to 'Azure.Core.Extensions.IAzureClientFactoryBuilder' in order to use it as parameter 'TBuilder' in the generic method 'IAzureClientBuilder<ServiceBusClient,ServiceBusClientOptions> Microsoft.Extensions.Azure.ServiceBusClientBuilderExtensions.AddServiceBusClient(this TBuilder, string)'

enter image description here

If anyone can help with this that'll be great!

ANSWER

Answered 2021-Sep-02 at 20:03

ServiceBusClientBuilderExtensions.AddServiceBusClient is an extension method of IAzureClientFactoryBuilder:

1public override void Configure(IFunctionsHostBuilder builder)
2{
3    ServiceBusClientBuilderExtensions.AddServiceBusClient(builder, Typsy.Domain.Configuration.Settings.Instance().Connections.ServiceBusPrimary);
4}
5public static IAzureClientBuilder&lt;ServiceBusClient, ServiceBusClientOptions&gt; AddServiceBusClient&lt;TBuilder&gt;(this TBuilder builder, string connectionString)
6            where TBuilder : IAzureClientFactoryBuilder
7

To get an instance of IAzureClientFactoryBuilder, you need to call AzureClientServiceCollectionExtensions.AddAzureClients(IServiceCollection, Action<AzureClientFactoryBuilder>) for a given IServiceCollection, which provides a delegate giving an instance of IAzureClientFactoryBuilder. (this method is in the Microsoft.Extensions.Azure NuGet package)

To call that method, you can use the IServiceCollection provided by IFunctionsHostBuilder. With all of that, what you have should look something like:

1public override void Configure(IFunctionsHostBuilder builder)
2{
3    ServiceBusClientBuilderExtensions.AddServiceBusClient(builder, Typsy.Domain.Configuration.Settings.Instance().Connections.ServiceBusPrimary);
4}
5public static IAzureClientBuilder&lt;ServiceBusClient, ServiceBusClientOptions&gt; AddServiceBusClient&lt;TBuilder&gt;(this TBuilder builder, string connectionString)
6            where TBuilder : IAzureClientFactoryBuilder
7public override void Configure(IFunctionsHostBuilder builder)
8{
9    builder.Services.AddAzureClients(clientsBuilder =&gt;
10    {
11        clientsBuilder.AddServiceBusClient(Typsy.Domain.Configuration.Settings.Instance().Connections.ServiceBusPrimary)
12          // (Optional) Provide name for instance to retrieve by with DI
13          .WithName(&quot;Client1Name&quot;)
14          // (Optional) Override ServiceBusClientOptions (e.g. change retry settings)
15          .ConfigureOptions(options =&gt;
16          {
17              options.RetryOptions.Delay = TimeSpan.FromMilliseconds(50);
18              options.RetryOptions.MaxDelay = TimeSpan.FromSeconds(5);
19              options.RetryOptions.MaxRetries = 3;
20          });
21    });
22}
23

To retrieve the named instance, instead of using ServiceBusClient as the injected type you use IAzureClientFactory<ServiceBusClient>. The ServiceBusClient is a Singleton regardless of whether you use a named instance or not.

1public override void Configure(IFunctionsHostBuilder builder)
2{
3    ServiceBusClientBuilderExtensions.AddServiceBusClient(builder, Typsy.Domain.Configuration.Settings.Instance().Connections.ServiceBusPrimary);
4}
5public static IAzureClientBuilder&lt;ServiceBusClient, ServiceBusClientOptions&gt; AddServiceBusClient&lt;TBuilder&gt;(this TBuilder builder, string connectionString)
6            where TBuilder : IAzureClientFactoryBuilder
7public override void Configure(IFunctionsHostBuilder builder)
8{
9    builder.Services.AddAzureClients(clientsBuilder =&gt;
10    {
11        clientsBuilder.AddServiceBusClient(Typsy.Domain.Configuration.Settings.Instance().Connections.ServiceBusPrimary)
12          // (Optional) Provide name for instance to retrieve by with DI
13          .WithName(&quot;Client1Name&quot;)
14          // (Optional) Override ServiceBusClientOptions (e.g. change retry settings)
15          .ConfigureOptions(options =&gt;
16          {
17              options.RetryOptions.Delay = TimeSpan.FromMilliseconds(50);
18              options.RetryOptions.MaxDelay = TimeSpan.FromSeconds(5);
19              options.RetryOptions.MaxRetries = 3;
20          });
21    });
22}
23 public Constructor(IAzureClientFactory&lt;ServiceBusClient&gt; serviceBusClientFactory)
24 {
25     // Wherever you need the ServiceBusClient
26     ServiceBusClient singletonClient1 = serviceBusClientFactory.CreateClient(&quot;Client1Name&quot;)
27 }
28

Source https://stackoverflow.com/questions/68688838

QUESTION

uploaded an APK which has an activity,activity alias,service or broadcast receiver with intentfilter, but without 'android : exported' property set

Asked 2022-Feb-03 at 10:56

I'm having an issue when i'm uploading app bundle to the play console that You uploaded an APK or Android App Bundle which has an activity, activity alias, service or broadcast receiver with intent filter, but without 'android:exported' property set. This file can't be installed on Android 12 or higher. but my manifest file includes the property.

Manifest file

1    &lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
2    &lt;manifest xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;
3        package=&quot;**********&quot;&gt;
4        &lt;!-- io.flutter.app.FlutterApplication is an android.app.Application that
5             calls FlutterMain.startInitialization(this); in its onCreate method.
6             In most cases you can leave this as-is, but you if you want to provide
7             additional functionality it is fine to subclass or reimplement
8             FlutterApplication and put your custom class here. --&gt;
9        &lt;uses-permission android:name=&quot;android.permission.INTERNET&quot; /&gt;
10        &lt;uses-permission android:name=&quot;android.permission.CAMERA&quot; /&gt;
11        &lt;uses-feature android:name=&quot;android.hardware.camera&quot; /&gt;
12        &lt;uses-permission android:name=&quot;android.permission.WRITE_EXTERNAL_STORAGE&quot; /&gt;
13        &lt;uses-permission android:name=&quot;android.permission.READ_EXTERNAL_STORAGE&quot; /&gt;
14        &lt;uses-permission android:name=&quot;android.permission.ACCESS_FINE_LOCATION&quot; /&gt;
15        &lt;uses-permission android:name=&quot;android.permission.ACCESS_COARSE_LOCATION&quot; /&gt;
16        &lt;uses-permission android:name=&quot;android.permission.ACCESS_BACKGROUND_LOCATION&quot; /&gt;
17        &lt;uses-permission android:name=&quot;android.permission.WAKE_LOCK&quot;/&gt;
18        &lt;uses-permission android:name=&quot;android.permission.FOREGROUND_SERVICE&quot;/&gt;
19        &lt;uses-permission android:name=&quot;android.permission.VIBRATE&quot; /&gt;
20        &lt;uses-permission android:name=&quot;android.permission.RECEIVE_BOOT_COMPLETED&quot;/&gt;
21        &lt;uses-permission android:name=&quot;android.permission.WAKE_LOCK&quot; /&gt;
22        &lt;uses-permission android:name=&quot;android.permission.ACTIVITY_RECOGNITION&quot; /&gt;
23        &lt;uses-permission android:name=&quot;com.google.android.gms.permission.ACTIVITY_RECOGNITION&quot; /&gt;
24    
25    
26        &lt;application
27            android:name=&quot;io.flutter.app.FlutterApplication&quot;
28            android:label=&quot;*****&quot;
29            android:requestLegacyExternalStorage=&quot;true&quot;
30            android:usesCleartextTraffic=&quot;true&quot;
31            android:icon=&quot;@mipmap/ic_launcher&quot;&gt;
32    
33    
34            &lt;meta-data
35              android:name=&quot;com.google.firebase.messaging.default_notification_icon&quot;
36              android:resource=&quot;@drawable/ic_stat_artboard_1&quot; /&gt;
37    
38            &lt;meta-data android:name=&quot;com.google.android.geo.API_KEY&quot;
39                android:value=&quot;Z*********&quot;/&gt;
40    
41            &lt;provider
42                android:name=&quot;vn.hunghd.flutterdownloader.DownloadedFileProvider&quot;
43                android:authorities=&quot;im.mingguang.mingguang_app.flutter_downloader.provider&quot;
44                android:grantUriPermissions=&quot;true&quot;
45                android:requestLegacyExternalStorage=&quot;true&quot;&gt;
46                &lt;meta-data
47                    android:name=&quot;android.support.FILE_PROVIDER_PATHS&quot;
48                    android:resource=&quot;@xml/provider_paths&quot;/&gt;
49            &lt;/provider&gt;
50    
51            &lt;provider
52        android:name=&quot;androidx.core.content.FileProvider&quot;
53        android:authorities=&quot;${applicationId}.provider&quot;
54        android:grantUriPermissions=&quot;true&quot;&gt;
55        &lt;meta-data
56            android:name=&quot;android.support.FILE_PROVIDER_PATHS&quot;
57            android:resource=&quot;@xml/provider_paths&quot;/&gt;
58    &lt;/provider&gt;
59            &lt;activity
60                android:name=&quot;.MainActivity&quot;
61                android:launchMode=&quot;singleTop&quot;
62                android:theme=&quot;@style/LaunchTheme&quot;
63                android:configChanges=&quot;orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode&quot;
64                android:hardwareAccelerated=&quot;true&quot;
65                android:exported=&quot;true&quot;
66                android:windowSoftInputMode=&quot;adjustResize&quot;&gt;
67                &lt;intent-filter&gt;
68                    &lt;action android:name=&quot;android.intent.action.MAIN&quot;/&gt;
69                    &lt;category android:name=&quot;android.intent.category.DEFAULT&quot;/&gt;
70                    &lt;category android:name=&quot;android.intent.category.LAUNCHER&quot;/&gt;
71                &lt;/intent-filter&gt;
72                &lt;intent-filter&gt;
73                    &lt;action android:name=&quot;FLUTTER_NOTIFICATION_CLICK&quot; /&gt;
74                    &lt;category android:name=&quot;android.intent.category.DEFAULT&quot;/&gt;
75                &lt;/intent-filter&gt;
76            &lt;/activity&gt;
77            &lt;!-- Don't delete the meta-data below.
78                 This is used by the Flutter tool to generate GeneratedPluginRegistrant.java --&gt;
79            &lt;meta-data
80                android:name=&quot;flutterEmbedding&quot;
81                android:value=&quot;2&quot; /&gt;
82        &lt;/application&gt;
83    &lt;/manifest&gt;
84

Play Console Error

enter image description here

ANSWER

Answered 2022-Jan-12 at 23:56

I face the same Issue but i solved by writing android:exported="true" in activity bellow the android:name=".MainActivity" image shown

Source https://stackoverflow.com/questions/70684516

QUESTION

How to solve FirebaseError: Expected first argument to collection() to be a CollectionReference, a DocumentReference or FirebaseFirestore problem?

Asked 2022-Jan-11 at 15:08

I am trying to set up Firebase with next.js. I am getting this error in the console.

FirebaseError: Expected first argument to collection() to be a CollectionReference, a DocumentReference or FirebaseFirestore

This is one of my custom hook

1import { onAuthStateChanged, User } from '@firebase/auth'
2import { doc, onSnapshot, Unsubscribe } from 'firebase/firestore'
3import { useEffect, useState } from 'react'
4import { auth, fireStore } from './firebase'
5
6export const useUserData = () =&gt; {
7  const [username, setUsername] = useState&lt;string | null&gt;(null)
8
9  const [currentUser, setCurrentUser] = useState&lt;User | null&gt;(null)
10
11  useEffect(() =&gt; {
12    let unsubscribe: void | Unsubscribe
13
14    onAuthStateChanged(auth, (user) =&gt; {
15      if (user) {
16        setCurrentUser(user)
17        // The Problem is inside this try blog
18        try {
19          // the onsnapshot function is causing the problem
20          console.log('firestore: ', fireStore)
21          unsubscribe = onSnapshot(doc(fireStore, 'users', user.uid), (doc) =&gt; {
22            setUsername(doc.data()?.username)
23          })
24        } catch (e) {
25          console.log(e.message)
26        }
27      } else {
28        setCurrentUser(null)
29        setUsername(null)
30      }
31    })
32
33    return unsubscribe
34  }, [currentUser])
35
36  return { currentUser, username }
37}
38

I also have this firebase.ts file where I initialized my firebase app

1import { onAuthStateChanged, User } from '@firebase/auth'
2import { doc, onSnapshot, Unsubscribe } from 'firebase/firestore'
3import { useEffect, useState } from 'react'
4import { auth, fireStore } from './firebase'
5
6export const useUserData = () =&gt; {
7  const [username, setUsername] = useState&lt;string | null&gt;(null)
8
9  const [currentUser, setCurrentUser] = useState&lt;User | null&gt;(null)
10
11  useEffect(() =&gt; {
12    let unsubscribe: void | Unsubscribe
13
14    onAuthStateChanged(auth, (user) =&gt; {
15      if (user) {
16        setCurrentUser(user)
17        // The Problem is inside this try blog
18        try {
19          // the onsnapshot function is causing the problem
20          console.log('firestore: ', fireStore)
21          unsubscribe = onSnapshot(doc(fireStore, 'users', user.uid), (doc) =&gt; {
22            setUsername(doc.data()?.username)
23          })
24        } catch (e) {
25          console.log(e.message)
26        }
27      } else {
28        setCurrentUser(null)
29        setUsername(null)
30      }
31    })
32
33    return unsubscribe
34  }, [currentUser])
35
36  return { currentUser, username }
37}
38import { FirebaseApp, getApps, initializeApp } from 'firebase/app'
39import { getAuth } from 'firebase/auth'
40import { getFirestore } from 'firebase/firestore/lite'
41import { getStorage } from 'firebase/storage'
42
43const firebaseConfig = {
44  apiKey: 'some-api',
45  authDomain: 'some-auth-domain',
46  projectId: 'some-project-id',
47  storageBucket: 'some-storage-bucket',
48  messagingSenderId: 'some-id',
49  appId: 'some-app-id',
50  measurementId: 'some-measurement-id',
51}
52
53let firebaseApp: FirebaseApp
54
55if (!getApps.length) {
56  firebaseApp = initializeApp(firebaseConfig)
57}
58
59const fireStore = getFirestore(firebaseApp)
60const auth = getAuth(firebaseApp)
61const storage = getStorage(firebaseApp)
62
63export { fireStore, auth, storage }
64

I don't know whether the problem is in the project initialization. I am pretty sure the error is generated from my custom hook file. I also found out that there must be something wrong with onSnapshot function. Am I passing the docRef wrong or something? What am I doing wrong here?

The console.log(firestore) log:

1import { onAuthStateChanged, User } from '@firebase/auth'
2import { doc, onSnapshot, Unsubscribe } from 'firebase/firestore'
3import { useEffect, useState } from 'react'
4import { auth, fireStore } from './firebase'
5
6export const useUserData = () =&gt; {
7  const [username, setUsername] = useState&lt;string | null&gt;(null)
8
9  const [currentUser, setCurrentUser] = useState&lt;User | null&gt;(null)
10
11  useEffect(() =&gt; {
12    let unsubscribe: void | Unsubscribe
13
14    onAuthStateChanged(auth, (user) =&gt; {
15      if (user) {
16        setCurrentUser(user)
17        // The Problem is inside this try blog
18        try {
19          // the onsnapshot function is causing the problem
20          console.log('firestore: ', fireStore)
21          unsubscribe = onSnapshot(doc(fireStore, 'users', user.uid), (doc) =&gt; {
22            setUsername(doc.data()?.username)
23          })
24        } catch (e) {
25          console.log(e.message)
26        }
27      } else {
28        setCurrentUser(null)
29        setUsername(null)
30      }
31    })
32
33    return unsubscribe
34  }, [currentUser])
35
36  return { currentUser, username }
37}
38import { FirebaseApp, getApps, initializeApp } from 'firebase/app'
39import { getAuth } from 'firebase/auth'
40import { getFirestore } from 'firebase/firestore/lite'
41import { getStorage } from 'firebase/storage'
42
43const firebaseConfig = {
44  apiKey: 'some-api',
45  authDomain: 'some-auth-domain',
46  projectId: 'some-project-id',
47  storageBucket: 'some-storage-bucket',
48  messagingSenderId: 'some-id',
49  appId: 'some-app-id',
50  measurementId: 'some-measurement-id',
51}
52
53let firebaseApp: FirebaseApp
54
55if (!getApps.length) {
56  firebaseApp = initializeApp(firebaseConfig)
57}
58
59const fireStore = getFirestore(firebaseApp)
60const auth = getAuth(firebaseApp)
61const storage = getStorage(firebaseApp)
62
63export { fireStore, auth, storage }
64
65    type: &quot;firestore-lite&quot;
66    _app: FirebaseAppImpl
67    _automaticDataCollectionEnabled: false
68    _config: {name: &quot;[DEFAULT]&quot;, automaticDataCollectionEnabled: false}
69    _container: ComponentContainer {name: &quot;[DEFAULT]&quot;, providers: Map(15)}
70    _isDeleted: false
71    _name: &quot;[DEFAULT]&quot;
72    _options:
73    apiKey: 'some-api'
74    authDomain: 'some-auth-domain'
75    projectId: 'some-project-id'
76    storageBucket: 'some-storage-bucket'
77    messagingSenderId: 'some-id'
78    appId: 'some-app-id'
79    measurementId: 'some-measurement-id'
80    [[Prototype]]: Object
81    automaticDataCollectionEnabled: (...)
82    config: (...)
83    container: (...)
84    isDeleted: (...)
85    name: (...)
86    options: (...)
87    [[Prototype]]: Object
88    _credentials: Q {auth: AuthInterop}
89    _databaseId: H {projectId: &quot;next-firebase-fireship&quot;, database: &quot;(default)&quot;}
90    _persistenceKey: &quot;(lite)&quot;
91    _settings: ee {host: &quot;firestore.googleapis.com&quot;, ssl: true, credentials: undefined, ignoreUndefinedProperties: false, cacheSizeBytes: 41943040, …}
92    _settingsFrozen: false
93    app: (...)
94    _initialized: (...)
95    _terminated: (...)
96
97

ANSWER

Answered 2022-Jan-07 at 19:07

Using getFirestore from lite library will not work with onSnapshot. You are importing getFirestore from lite version:

1import { onAuthStateChanged, User } from '@firebase/auth'
2import { doc, onSnapshot, Unsubscribe } from 'firebase/firestore'
3import { useEffect, useState } from 'react'
4import { auth, fireStore } from './firebase'
5
6export const useUserData = () =&gt; {
7  const [username, setUsername] = useState&lt;string | null&gt;(null)
8
9  const [currentUser, setCurrentUser] = useState&lt;User | null&gt;(null)
10
11  useEffect(() =&gt; {
12    let unsubscribe: void | Unsubscribe
13
14    onAuthStateChanged(auth, (user) =&gt; {
15      if (user) {
16        setCurrentUser(user)
17        // The Problem is inside this try blog
18        try {
19          // the onsnapshot function is causing the problem
20          console.log('firestore: ', fireStore)
21          unsubscribe = onSnapshot(doc(fireStore, 'users', user.uid), (doc) =&gt; {
22            setUsername(doc.data()?.username)
23          })
24        } catch (e) {
25          console.log(e.message)
26        }
27      } else {
28        setCurrentUser(null)
29        setUsername(null)
30      }
31    })
32
33    return unsubscribe
34  }, [currentUser])
35
36  return { currentUser, username }
37}
38import { FirebaseApp, getApps, initializeApp } from 'firebase/app'
39import { getAuth } from 'firebase/auth'
40import { getFirestore } from 'firebase/firestore/lite'
41import { getStorage } from 'firebase/storage'
42
43const firebaseConfig = {
44  apiKey: 'some-api',
45  authDomain: 'some-auth-domain',
46  projectId: 'some-project-id',
47  storageBucket: 'some-storage-bucket',
48  messagingSenderId: 'some-id',
49  appId: 'some-app-id',
50  measurementId: 'some-measurement-id',
51}
52
53let firebaseApp: FirebaseApp
54
55if (!getApps.length) {
56  firebaseApp = initializeApp(firebaseConfig)
57}
58
59const fireStore = getFirestore(firebaseApp)
60const auth = getAuth(firebaseApp)
61const storage = getStorage(firebaseApp)
62
63export { fireStore, auth, storage }
64
65    type: &quot;firestore-lite&quot;
66    _app: FirebaseAppImpl
67    _automaticDataCollectionEnabled: false
68    _config: {name: &quot;[DEFAULT]&quot;, automaticDataCollectionEnabled: false}
69    _container: ComponentContainer {name: &quot;[DEFAULT]&quot;, providers: Map(15)}
70    _isDeleted: false
71    _name: &quot;[DEFAULT]&quot;
72    _options:
73    apiKey: 'some-api'
74    authDomain: 'some-auth-domain'
75    projectId: 'some-project-id'
76    storageBucket: 'some-storage-bucket'
77    messagingSenderId: 'some-id'
78    appId: 'some-app-id'
79    measurementId: 'some-measurement-id'
80    [[Prototype]]: Object
81    automaticDataCollectionEnabled: (...)
82    config: (...)
83    container: (...)
84    isDeleted: (...)
85    name: (...)
86    options: (...)
87    [[Prototype]]: Object
88    _credentials: Q {auth: AuthInterop}
89    _databaseId: H {projectId: &quot;next-firebase-fireship&quot;, database: &quot;(default)&quot;}
90    _persistenceKey: &quot;(lite)&quot;
91    _settings: ee {host: &quot;firestore.googleapis.com&quot;, ssl: true, credentials: undefined, ignoreUndefinedProperties: false, cacheSizeBytes: 41943040, …}
92    _settingsFrozen: false
93    app: (...)
94    _initialized: (...)
95    _terminated: (...)
96
97import { getFirestore } from 'firebase/firestore/lite'
98

Change the import to:

1import { onAuthStateChanged, User } from '@firebase/auth'
2import { doc, onSnapshot, Unsubscribe } from 'firebase/firestore'
3import { useEffect, useState } from 'react'
4import { auth, fireStore } from './firebase'
5
6export const useUserData = () =&gt; {
7  const [username, setUsername] = useState&lt;string | null&gt;(null)
8
9  const [currentUser, setCurrentUser] = useState&lt;User | null&gt;(null)
10
11  useEffect(() =&gt; {
12    let unsubscribe: void | Unsubscribe
13
14    onAuthStateChanged(auth, (user) =&gt; {
15      if (user) {
16        setCurrentUser(user)
17        // The Problem is inside this try blog
18        try {
19          // the onsnapshot function is causing the problem
20          console.log('firestore: ', fireStore)
21          unsubscribe = onSnapshot(doc(fireStore, 'users', user.uid), (doc) =&gt; {
22            setUsername(doc.data()?.username)
23          })
24        } catch (e) {
25          console.log(e.message)
26        }
27      } else {
28        setCurrentUser(null)
29        setUsername(null)
30      }
31    })
32
33    return unsubscribe
34  }, [currentUser])
35
36  return { currentUser, username }
37}
38import { FirebaseApp, getApps, initializeApp } from 'firebase/app'
39import { getAuth } from 'firebase/auth'
40import { getFirestore } from 'firebase/firestore/lite'
41import { getStorage } from 'firebase/storage'
42
43const firebaseConfig = {
44  apiKey: 'some-api',
45  authDomain: 'some-auth-domain',
46  projectId: 'some-project-id',
47  storageBucket: 'some-storage-bucket',
48  messagingSenderId: 'some-id',
49  appId: 'some-app-id',
50  measurementId: 'some-measurement-id',
51}
52
53let firebaseApp: FirebaseApp
54
55if (!getApps.length) {
56  firebaseApp = initializeApp(firebaseConfig)
57}
58
59const fireStore = getFirestore(firebaseApp)
60const auth = getAuth(firebaseApp)
61const storage = getStorage(firebaseApp)
62
63export { fireStore, auth, storage }
64
65    type: &quot;firestore-lite&quot;
66    _app: FirebaseAppImpl
67    _automaticDataCollectionEnabled: false
68    _config: {name: &quot;[DEFAULT]&quot;, automaticDataCollectionEnabled: false}
69    _container: ComponentContainer {name: &quot;[DEFAULT]&quot;, providers: Map(15)}
70    _isDeleted: false
71    _name: &quot;[DEFAULT]&quot;
72    _options:
73    apiKey: 'some-api'
74    authDomain: 'some-auth-domain'
75    projectId: 'some-project-id'
76    storageBucket: 'some-storage-bucket'
77    messagingSenderId: 'some-id'
78    appId: 'some-app-id'
79    measurementId: 'some-measurement-id'
80    [[Prototype]]: Object
81    automaticDataCollectionEnabled: (...)
82    config: (...)
83    container: (...)
84    isDeleted: (...)
85    name: (...)
86    options: (...)
87    [[Prototype]]: Object
88    _credentials: Q {auth: AuthInterop}
89    _databaseId: H {projectId: &quot;next-firebase-fireship&quot;, database: &quot;(default)&quot;}
90    _persistenceKey: &quot;(lite)&quot;
91    _settings: ee {host: &quot;firestore.googleapis.com&quot;, ssl: true, credentials: undefined, ignoreUndefinedProperties: false, cacheSizeBytes: 41943040, …}
92    _settingsFrozen: false
93    app: (...)
94    _initialized: (...)
95    _terminated: (...)
96
97import { getFirestore } from 'firebase/firestore/lite'
98import { getFirestore } from 'firebase/firestore'
99

From the documentation,

The onSnapshot method and DocumentChange, SnapshotListenerOptions, SnapshotMetadata, SnapshotOptions and Unsubscribe objects are not included in lite version.


Another reason for this error to show up could be passing invalid first argument to collection() or doc() functions. They both take a Firestore instance as first argument.

1import { onAuthStateChanged, User } from '@firebase/auth'
2import { doc, onSnapshot, Unsubscribe } from 'firebase/firestore'
3import { useEffect, useState } from 'react'
4import { auth, fireStore } from './firebase'
5
6export const useUserData = () =&gt; {
7  const [username, setUsername] = useState&lt;string | null&gt;(null)
8
9  const [currentUser, setCurrentUser] = useState&lt;User | null&gt;(null)
10
11  useEffect(() =&gt; {
12    let unsubscribe: void | Unsubscribe
13
14    onAuthStateChanged(auth, (user) =&gt; {
15      if (user) {
16        setCurrentUser(user)
17        // The Problem is inside this try blog
18        try {
19          // the onsnapshot function is causing the problem
20          console.log('firestore: ', fireStore)
21          unsubscribe = onSnapshot(doc(fireStore, 'users', user.uid), (doc) =&gt; {
22            setUsername(doc.data()?.username)
23          })
24        } catch (e) {
25          console.log(e.message)
26        }
27      } else {
28        setCurrentUser(null)
29        setUsername(null)
30      }
31    })
32
33    return unsubscribe
34  }, [currentUser])
35
36  return { currentUser, username }
37}
38import { FirebaseApp, getApps, initializeApp } from 'firebase/app'
39import { getAuth } from 'firebase/auth'
40import { getFirestore } from 'firebase/firestore/lite'
41import { getStorage } from 'firebase/storage'
42
43const firebaseConfig = {
44  apiKey: 'some-api',
45  authDomain: 'some-auth-domain',
46  projectId: 'some-project-id',
47  storageBucket: 'some-storage-bucket',
48  messagingSenderId: 'some-id',
49  appId: 'some-app-id',
50  measurementId: 'some-measurement-id',
51}
52
53let firebaseApp: FirebaseApp
54
55if (!getApps.length) {
56  firebaseApp = initializeApp(firebaseConfig)
57}
58
59const fireStore = getFirestore(firebaseApp)
60const auth = getAuth(firebaseApp)
61const storage = getStorage(firebaseApp)
62
63export { fireStore, auth, storage }
64
65    type: &quot;firestore-lite&quot;
66    _app: FirebaseAppImpl
67    _automaticDataCollectionEnabled: false
68    _config: {name: &quot;[DEFAULT]&quot;, automaticDataCollectionEnabled: false}
69    _container: ComponentContainer {name: &quot;[DEFAULT]&quot;, providers: Map(15)}
70    _isDeleted: false
71    _name: &quot;[DEFAULT]&quot;
72    _options:
73    apiKey: 'some-api'
74    authDomain: 'some-auth-domain'
75    projectId: 'some-project-id'
76    storageBucket: 'some-storage-bucket'
77    messagingSenderId: 'some-id'
78    appId: 'some-app-id'
79    measurementId: 'some-measurement-id'
80    [[Prototype]]: Object
81    automaticDataCollectionEnabled: (...)
82    config: (...)
83    container: (...)
84    isDeleted: (...)
85    name: (...)
86    options: (...)
87    [[Prototype]]: Object
88    _credentials: Q {auth: AuthInterop}
89    _databaseId: H {projectId: &quot;next-firebase-fireship&quot;, database: &quot;(default)&quot;}
90    _persistenceKey: &quot;(lite)&quot;
91    _settings: ee {host: &quot;firestore.googleapis.com&quot;, ssl: true, credentials: undefined, ignoreUndefinedProperties: false, cacheSizeBytes: 41943040, …}
92    _settingsFrozen: false
93    app: (...)
94    _initialized: (...)
95    _terminated: (...)
96
97import { getFirestore } from 'firebase/firestore/lite'
98import { getFirestore } from 'firebase/firestore'
99// Ensure that &quot;db&quot; is defined and initialized
100const db = getFirestore();
101// console.log(db);
102
103const colRef = collection(db, &quot;collection_name&quot;);
104

Source https://stackoverflow.com/questions/69047904

QUESTION

Mandatory Consent for Admob User Messaging Platform

Asked 2021-Dec-12 at 16:09

I switched from the deprecated GDPR Consent Library to the new User Messaging Platform, and used the code as stated in the documentation.

I noticed that when the user clicks on Manage Options then Confirm choices, ads will stop displaying altogether (Ad failed to load, no ad config), and I can't find anyway to check if the user didn't consent to the use of personal data.

This is problematic as my app relies purely on ads, and I will be losing money if ads don't show up, so I want to make it mandatory for users to consent to the use of their personal data, otherwise the app should be unusable.

I have made a test project on Github so everyone can test this behavior. If you are not using an emulator, then you need to change the "TEST_DEVICE_ID" to yours.

How can I achieve this?

ANSWER

Answered 2021-Nov-02 at 17:50

I found a workaround for this, but this is no final official solution.

It seems that if a user consented to Personalized ads, a string in SharedPreferences, which key is IABTCF_VendorConsents, will contain ones and zeros corresponding to some vendors (I think). If he didn't consent, this string will be equal to 0.

1private val sp = PreferenceManager.getDefaultSharedPreferences(appContext)
2fun consentedToPersonalizedAds() = sp.getString(&quot;IABTCF_VendorConsents&quot;, null) != &quot;0&quot;
3

Source https://stackoverflow.com/questions/69307205

QUESTION

MissingPluginException(No implementation found for method Messaging#requestPermission on channel firebase_messaging

Asked 2021-Dec-07 at 05:13
1final NotificationSettings settings = await messaging.requestPermission();
2

I am getting this error when calling requestPermission() method of firebase messaging.

[ERROR:flutter/lib/ui/ui_dart_state.cc(209)] Unhandled Exception: MissingPluginException(No implementation found for method Messaging#requestPermission on channel plugins.flutter.io/firebase_messaging) E/flutter ( 7180): #0 convertPlatformException (package:firebase_messaging_platform_interface/src/method_channel/utils/exception.dart:13:5) E/flutter ( 7180): #1 MethodChannelFirebaseMessaging.requestPermission (package:firebase_messaging_platform_interface/src/method_channel/method_channel_messaging.dart:286:13) E/flutter ( 7180):

In build.gradle i implemented 'com.google.firebase:firebase-messaging'

implementation platform('com.google.firebase:firebase-bom:28.3.0')

ANSWER

Answered 2021-Nov-08 at 09:11

Terminate the current running session.

Do flutter pub get in your terminal

Then run again.

Source https://stackoverflow.com/questions/69880191

QUESTION

Error in retrieving notification_key for group messaging in FCM

Asked 2021-Aug-22 at 06:09

I was able to create a notification_key from notification_key_name as mentioned in the docs.

However, when I went to retrieving the notification_key from notification_key_name using

enter image description here

I get the error:

Your client has issued a malformed or illegal request.

What am I doing wrong?

ANSWER

Answered 2021-Aug-22 at 06:09

It was a silly mistake (thanks to docs as always), the request body should NOT be {} but empty.

enter image description here

Source https://stackoverflow.com/questions/68843537

QUESTION

Firestore Push Notification &quot;time out&quot; error Notification doesn't always get sent

Asked 2021-Jul-13 at 09:43

I am calling a function from my app that sends a notification out to a specific user on the app. The notification gets sent successfully much of the time but a good amount of times it does not get sent. When it does not get sent I check the logs to see

Function execution took 60003 ms, finished with status: 'timeout'

I have tried playing with my promises / async await but have had no luck as I suspect that is where the issue lies.

Here is what my cloud code looks like now

1exports.sendNotification = functions.https.onRequest(async (request, response) =&gt; {
2
3    if (request.method !== &quot;POST&quot;) {
4        response.status(400).send(&quot;Send it using post request&quot;);
5        return;
6    }
7
8    var toUid = request.body.toUid
9    var fcm = request.body.fcm
10    var fromUid = request.body.fromUid
11    var type = request.body.type
12    var fromName = request.body.fromName
13    var messageText = request.body.message
14
15    if (toUid === &quot;&quot; || fromUid === &quot;&quot; || fcm === &quot;&quot;) {
16        response.status(400).send(&quot;Parameter is missing!&quot;);
17        return;
18    }
19
20    // common data for both platforms
21    const notification = {
22     title: fromName,
23     body: messageText,
24    }
25    const fcmToken = fcm
26
27    // ios specific headers
28    const apns = {
29      headers: {
30        &quot;apns-collapse-id&quot;: 'toUid'
31      },
32      payload: {
33        aps: {
34          sound: 'default'
35        },
36        &quot;data&quot;: {
37          &quot;fromUid&quot;: fromUid,
38          &quot;type&quot;: type
39        }
40      }
41    }
42
43    // final message
44    const message = {
45     token: fcmToken,
46     notification: notification,
47     apns: apns,
48    }
49
50    // send message
51    try {
52      return await admin.messaging().send(message);
53      response.status(200).send(&quot;Done&quot;);
54    } catch(e) {
55      console.log('Error sending message:', e);
56    }
57});
58

I call the function from the app as follows

1exports.sendNotification = functions.https.onRequest(async (request, response) =&gt; {
2
3    if (request.method !== &quot;POST&quot;) {
4        response.status(400).send(&quot;Send it using post request&quot;);
5        return;
6    }
7
8    var toUid = request.body.toUid
9    var fcm = request.body.fcm
10    var fromUid = request.body.fromUid
11    var type = request.body.type
12    var fromName = request.body.fromName
13    var messageText = request.body.message
14
15    if (toUid === &quot;&quot; || fromUid === &quot;&quot; || fcm === &quot;&quot;) {
16        response.status(400).send(&quot;Parameter is missing!&quot;);
17        return;
18    }
19
20    // common data for both platforms
21    const notification = {
22     title: fromName,
23     body: messageText,
24    }
25    const fcmToken = fcm
26
27    // ios specific headers
28    const apns = {
29      headers: {
30        &quot;apns-collapse-id&quot;: 'toUid'
31      },
32      payload: {
33        aps: {
34          sound: 'default'
35        },
36        &quot;data&quot;: {
37          &quot;fromUid&quot;: fromUid,
38          &quot;type&quot;: type
39        }
40      }
41    }
42
43    // final message
44    const message = {
45     token: fcmToken,
46     notification: notification,
47     apns: apns,
48    }
49
50    // send message
51    try {
52      return await admin.messaging().send(message);
53      response.status(200).send(&quot;Done&quot;);
54    } catch(e) {
55      console.log('Error sending message:', e);
56    }
57});
58         AF.request(&quot;https://myproject.net/sendNotification&quot;, method: .post, parameters: parameters, encoding: JSONEncoding.default)
59         .responseString { response in
60             print(response)
61            DispatchQueue.main.async {
62                completion(&quot;done&quot;)
63            }
64         }
65

I have seen other stackoverflow questions of similar questions where it was suggested to use .post and JSONEncoding.default and so that is what I have now.

ANSWER

Answered 2021-Jul-06 at 17:40

I'm no node expert by any means, but played with Firebase Messaging for a while and came up with a working async solution to send a notification based on data creation in the realtime db. The only other difference aside from the trigger I really see is I'm not sending the APNS specific header yet...

I'm also remembering now I was having an intermittent timeout issue when I tried using the async messaging.send which is why I'm using promises there.

1exports.sendNotification = functions.https.onRequest(async (request, response) =&gt; {
2
3    if (request.method !== &quot;POST&quot;) {
4        response.status(400).send(&quot;Send it using post request&quot;);
5        return;
6    }
7
8    var toUid = request.body.toUid
9    var fcm = request.body.fcm
10    var fromUid = request.body.fromUid
11    var type = request.body.type
12    var fromName = request.body.fromName
13    var messageText = request.body.message
14
15    if (toUid === &quot;&quot; || fromUid === &quot;&quot; || fcm === &quot;&quot;) {
16        response.status(400).send(&quot;Parameter is missing!&quot;);
17        return;
18    }
19
20    // common data for both platforms
21    const notification = {
22     title: fromName,
23     body: messageText,
24    }
25    const fcmToken = fcm
26
27    // ios specific headers
28    const apns = {
29      headers: {
30        &quot;apns-collapse-id&quot;: 'toUid'
31      },
32      payload: {
33        aps: {
34          sound: 'default'
35        },
36        &quot;data&quot;: {
37          &quot;fromUid&quot;: fromUid,
38          &quot;type&quot;: type
39        }
40      }
41    }
42
43    // final message
44    const message = {
45     token: fcmToken,
46     notification: notification,
47     apns: apns,
48    }
49
50    // send message
51    try {
52      return await admin.messaging().send(message);
53      response.status(200).send(&quot;Done&quot;);
54    } catch(e) {
55      console.log('Error sending message:', e);
56    }
57});
58         AF.request(&quot;https://myproject.net/sendNotification&quot;, method: .post, parameters: parameters, encoding: JSONEncoding.default)
59         .responseString { response in
60             print(response)
61            DispatchQueue.main.async {
62                completion(&quot;done&quot;)
63            }
64         }
65exports.onMessageCreate = functions.database
66.ref('/users/{userId}/notifications/unread/{notificationId}')
67.onCreate(async (snapshot, context) =&gt; {
68    
69    const message = snapshot.val()
70    const category = message.category
71    const title = category + &quot;: &quot; + message.title
72    const text = message.text
73    const forUserId = message.forUserId
74    const date = message.date
75    
76    const token = await getUserToken(forUserId)
77    
78    if (token == null) {
79        throw new functions.https.HttpsError('unavailable', 'The token is nil, unable to send message')
80    }
81    
82    const notification = {
83        notification: {
84            title: title,
85            body: text
86        },
87        data: {
88            category: category,
89            title: message.title,
90            text: text,         
91            forUserId: forUserId,
92            date: date.toString()
93        },
94        token: token
95    }
96    
97    return admin.messaging().send(notification)
98    .then((response) =&gt; {
99        console.log('Successfully sent notification:', response)
100    })
101    .catch((error) =&gt; {
102        console.log('Error sending notification:', error)
103    })
104    
105})
106

Source https://stackoverflow.com/questions/68199189

QUESTION

Google AdMob new SDK setup for iOS : SKAdNetworkItems, NSUserTrackingUsageDescription, ATTrackingManager. Guideline 5.1.2 - Legal - Privacy - Data Use

Asked 2021-May-25 at 17:38

Google AdMob now shows below warning.

enter image description here

Prepare your apps for iOS 14 Apple announced the new AppTrackingTransparency framework, which requires changes to your iOS apps. Implement the GMA SDK 7.64.0 (or later) and set up consent messaging to help prevent a significant loss in ad revenue.

Some apps haven't been configured to use Apple's SKAdNetwork To ensure you're getting credit for all ads activity, like app installs, be sure to configure SKAdNetwork with Google's network IDs.

Some of your iOS apps require a GMA SDK update To keep ads serving normally and minimize a loss in ad revenue, implement the GMA SDK 7.64.0 (or later) for your iOS apps. And configure the SKAdNetwork in your apps with Google's network ID.

For this I did these changes

  1. Updated GoogleMobileAds SDK to 8.0

2.Updated app's Info.plist file with these 3 keys:

1        1. GADApplicationIdentifier key with a string value of AdMob app ID.
2        2. Added SKAdNetworkItems in plist as mentioned here https://developers.google.com/admob/ios/ios14
3        3. NSUserTrackingUsageDescription key with value 'Game_Name would like to access IDFA for thirdparty advertising purpose'  
4

info.plist screenshot enter image description here

Also added App Tracking Transparancy Alert:

1        1. GADApplicationIdentifier key with a string value of AdMob app ID.
2        2. Added SKAdNetworkItems in plist as mentioned here https://developers.google.com/admob/ios/ios14
3        3. NSUserTrackingUsageDescription key with value 'Game_Name would like to access IDFA for thirdparty advertising purpose'  
4- (void)requestIDFA
5{
6    if (@available(iOS 14.0, *))
7    {
8        [ATTrackingManager requestTrackingAuthorizationWithCompletionHandler:^(ATTrackingManagerAuthorizationStatus status) {
9            
10            // Admob Ads
11            [self loadAdmob_Ads];
12            [self loadRewardedInterstitial];
13            [self requestAppOpenAd];
14        }];
15    }
16    else
17    {
18        // Admob Ads
19        [self loadAdmob_Ads];
20        [self loadRewardedInterstitial];
21        [self requestAppOpenAd];
22    }
23}
24

Is there anything else I need to do in Xcode ?

See below image from Appstoreconnect, Am I need to set Yes Or No?(Yes, we use advertising data for tracking purpose?) we are not tracking user, not sure about Google AdMob. enter image description here

Data Used to Track You ( Identifiers), Data Linked to You ( Identifiers ). Is it right settings for Google AdMob ? enter image description here

Recent AppStore Rejection Message:

Guideline 5.1.2 - Legal - Privacy - Data Use and Sharing

We noticed you do not use App Tracking Transparency to request the user's permission before tracking their activity across apps and websites. The app privacy information you provided in App Store Connect indicates you collect data in order to track the user, including Device ID and Advertising Data.

Starting with iOS 14.5, apps on the App Store need to receive the user’s permission through the AppTrackingTransparency framework before collecting data used to track them. This requirement protects the privacy of App Store users.

Updates: Game approved by Apple. Here is game with latest admob ads (GADInterstitialAd, GADAppOpenAd, GADRewardedInterstitialAd, GADRewardedAd): https://apps.apple.com/us/app/ocean-fishing-master-3d-games/id1550945081

ANSWER

Answered 2021-May-25 at 17:37

Updates: Game approved by Apple. Here is game with latest admob ads (GADInterstitialAd, GADRewardedInterstitialAd, GADRewardedAd, GADAppOpenAd):

https://apps.apple.com/us/app/ocean-fishing-master-3d-games/id1550945081

Added Google Admob SKAdNetworkIdentifier values in Info.plist

1        1. GADApplicationIdentifier key with a string value of AdMob app ID.
2        2. Added SKAdNetworkItems in plist as mentioned here https://developers.google.com/admob/ios/ios14
3        3. NSUserTrackingUsageDescription key with value 'Game_Name would like to access IDFA for thirdparty advertising purpose'  
4- (void)requestIDFA
5{
6    if (@available(iOS 14.0, *))
7    {
8        [ATTrackingManager requestTrackingAuthorizationWithCompletionHandler:^(ATTrackingManagerAuthorizationStatus status) {
9            
10            // Admob Ads
11            [self loadAdmob_Ads];
12            [self loadRewardedInterstitial];
13            [self requestAppOpenAd];
14        }];
15    }
16    else
17    {
18        // Admob Ads
19        [self loadAdmob_Ads];
20        [self loadRewardedInterstitial];
21        [self requestAppOpenAd];
22    }
23}
24&lt;key&gt;SKAdNetworkItems&lt;/key&gt;
25  &lt;array&gt;
26    &lt;dict&gt;
27      &lt;key&gt;SKAdNetworkIdentifier&lt;/key&gt;
28      &lt;string&gt;cstr6suwn9.skadnetwork&lt;/string&gt;
29    &lt;/dict&gt;
30    &lt;dict&gt;
31      &lt;key&gt;SKAdNetworkIdentifier&lt;/key&gt;
32      &lt;string&gt;4fzdc2evr5.skadnetwork&lt;/string&gt;
33    &lt;/dict&gt;
34    &lt;dict&gt;
35      &lt;key&gt;SKAdNetworkIdentifier&lt;/key&gt;
36      &lt;string&gt;2fnua5tdw4.skadnetwork&lt;/string&gt;
37    &lt;/dict&gt;
38    &lt;dict&gt;
39      &lt;key&gt;SKAdNetworkIdentifier&lt;/key&gt;
40      &lt;string&gt;ydx93a7ass.skadnetwork&lt;/string&gt;
41    &lt;/dict&gt;
42    &lt;dict&gt;
43      &lt;key&gt;SKAdNetworkIdentifier&lt;/key&gt;
44      &lt;string&gt;5a6flpkh64.skadnetwork&lt;/string&gt;
45    &lt;/dict&gt;
46    &lt;dict&gt;
47      &lt;key&gt;SKAdNetworkIdentifier&lt;/key&gt;
48      &lt;string&gt;p78axxw29g.skadnetwork&lt;/string&gt;
49    &lt;/dict&gt;
50    &lt;dict&gt;
51      &lt;key&gt;SKAdNetworkIdentifier&lt;/key&gt;
52      &lt;string&gt;v72qych5uu.skadnetwork&lt;/string&gt;
53    &lt;/dict&gt;
54    &lt;dict&gt;
55      &lt;key&gt;SKAdNetworkIdentifier&lt;/key&gt;
56      &lt;string&gt;c6k4g5qg8m.skadnetwork&lt;/string&gt;
57    &lt;/dict&gt;
58    &lt;dict&gt;
59      &lt;key&gt;SKAdNetworkIdentifier&lt;/key&gt;
60      &lt;string&gt;s39g8k73mm.skadnetwork&lt;/string&gt;
61    &lt;/dict&gt;
62    &lt;dict&gt;
63      &lt;key&gt;SKAdNetworkIdentifier&lt;/key&gt;
64      &lt;string&gt;3qy4746246.skadnetwork&lt;/string&gt;
65    &lt;/dict&gt;
66    &lt;dict&gt;
67      &lt;key&gt;SKAdNetworkIdentifier&lt;/key&gt;
68      &lt;string&gt;3sh42y64q3.skadnetwork&lt;/string&gt;
69    &lt;/dict&gt;
70    &lt;dict&gt;
71      &lt;key&gt;SKAdNetworkIdentifier&lt;/key&gt;
72      &lt;string&gt;f38h382jlk.skadnetwork&lt;/string&gt;
73    &lt;/dict&gt;
74    &lt;dict&gt;
75      &lt;key&gt;SKAdNetworkIdentifier&lt;/key&gt;
76      &lt;string&gt;hs6bdukanm.skadnetwork&lt;/string&gt;
77    &lt;/dict&gt;
78    &lt;dict&gt;
79      &lt;key&gt;SKAdNetworkIdentifier&lt;/key&gt;
80      &lt;string&gt;prcb7njmu6.skadnetwork&lt;/string&gt;
81    &lt;/dict&gt;
82    &lt;dict&gt;
83      &lt;key&gt;SKAdNetworkIdentifier&lt;/key&gt;
84      &lt;string&gt;wzmmz9fp6w.skadnetwork&lt;/string&gt;
85    &lt;/dict&gt;
86    &lt;dict&gt;
87      &lt;key&gt;SKAdNetworkIdentifier&lt;/key&gt;
88      &lt;string&gt;yclnxrl5pm.skadnetwork&lt;/string&gt;
89    &lt;/dict&gt;
90    &lt;dict&gt;
91      &lt;key&gt;SKAdNetworkIdentifier&lt;/key&gt;
92      &lt;string&gt;4468km3ulz.skadnetwork&lt;/string&gt;
93    &lt;/dict&gt;
94    &lt;dict&gt;
95      &lt;key&gt;SKAdNetworkIdentifier&lt;/key&gt;
96      &lt;string&gt;t38b2kh725.skadnetwork&lt;/string&gt;
97    &lt;/dict&gt;
98    &lt;dict&gt;
99      &lt;key&gt;SKAdNetworkIdentifier&lt;/key&gt;
100      &lt;string&gt;7ug5zh24hu.skadnetwork&lt;/string&gt;
101    &lt;/dict&gt;
102    &lt;dict&gt;
103      &lt;key&gt;SKAdNetworkIdentifier&lt;/key&gt;
104      &lt;string&gt;9rd848q2bz.skadnetwork&lt;/string&gt;
105    &lt;/dict&gt;
106    &lt;dict&gt;
107      &lt;key&gt;SKAdNetworkIdentifier&lt;/key&gt;
108      &lt;string&gt;n6fk4nfna4.skadnetwork&lt;/string&gt;
109    &lt;/dict&gt;
110    &lt;dict&gt;
111      &lt;key&gt;SKAdNetworkIdentifier&lt;/key&gt;
112      &lt;string&gt;kbd757ywx3.skadnetwork&lt;/string&gt;
113    &lt;/dict&gt;
114    &lt;dict&gt;
115      &lt;key&gt;SKAdNetworkIdentifier&lt;/key&gt;
116      &lt;string&gt;9t245vhmpl.skadnetwork&lt;/string&gt;
117    &lt;/dict&gt;
118    &lt;dict&gt;
119      &lt;key&gt;SKAdNetworkIdentifier&lt;/key&gt;
120      &lt;string&gt;2u9pt9hc89.skadnetwork&lt;/string&gt;
121    &lt;/dict&gt;
122    &lt;dict&gt;
123      &lt;key&gt;SKAdNetworkIdentifier&lt;/key&gt;
124      &lt;string&gt;8s468mfl3y.skadnetwork&lt;/string&gt;
125    &lt;/dict&gt;
126    &lt;dict&gt;
127      &lt;key&gt;SKAdNetworkIdentifier&lt;/key&gt;
128      &lt;string&gt;av6w8kgt66.skadnetwork&lt;/string&gt;
129    &lt;/dict&gt;
130    &lt;dict&gt;
131      &lt;key&gt;SKAdNetworkIdentifier&lt;/key&gt;
132      &lt;string&gt;klf5c3l5u5.skadnetwork&lt;/string&gt;
133    &lt;/dict&gt;
134    &lt;dict&gt;
135      &lt;key&gt;SKAdNetworkIdentifier&lt;/key&gt;
136      &lt;string&gt;ppxm28t8ap.skadnetwork&lt;/string&gt;
137    &lt;/dict&gt;
138    &lt;dict&gt;
139      &lt;key&gt;SKAdNetworkIdentifier&lt;/key&gt;
140      &lt;string&gt;424m5254lk.skadnetwork&lt;/string&gt;
141    &lt;/dict&gt;
142    &lt;dict&gt;
143      &lt;key&gt;SKAdNetworkIdentifier&lt;/key&gt;
144      &lt;string&gt;uw77j35x4d.skadnetwork&lt;/string&gt;
145    &lt;/dict&gt;
146    &lt;dict&gt;
147      &lt;key&gt;SKAdNetworkIdentifier&lt;/key&gt;
148      &lt;string&gt;e5fvkxwrpn.skadnetwork&lt;/string&gt;
149    &lt;/dict&gt;
150    &lt;dict&gt;
151      &lt;key&gt;SKAdNetworkIdentifier&lt;/key&gt;
152      &lt;string&gt;zq492l623r.skadnetwork&lt;/string&gt;
153    &lt;/dict&gt;
154    &lt;dict&gt;
155      &lt;key&gt;SKAdNetworkIdentifier&lt;/key&gt;
156      &lt;string&gt;3qcr597p9d.skadnetwork&lt;/string&gt;
157    &lt;/dict&gt;
158  &lt;/array&gt;
159

Added requestIDFA in didFinishLaunchingWithOptions. It opens App Tracking Transparency dialog box.

1        1. GADApplicationIdentifier key with a string value of AdMob app ID.
2        2. Added SKAdNetworkItems in plist as mentioned here https://developers.google.com/admob/ios/ios14
3        3. NSUserTrackingUsageDescription key with value 'Game_Name would like to access IDFA for thirdparty advertising purpose'  
4- (void)requestIDFA
5{
6    if (@available(iOS 14.0, *))
7    {
8        [ATTrackingManager requestTrackingAuthorizationWithCompletionHandler:^(ATTrackingManagerAuthorizationStatus status) {
9            
10            // Admob Ads
11            [self loadAdmob_Ads];
12            [self loadRewardedInterstitial];
13            [self requestAppOpenAd];
14        }];
15    }
16    else
17    {
18        // Admob Ads
19        [self loadAdmob_Ads];
20        [self loadRewardedInterstitial];
21        [self requestAppOpenAd];
22    }
23}
24&lt;key&gt;SKAdNetworkItems&lt;/key&gt;
25  &lt;array&gt;
26    &lt;dict&gt;
27      &lt;key&gt;SKAdNetworkIdentifier&lt;/key&gt;
28      &lt;string&gt;cstr6suwn9.skadnetwork&lt;/string&gt;
29    &lt;/dict&gt;
30    &lt;dict&gt;
31      &lt;key&gt;SKAdNetworkIdentifier&lt;/key&gt;
32      &lt;string&gt;4fzdc2evr5.skadnetwork&lt;/string&gt;
33    &lt;/dict&gt;
34    &lt;dict&gt;
35      &lt;key&gt;SKAdNetworkIdentifier&lt;/key&gt;
36      &lt;string&gt;2fnua5tdw4.skadnetwork&lt;/string&gt;
37    &lt;/dict&gt;
38    &lt;dict&gt;
39      &lt;key&gt;SKAdNetworkIdentifier&lt;/key&gt;
40      &lt;string&gt;ydx93a7ass.skadnetwork&lt;/string&gt;
41    &lt;/dict&gt;
42    &lt;dict&gt;
43      &lt;key&gt;SKAdNetworkIdentifier&lt;/key&gt;
44      &lt;string&gt;5a6flpkh64.skadnetwork&lt;/string&gt;
45    &lt;/dict&gt;
46    &lt;dict&gt;
47      &lt;key&gt;SKAdNetworkIdentifier&lt;/key&gt;
48      &lt;string&gt;p78axxw29g.skadnetwork&lt;/string&gt;
49    &lt;/dict&gt;
50    &lt;dict&gt;
51      &lt;key&gt;SKAdNetworkIdentifier&lt;/key&gt;
52      &lt;string&gt;v72qych5uu.skadnetwork&lt;/string&gt;
53    &lt;/dict&gt;
54    &lt;dict&gt;
55      &lt;key&gt;SKAdNetworkIdentifier&lt;/key&gt;
56      &lt;string&gt;c6k4g5qg8m.skadnetwork&lt;/string&gt;
57    &lt;/dict&gt;
58    &lt;dict&gt;
59      &lt;key&gt;SKAdNetworkIdentifier&lt;/key&gt;
60      &lt;string&gt;s39g8k73mm.skadnetwork&lt;/string&gt;
61    &lt;/dict&gt;
62    &lt;dict&gt;
63      &lt;key&gt;SKAdNetworkIdentifier&lt;/key&gt;
64      &lt;string&gt;3qy4746246.skadnetwork&lt;/string&gt;
65    &lt;/dict&gt;
66    &lt;dict&gt;
67      &lt;key&gt;SKAdNetworkIdentifier&lt;/key&gt;
68      &lt;string&gt;3sh42y64q3.skadnetwork&lt;/string&gt;
69    &lt;/dict&gt;
70    &lt;dict&gt;
71      &lt;key&gt;SKAdNetworkIdentifier&lt;/key&gt;
72      &lt;string&gt;f38h382jlk.skadnetwork&lt;/string&gt;
73    &lt;/dict&gt;
74    &lt;dict&gt;
75      &lt;key&gt;SKAdNetworkIdentifier&lt;/key&gt;
76      &lt;string&gt;hs6bdukanm.skadnetwork&lt;/string&gt;
77    &lt;/dict&gt;
78    &lt;dict&gt;
79      &lt;key&gt;SKAdNetworkIdentifier&lt;/key&gt;
80      &lt;string&gt;prcb7njmu6.skadnetwork&lt;/string&gt;
81    &lt;/dict&gt;
82    &lt;dict&gt;
83      &lt;key&gt;SKAdNetworkIdentifier&lt;/key&gt;
84      &lt;string&gt;wzmmz9fp6w.skadnetwork&lt;/string&gt;
85    &lt;/dict&gt;
86    &lt;dict&gt;
87      &lt;key&gt;SKAdNetworkIdentifier&lt;/key&gt;
88      &lt;string&gt;yclnxrl5pm.skadnetwork&lt;/string&gt;
89    &lt;/dict&gt;
90    &lt;dict&gt;
91      &lt;key&gt;SKAdNetworkIdentifier&lt;/key&gt;
92      &lt;string&gt;4468km3ulz.skadnetwork&lt;/string&gt;
93    &lt;/dict&gt;
94    &lt;dict&gt;
95      &lt;key&gt;SKAdNetworkIdentifier&lt;/key&gt;
96      &lt;string&gt;t38b2kh725.skadnetwork&lt;/string&gt;
97    &lt;/dict&gt;
98    &lt;dict&gt;
99      &lt;key&gt;SKAdNetworkIdentifier&lt;/key&gt;
100      &lt;string&gt;7ug5zh24hu.skadnetwork&lt;/string&gt;
101    &lt;/dict&gt;
102    &lt;dict&gt;
103      &lt;key&gt;SKAdNetworkIdentifier&lt;/key&gt;
104      &lt;string&gt;9rd848q2bz.skadnetwork&lt;/string&gt;
105    &lt;/dict&gt;
106    &lt;dict&gt;
107      &lt;key&gt;SKAdNetworkIdentifier&lt;/key&gt;
108      &lt;string&gt;n6fk4nfna4.skadnetwork&lt;/string&gt;
109    &lt;/dict&gt;
110    &lt;dict&gt;
111      &lt;key&gt;SKAdNetworkIdentifier&lt;/key&gt;
112      &lt;string&gt;kbd757ywx3.skadnetwork&lt;/string&gt;
113    &lt;/dict&gt;
114    &lt;dict&gt;
115      &lt;key&gt;SKAdNetworkIdentifier&lt;/key&gt;
116      &lt;string&gt;9t245vhmpl.skadnetwork&lt;/string&gt;
117    &lt;/dict&gt;
118    &lt;dict&gt;
119      &lt;key&gt;SKAdNetworkIdentifier&lt;/key&gt;
120      &lt;string&gt;2u9pt9hc89.skadnetwork&lt;/string&gt;
121    &lt;/dict&gt;
122    &lt;dict&gt;
123      &lt;key&gt;SKAdNetworkIdentifier&lt;/key&gt;
124      &lt;string&gt;8s468mfl3y.skadnetwork&lt;/string&gt;
125    &lt;/dict&gt;
126    &lt;dict&gt;
127      &lt;key&gt;SKAdNetworkIdentifier&lt;/key&gt;
128      &lt;string&gt;av6w8kgt66.skadnetwork&lt;/string&gt;
129    &lt;/dict&gt;
130    &lt;dict&gt;
131      &lt;key&gt;SKAdNetworkIdentifier&lt;/key&gt;
132      &lt;string&gt;klf5c3l5u5.skadnetwork&lt;/string&gt;
133    &lt;/dict&gt;
134    &lt;dict&gt;
135      &lt;key&gt;SKAdNetworkIdentifier&lt;/key&gt;
136      &lt;string&gt;ppxm28t8ap.skadnetwork&lt;/string&gt;
137    &lt;/dict&gt;
138    &lt;dict&gt;
139      &lt;key&gt;SKAdNetworkIdentifier&lt;/key&gt;
140      &lt;string&gt;424m5254lk.skadnetwork&lt;/string&gt;
141    &lt;/dict&gt;
142    &lt;dict&gt;
143      &lt;key&gt;SKAdNetworkIdentifier&lt;/key&gt;
144      &lt;string&gt;uw77j35x4d.skadnetwork&lt;/string&gt;
145    &lt;/dict&gt;
146    &lt;dict&gt;
147      &lt;key&gt;SKAdNetworkIdentifier&lt;/key&gt;
148      &lt;string&gt;e5fvkxwrpn.skadnetwork&lt;/string&gt;
149    &lt;/dict&gt;
150    &lt;dict&gt;
151      &lt;key&gt;SKAdNetworkIdentifier&lt;/key&gt;
152      &lt;string&gt;zq492l623r.skadnetwork&lt;/string&gt;
153    &lt;/dict&gt;
154    &lt;dict&gt;
155      &lt;key&gt;SKAdNetworkIdentifier&lt;/key&gt;
156      &lt;string&gt;3qcr597p9d.skadnetwork&lt;/string&gt;
157    &lt;/dict&gt;
158  &lt;/array&gt;
159- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {    
160    
161    [[GADMobileAds sharedInstance] startWithCompletionHandler:nil];
162    [self requestIDFA];
163.
164.
165.
166}
167

requestIDFA function:

1        1. GADApplicationIdentifier key with a string value of AdMob app ID.
2        2. Added SKAdNetworkItems in plist as mentioned here https://developers.google.com/admob/ios/ios14
3        3. NSUserTrackingUsageDescription key with value 'Game_Name would like to access IDFA for thirdparty advertising purpose'  
4- (void)requestIDFA
5{
6    if (@available(iOS 14.0, *))
7    {
8        [ATTrackingManager requestTrackingAuthorizationWithCompletionHandler:^(ATTrackingManagerAuthorizationStatus status) {
9            
10            // Admob Ads
11            [self loadAdmob_Ads];
12            [self loadRewardedInterstitial];
13            [self requestAppOpenAd];
14        }];
15    }
16    else
17    {
18        // Admob Ads
19        [self loadAdmob_Ads];
20        [self loadRewardedInterstitial];
21        [self requestAppOpenAd];
22    }
23}
24&lt;key&gt;SKAdNetworkItems&lt;/key&gt;
25  &lt;array&gt;
26    &lt;dict&gt;
27      &lt;key&gt;SKAdNetworkIdentifier&lt;/key&gt;
28      &lt;string&gt;cstr6suwn9.skadnetwork&lt;/string&gt;
29    &lt;/dict&gt;
30    &lt;dict&gt;
31      &lt;key&gt;SKAdNetworkIdentifier&lt;/key&gt;
32      &lt;string&gt;4fzdc2evr5.skadnetwork&lt;/string&gt;
33    &lt;/dict&gt;
34    &lt;dict&gt;
35      &lt;key&gt;SKAdNetworkIdentifier&lt;/key&gt;
36      &lt;string&gt;2fnua5tdw4.skadnetwork&lt;/string&gt;
37    &lt;/dict&gt;
38    &lt;dict&gt;
39      &lt;key&gt;SKAdNetworkIdentifier&lt;/key&gt;
40      &lt;string&gt;ydx93a7ass.skadnetwork&lt;/string&gt;
41    &lt;/dict&gt;
42    &lt;dict&gt;
43      &lt;key&gt;SKAdNetworkIdentifier&lt;/key&gt;
44      &lt;string&gt;5a6flpkh64.skadnetwork&lt;/string&gt;
45    &lt;/dict&gt;
46    &lt;dict&gt;
47      &lt;key&gt;SKAdNetworkIdentifier&lt;/key&gt;
48      &lt;string&gt;p78axxw29g.skadnetwork&lt;/string&gt;
49    &lt;/dict&gt;
50    &lt;dict&gt;
51      &lt;key&gt;SKAdNetworkIdentifier&lt;/key&gt;
52      &lt;string&gt;v72qych5uu.skadnetwork&lt;/string&gt;
53    &lt;/dict&gt;
54    &lt;dict&gt;
55      &lt;key&gt;SKAdNetworkIdentifier&lt;/key&gt;
56      &lt;string&gt;c6k4g5qg8m.skadnetwork&lt;/string&gt;
57    &lt;/dict&gt;
58    &lt;dict&gt;
59      &lt;key&gt;SKAdNetworkIdentifier&lt;/key&gt;
60      &lt;string&gt;s39g8k73mm.skadnetwork&lt;/string&gt;
61    &lt;/dict&gt;
62    &lt;dict&gt;
63      &lt;key&gt;SKAdNetworkIdentifier&lt;/key&gt;
64      &lt;string&gt;3qy4746246.skadnetwork&lt;/string&gt;
65    &lt;/dict&gt;
66    &lt;dict&gt;
67      &lt;key&gt;SKAdNetworkIdentifier&lt;/key&gt;
68      &lt;string&gt;3sh42y64q3.skadnetwork&lt;/string&gt;
69    &lt;/dict&gt;
70    &lt;dict&gt;
71      &lt;key&gt;SKAdNetworkIdentifier&lt;/key&gt;
72      &lt;string&gt;f38h382jlk.skadnetwork&lt;/string&gt;
73    &lt;/dict&gt;
74    &lt;dict&gt;
75      &lt;key&gt;SKAdNetworkIdentifier&lt;/key&gt;
76      &lt;string&gt;hs6bdukanm.skadnetwork&lt;/string&gt;
77    &lt;/dict&gt;
78    &lt;dict&gt;
79      &lt;key&gt;SKAdNetworkIdentifier&lt;/key&gt;
80      &lt;string&gt;prcb7njmu6.skadnetwork&lt;/string&gt;
81    &lt;/dict&gt;
82    &lt;dict&gt;
83      &lt;key&gt;SKAdNetworkIdentifier&lt;/key&gt;
84      &lt;string&gt;wzmmz9fp6w.skadnetwork&lt;/string&gt;
85    &lt;/dict&gt;
86    &lt;dict&gt;
87      &lt;key&gt;SKAdNetworkIdentifier&lt;/key&gt;
88      &lt;string&gt;yclnxrl5pm.skadnetwork&lt;/string&gt;
89    &lt;/dict&gt;
90    &lt;dict&gt;
91      &lt;key&gt;SKAdNetworkIdentifier&lt;/key&gt;
92      &lt;string&gt;4468km3ulz.skadnetwork&lt;/string&gt;
93    &lt;/dict&gt;
94    &lt;dict&gt;
95      &lt;key&gt;SKAdNetworkIdentifier&lt;/key&gt;
96      &lt;string&gt;t38b2kh725.skadnetwork&lt;/string&gt;
97    &lt;/dict&gt;
98    &lt;dict&gt;
99      &lt;key&gt;SKAdNetworkIdentifier&lt;/key&gt;
100      &lt;string&gt;7ug5zh24hu.skadnetwork&lt;/string&gt;
101    &lt;/dict&gt;
102    &lt;dict&gt;
103      &lt;key&gt;SKAdNetworkIdentifier&lt;/key&gt;
104      &lt;string&gt;9rd848q2bz.skadnetwork&lt;/string&gt;
105    &lt;/dict&gt;
106    &lt;dict&gt;
107      &lt;key&gt;SKAdNetworkIdentifier&lt;/key&gt;
108      &lt;string&gt;n6fk4nfna4.skadnetwork&lt;/string&gt;
109    &lt;/dict&gt;
110    &lt;dict&gt;
111      &lt;key&gt;SKAdNetworkIdentifier&lt;/key&gt;
112      &lt;string&gt;kbd757ywx3.skadnetwork&lt;/string&gt;
113    &lt;/dict&gt;
114    &lt;dict&gt;
115      &lt;key&gt;SKAdNetworkIdentifier&lt;/key&gt;
116      &lt;string&gt;9t245vhmpl.skadnetwork&lt;/string&gt;
117    &lt;/dict&gt;
118    &lt;dict&gt;
119      &lt;key&gt;SKAdNetworkIdentifier&lt;/key&gt;
120      &lt;string&gt;2u9pt9hc89.skadnetwork&lt;/string&gt;
121    &lt;/dict&gt;
122    &lt;dict&gt;
123      &lt;key&gt;SKAdNetworkIdentifier&lt;/key&gt;
124      &lt;string&gt;8s468mfl3y.skadnetwork&lt;/string&gt;
125    &lt;/dict&gt;
126    &lt;dict&gt;
127      &lt;key&gt;SKAdNetworkIdentifier&lt;/key&gt;
128      &lt;string&gt;av6w8kgt66.skadnetwork&lt;/string&gt;
129    &lt;/dict&gt;
130    &lt;dict&gt;
131      &lt;key&gt;SKAdNetworkIdentifier&lt;/key&gt;
132      &lt;string&gt;klf5c3l5u5.skadnetwork&lt;/string&gt;
133    &lt;/dict&gt;
134    &lt;dict&gt;
135      &lt;key&gt;SKAdNetworkIdentifier&lt;/key&gt;
136      &lt;string&gt;ppxm28t8ap.skadnetwork&lt;/string&gt;
137    &lt;/dict&gt;
138    &lt;dict&gt;
139      &lt;key&gt;SKAdNetworkIdentifier&lt;/key&gt;
140      &lt;string&gt;424m5254lk.skadnetwork&lt;/string&gt;
141    &lt;/dict&gt;
142    &lt;dict&gt;
143      &lt;key&gt;SKAdNetworkIdentifier&lt;/key&gt;
144      &lt;string&gt;uw77j35x4d.skadnetwork&lt;/string&gt;
145    &lt;/dict&gt;
146    &lt;dict&gt;
147      &lt;key&gt;SKAdNetworkIdentifier&lt;/key&gt;
148      &lt;string&gt;e5fvkxwrpn.skadnetwork&lt;/string&gt;
149    &lt;/dict&gt;
150    &lt;dict&gt;
151      &lt;key&gt;SKAdNetworkIdentifier&lt;/key&gt;
152      &lt;string&gt;zq492l623r.skadnetwork&lt;/string&gt;
153    &lt;/dict&gt;
154    &lt;dict&gt;
155      &lt;key&gt;SKAdNetworkIdentifier&lt;/key&gt;
156      &lt;string&gt;3qcr597p9d.skadnetwork&lt;/string&gt;
157    &lt;/dict&gt;
158  &lt;/array&gt;
159- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {    
160    
161    [[GADMobileAds sharedInstance] startWithCompletionHandler:nil];
162    [self requestIDFA];
163.
164.
165.
166}
167- (void)requestIDFA
168{
169    if (@available(iOS 14.0, *))
170    {
171        [ATTrackingManager requestTrackingAuthorizationWithCompletionHandler:^(ATTrackingManagerAuthorizationStatus status) {
172
173            // Admob Ads
174            [self requestAppOpenAd];
175            [self loadAdmob_Ads];
176            [self loadRewardedInterstitial];
177        }];
178    }
179    else
180    {
181        // Admob Ads
182        [self requestAppOpenAd];
183        [self loadAdmob_Ads];
184        [self loadRewardedInterstitial];
185    }
186}
187

Added AppTrackingTransparency.framework to Xcode.

In info.plist added NSUserTrackingUsageDescription

1        1. GADApplicationIdentifier key with a string value of AdMob app ID.
2        2. Added SKAdNetworkItems in plist as mentioned here https://developers.google.com/admob/ios/ios14
3        3. NSUserTrackingUsageDescription key with value 'Game_Name would like to access IDFA for thirdparty advertising purpose'  
4- (void)requestIDFA
5{
6    if (@available(iOS 14.0, *))
7    {
8        [ATTrackingManager requestTrackingAuthorizationWithCompletionHandler:^(ATTrackingManagerAuthorizationStatus status) {
9            
10            // Admob Ads
11            [self loadAdmob_Ads];
12            [self loadRewardedInterstitial];
13            [self requestAppOpenAd];
14        }];
15    }
16    else
17    {
18        // Admob Ads
19        [self loadAdmob_Ads];
20        [self loadRewardedInterstitial];
21        [self requestAppOpenAd];
22    }
23}
24&lt;key&gt;SKAdNetworkItems&lt;/key&gt;
25  &lt;array&gt;
26    &lt;dict&gt;
27      &lt;key&gt;SKAdNetworkIdentifier&lt;/key&gt;
28      &lt;string&gt;cstr6suwn9.skadnetwork&lt;/string&gt;
29    &lt;/dict&gt;
30    &lt;dict&gt;
31      &lt;key&gt;SKAdNetworkIdentifier&lt;/key&gt;
32      &lt;string&gt;4fzdc2evr5.skadnetwork&lt;/string&gt;
33    &lt;/dict&gt;
34    &lt;dict&gt;
35      &lt;key&gt;SKAdNetworkIdentifier&lt;/key&gt;
36      &lt;string&gt;2fnua5tdw4.skadnetwork&lt;/string&gt;
37    &lt;/dict&gt;
38    &lt;dict&gt;
39      &lt;key&gt;SKAdNetworkIdentifier&lt;/key&gt;
40      &lt;string&gt;ydx93a7ass.skadnetwork&lt;/string&gt;
41    &lt;/dict&gt;
42    &lt;dict&gt;
43      &lt;key&gt;SKAdNetworkIdentifier&lt;/key&gt;
44      &lt;string&gt;5a6flpkh64.skadnetwork&lt;/string&gt;
45    &lt;/dict&gt;
46    &lt;dict&gt;
47      &lt;key&gt;SKAdNetworkIdentifier&lt;/key&gt;
48      &lt;string&gt;p78axxw29g.skadnetwork&lt;/string&gt;
49    &lt;/dict&gt;
50    &lt;dict&gt;
51      &lt;key&gt;SKAdNetworkIdentifier&lt;/key&gt;
52      &lt;string&gt;v72qych5uu.skadnetwork&lt;/string&gt;
53    &lt;/dict&gt;
54    &lt;dict&gt;
55      &lt;key&gt;SKAdNetworkIdentifier&lt;/key&gt;
56      &lt;string&gt;c6k4g5qg8m.skadnetwork&lt;/string&gt;
57    &lt;/dict&gt;
58    &lt;dict&gt;
59      &lt;key&gt;SKAdNetworkIdentifier&lt;/key&gt;
60      &lt;string&gt;s39g8k73mm.skadnetwork&lt;/string&gt;
61    &lt;/dict&gt;
62    &lt;dict&gt;
63      &lt;key&gt;SKAdNetworkIdentifier&lt;/key&gt;
64      &lt;string&gt;3qy4746246.skadnetwork&lt;/string&gt;
65    &lt;/dict&gt;
66    &lt;dict&gt;
67      &lt;key&gt;SKAdNetworkIdentifier&lt;/key&gt;
68      &lt;string&gt;3sh42y64q3.skadnetwork&lt;/string&gt;
69    &lt;/dict&gt;
70    &lt;dict&gt;
71      &lt;key&gt;SKAdNetworkIdentifier&lt;/key&gt;
72      &lt;string&gt;f38h382jlk.skadnetwork&lt;/string&gt;
73    &lt;/dict&gt;
74    &lt;dict&gt;
75      &lt;key&gt;SKAdNetworkIdentifier&lt;/key&gt;
76      &lt;string&gt;hs6bdukanm.skadnetwork&lt;/string&gt;
77    &lt;/dict&gt;
78    &lt;dict&gt;
79      &lt;key&gt;SKAdNetworkIdentifier&lt;/key&gt;
80      &lt;string&gt;prcb7njmu6.skadnetwork&lt;/string&gt;
81    &lt;/dict&gt;
82    &lt;dict&gt;
83      &lt;key&gt;SKAdNetworkIdentifier&lt;/key&gt;
84      &lt;string&gt;wzmmz9fp6w.skadnetwork&lt;/string&gt;
85    &lt;/dict&gt;
86    &lt;dict&gt;
87      &lt;key&gt;SKAdNetworkIdentifier&lt;/key&gt;
88      &lt;string&gt;yclnxrl5pm.skadnetwork&lt;/string&gt;
89    &lt;/dict&gt;
90    &lt;dict&gt;
91      &lt;key&gt;SKAdNetworkIdentifier&lt;/key&gt;
92      &lt;string&gt;4468km3ulz.skadnetwork&lt;/string&gt;
93    &lt;/dict&gt;
94    &lt;dict&gt;
95      &lt;key&gt;SKAdNetworkIdentifier&lt;/key&gt;
96      &lt;string&gt;t38b2kh725.skadnetwork&lt;/string&gt;
97    &lt;/dict&gt;
98    &lt;dict&gt;
99      &lt;key&gt;SKAdNetworkIdentifier&lt;/key&gt;
100      &lt;string&gt;7ug5zh24hu.skadnetwork&lt;/string&gt;
101    &lt;/dict&gt;
102    &lt;dict&gt;
103      &lt;key&gt;SKAdNetworkIdentifier&lt;/key&gt;
104      &lt;string&gt;9rd848q2bz.skadnetwork&lt;/string&gt;
105    &lt;/dict&gt;
106    &lt;dict&gt;
107      &lt;key&gt;SKAdNetworkIdentifier&lt;/key&gt;
108      &lt;string&gt;n6fk4nfna4.skadnetwork&lt;/string&gt;
109    &lt;/dict&gt;
110    &lt;dict&gt;
111      &lt;key&gt;SKAdNetworkIdentifier&lt;/key&gt;
112      &lt;string&gt;kbd757ywx3.skadnetwork&lt;/string&gt;
113    &lt;/dict&gt;
114    &lt;dict&gt;
115      &lt;key&gt;SKAdNetworkIdentifier&lt;/key&gt;
116      &lt;string&gt;9t245vhmpl.skadnetwork&lt;/string&gt;
117    &lt;/dict&gt;
118    &lt;dict&gt;
119      &lt;key&gt;SKAdNetworkIdentifier&lt;/key&gt;
120      &lt;string&gt;2u9pt9hc89.skadnetwork&lt;/string&gt;
121    &lt;/dict&gt;
122    &lt;dict&gt;
123      &lt;key&gt;SKAdNetworkIdentifier&lt;/key&gt;
124      &lt;string&gt;8s468mfl3y.skadnetwork&lt;/string&gt;
125    &lt;/dict&gt;
126    &lt;dict&gt;
127      &lt;key&gt;SKAdNetworkIdentifier&lt;/key&gt;
128      &lt;string&gt;av6w8kgt66.skadnetwork&lt;/string&gt;
129    &lt;/dict&gt;
130    &lt;dict&gt;
131      &lt;key&gt;SKAdNetworkIdentifier&lt;/key&gt;
132      &lt;string&gt;klf5c3l5u5.skadnetwork&lt;/string&gt;
133    &lt;/dict&gt;
134    &lt;dict&gt;
135      &lt;key&gt;SKAdNetworkIdentifier&lt;/key&gt;
136      &lt;string&gt;ppxm28t8ap.skadnetwork&lt;/string&gt;
137    &lt;/dict&gt;
138    &lt;dict&gt;
139      &lt;key&gt;SKAdNetworkIdentifier&lt;/key&gt;
140      &lt;string&gt;424m5254lk.skadnetwork&lt;/string&gt;
141    &lt;/dict&gt;
142    &lt;dict&gt;
143      &lt;key&gt;SKAdNetworkIdentifier&lt;/key&gt;
144      &lt;string&gt;uw77j35x4d.skadnetwork&lt;/string&gt;
145    &lt;/dict&gt;
146    &lt;dict&gt;
147      &lt;key&gt;SKAdNetworkIdentifier&lt;/key&gt;
148      &lt;string&gt;e5fvkxwrpn.skadnetwork&lt;/string&gt;
149    &lt;/dict&gt;
150    &lt;dict&gt;
151      &lt;key&gt;SKAdNetworkIdentifier&lt;/key&gt;
152      &lt;string&gt;zq492l623r.skadnetwork&lt;/string&gt;
153    &lt;/dict&gt;
154    &lt;dict&gt;
155      &lt;key&gt;SKAdNetworkIdentifier&lt;/key&gt;
156      &lt;string&gt;3qcr597p9d.skadnetwork&lt;/string&gt;
157    &lt;/dict&gt;
158  &lt;/array&gt;
159- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {    
160    
161    [[GADMobileAds sharedInstance] startWithCompletionHandler:nil];
162    [self requestIDFA];
163.
164.
165.
166}
167- (void)requestIDFA
168{
169    if (@available(iOS 14.0, *))
170    {
171        [ATTrackingManager requestTrackingAuthorizationWithCompletionHandler:^(ATTrackingManagerAuthorizationStatus status) {
172
173            // Admob Ads
174            [self requestAppOpenAd];
175            [self loadAdmob_Ads];
176            [self loadRewardedInterstitial];
177        }];
178    }
179    else
180    {
181        // Admob Ads
182        [self requestAppOpenAd];
183        [self loadAdmob_Ads];
184        [self loadRewardedInterstitial];
185    }
186}
187&lt;key&gt;NSUserTrackingUsageDescription&lt;/key&gt;
188&lt;string&gt;This identifier will be used to deliver personalized ads to you.&lt;/string&gt;
189

Admob ads related functions:

1        1. GADApplicationIdentifier key with a string value of AdMob app ID.
2        2. Added SKAdNetworkItems in plist as mentioned here https://developers.google.com/admob/ios/ios14
3        3. NSUserTrackingUsageDescription key with value 'Game_Name would like to access IDFA for thirdparty advertising purpose'  
4- (void)requestIDFA
5{
6    if (@available(iOS 14.0, *))
7    {
8        [ATTrackingManager requestTrackingAuthorizationWithCompletionHandler:^(ATTrackingManagerAuthorizationStatus status) {
9            
10            // Admob Ads
11            [self loadAdmob_Ads];
12            [self loadRewardedInterstitial];
13            [self requestAppOpenAd];
14        }];
15    }
16    else
17    {
18        // Admob Ads
19        [self loadAdmob_Ads];
20        [self loadRewardedInterstitial];
21        [self requestAppOpenAd];
22    }
23}
24&lt;key&gt;SKAdNetworkItems&lt;/key&gt;
25  &lt;array&gt;
26    &lt;dict&gt;
27      &lt;key&gt;SKAdNetworkIdentifier&lt;/key&gt;
28      &lt;string&gt;cstr6suwn9.skadnetwork&lt;/string&gt;
29    &lt;/dict&gt;
30    &lt;dict&gt;
31      &lt;key&gt;SKAdNetworkIdentifier&lt;/key&gt;
32      &lt;string&gt;4fzdc2evr5.skadnetwork&lt;/string&gt;
33    &lt;/dict&gt;
34    &lt;dict&gt;
35      &lt;key&gt;SKAdNetworkIdentifier&lt;/key&gt;
36      &lt;string&gt;2fnua5tdw4.skadnetwork&lt;/string&gt;
37    &lt;/dict&gt;
38    &lt;dict&gt;
39      &lt;key&gt;SKAdNetworkIdentifier&lt;/key&gt;
40      &lt;string&gt;ydx93a7ass.skadnetwork&lt;/string&gt;
41    &lt;/dict&gt;
42    &lt;dict&gt;
43      &lt;key&gt;SKAdNetworkIdentifier&lt;/key&gt;
44      &lt;string&gt;5a6flpkh64.skadnetwork&lt;/string&gt;
45    &lt;/dict&gt;
46    &lt;dict&gt;
47      &lt;key&gt;SKAdNetworkIdentifier&lt;/key&gt;
48      &lt;string&gt;p78axxw29g.skadnetwork&lt;/string&gt;
49    &lt;/dict&gt;
50    &lt;dict&gt;
51      &lt;key&gt;SKAdNetworkIdentifier&lt;/key&gt;
52      &lt;string&gt;v72qych5uu.skadnetwork&lt;/string&gt;
53    &lt;/dict&gt;
54    &lt;dict&gt;
55      &lt;key&gt;SKAdNetworkIdentifier&lt;/key&gt;
56      &lt;string&gt;c6k4g5qg8m.skadnetwork&lt;/string&gt;
57    &lt;/dict&gt;
58    &lt;dict&gt;
59      &lt;key&gt;SKAdNetworkIdentifier&lt;/key&gt;
60      &lt;string&gt;s39g8k73mm.skadnetwork&lt;/string&gt;
61    &lt;/dict&gt;
62    &lt;dict&gt;
63      &lt;key&gt;SKAdNetworkIdentifier&lt;/key&gt;
64      &lt;string&gt;3qy4746246.skadnetwork&lt;/string&gt;
65    &lt;/dict&gt;
66    &lt;dict&gt;
67      &lt;key&gt;SKAdNetworkIdentifier&lt;/key&gt;
68      &lt;string&gt;3sh42y64q3.skadnetwork&lt;/string&gt;
69    &lt;/dict&gt;
70    &lt;dict&gt;
71      &lt;key&gt;SKAdNetworkIdentifier&lt;/key&gt;
72      &lt;string&gt;f38h382jlk.skadnetwork&lt;/string&gt;
73    &lt;/dict&gt;
74    &lt;dict&gt;
75      &lt;key&gt;SKAdNetworkIdentifier&lt;/key&gt;
76      &lt;string&gt;hs6bdukanm.skadnetwork&lt;/string&gt;
77    &lt;/dict&gt;
78    &lt;dict&gt;
79      &lt;key&gt;SKAdNetworkIdentifier&lt;/key&gt;
80      &lt;string&gt;prcb7njmu6.skadnetwork&lt;/string&gt;
81    &lt;/dict&gt;
82    &lt;dict&gt;
83      &lt;key&gt;SKAdNetworkIdentifier&lt;/key&gt;
84      &lt;string&gt;wzmmz9fp6w.skadnetwork&lt;/string&gt;
85    &lt;/dict&gt;
86    &lt;dict&gt;
87      &lt;key&gt;SKAdNetworkIdentifier&lt;/key&gt;
88      &lt;string&gt;yclnxrl5pm.skadnetwork&lt;/string&gt;
89    &lt;/dict&gt;
90    &lt;dict&gt;
91      &lt;key&gt;SKAdNetworkIdentifier&lt;/key&gt;
92      &lt;string&gt;4468km3ulz.skadnetwork&lt;/string&gt;
93    &lt;/dict&gt;
94    &lt;dict&gt;
95      &lt;key&gt;SKAdNetworkIdentifier&lt;/key&gt;
96      &lt;string&gt;t38b2kh725.skadnetwork&lt;/string&gt;
97    &lt;/dict&gt;
98    &lt;dict&gt;
99      &lt;key&gt;SKAdNetworkIdentifier&lt;/key&gt;
100      &lt;string&gt;7ug5zh24hu.skadnetwork&lt;/string&gt;
101    &lt;/dict&gt;
102    &lt;dict&gt;
103      &lt;key&gt;SKAdNetworkIdentifier&lt;/key&gt;
104      &lt;string&gt;9rd848q2bz.skadnetwork&lt;/string&gt;
105    &lt;/dict&gt;
106    &lt;dict&gt;
107      &lt;key&gt;SKAdNetworkIdentifier&lt;/key&gt;
108      &lt;string&gt;n6fk4nfna4.skadnetwork&lt;/string&gt;
109    &lt;/dict&gt;
110    &lt;dict&gt;
111      &lt;key&gt;SKAdNetworkIdentifier&lt;/key&gt;
112      &lt;string&gt;kbd757ywx3.skadnetwork&lt;/string&gt;
113    &lt;/dict&gt;
114    &lt;dict&gt;
115      &lt;key&gt;SKAdNetworkIdentifier&lt;/key&gt;
116      &lt;string&gt;9t245vhmpl.skadnetwork&lt;/string&gt;
117    &lt;/dict&gt;
118    &lt;dict&gt;
119      &lt;key&gt;SKAdNetworkIdentifier&lt;/key&gt;
120      &lt;string&gt;2u9pt9hc89.skadnetwork&lt;/string&gt;
121    &lt;/dict&gt;
122    &lt;dict&gt;
123      &lt;key&gt;SKAdNetworkIdentifier&lt;/key&gt;
124      &lt;string&gt;8s468mfl3y.skadnetwork&lt;/string&gt;
125    &lt;/dict&gt;
126    &lt;dict&gt;
127      &lt;key&gt;SKAdNetworkIdentifier&lt;/key&gt;
128      &lt;string&gt;av6w8kgt66.skadnetwork&lt;/string&gt;
129    &lt;/dict&gt;
130    &lt;dict&gt;
131      &lt;key&gt;SKAdNetworkIdentifier&lt;/key&gt;
132      &lt;string&gt;klf5c3l5u5.skadnetwork&lt;/string&gt;
133    &lt;/dict&gt;
134    &lt;dict&gt;
135      &lt;key&gt;SKAdNetworkIdentifier&lt;/key&gt;
136      &lt;string&gt;ppxm28t8ap.skadnetwork&lt;/string&gt;
137    &lt;/dict&gt;
138    &lt;dict&gt;
139      &lt;key&gt;SKAdNetworkIdentifier&lt;/key&gt;
140      &lt;string&gt;424m5254lk.skadnetwork&lt;/string&gt;
141    &lt;/dict&gt;
142    &lt;dict&gt;
143      &lt;key&gt;SKAdNetworkIdentifier&lt;/key&gt;
144      &lt;string&gt;uw77j35x4d.skadnetwork&lt;/string&gt;
145    &lt;/dict&gt;
146    &lt;dict&gt;
147      &lt;key&gt;SKAdNetworkIdentifier&lt;/key&gt;
148      &lt;string&gt;e5fvkxwrpn.skadnetwork&lt;/string&gt;
149    &lt;/dict&gt;
150    &lt;dict&gt;
151      &lt;key&gt;SKAdNetworkIdentifier&lt;/key&gt;
152      &lt;string&gt;zq492l623r.skadnetwork&lt;/string&gt;
153    &lt;/dict&gt;
154    &lt;dict&gt;
155      &lt;key&gt;SKAdNetworkIdentifier&lt;/key&gt;
156      &lt;string&gt;3qcr597p9d.skadnetwork&lt;/string&gt;
157    &lt;/dict&gt;
158  &lt;/array&gt;
159- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {    
160    
161    [[GADMobileAds sharedInstance] startWithCompletionHandler:nil];
162    [self requestIDFA];
163.
164.
165.
166}
167- (void)requestIDFA
168{
169    if (@available(iOS 14.0, *))
170    {
171        [ATTrackingManager requestTrackingAuthorizationWithCompletionHandler:^(ATTrackingManagerAuthorizationStatus status) {
172
173            // Admob Ads
174            [self requestAppOpenAd];
175            [self loadAdmob_Ads];
176            [self loadRewardedInterstitial];
177        }];
178    }
179    else
180    {
181        // Admob Ads
182        [self requestAppOpenAd];
183        [self loadAdmob_Ads];
184        [self loadRewardedInterstitial];
185    }
186}
187&lt;key&gt;NSUserTrackingUsageDescription&lt;/key&gt;
188&lt;string&gt;This identifier will be used to deliver personalized ads to you.&lt;/string&gt;
189- (void)requestAppOpenAd {
190  self.appOpenAd = nil;
191  [GADAppOpenAd loadWithAdUnitID:ADMOB_APP_OPEN_ID
192                         request:[GADRequest request]
193                     orientation:UIInterfaceOrientationPortrait
194               completionHandler:^(GADAppOpenAd *_Nullable appOpenAd, NSError *_Nullable error) {
195                 if (error) {
196                   NSLog(@&quot;Failed to load app open ad: %@&quot;, error);
197                   return;
198                 }
199                 self.appOpenAd = appOpenAd;
200                 self.appOpenAd.fullScreenContentDelegate = self;
201
202               }];
203}
204
205- (void)tryToPresentAd
206{
207        if (self.appOpenAd) {
208          UIViewController *rootController = self.window.rootViewController;
209          [self.appOpenAd presentFromRootViewController:rootController];
210        } else {
211          // If you don't have an ad ready, request one.
212          [self requestAppOpenAd];
213        }
214}
215
216- (void)applicationDidBecomeActive:(UIApplication *)application {
217 [self tryToPresentAd];
218}
219
220-(void)loadAdmob_Ads
221{
222    GADRequest *request = [GADRequest request];
223            
224    [GADInterstitialAd loadWithAdUnitID:ADMOB_FULL_SCREEM
225                                    request:request
226                          completionHandler:^(GADInterstitialAd *ad, NSError *error)
227    {
228      if (error)
229      {
230                NSLog(@&quot;\nAdmob Failed to load interstitial ad with error: %@&quot;, [error localizedDescription]);
231          return;
232      }
233      self.interstitial = ad;
234      self.interstitial.fullScreenContentDelegate = self;
235    }];
236}
237
238-(void)showAdmobAdsFullScreen
239{
240        if (self.interstitial) {
241            [self.interstitial presentFromRootViewController:self.viewController];
242          }
243}
244
245-(void)loadRewardedInterstitial
246{
247    [GADRewardedInterstitialAd
248           loadWithAdUnitID:ADMOB_REWARDED_INTERSTITIAL
249                    request:[GADRequest request]
250          completionHandler:^(
251              GADRewardedInterstitialAd *_Nullable rewardedInterstitialAd,
252              NSError *_Nullable error) {
253            if (!error) {
254              self.rewardedInterstitialAd = rewardedInterstitialAd;
255              self.rewardedInterstitialAd.fullScreenContentDelegate = self;
256            }
257          }];
258}
259
260-(void)playRewardedInterstitial
261{
262          [self.rewardedInterstitialAd presentFromRootViewController:self.viewController
263                                userDidEarnRewardHandler:^{
264                                    
265                                    [self rewardInterstitialDoneRewardUser];
266      
267                                    [self loadRewardedInterstitial];
268                                }];
269}
270

Source https://stackoverflow.com/questions/66177136

Community Discussions contain sources that include Stack Exchange Network

Tutorials and Learning Resources in Messaging

Tutorials and Learning Resources are not available at this moment for Messaging

Share this Page

share link

Get latest updates on Messaging