dagronf / DSFStepperView

A custom stepper text field for macOS and iOS, supporting Swift, Objective-C, SwiftUI and Catalyst
MIT License
63 stars 7 forks source link

DSFStepperView-shared linker issue for iOS Device build #5

Closed amagrude closed 5 months ago

amagrude commented 7 months ago

When I added this to an existing project via SPM, I was unable to get it to build to run on a device, but it ran just fine in the simulator. I received this error:

No such file or directory: '/Users/andrewmagruder/Library/Developer/Xcode/DerivedData/Multi-Tool-eltmjcbmaxjdygagnsgbmawozdfs/Build/Products/Debug-iphoneos/PackageFrameworks/DSFStepperView-shared.framework/DSFStepperView-shared'

To correct this, I went Target->Frameworks, Libraries, and Embedded Content->DSFStepperView-shared->Filters->Unchecked "Allow on any platform" && "iOS".

This cleared my linker error and now the app builds/runs on device and in simulator.

Xxode: 15.2. iOS: 17.2. Device: iPhone 14 Pro Max.

Works great! Thank you! 👍

dagronf commented 5 months ago

Glad you were able to resolve your issue. As much as Apple states 'just add it! It's simple!' sometimes its far from the truth.

This library has three targets

In most cases you only ever need to use the first one. I had a number of requests for specific shared/static targets for people that want fine control over how their app is built (which unfortunately makes the initial integration a little more confusing).

Cheers!