Initial commit
Using Firebase Functions with an external API (Walmart)
Consuming Firebase Realtime Database/Functions in an iOS app using FirebaseUI
Note: this is not an official Google product.
A gmail account
Billing enabled in the GCP Console (https://console.developers.google.com/)
You might be eligible for a free trial with a $300, 12-month credit
A Walmart Open API key
Register at https://developer.walmartlabs.com/
Node.js, npm and Firebase CLI installed
npm install -g firebase-tools
Using the Firebase Console (https://console.firebase.google.com), create a new project
Upgrade the pricing plan to Blaze (Pay as you go)
Log into the Firebase CLI
firebase login
In the terminal, navigate to the root of this repository
Initialize the Firebase Functions
firebase init functions
When prompted, select the project created in step #1.
Do not overwrite existing files.
Say “Y” to “Do you want to install dependencies”
cd functions
Edit the walmartAPI.js file and update the WALMART_API_KEY constant with your key
Deploy the functions
firebase deploy –only functions
In the Firebase Console, use the Database Rules to make the database public
(Caution - this is only good for demo purposes, do not leave a production database public)
{ “rules”: {
".read": true, ".write": true
} }
In the Firebase Console, go through the “Add Firebase to your iOS App” wizard
Enter “com.github.davidair.FunctionsDemo” as the iOS Bundle ID
Download GoogleService-Info.plist
In the FunctionsDemo directory, run “pod install”
Open FunctionsDemo.xcworkspace
Drag the GoogleService-Info.plist downloaded in step 12 into the project
You should be able to run the demo in the simulator
版权所有:中国计算机学会技术支持:开源发展技术委员会 京ICP备13000930号-9 京公网安备 11010802032778号
Firebase Functions Demo
Using Firebase Functions with an external API (Walmart)
Consuming Firebase Realtime Database/Functions in an iOS app using FirebaseUI
Note: this is not an official Google product.
Prerequisites
A gmail account
Billing enabled in the GCP Console (https://console.developers.google.com/)
You might be eligible for a free trial with a $300, 12-month credit
A Walmart Open API key
Register at https://developer.walmartlabs.com/
Node.js, npm and Firebase CLI installed
npm install -g firebase-tools
Setting up
Using the Firebase Console (https://console.firebase.google.com), create a new project
Upgrade the pricing plan to Blaze (Pay as you go)
Log into the Firebase CLI
firebase login
In the terminal, navigate to the root of this repository
Initialize the Firebase Functions
firebase init functions
When prompted, select the project created in step #1.
Do not overwrite existing files.
Say “Y” to “Do you want to install dependencies”
cd functions
Edit the walmartAPI.js file and update the WALMART_API_KEY constant with your key
Deploy the functions
firebase deploy –only functions
In the Firebase Console, use the Database Rules to make the database public
(Caution - this is only good for demo purposes, do not leave a production database public)
{ “rules”: {
} }
In the Firebase Console, go through the “Add Firebase to your iOS App” wizard
Enter “com.github.davidair.FunctionsDemo” as the iOS Bundle ID
Download GoogleService-Info.plist
In the FunctionsDemo directory, run “pod install”
Open FunctionsDemo.xcworkspace
Drag the GoogleService-Info.plist downloaded in step 12 into the project
You should be able to run the demo in the simulator