Home > Blockchain >  Swift/Xcode: Multiple Returns to Array
Swift/Xcode: Multiple Returns to Array

Time:03-26

Having some trouble with my code. So I have these HealthKit Objects I'm trying to return to be displayed as widgets later on in my code.

import Foundation

struct Activity: Identifiable {
   var id: String
   var name: String
   var image: String

    static func allActivities() -> [Activity] {
       return[Activity(id:"bloodAlcoholContent", name:"BAC: ", image: "           
  • Related