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

fix PromisesSwift cannot be integrated as static libraries #181

Closed faimin closed 2 years ago

faimin commented 2 years ago
[!] The following Swift pods cannot yet be integrated as static libraries:

The Swift pod `PromisesSwift` depends upon `PromisesObjC`, which does not define modules. To opt into those targets generating module maps (which is necessary to import them from Swift when building as static libraries), you may set `use_modular_headers!` globally in your Podfile, or specify `:modular_headers => true` for particular dependencies.

now PromisesSwift can be integrated as static libraries with CocoaPods.

ykjchen commented 2 years ago

Thanks for the change, I'll handle versioning this weekend.

ykjchen commented 2 years ago

Ran into some issues during pod lib lint after updating Cocoapods and Xcode:

    In file included from /Users/joseph/workspace/google/promises/Tests/FBLPromisesTests/FBLPromiseTests.m:19:
    /Users/joseph/workspace/google/promises/Sources/FBLPromises/include/FBLPromise+Testing.h:34:56: error: property has a previous declaration
    @property(class, nonatomic, readonly) dispatch_group_t dispatchGroup NS_REFINED_FOR_SWIFT;
                                                           ^
    In module 'FBLPromises' imported from /Users/joseph/workspace/google/promises/Sources/FBLPromises/include/FBLPromise+Testing.h:17:
    /Users/joseph/workspace/google/promises/Sources/FBLPromises/include/FBLPromise+Testing.h:34:56: note: property declared here
    @property(class, nonatomic, readonly) dispatch_group_t dispatchGroup NS_REFINED_FOR_SWIFT;

Will need some more time to debug.

faimin commented 2 years ago

Ran into some issues during pod lib lint after updating Cocoapods and Xcode:

    In file included from /Users/joseph/workspace/google/promises/Tests/FBLPromisesTests/FBLPromiseTests.m:19:
    /Users/joseph/workspace/google/promises/Sources/FBLPromises/include/FBLPromise+Testing.h:34:56: error: property has a previous declaration
    @property(class, nonatomic, readonly) dispatch_group_t dispatchGroup NS_REFINED_FOR_SWIFT;
                                                           ^
    In module 'FBLPromises' imported from /Users/joseph/workspace/google/promises/Sources/FBLPromises/include/FBLPromise+Testing.h:17:
    /Users/joseph/workspace/google/promises/Sources/FBLPromises/include/FBLPromise+Testing.h:34:56: note: property declared here
    @property(class, nonatomic, readonly) dispatch_group_t dispatchGroup NS_REFINED_FOR_SWIFT;

Will need some more time to debug.

Sorry, I just saw it. I tried with pod :git => 'xx' in Xcode project before open this pr and it's ok. not tried pod lib lint. I open a new #182 to solve the lint error. @ykjchen

imekinox commented 1 year ago

I fixed by doing:

pod 'PromisesObjC', :modular_headers => true