Closed memamdie closed 1 year ago
Hi @memamdie, I am integrating LinkKit sdk, but because my project has a multi-layer structure: I created a static library of my own under the same workspace, included LinkKit in the static library, and then I links the static library to my app Target. When it runs on the iOS real device, it always crashes and reports image not found(Library not loaded: @rpath/LinkKit.framework/LinkKit). Can you help with this issue? Thank you The following is crash logs
@memamdie Thank you for flagging this. The most recent update to our SDK resolves this issue so I am going to close this PR.
Bug Description: There is currently a runtime error in the
LinkDemo-Swift-SwiftUI
app targetContext: As of Xcode 14, any object that inherits UIViewRepresentable must be a value type. This does not generate a compiler error but when the app is run, it generates a runtime error. To resolve this runtime error I changed the class to a struct and added the
@State
binding to the handler property. The binding was necessary because otherwise the struct was mutating itself on L90. I chose to add the state binding rather than refactor this because it was minimally invasive, an acceptable SwiftUI pattern which is the purpose of this class, and the proper SwiftUI pattern for this use case, but I am open to making a different change.Steps to reproduce:
git clone https://github.com/plaid/plaid-link-ios.git
open plaid-link-ios/LinkDemo.xcworkspace
LinkDemo-Swift-SwiftUI
as the targetOpen Plaid Link