SuperAPI AI Directory

apple-data

Data & analytics

View repository

Updated 10-15 21:40

About this skill

Apple Data Reference

A skill covering Apple's data persistence and data flow-related frameworks (SwiftData / Core Data / Foundation / Combine). Depending on the user's task, read the appropriate README.md, and from there follow to individual files.

Directory Structure

skills/apple-data/
  SKILL.md
  references/
    swiftdata/
      README.md
      model-macro.md
      persistent-model.md
      model-container.md
      model-context.md
      query-macro.md
      query-struct.md
      predicate.md
      fetch-descriptor.md
      sort-descriptor.md
      schema.md
      model-configuration.md
      attribute-macro.md
      relationship-macro.md
      transient-macro.md
      versioned-schema.md
      schema-migration-plan.md
      unique-macro.md
      index-macro.md
      data-store-protocol.md
      history-tracking.md
      model-document.md
      results-observer.md
    coredata/
      README.md
      nsmanagedobject.md
      nsmanagedobjectcontext.md
      nsmanagedobjectmodel.md
      nspersistentcontainer.md
      nspersistentstorecoordinator.md
      nspersistentstoredescription.md
      nsfetchrequest.md
      nsentitydescription.md
      nspredicate.md
      nssortdescriptor.md
      nsfetchedresultscontroller.md
      nsbatchinsertrequest.md
      nsbatchdeleterequest.md
      fetchrequest-swiftui.md
      nsmanaged.md
    foundation/
      README.md
      data.md
      date.md
      datecomponents.md
      calendar.md
      timezone.md
      dateinterval.md
      url.md
      urlcomponents.md
      urlrequest.md
      urlsession.md
      uuid.md
      measurement.md
      locale.md
      numberformatter.md
      dateformatter.md
      iso8601dateformatter.md
      filemanager.md
      bundle.md
      notificationcenter.md
      userdefaults.md
      jsonencoder.md
      jsondecoder.md
      propertylistencoder.md
    combine/
      README.md
      publisher.md
      subscriber.md
      subscription.md
      subject.md
      passthroughsubject.md
      currentvaluesubject.md
      anypublisher.md
      anycancellable.md
      cancellable.md
      published.md
      sink.md
      assign.md
      operators-transforming.md
      operators-filtering.md
      operators-combining.md
      operators-timing.md
      receive-on.md
      erasetoanypublisher.md

Exploration Procedure

Derive the category from the task, and identify the target page in the category's README.md:

  1. Find the category corresponding to the task in the mapping table below
  2. For that category, references/{category}/README.md to identify the target page
  3. Read the .md of the corresponding page to check the details

Task → Category Mapping

Task Category Reference README
I want to define a model class with @Model swiftdata references/swiftdata/README.md
Want to set up ModelContainer / ModelContext swiftdata references/swiftdata/README.md
I want to fetch data with @Query / FetchDescriptor swiftdata references/swiftdata/README.md
Want to filter and sort with Predicate / SortDescriptor swiftdata references/swiftdata/README.md
I want to set @Attribute / @Relationship / @Transient swiftdata references/swiftdata/README.md
Want to migrate with VersionedSchema / SchemaMigrationPlan swiftdata references/swiftdata/README.md
I want to set uniqueness and indexes with @Unique / @Index swiftdata references/swiftdata/README.md
I want to implement custom storage with the DataStore protocol swiftdata references/swiftdata/README.md
I want to observe changes with History tracking / ResultsObserver swiftdata references/swiftdata/README.md
I want to build a document-based app with ModelDocument swiftdata references/swiftdata/README.md
I want to manipulate entities with NSManagedObject coredata references/coredata/README.md
I want to perform CRUD with NSManagedObjectContext coredata references/coredata/README.md
Want to set up the stack with NSPersistentContainer coredata references/coredata/README.md
Want to fetch data with NSFetchRequest / NSPredicate coredata references/coredata/README.md
I want to synchronize with the UI using NSFetchedResultsController coredata references/coredata/README.md
I want to perform batch processing with NSBatchInsertRequest / NSBatchDeleteRequest coredata references/coredata/README.md
I want to send network requests with URLSession foundation references/foundation/README.md
I want to convert JSON with JSONEncoder / JSONDecoder foundation references/foundation/README.md
I want to handle dates with Date / Calendar / DateComponents foundation references/foundation/README.md
I want to perform file operations with FileManager foundation references/foundation/README.md
I want to use UserDefaults / NotificationCenter foundation references/foundation/README.md
I want to use UUID / Measurement / Locale foundation references/foundation/README.md
I want to build a reactive stream with Publisher / Subscriber combine references/combine/README.md
I want to subscribe to property changes with @Published combine references/combine/README.md
I want to send events with PassthroughSubject / CurrentValueSubject combine references/combine/README.md
I want to subscribe to and bind streams with sink / assign combine references/combine/README.md
I want to use operators such as map / filter / flatMap combine references/combine/README.md
I want to switch threads with receive(on:) combine references/combine/README.md
I want to erase types with AnyCancellable / eraseToAnyPublisher combine references/combine/README.md