'JSON::ParserError - 416: unexpected token at '"#define RSAPrivateKey_dup GRPC_SHADOW_'
Steps I followed to add firestore to ios part of flutter
- Create a new flutter app.
- Ensure flutter run launches in ios simulator. It works fine.
- Add cloud_firestore: 0.9.7 to the pubspec.yaml
- then run the app,which leads to te error.
The Pod.lock file is not getting created
Here is my pubspec.yaml
name: dili_platform
description: A new Flutter application.
environment:
sdk: ">=2.1.0 <3.0.0"
dependencies:
flutter:
sdk: flutter
cloud_firestore: 0.9.7
# The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons.
cupertino_icons: ^0.1.2
dev_dependencies:
flutter_test:
sdk: flutter
# For information on the generic Dart part of this file, see the
# following page: https://dart.dev/tools/pub/pubspec
# The following section is specific to Flutter.
flutter:
uses-material-design: true
I am using Xcode Version 11.2 (11B52)
Solution 1:[1]
Run these two commands:
rm -rf ~/.cocoapods/repos/Spec_Lock
rm -rf ~/.cocoapods/repos/trunk/
then pod install.
Solution 2:[2]
I have downgraded cocoapods following the instructions listed here [https://github.com/flutter/flutter/issues/41253#issuecomment-536039050], and then used the following firebase package :
firebase_core: ^0.4.0
firebase_analytics: ^3.0.0
firebase_auth: ^0.11.0
cloud_firestore: ^0.11.0+1
cloud_functions: ^0.3.0
Looks its some compatibility issued with cocoapods v1.9.0
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Ansshkki |
| Solution 2 | Armando Sudi |
