facebook / facebook/facebook-ios-sdk
"No such module 'FBSDKCoreKit'" when building the gaming services Swift package product
- Dominant language
- Swift
- Stars
- 8.1k
- Forks
- 3.7k
- PR merge metrics
- No merged PRs in 30d
Description
### Checklist before submitting a bug report
- [X] I've updated to the latest released version of the SDK
- [X] I've searched for existing [GitHub issues](https://github.com/facebook/facebook-ios-sdk/issues)
- [X] I've looked for existing answers on [Stack Overflow](https://facebook.stackoverflow.com), the [Facebook Developer Community Forum](https://developers.facebook.com/community/) and the [Facebook Developers Group](https://www.facebook.com/groups/fbdevelopers)
- [X] I've read the [Code of Conduct](https://github.com/facebook/facebook-ios-sdk/blob/main/CODE_OF_CONDUCT.md)
- [X] This issue is not security related and can safely be disclosed publicly on GitHub
### Xcode version
14.2
### Facebook iOS SDK version
16.0.1
### Dependency Manager
SPM
### SDK Framework
Gaming Services
### Goals
Be able to use the fb ios sdk as a Swift package dependency without compile errors.
### Expected results
The sdk does not create build errors when incorporating as a Swift package into a project.
### Actual results
Instead of building clean we get these errors:
`FBSDKGamingServicesKit.framework/Modules/FBSDKGamingServicesKit.swiftmodule/arm64-apple-ios.private.swiftinterface:5:8: No such module 'FBSDKCoreKit'`
`FBSDKShareKit.framework/Modules/FBSDKShareKit.swiftmodule/arm64-apple-ios.private.swiftinterface:5:8: No such module 'FBSDKCoreKit'`
`SourcePackages/checkouts/facebook-ios-sdk/Sources/FacebookGamingServices/Exports.swift:10:19: Failed to build module 'FBSDKGamingServicesKit' for importation due to the errors above; the textual interface may be broken by project issues or a compiler bug`
Building a second time will generally work.
### Steps to reproduce
This can be reproduced in an app project and just using the standalone project in Xcode.
### App
1. Add the sdk as a package dependency to an app project
2. Link all the products (basics, core, )
3. Archive the app
4. Notice the build errors
5. Close the project, open it again, archive again
6. Notice it works
7. Close the project, delete derived data, open the project, archive again
8. Notice it fails
### Package
1. Check out the sdk repo
2. Open the package in Xcode
3. Select the gaming services scheme and build
4. Notice the build errors
### Code samples & details
```swift
// INSERT YOUR CODE HERE
var example = "Example code"
```
Contributor guide
Assessment
This issue has not been assessed yet.