     }
     
     /// Product reference.
-    public var productReference: PBXObjectReference?
+    var productReference: PBXObjectReference?
+    
+    /// Product.
+    public var product: XCSwiftPackageProductDependency? {
+        get {
+            return productReference?.getObject()
+        }
+        set {
+            self.productReference = newValue?.reference
+        }
+    }
 
     /// Element settings
     public var settings: [String: Any]?

            let fileElement: PBXFileElement? = fileReference.getObject()
            dictionary["fileRef"] = .string(CommentedString(fileReference.value, comment: fileElement?.fileName()))
        }
        if let settings = buildFile.settings {
            dictionary["settings"] = settings.plist()
        }

    enum CodingKeys: String, CodingKey {
        case fileRef
        case settings
        case productRef
    }

    public required init(from decoder: Decoder) throws {
