Skip to content

Commit 2c8b11c

Browse files
committed
Make generated machine classes and their attributes public.
1 parent 448e833 commit 2c8b11c

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

templates/machine.swift.motemplate

+9-9
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ enum <$managedObjectClassName$>UserInfo: String {<$foreach UserInfo userInfoKeyV
2727
}
2828
<$endif$>
2929

30-
@objc
30+
@objc public
3131
class _<$managedObjectClassName$>: <$customSuperentity$> {
3232

3333
// MARK: - Class methods
@@ -56,18 +56,18 @@ class _<$managedObjectClassName$>: <$customSuperentity$> {
5656
<$if Attribute.hasDefinedAttributeType$>
5757
<$if Attribute.hasScalarAttributeType$>
5858
<$if Attribute.isReadonly$>
59-
@NSManaged
59+
@NSManaged public
6060
let <$Attribute.name$>: NSNumber?
6161
<$else$>
62-
@NSManaged
62+
@NSManaged public
6363
var <$Attribute.name$>: NSNumber?
6464
<$endif$>
6565
<$else$>
6666
<$if Attribute.isReadonly$>
67-
@NSManaged
67+
@NSManaged public
6868
let <$Attribute.name$>: <$Attribute.objectAttributeType$><$if Attribute.isOptional$>?<$endif$>
6969
<$else$>
70-
@NSManaged
70+
@NSManaged public
7171
var <$Attribute.name$>: <$Attribute.objectAttributeType$><$if Attribute.isOptional$>?<$endif$>
7272
<$endif$>
7373
<$endif$>
@@ -78,11 +78,11 @@ class _<$managedObjectClassName$>: <$customSuperentity$> {
7878
// MARK: - Relationships
7979
<$foreach Relationship noninheritedRelationships do$>
8080
<$if Relationship.isToMany$>
81-
@NSManaged
81+
@NSManaged public
8282
var <$Relationship.name$>: <$Relationship.immutableCollectionClassName$>
8383

8484
<$else$>
85-
@NSManaged
85+
@NSManaged public
8686
var <$Relationship.name$>: <$Relationship.destinationEntity.managedObjectClassName$><$if Relationship.isOptional$>?<$endif$>
8787

8888
// func validate<$Relationship.name.initialCapitalString$>(value: AutoreleasingUnsafePointer<AnyObject>, error: NSErrorPointer) {}
@@ -154,7 +154,7 @@ class _<$managedObjectClassName$>: <$customSuperentity$> {
154154
<$endforeach do$>
155155

156156
<$foreach FetchedProperty noninheritedFetchedProperties do$>
157-
@NSManaged
157+
@NSManaged public
158158
let <$FetchedProperty.name$>: [<$FetchedProperty.entity.managedObjectClassName$>]
159159
<$endforeach do$>
160160
}
@@ -187,4 +187,4 @@ extension _<$managedObjectClassName$> {
187187
}
188188

189189
}
190-
<$endif$><$endforeach do$>
190+
<$endif$><$endforeach do$>

0 commit comments

Comments
 (0)