What has replaced the method toUIntMax() and the method toIntMax() in Swift 4 ? The error occurred within the FacebookCore framework.
Any help would be appreciated
What has replaced the method toUIntMax() and the method toIntMax() in Swift 4 ? The error occurred within the FacebookCore framework.
Any help would be appreciated
The concept of IntMax
has been completely removed as part of SE-104.
Converting from one integer type to another is performed using the concept of the 'maximum width integer' (see
MaxInt
), which is an artificial limitation. The very existence ofMaxInt
makes it unclear what to do should someone implementInt256
, for example.
The proposed model eliminates the 'largest integer type' concept previously used to interoperate between integer types (see
toIntMax
in the current model) and instead provides access to machine words. It also introduces themultipliedFullWidth(by:)
,dividingFullWidth(_:)
, andquotientAndRemainder
methods. Together these changes can be used to provide an efficient implementation of bignums that would be hard to achieve otherwise.
In this specific case FB SDK should simply use the UInt64($0)
initializer which is now available for any BinaryInteger
type thanks to the new protocols.
You can also for now, can select Swift 3.2 under Pods -> Targets -> ObjectMapper -> Swift language version option
© 2022 - 2024 — McMap. All rights reserved.