jacksonjude / cloudkit_flutter Goto Github PK
View Code? Open in Web Editor NEWCloudKit support for Flutter via CloudKit Web Services.
Home Page: https://pub.dev/packages/cloudkit_flutter
License: BSD 3-Clause "New" or "Revised" License
CloudKit support for Flutter via CloudKit Web Services.
Home Page: https://pub.dev/packages/cloudkit_flutter
License: BSD 3-Clause "New" or "Revised" License
Hey @jacksonjude, how can we save a record in cloudkit using this package. The example app only uses fetch operation and I couldn't find this in readme as well. Please let me know how can I save data in cloudkit using this package.
Hello,
I noticed that Apple records (and therefore gives back) integer values when a no-decimal value is submitted in a double field.
This causes a crash when parsing.
I fixed this locally in. my app with that patch in src/parsing/ck_record_parser.dart
:
function convertToLocalValue()
switch (field) {
case CKFieldType.STRING_TYPE:
case CKFieldType.INT_TYPE:
case CKFieldType.DOUBLE_TYPE:
// setter below will automatically work for these types; others might also automatically work (other types of lists?)
///// THIS PART IS A FIX FOR DOUBLE INPUTS THAT COME AS INTEGER FROM APPLE SIDE
if (field == CKFieldType.DOUBLE_TYPE) {
if (rawValue is int) {
rawValue = rawValue.toDouble();
}
}
///// END OF FIX
convertedValue = rawValue;
break;
(...)
}
The package works fine before but I suddenly got this error when compiling. It complains about the type casting on source code: "ClassMirror currentClassMirrorForType = reflector.reflectType(T) as ClassMirror; //TODO: Messy solution :(" in ck_field_type.dart file. Please help. I am using dart version 2.17.5 (stable) on mac.
Thanks for an interesting project!
Firstly, I noticed the example doesn't work with flutter build
- presumably some files like pubspec.yaml
are missing?
Secondly, the README states that the usefulness on iOS is limited - I'd be interested to learn more about this and whether you think it's tractable to improve iOS support via this approach?
The CKFilter doesn't work. Has anyone had it working?
Hi,
I received a 400 Bad Request error when trying to use filter with current parsing.
I fixed this in ck_filter.dart
in class CKFilter
:
class CKFilter {
final CKComparator _comparator;
final String _fieldName;
final Map<String, dynamic> _fieldValueDictionary;
final double? _distance;
///// THIS PART IS A FIX FOR NON-SYSTEMFIELD FILTERS
dynamic _fieldValue;
CKFilter(this._fieldName, CKFieldType fieldType, dynamic fieldValue,
this._comparator,
{double? distance})
: _fieldValue = (fieldValue != null)
? {'value': fieldValue, 'type': fieldType.record}
: ((fieldType is num) ? 0 : ""),
_fieldValueDictionary = {
'value': {_fieldName: fieldValue},
'type': fieldType.record
},
_distance = distance;
/// Convert the filter to JSON.
Map<String, dynamic> toJSON() => {
'comparator': _comparator._comparatorString,
(CKConstants.isSystemFieldName(_fieldName)
? 'systemFieldName'
: 'fieldName'): _fieldName,
'fieldValue': (CKConstants.isSystemFieldName(_fieldName)
? _fieldValueDictionary
: _fieldValue),
'distance': _distance
};
///// END OF FIX
}
Steps to reproduce (in Um Yang):
Expected result: in CloudKit console, person should have 1 participation and 1 promotion record.
Actual result: person has 2 participation and 2 promotion records. one of each points to child records that no longer exist. So the child records are being deleted, but the references are not, even though I am doing that locally.
It seems like the local record keeps sending old references up to cloudkit when saving, like they aren’t being cleared out after delete, even thought I am explicitly doing so.
Related perhaps? Clearing out the references on CloudKit dashboard does not clear them out locally either.
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.