google / promises

Promises is a modern framework that provides a synchronization construct for Swift and Objective-C.
Apache License 2.0
3.79k stars 292 forks source link

SPM: Missing required module 'FBLPromises' in WatchKit app #160

Closed tkafka closed 3 years ago

tkafka commented 3 years ago

Hello, I added Promises to my Xcode project's Swift Package section, and when I am building my WatchKit app, I get a Missing required module 'FBLPromises' message on a line where I import Promises in swift file.

Screenshot 2020-09-09 at 23 50 11 Screenshot 2020-09-09 at 23 52 31

I tired to solve this by adding #import "FBLPromises.h" to my bridging headers file (MyAppName-Bridging-Header.h), but then the build just says 'FBLPromises.h' file not found.

Screenshot 2020-09-09 at 23 53 54

Any idea what I am doing wrong? There are no useful Google results for module FBLPromises not found with Swift Package Manager, all I found were about CocoaPods.

tkafka commented 3 years ago

For everyone with a same problem: You need to add the Promises and FBLPromises libraries manually to a WatchKit Extension target:

Select your WatchKit Extension target, under Frameworks, Libraries and Embedded Content add the library

https://onmyway133.github.io/blog/How-to-use-Swift-package-manager-in-watchOS/