I made a package that depends on GoogleMobileAds. I used to add my package as dependency on my apps and it used to load GoogleMobileAds. Something changed now and I observe this behaviour:
- Swift Package compiles without error.
- When I add package to my project (through Github), GoogleMobileAds and GoogleUserMessagingPlatform (dependency of GoogleMobileAds) are loaded and I can see them on the “Package Dependencies” section on the left.
- After adding my package, my project does not compile anymore with error messages: 1) “Undefined symbols:”, and “Linker command failed with exit code 1”
When I navigate to target –> Frameworks, Libraries, and Embedded Content, I can not find GoogleMobileAds there..
Here is my Package.swift
let package = Package(
name: "MikrasyaLibraryAds",
platforms: [.iOS(.v15)],
products: [
.library(
name: "MikrasyaLibraryAds",
targets: ["MikrasyaLibraryAds"]),
],
dependencies: [
.package(url: "https://github.com/googleads/swift-package-manager-google-mobile-ads.git", branch: "main"),
],
targets: [
.target(
name: "MikrasyaLibraryAds",
dependencies: [ .product(name: "GoogleMobileAds", package: "swift-package-manager-google-mobile-ads"),
]
),
]
)
Thank you..