Skip to content

Commit

Permalink
Workaround for broken AnyKeypath hashValue
Browse files Browse the repository at this point in the history
  • Loading branch information
alexdrone committed Jun 11, 2018
1 parent e80ac2a commit 4a0db97
Show file tree
Hide file tree
Showing 7 changed files with 37 additions and 12 deletions.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified bin/RenderNeutrino.framework/RenderNeutrino
Binary file not shown.
39 changes: 27 additions & 12 deletions bin/RenderNeutrino.framework/_CodeSignature/CodeResources
Original file line number Diff line number Diff line change
Expand Up @@ -56,21 +56,25 @@
<data>
/IKT3xCA3lBKnsJ4foW2m8nPF/E=
</data>
<key>Modules/RenderNeutrino.swiftmodule/.BC.T_Kv6jQ6</key>
<data>
ac3lsQVfyFlCE3qfwb8wY2ZV5UM=
</data>
<key>Modules/RenderNeutrino.swiftmodule/i386.swiftdoc</key>
<data>
4hfB9jip4o6xfO83zQWpADQThk8=
LyjGnr+q1TiVyPAoLPWzdNcmZRU=
</data>
<key>Modules/RenderNeutrino.swiftmodule/i386.swiftmodule</key>
<data>
IgFbEw43Ajn6ra2aBf56KPQzJwA=
lHywRf/m5vNH3mK/x+XNGe0wDEc=
</data>
<key>Modules/RenderNeutrino.swiftmodule/x86_64.swiftdoc</key>
<data>
hqKf55xH2I7NgF8F1DS/ELt1bEs=
w47MhORONOPU34ViuY0eh5E1oXU=
</data>
<key>Modules/RenderNeutrino.swiftmodule/x86_64.swiftmodule</key>
<data>
ougXYxqQLmC135eOdp9bdjbuMfs=
MyFoaevxd/+Olwo/87XaNt/zwlU=
</data>
<key>Modules/module.modulemap</key>
<data>
Expand Down Expand Up @@ -211,48 +215,59 @@
OQIF5ergmz2uAw/u900rYcTR0evRWj45TNK4lviOMr8=
</data>
</dict>
<key>Modules/RenderNeutrino.swiftmodule/.BC.T_Kv6jQ6</key>
<dict>
<key>hash</key>
<data>
ac3lsQVfyFlCE3qfwb8wY2ZV5UM=
</data>
<key>hash2</key>
<data>
Fr66Uy0n17SmzAYX+0J19rOwDCyxPCavvcEcHTGkSjY=
</data>
</dict>
<key>Modules/RenderNeutrino.swiftmodule/i386.swiftdoc</key>
<dict>
<key>hash</key>
<data>
4hfB9jip4o6xfO83zQWpADQThk8=
LyjGnr+q1TiVyPAoLPWzdNcmZRU=
</data>
<key>hash2</key>
<data>
MQ3RUdv0di/ygTlW+nXSf/hb3Zxqvj1QQXwfgqovDtA=
PK5zoT22wUy8dIVX3SPX8LzCoKgn1HsSe11yT19Reik=
</data>
</dict>
<key>Modules/RenderNeutrino.swiftmodule/i386.swiftmodule</key>
<dict>
<key>hash</key>
<data>
IgFbEw43Ajn6ra2aBf56KPQzJwA=
lHywRf/m5vNH3mK/x+XNGe0wDEc=
</data>
<key>hash2</key>
<data>
Dmu7NIz83C6opJ1enRWtXZVNhR2kO/ya51aKvDxuxVk=
qcqz0LfmhXFAJU8q9QmGcdQkyn1Exas5THW5bFAIIqA=
</data>
</dict>
<key>Modules/RenderNeutrino.swiftmodule/x86_64.swiftdoc</key>
<dict>
<key>hash</key>
<data>
hqKf55xH2I7NgF8F1DS/ELt1bEs=
w47MhORONOPU34ViuY0eh5E1oXU=
</data>
<key>hash2</key>
<data>
wtg/bfAjnCPmtz9kWVOd5w/u9oegFN/ZjYbgorhoZRQ=
NZ26kauNPzcphbGIt0I1ua7WifSG6dQMgPHiGnnfTyU=
</data>
</dict>
<key>Modules/RenderNeutrino.swiftmodule/x86_64.swiftmodule</key>
<dict>
<key>hash</key>
<data>
ougXYxqQLmC135eOdp9bdjbuMfs=
MyFoaevxd/+Olwo/87XaNt/zwlU=
</data>
<key>hash2</key>
<data>
IYOqUh1fkQaKbOemdhlGmA2ZzO7DjZH68u1J4vKo1mc=
gXLE2mFKB9BnZjC5nOVEJgNVnh2dDBPrudLRJOnkBBk=
</data>
</dict>
<key>Modules/module.modulemap</key>
Expand Down
Binary file modified bin/dist.zip
Binary file not shown.
10 changes: 10 additions & 0 deletions render/src/KeyPath.swift
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,16 @@ extension AnyKeyPath {
}
return path
}

public var hashIdentifier: Int {
if let path = _kvcKeyPathString { return path.hashValue }
// *hashValue* is broken in iOS12
#if swift(>=4.2)
return Unmanaged.passUnretained(self).toOpaque().hashValue
#else
return hashValue
#endif
}
}

@objc public final class UIRenderConfigurationContainer: NSObject {
Expand Down

0 comments on commit 4a0db97

Please sign in to comment.