Giter VIP home page Giter VIP logo

cloudkit_flutter's People

Contributors

jacksonjude avatar yz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

cloudkit_flutter's Issues

Save Record in cloudkit

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.

Apple give sometimes INTEGER values in a DOUBLE column...

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;
(...)
}

type 'DynamicMirrorImpl' is not a subtype of type 'ClassMirror' in type cast

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.

Example not working and iOS support

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?

Bad syntax for JSON filter when NOT systemField

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
}

Bug: Adding, deleting, and adding a child record causes "leaky" record reference in the parent record

Steps to reproduce (in Um Yang):

  1. Add a person

  2. Add a promotion
  3. Delete the promotion
  4. Add a promotion

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.