Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to link binary from spm #1089

Open
mostafa-v opened this issue May 26, 2024 · 4 comments
Open

Unable to link binary from spm #1089

mostafa-v opened this issue May 26, 2024 · 4 comments
Assignees
Labels
question Further information is requested

Comments

@mostafa-v
Copy link

Hi
I want to integrate a package into my project. here are the steps:

Swift Package Manager

1. Add package to your project

2. Add -ObjC to OTHER_LDFLAGS

3. Ensure that your target is linked binary with YandexMobileAdsPackge (Your target -> Build Phases -> Link Binary With Libraries)

4. Add MobileAdsBundle.bundle from YandexMobileAds (Package Dependencies -> YandexMobileAdsPackage -> Referenced Binaries -> YandexMobileAds) to Copy Bundle Resource phase (Your target -> Build Phases -> Copy Bundle Resource)

5. Build and run.

https://github.com/yandexmobile/yandex-ads-sdk-ios

I have successfully did step 1 and 2. But I don't have any clue how to do step 3 and 4. and without doing them, I got lots of link errors in my build (which probably because I didn't do step 3).

I have successfully integrated other packages into my project, but all of them needed steps like step 1 and 2 and no steps like step 3 and 4.

@cgrindel cgrindel added the question Further information is requested label Jun 1, 2024
@cgrindel cgrindel self-assigned this Jun 1, 2024
@cgrindel
Copy link
Owner

cgrindel commented Jun 1, 2024

For step 3, I believe that they are just saying that you need to reference the package in your project. The equivalent in Bazel is to reference the Bazel target for a product in the package in one of your swift_xxx targets.

For step 4, I believe that this is about how the resource bundle is packaged in the output. What are you building? iOS app?

@brentleyjones @luispadron Do you have any suggestions for @mostafa-v ?

@luispadron
Copy link
Collaborator

I agree that 3 - 4 just mean using those targets in the product you're building, more info on what kind of product would help.

@mostafa-v
Copy link
Author

the whole project is ios app, but I add this package in a swift_library deps.

@cgrindel
Copy link
Owner

cgrindel commented Jun 1, 2024

If you could provide a repro or at least more information about the errors, that could help use provide some advice.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants