kukai-wallet / kukai-core-swift

Kukai Core Swift is a native Swift library for interacting with the Tezos blockchain and other applications in the Tezos ecosystem
MIT License
10 stars 8 forks source link

won't compile, WalletHD issues #4

Closed jimijon closed 2 years ago

jimijon commented 2 years ago

lots of optional issues, plus this one:

/Users/James/Downloads/kukai-core-swift-main/Sources/KukaiCoreSwift/Models/Wallet.swift:78:30: Type 'HDWallet' has no member 'isValid'

simonmcl commented 2 years ago

@jimijon One of the dependencies was only available by pointing directly to a master branch (WalletCore) at the time of writing this version. They have used that master branch now to conduct experiments, that means the dependency code changes without knowing about it. They've since moved it to a proper repo, but has breaking changes. This is all fixed in /develop, but /develop is very different and not ready to be released yet.

As a temporary workaround i've tagged version 0.1.3 where I force SPM to work off the specific commit of WalletCore being used at the time 0.1.2 was released. It should compile now

There are currently some warnings coming from a dependency, i've fixed those in the library itself, but the maintainers have gone awol and won't merge them in. Can't do anything about that right now.

jimijon commented 2 years ago

@simonmcl wow, thank you for the fast turnaround. I wasn't expecting that. And you have me intrigued. I am just starting out on making my app and maybe I should work with the develop branch. Why bother developing on the old unsupported code vs going forward with the new. Thoughts?

simonmcl commented 2 years ago

@jimijon you caught me at the exact right time about to log off for the night. Decided to check my emails first.

I'm using /develop my self to experiment with for an app I'm working on, while waiting for designs etc. It has a lot more features and some big improvements over the released features. Feel free to use. Just be warned it's under active development, not suitable for production just yet, subject to breaking changes at any time, needs testing + unit tests etc. hopefully getting close to a versioned release in a couple of weeks

Also, if you do use this library for an app that gets released, please let us know. It helps us secure funding if we can prove our tools are being used by the community

jimijon commented 2 years ago

@simonmcl I tried downloading the develop branch. But it won't run/compile the Example app...like to get working on this project... maybe we could form a small team.

simonmcl commented 2 years ago

@jimijon i've just "Reset Package Cache" on the example app and yes I'm now getting a build failure too. A conflict inside of the TorusSearch dependency, both the library and one of its sub dependencies is using CryptoSwift and theres a version conflict. Looks like they've pushed several new versions since I last spoke to them and they didn't make me aware of it. I'll look into this today as now this is blocking me too

simonmcl commented 2 years ago

@jimijon i've pushed a temporary workaround to /develop until its addressed properly by the developers of the web3.swift library

jimijon commented 2 years ago

@simonmcl ok, it now builds after creating a project file and a scene but, we are a bit baffled. Are we missing a storyboard? There seems to be many view controllers that have no reference to them. We would like to convert the code to SwiftUI and then add our value add. However we do need to see it in operation so we can test, etc.

simonmcl commented 2 years ago

@jimijon i'm not following your question. Yes there is a Main.storyboard inside the iOS-Example application that references multiple example UIViewControllers. There is no storyboard or viewControllers inside the library code. The example isn't something to use in a production app, its an example/demo app to show how to use the library to achieve some common tasks. A lot of that code is intentionally bad practise in order to keep it quick and simple to serve as a basic demo.

I've not done anything with SwiftUI yet, as there is no first class support for UITableViews. The List type will cause issues with memory for users who hold a large number of tokens / NFTs. Even more so with rich media NFT's. It somewhat depends on how the UI is structured, but users won't want to have to click across multiple screens, they'll want a full list. In general many still see SwiftUI as not ready for production until these issues are addressed

jimijon commented 2 years ago

@simonmcl thanks for the communications. We are trying to see what it does but there were just three barebones screens of switch testnet or a hash lookup. Meanwhile there are many swift view controller files that are not being referenced in the ui. I will look further.

We are looking to create an integrated wallet / iPhoto type organizer. We do have experience with SwiftUI and there are different ways to approach the problem of the tableview.

Maybe we could team up? I also had a great idea for an NFT and have a great artist to pull it off but it would need to have to pay at least two royalties.

simonmcl commented 2 years ago

@jimijon It sounds like you've done something odd to look at the example project. I've followed the same pattern/folder-structure all the well known libraries use, including most of the dependencies of this library.

If you clone the develop branch locally, open the folder where it was cloned, open iOS-Example and double click on iOS-Example.xcworkspace it will open the example project in Xcode. Wait for it to download dependencies, select an iOS simulator and click run. It will build and open the sample app which has screens for creating / importing wallets, checking balances, downloading NFT images and video, estimating and injecting operations etc.

Simulator Screen Shot - iPhone 13 - 2022-02-10 at 14 48 07

From inside the example project you can see how the library is called and used. If this doesn't work for some reason, please provide detailed step by step instructions of what it is you are doing and what error message you receive.

I'm flat out working on this library and preparing for our app. I don't have any bandwidth to take on anything new at this time

jimijon commented 2 years ago

ok,,, thank you for this. We probably did do something wrong but now that I know what it is supposed to look like I can take it from here. Appreciate everything and good luck with the library and of course big success for your app.