This repository holds code snippets used in iOS documentation on firebase.google.com.
We love contributions! See CONTRIBUTING.md for guidelines.
iOS snippets used in firebase.google.com
License: Apache License 2.0
This repository holds code snippets used in iOS documentation on firebase.google.com.
We love contributions! See CONTRIBUTING.md for guidelines.
The following function doesn't work:
func incrementCounter(ref: DocumentReference, numShards: Int) {
// Select a shard of the counter at random
let shardId = Int(arc4random_uniform(UInt32(numShards)))
let shardRef = ref.collection("shards").document(String(shardId))
shardRef.updateData([
"count": FieldValue.increment(Int64(1))
])
}
The FieldValue.increment(Int64(1))
part throws the following error:
Unsupported type: FSTNumericIncrementFieldValue (found in field count) (FIRInvalidArgumentException)
See:
firebase/snippets-android@2a401e1
Checking for snapshot nullity is not enough.
snippets-ios/firestore/swift/firestore-smoketest/ViewController.swift
Lines 755 to 773 in 6057cc7
System information (OS, Device, etc): macOS 10.15.3, Xcode 11.3.1
What steps will reproduce the problem:
What is the expected result?
The snippet will cast the Firestore document to the given type
What happens instead of that?
Error: "Value of type 'NSObject' has no member 'data'
In CONTRIBUTING.md, the Feature Requests sub-cat (that should be at: https://github.com/firebase/snippets-ios/blob/master/CONTRIBUTING.md#feature) leads to nothing. Should it be added/removed?
I have noticed on https://firebase.google.com/docs/auth/ios/google-signin page under "Authenticate with Firebase" the use of a deprecated method while implementing the same in my iOS application
Can we change the snippet code to new function?
Code in this repository should be automatically verified for at least compilation, and correctness as a bonus. Travis would be ideal for consistency but whatever is easiest.
Add ad_impression events for helpcenter
snippets-ios/firestore/swift/firestore-smoketest/ViewController.swift
Lines 1277 to 1284 in a38496b
Doest seem like count variable exists anywhere in the SDK, im used Firebase v 9.6.0
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.