Skip to content

Commit

Permalink
Merge pull request #2475 from woocommerce/issue/1372-core-data-transf…
Browse files Browse the repository at this point in the history
…ormer

Set transformer to `NSSecureUnarchiveFromData` for model versions 20-28 to fix warnings on iOS 13
  • Loading branch information
jaclync authored Jun 29, 2020
2 parents 8a982eb + 7b51533 commit 39e5c78
Show file tree
Hide file tree
Showing 10 changed files with 158 additions and 61 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@
<attribute name="backordersKey" attributeType="String"/>
<attribute name="briefDescription" optional="YES" attributeType="String"/>
<attribute name="catalogVisibilityKey" attributeType="String"/>
<attribute name="crossSellIDs" optional="YES" attributeType="Transformable" customClassName="[Int64]"/>
<attribute name="crossSellIDs" optional="YES" attributeType="Transformable" valueTransformerName="NSSecureUnarchiveFromData" customClassName="[Int64]"/>
<attribute name="dateCreated" attributeType="Date" usesScalarValueType="NO"/>
<attribute name="dateModified" optional="YES" attributeType="Date" usesScalarValueType="NO"/>
<attribute name="downloadable" attributeType="Boolean" usesScalarValueType="YES"/>
Expand All @@ -212,7 +212,7 @@
<attribute name="externalURL" optional="YES" attributeType="String"/>
<attribute name="featured" attributeType="Boolean" usesScalarValueType="YES"/>
<attribute name="fullDescription" optional="YES" attributeType="String"/>
<attribute name="groupedProducts" attributeType="Transformable" customClassName="[Int64]"/>
<attribute name="groupedProducts" attributeType="Transformable" valueTransformerName="NSSecureUnarchiveFromData" customClassName="[Int64]"/>
<attribute name="manageStock" attributeType="Boolean" usesScalarValueType="YES"/>
<attribute name="menuOrder" attributeType="Integer 64" defaultValueString="0" usesScalarValueType="YES"/>
<attribute name="name" attributeType="String"/>
Expand All @@ -226,7 +226,7 @@
<attribute name="purchaseNote" optional="YES" attributeType="String"/>
<attribute name="ratingCount" attributeType="Integer 64" defaultValueString="0" usesScalarValueType="YES"/>
<attribute name="regularPrice" optional="YES" attributeType="String"/>
<attribute name="relatedIDs" optional="YES" attributeType="Transformable" customClassName="[Int64]"/>
<attribute name="relatedIDs" optional="YES" attributeType="Transformable" valueTransformerName="NSSecureUnarchiveFromData" customClassName="[Int64]"/>
<attribute name="reviewsAllowed" attributeType="Boolean" usesScalarValueType="YES"/>
<attribute name="salePrice" optional="YES" attributeType="String"/>
<attribute name="shippingClass" optional="YES" attributeType="String"/>
Expand All @@ -243,8 +243,8 @@
<attribute name="taxClass" optional="YES" attributeType="String"/>
<attribute name="taxStatusKey" attributeType="String"/>
<attribute name="totalSales" attributeType="Integer 64" defaultValueString="0" usesScalarValueType="YES"/>
<attribute name="upsellIDs" optional="YES" attributeType="Transformable" customClassName="[Int64]"/>
<attribute name="variations" optional="YES" attributeType="Transformable" customClassName="[Int64]"/>
<attribute name="upsellIDs" optional="YES" attributeType="Transformable" valueTransformerName="NSSecureUnarchiveFromData" customClassName="[Int64]"/>
<attribute name="variations" optional="YES" attributeType="Transformable" valueTransformerName="NSSecureUnarchiveFromData" customClassName="[Int64]"/>
<attribute name="virtual" attributeType="Boolean" usesScalarValueType="YES"/>
<attribute name="weight" optional="YES" attributeType="String"/>
<relationship name="attributes" optional="YES" toMany="YES" deletionRule="Cascade" destinationEntity="ProductAttribute" inverseName="product" inverseEntity="ProductAttribute"/>
Expand All @@ -259,7 +259,7 @@
<entity name="ProductAttribute" representedClassName="ProductAttribute" syncable="YES">
<attribute name="attributeID" attributeType="Integer 64" defaultValueString="0" usesScalarValueType="YES"/>
<attribute name="name" attributeType="String"/>
<attribute name="options" optional="YES" attributeType="Transformable" customClassName="[String]"/>
<attribute name="options" optional="YES" attributeType="Transformable" valueTransformerName="NSSecureUnarchiveFromData" customClassName="[String]"/>
<attribute name="position" attributeType="Integer 64" defaultValueString="0" usesScalarValueType="YES"/>
<attribute name="variation" attributeType="Boolean" usesScalarValueType="YES"/>
<attribute name="visible" attributeType="Boolean" usesScalarValueType="YES"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@
<attribute name="backordersKey" attributeType="String"/>
<attribute name="briefDescription" optional="YES" attributeType="String"/>
<attribute name="catalogVisibilityKey" attributeType="String"/>
<attribute name="crossSellIDs" optional="YES" attributeType="Transformable" customClassName="[Int64]"/>
<attribute name="crossSellIDs" optional="YES" attributeType="Transformable" valueTransformerName="NSSecureUnarchiveFromData" customClassName="[Int64]"/>
<attribute name="dateCreated" attributeType="Date" usesScalarValueType="NO"/>
<attribute name="dateModified" optional="YES" attributeType="Date" usesScalarValueType="NO"/>
<attribute name="downloadable" attributeType="Boolean" usesScalarValueType="YES"/>
Expand All @@ -241,7 +241,7 @@
<attribute name="externalURL" optional="YES" attributeType="String"/>
<attribute name="featured" attributeType="Boolean" usesScalarValueType="YES"/>
<attribute name="fullDescription" optional="YES" attributeType="String"/>
<attribute name="groupedProducts" attributeType="Transformable" customClassName="[Int64]"/>
<attribute name="groupedProducts" attributeType="Transformable" valueTransformerName="NSSecureUnarchiveFromData" customClassName="[Int64]"/>
<attribute name="manageStock" attributeType="Boolean" usesScalarValueType="YES"/>
<attribute name="menuOrder" attributeType="Integer 64" defaultValueString="0" usesScalarValueType="YES"/>
<attribute name="name" attributeType="String"/>
Expand All @@ -255,7 +255,7 @@
<attribute name="purchaseNote" optional="YES" attributeType="String"/>
<attribute name="ratingCount" attributeType="Integer 64" defaultValueString="0" usesScalarValueType="YES"/>
<attribute name="regularPrice" optional="YES" attributeType="String"/>
<attribute name="relatedIDs" optional="YES" attributeType="Transformable" customClassName="[Int64]"/>
<attribute name="relatedIDs" optional="YES" attributeType="Transformable" valueTransformerName="NSSecureUnarchiveFromData" customClassName="[Int64]"/>
<attribute name="reviewsAllowed" attributeType="Boolean" usesScalarValueType="YES"/>
<attribute name="salePrice" optional="YES" attributeType="String"/>
<attribute name="shippingClass" optional="YES" attributeType="String"/>
Expand All @@ -272,8 +272,8 @@
<attribute name="taxClass" optional="YES" attributeType="String"/>
<attribute name="taxStatusKey" attributeType="String"/>
<attribute name="totalSales" attributeType="Integer 64" defaultValueString="0" usesScalarValueType="YES"/>
<attribute name="upsellIDs" optional="YES" attributeType="Transformable" customClassName="[Int64]"/>
<attribute name="variations" optional="YES" attributeType="Transformable" customClassName="[Int64]"/>
<attribute name="upsellIDs" optional="YES" attributeType="Transformable" valueTransformerName="NSSecureUnarchiveFromData" customClassName="[Int64]"/>
<attribute name="variations" optional="YES" attributeType="Transformable" valueTransformerName="NSSecureUnarchiveFromData" customClassName="[Int64]"/>
<attribute name="virtual" attributeType="Boolean" usesScalarValueType="YES"/>
<attribute name="weight" optional="YES" attributeType="String"/>
<relationship name="attributes" optional="YES" toMany="YES" deletionRule="Cascade" destinationEntity="ProductAttribute" inverseName="product" inverseEntity="ProductAttribute"/>
Expand All @@ -288,7 +288,7 @@
<entity name="ProductAttribute" representedClassName="ProductAttribute" syncable="YES">
<attribute name="attributeID" attributeType="Integer 64" defaultValueString="0" usesScalarValueType="YES"/>
<attribute name="name" attributeType="String"/>
<attribute name="options" optional="YES" attributeType="Transformable" customClassName="[String]"/>
<attribute name="options" optional="YES" attributeType="Transformable" valueTransformerName="NSSecureUnarchiveFromData" customClassName="[String]"/>
<attribute name="position" attributeType="Integer 64" defaultValueString="0" usesScalarValueType="YES"/>
<attribute name="variation" attributeType="Boolean" usesScalarValueType="YES"/>
<attribute name="visible" attributeType="Boolean" usesScalarValueType="YES"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@
<attribute name="backordersKey" attributeType="String"/>
<attribute name="briefDescription" optional="YES" attributeType="String"/>
<attribute name="catalogVisibilityKey" attributeType="String"/>
<attribute name="crossSellIDs" optional="YES" attributeType="Transformable" customClassName="[Int64]"/>
<attribute name="crossSellIDs" optional="YES" attributeType="Transformable" valueTransformerName="NSSecureUnarchiveFromData" customClassName="[Int64]"/>
<attribute name="dateCreated" attributeType="Date" usesScalarValueType="NO"/>
<attribute name="dateModified" optional="YES" attributeType="Date" usesScalarValueType="NO"/>
<attribute name="downloadable" attributeType="Boolean" usesScalarValueType="YES"/>
Expand All @@ -242,7 +242,7 @@
<attribute name="externalURL" optional="YES" attributeType="String"/>
<attribute name="featured" attributeType="Boolean" usesScalarValueType="YES"/>
<attribute name="fullDescription" optional="YES" attributeType="String"/>
<attribute name="groupedProducts" attributeType="Transformable" customClassName="[Int64]"/>
<attribute name="groupedProducts" attributeType="Transformable" valueTransformerName="NSSecureUnarchiveFromData" customClassName="[Int64]"/>
<attribute name="manageStock" attributeType="Boolean" usesScalarValueType="YES"/>
<attribute name="menuOrder" attributeType="Integer 64" defaultValueString="0" usesScalarValueType="YES"/>
<attribute name="name" attributeType="String"/>
Expand All @@ -256,7 +256,7 @@
<attribute name="purchaseNote" optional="YES" attributeType="String"/>
<attribute name="ratingCount" attributeType="Integer 64" defaultValueString="0" usesScalarValueType="YES"/>
<attribute name="regularPrice" optional="YES" attributeType="String"/>
<attribute name="relatedIDs" optional="YES" attributeType="Transformable" customClassName="[Int64]"/>
<attribute name="relatedIDs" optional="YES" attributeType="Transformable" valueTransformerName="NSSecureUnarchiveFromData" customClassName="[Int64]"/>
<attribute name="reviewsAllowed" attributeType="Boolean" usesScalarValueType="YES"/>
<attribute name="salePrice" optional="YES" attributeType="String"/>
<attribute name="shippingClass" optional="YES" attributeType="String"/>
Expand All @@ -273,8 +273,8 @@
<attribute name="taxClass" optional="YES" attributeType="String"/>
<attribute name="taxStatusKey" attributeType="String"/>
<attribute name="totalSales" attributeType="Integer 64" defaultValueString="0" usesScalarValueType="YES"/>
<attribute name="upsellIDs" optional="YES" attributeType="Transformable" customClassName="[Int64]"/>
<attribute name="variations" optional="YES" attributeType="Transformable" customClassName="[Int64]"/>
<attribute name="upsellIDs" optional="YES" attributeType="Transformable" valueTransformerName="NSSecureUnarchiveFromData" customClassName="[Int64]"/>
<attribute name="variations" optional="YES" attributeType="Transformable" valueTransformerName="NSSecureUnarchiveFromData" customClassName="[Int64]"/>
<attribute name="virtual" attributeType="Boolean" usesScalarValueType="YES"/>
<attribute name="weight" optional="YES" attributeType="String"/>
<relationship name="attributes" optional="YES" toMany="YES" deletionRule="Cascade" destinationEntity="ProductAttribute" inverseName="product" inverseEntity="ProductAttribute"/>
Expand All @@ -289,7 +289,7 @@
<entity name="ProductAttribute" representedClassName="ProductAttribute" syncable="YES">
<attribute name="attributeID" attributeType="Integer 64" defaultValueString="0" usesScalarValueType="YES"/>
<attribute name="name" attributeType="String"/>
<attribute name="options" optional="YES" attributeType="Transformable" customClassName="[String]"/>
<attribute name="options" optional="YES" attributeType="Transformable" valueTransformerName="NSSecureUnarchiveFromData" customClassName="[String]"/>
<attribute name="position" attributeType="Integer 64" defaultValueString="0" usesScalarValueType="YES"/>
<attribute name="variation" attributeType="Boolean" usesScalarValueType="YES"/>
<attribute name="visible" attributeType="Boolean" usesScalarValueType="YES"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@
<attribute name="backordersKey" attributeType="String"/>
<attribute name="briefDescription" optional="YES" attributeType="String"/>
<attribute name="catalogVisibilityKey" attributeType="String"/>
<attribute name="crossSellIDs" optional="YES" attributeType="Transformable" customClassName="[Int64]"/>
<attribute name="crossSellIDs" optional="YES" attributeType="Transformable" valueTransformerName="NSSecureUnarchiveFromData" customClassName="[Int64]"/>
<attribute name="dateCreated" attributeType="Date" usesScalarValueType="NO"/>
<attribute name="dateModified" optional="YES" attributeType="Date" usesScalarValueType="NO"/>
<attribute name="downloadable" attributeType="Boolean" usesScalarValueType="YES"/>
Expand All @@ -248,7 +248,7 @@
<attribute name="externalURL" optional="YES" attributeType="String"/>
<attribute name="featured" attributeType="Boolean" usesScalarValueType="YES"/>
<attribute name="fullDescription" optional="YES" attributeType="String"/>
<attribute name="groupedProducts" attributeType="Transformable" customClassName="[Int64]"/>
<attribute name="groupedProducts" attributeType="Transformable" valueTransformerName="NSSecureUnarchiveFromData" customClassName="[Int64]"/>
<attribute name="manageStock" attributeType="Boolean" usesScalarValueType="YES"/>
<attribute name="menuOrder" attributeType="Integer 64" defaultValueString="0" usesScalarValueType="YES"/>
<attribute name="name" attributeType="String"/>
Expand All @@ -262,7 +262,7 @@
<attribute name="purchaseNote" optional="YES" attributeType="String"/>
<attribute name="ratingCount" attributeType="Integer 64" defaultValueString="0" usesScalarValueType="YES"/>
<attribute name="regularPrice" optional="YES" attributeType="String"/>
<attribute name="relatedIDs" optional="YES" attributeType="Transformable" customClassName="[Int64]"/>
<attribute name="relatedIDs" optional="YES" attributeType="Transformable" valueTransformerName="NSSecureUnarchiveFromData" customClassName="[Int64]"/>
<attribute name="reviewsAllowed" attributeType="Boolean" usesScalarValueType="YES"/>
<attribute name="salePrice" optional="YES" attributeType="String"/>
<attribute name="shippingClass" optional="YES" attributeType="String"/>
Expand All @@ -279,8 +279,8 @@
<attribute name="taxClass" optional="YES" attributeType="String"/>
<attribute name="taxStatusKey" attributeType="String"/>
<attribute name="totalSales" attributeType="Integer 64" defaultValueString="0" usesScalarValueType="YES"/>
<attribute name="upsellIDs" optional="YES" attributeType="Transformable" customClassName="[Int64]"/>
<attribute name="variations" optional="YES" attributeType="Transformable" customClassName="[Int64]"/>
<attribute name="upsellIDs" optional="YES" attributeType="Transformable" valueTransformerName="NSSecureUnarchiveFromData" customClassName="[Int64]"/>
<attribute name="variations" optional="YES" attributeType="Transformable" valueTransformerName="NSSecureUnarchiveFromData" customClassName="[Int64]"/>
<attribute name="virtual" attributeType="Boolean" usesScalarValueType="YES"/>
<attribute name="weight" optional="YES" attributeType="String"/>
<relationship name="attributes" optional="YES" toMany="YES" deletionRule="Cascade" destinationEntity="ProductAttribute" inverseName="product" inverseEntity="ProductAttribute"/>
Expand All @@ -296,7 +296,7 @@
<entity name="ProductAttribute" representedClassName="ProductAttribute" syncable="YES">
<attribute name="attributeID" attributeType="Integer 64" defaultValueString="0" usesScalarValueType="YES"/>
<attribute name="name" attributeType="String"/>
<attribute name="options" optional="YES" attributeType="Transformable" customClassName="[String]"/>
<attribute name="options" optional="YES" attributeType="Transformable" valueTransformerName="NSSecureUnarchiveFromData" customClassName="[String]"/>
<attribute name="position" attributeType="Integer 64" defaultValueString="0" usesScalarValueType="YES"/>
<attribute name="variation" attributeType="Boolean" usesScalarValueType="YES"/>
<attribute name="visible" attributeType="Boolean" usesScalarValueType="YES"/>
Expand Down
Loading

0 comments on commit 39e5c78

Please sign in to comment.