2
votes

I have updated Firestore to follows. Now, I can't use it anymore. I removed, reinstalled several times. But there is no change. I am losing my mind. The issue is:

"Use of unresolved identifier 'SetOptions'".

db.collection("").document("").setData([ "p1answered":false, "p1OutofTime": false ], options: SetOptions.merge())

Bolts (1.9.0)
Using BoringSSL (10.0.2)
Using FBSDKCoreKit (4.33.0)
Using FBSDKLoginKit (4.33.0)
Using Firebase (5.0.1)
Using FirebaseAnalytics (5.0.0)
Using FirebaseAuth (5.0.0)
Using FirebaseCore (5.0.1)
Using FirebaseFirestore (0.12.1)
Using FirebaseInstanceID (3.0.0)
Using FirebaseUI (5.0.0)
Using GTMOAuth2 (1.1.6)
Using GTMSessionFetcher (1.1.15)
Using Google-Mobile-Ads-SDK (7.31.0)
Using GoogleSignIn (4.1.2)
Using GoogleToolboxForMac (2.1.4)
Using Protobuf (3.5.0)
Using SwiftySound (1.0.0)
Using TwitterCore (3.1.0)
Using TwitterKit (3.3.0)
Using gRPC (1.12.0)
Using gRPC-Core (1.12.0)
Using gRPC-ProtoRPC (1.12.0)
Using gRPC-RxLibrary (1.12.0)
Using leveldb-library (1.20)
Using nanopb (0.3.8)

//Pod File

Uncomment the next line to define a global platform for your project

platform :ios, '9.0'

target 'Tahmin Et' do # Comment the next line if you're not using Swift and don't want to use dynamic frameworks use_frameworks!

 # Pods for My App

    pod 'SwiftySound'
    pod 'FirebaseUI/Google'
    pod 'FirebaseUI/Facebook'
    pod 'Google-Mobile-Ads-SDK'
    pod 'FirebaseUI/Twitter'
    pod 'FirebaseCore'
    pod 'FirebaseAuth'
    pod 'FirebaseFirestore'

end
1

1 Answers

5
votes

Your code is okay, you just need to import FirebaseFirestore in your class.

Edit: After discussion

pod 'FirebaseFirestore' is also not correct. It should be pod 'Firebase/Firestore'. Have a look at Firebase getting started guide choose iOS tab under Set up your development environment.

Edit: 2

In latest documentation it is like:

db.collection("cities").document("BJ").setData([ "capital": true ], merge: true)