Do anybody have a good example or source code for integrating firebase clouds, stripe on ios using swift?
This is an sample code that I got from: Stripe firebase example code
'use strict';
const functions = require('firebase-functions'),
admin = require('firebase-admin'),
logging = require('#google-cloud/logging')();
admin.initializeApp(functions.config().firebase);
const stripe = require('stripe')(functions.config().stripe.token),
currency = functions.config().stripe.currency || 'USD';
But how do I connect it the backend to my ios app?
Your app should trigger the execution of the cloud function. Check this tutorial. The functionality will be independent of your backend ios app as it should be triggered from ios/Android/web... all potential clients.
Related
I'm trying to publish my first xamarin forms app on IOS. I barred the issue of login with the Apple account.
I have 4 questions, please.
1- If I implement Sign in with Apple only for IOS 13+ will it be accepted? :(
2- I'm trying to use Xamarin Essentials to log in to IOS 13+ as shown in this article:
Xamarin Essentials
// Use Native Apple Sign In API's
r = await AppleSignInAuthenticator.AuthenticateAsync();
But I only get back the idToken. AccessToken, name and mail return null. Am I missing something?
3 - And finally I tried to use the plugin.firebaseAuth version 4.0.0-pre01:
Link plugin
// For iOS
var credential = CrossFirebaseAuth.Current.OAuthProvider.GetCredential("apple.com", idToken, rawNonce: rawNonce);
var result = await CrossFirebaseAuth.Current.Instance.SignInWithCredentialAsync(credential);
// For Android
var provider = new OAuthProvider("apple.com");
var result = await CrossFirebaseAuth.Current.Instance.SignInWithProviderAsync(provider);
It provides an example using prism to deal with this, but when I install the plugin in this version the application is no more than a splash screen and closes, without showing an error in the output. What am I doing wrong? :(
The first link seems promising for iOS less than 13 and Android using Asp.NET. However in the application I use only the Firebase ClouFirestone and Firebase Hosting for the Administrative Panel. Is it possible for me to sign in Apple without the services of a different backend?
I am very grateful for any light on the path I must follow
1- If I implement Sign in with Apple only for IOS 13+ will it be accepted?
It depends, if they don't find any other issues or violation, it will get accepted.
2- I'm trying to use Xamarin Essentials to log in to IOS 13+ as shown in this article: But I only get back the idToken.
Apple will only provide you the requested details on the first authentication. After that first authentication, you will only get the User Id so be sure to store the details that first time in case you need them.
This feature needs to be tested on a physical device running iOS 13. The simulator is not reliable, it doesn’t always work properly.
Should follow the design guidelines when implementing Apple Sign In. You can find it here: https://developer.apple.com/design/human-interface-guidelines/sign-in-with-apple/overview/
I am trying to let people like tracks, albums or playlists on Apple Music from a webpage.
I understand the manual on this page:
https://developer.apple.com/library/content/documentation/NetworkingInternetWeb/Conceptual/AppleMusicWebServicesReference/SetUpWebServices.html
Until I hit the part where I should use the requestUserToken(forDeveloperToken:completionHandler:) method from SKCloudServiceController in the StoreKit framework, since there is no StoreKit framework available for outside iOS/macOS/tvOS/etc.
How is this token generated? Is there any other way I can generate this Music User Token manually?
I know it is a (very) longshot, but maybe someone figured it out!
The new Apple MusicKit JS library allows you to create Music User Token's from your Developer Token as seen here outside of iOS. Once you've loaded the Library you can use the authorize method to allow a user to authenticate and generate a token.
document.addEventListener('musickitloaded', function() {
// MusicKit global is now defined
MusicKit.configure({
developerToken: 'DEVELOPER-TOKEN',
app: {
name: 'My Cool Web App',
build: '1978.4.1'
}
});
let music = MusicKit.getInstance();
music.authorize().then(musicUserToken => {
console.log(musicUserToken);
});
});
I have tried the approach within my iOS app.
You can follow this link generate music token
This is basically python script. You can easily create a music developer token from your mac.
I need your help. I am developing a App using Swift language and Firebase as a database. I am trying to initialize SDK with a code. I am confused, in which file I have to add this code snippet? HTML or a new swift file or?
I am stuck in this step https://firebase.google.com/docs/admin/setup
Hope you guys will help me. Thank you in advance.
Below is the code snippet example:
var admin = require("firebase-admin");
var serviceAccount = require("path/to/serviceAccountKey.json");
admin.initializeApp({
credential: admin.credential.cert(serviceAccount),
databaseURL: "https://<DATABASE_NAME>.firebaseio.com"
});
You seem to be following the wrong directions. This is for adding the Firebase Admin SDK to a server -- not setting up access to the database from an iOS client.
I'd recommend following the directions here instead: https://firebase.google.com/docs/ios/setup
I am currently working on an iOS app using app. I want to add AWS mobile analytics to my app but I've been having a difficult time doing so. I followed AWS get started guide but it doesn't work. I imported AWS using Cocoapods.
In the guide, the code to initialize AWS mobile analytics is here (it is in objective-C) :
AWSMobileAnalytics *analytics = [AWSMobileAnalytics mobileAnalyticsForAppId: #"myAppID"
identityPoolId: #"myIdentityPool iD"];
I don't know much about objective-C, but I translated it to swift like this:
var analytics: AWSMobileAnalytics = AWSMobileAnalytics(mobileAnalyticsForAppI:"myAppID", identityPoolId: "myIdentityPool iD")
When I went back to the aws analytics dashboard, nothing showed up. Am I missing something here?
I am using paypal Sdk(https://github.com/paypal/PayPal-iOS-SDK) in my iPhone app.I was successfully integrated and tested in sandbox mode. I have given client for production in appdlegate file.I changed the environment to "PayPalEnvironmentProduction". I have some doubts regarding while changing to live.
[PayPalMobile initializeWithClientIdsForEnvironments:#{PayPalEnvironmentProduction : #"YOUR_CLIENT_ID_FOR_PRODUCTION",
PayPalEnvironmentSandbox : #"YOUR_CLIENT_ID_FOR_SANDBOX"}];
what is the use of "endpoint" and "secret" in my app credentials (because i used Only client id)
shall i need to submit the app to paypal to get any other credentials from paypal or directly to Appstore
will my app is approved by apple if i use paypal
what is the use of below code (even though i removed code )payment process is working
_payPalConfig = [[PayPalConfiguration alloc] init];
_payPalConfig.acceptCreditCards = YES;
_payPalConfig.languageOrLocale = #"en";
_payPalConfig.merchantName = #"Awesome Shirts, Inc.";
_payPalConfig.merchantPrivacyPolicyURL = [NSURL URLWithString:#"https://www.paypal.com/webapps/mpp/ua/privacy-full"];
_payPalConfig.merchantUserAgreementURL = [NSURL URLWithString:#"https://www.paypal.com/webapps/mpp/ua/useragreement-full"];
If it is necessary to submit the app to paypal first what are the necessary steps to taken and any detailed expalanation may be helpful.what is difference between paypalSdk and MPL, which is better?
Dave from PayPal here.
1 what is the use of "endpoint" and "secret" in my app credentials (because i used Only client id)
Client id is the only credential that you need to use with the PayPal iOS SDK.
2 shall i need to submit the app to paypal to get any other credentials from paypal or directly to Appstore
No.
3 will my app is approved by apple if i use paypal
Many apps using the PayPal iOS SDK have already been approved by Apple.
4 what is the use of below code (even though i removed code )payment process is working
This is all explained in the documentation and the header files.
If it is necessary to submit the app to paypal first what are the necessary steps to taken
It is not necessary to submit your app to PayPal.
any detailed expalanation may be helpful.what is difference between paypalSdk and MPL, which is better?
The PayPal iOS SDK is the one which we will continue to support into the future. The only reason to use the older MPL library is if you need features which are not yet supported in the PayPal iOS SDK and the REST APIs on which it relies.