Skip to content
This repository has been archived by the owner on Aug 30, 2024. It is now read-only.

Archive compile error #27

Open
ysoftware opened this issue Oct 19, 2018 · 2 comments
Open

Archive compile error #27

ysoftware opened this issue Oct 19, 2018 · 2 comments

Comments

@ysoftware
Copy link
Contributor

ysoftware commented Oct 19, 2018

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?

@ysoftware
Copy link
Contributor Author

ysoftware commented Oct 19, 2018

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.

@ysoftware
Copy link
Contributor Author

ysoftware commented Oct 20, 2018

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"

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant