Skip to content

Commit 8cbcc38

Browse files
authored
Fix CoreData swift/objc attributes Interoperability (#149)
* Explicitly expose NSManaged Objects to objc * Set xcdatamodel optional attributes & remove attachmentPaths customClassName
1 parent 31e77a4 commit 8cbcc38

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

Sources/Features/Resources/Crash+CoreDataProperties.swift

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,15 @@ extension Crash {
77
return NSFetchRequest<Crash>(entityName: "Crash")
88
}
99

10+
@objc(attachmentPaths)
1011
@NSManaged public var attachmentPaths: [String]?
12+
@objc(dateAdded)
1113
@NSManaged public var dateAdded: Date?
14+
@objc(hashProperty)
1215
@NSManaged public var hashProperty: String?
16+
@objc(reportData)
1317
@NSManaged public var reportData: Data?
18+
@objc(retryCount)
1419
@NSManaged public var retryCount: Int64
1520

1621
}
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
2-
<model type="com.apple.IDECoreDataModeler.DataModel" documentVersion="1.0" lastSavedToolsVersion="22758" systemVersion="23F79" minimumToolsVersion="Automatic" sourceLanguage="Swift" userDefinedModelVersionIdentifier="">
2+
<model type="com.apple.IDECoreDataModeler.DataModel" documentVersion="1.0" lastSavedToolsVersion="23507" systemVersion="24B83" minimumToolsVersion="Automatic" sourceLanguage="Swift" userDefinedModelVersionIdentifier="">
33
<entity name="Crash" representedClassName="Crash" syncable="YES">
4-
<attribute name="attachmentPaths" attributeType="Transformable" valueTransformerName="" customClassName="[String]"/>
5-
<attribute name="dateAdded" attributeType="Date" usesScalarValueType="NO"/>
6-
<attribute name="hashProperty" attributeType="String"/>
7-
<attribute name="reportData" attributeType="Binary"/>
4+
<attribute name="attachmentPaths" optional="YES" attributeType="Transformable" valueTransformerName=""/>
5+
<attribute name="dateAdded" optional="YES" attributeType="Date" usesScalarValueType="NO"/>
6+
<attribute name="hashProperty" optional="YES" attributeType="String"/>
7+
<attribute name="reportData" optional="YES" attributeType="Binary"/>
88
<attribute name="retryCount" optional="YES" attributeType="Integer 64" defaultValueString="0" usesScalarValueType="YES"/>
99
</entity>
1010
</model>

0 commit comments

Comments
 (0)