SwiftyEOS
SwiftyEOS copied to clipboard
Archive compile error
I get this error when trying to archive for App Store upload. Xcode 10
Transaction.swift
static func dataForSignature(chainId: String?, pkt: PackedTransaction) -> Data {
...
writer.pushInt(value: Int(UInt32(pkt.transaction.expiration.timeIntervalSince1970) & 0xFFFFFFFF))
writer.pushShort(value: pkt.transaction.refBlockNum & 0xFFFF)
writer.pushInt(value: Int(pkt.transaction.refBlockPrefix & 0xFFFFFFFF))
// ^ Integer literal '4294967295' overflows when stored into 'Int'
...
}
Any suggestions on how to fix this?
Not sure if it's going to work right but looking at another line I've fixed it by example like this:
writer.pushInt(value: Int(UInt32(pkt.transaction.refBlockPrefix) & 0xFFFFFFFF))
Then I had another problem with compilation and had to download this file and add to the project. You probably want to add it to the library as well.
uECC_PLATFORM == uECC_arm_thumb2)
#include "asm_arm.inc" // ← file not found
#endif
After that, the project built just fine and archived successfully. I would create a PR but I'm not completely sure if these are the fixes you'd want.
Another weird error. While running XCode Tests, I had to change these bridging header import statements to use quote marks or the files could not be found.
#import "libbase58.h"
#import "uECC.h"
#import "ripemd160.h"