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

Adding Firebase to Bazel project #1091

Closed
vchernyshov opened this issue Feb 24, 2021 · 4 comments
Closed

Adding Firebase to Bazel project #1091

vchernyshov opened this issue Feb 24, 2021 · 4 comments

Comments

@vchernyshov
Copy link

Hello, I have a Bazel iOS project and I need to add Firebase dependency.
Firebase provided as a zip with set of Xcode frameworks.
I'm trying to add it like this:
`
apple_static_framework_import(
name = "BoringSSLGRPC",
framework_imports = glob(["BoringSSL-GRPC.xcframework/ios-arm64_i386_x86_64-simulator/BoringSSL-GRPC.framework/**"]),
visibility = [
"//visibility:public",
],
)

apple_static_framework_import(
name = "FirebaseAnalytics",
framework_imports = glob(["FirebaseAnalytics.xcframework/ios-arm64_i386_x86_64-simulator/FirebaseAnalytics.framework/**"]),
visibility = ["//visibility:public"],
)`

Bazel generates Xcode project but error occurred when I build the project:
/var/tmp/_bazel_vchernyshov/8432bf40a9c3dc219067a8a2fb9ccda3/execroot/__main__/submodules/Pods/BoringSSL-GRPC.xcframework/ios-arm64_i386_x86_64-simulator/BoringSSL-GRPC.framework/Modules/module.modulemap:1:27: Skipping stray token
/var/tmp/_bazel_vchernyshov/8432bf40a9c3dc219067a8a2fb9ccda3/execroot/__main__/submodules/Pods/BoringSSL-GRPC.xcframework/ios-arm64_i386_x86_64-simulator/BoringSSL-GRPC.framework/Modules/module.modulemap:1:28: Expected '{' to start module 'BoringSSL'

Could say what I'm doing wrong?

@brentleyjones
Copy link
Collaborator

xcframeworks are currently not supported:

@vchernyshov
Copy link
Author

vchernyshov commented Feb 24, 2021

@brentleyjones so Bazel can't read such path:
BoringSSL-GRPC.xcframework/ios-arm64_i386_x86_64-simulator/BoringSSL-GRPC.framework/**?

if I put content from ios-arm64_i386_x86_64-simulator/BoringSSL-GRPC.framework/ to folder BoringSSL-GRPC without xcframework could this helps me?

@tinder-maxwellelliott
Copy link

tinder-maxwellelliott commented May 21, 2021

if I put content from ios-arm64_i386_x86_64-simulator/BoringSSL-GRPC.framework/ to folder BoringSSL-GRPC without xcframework could this helps me?

Can you put together a small example repo that reproduces this issue?

@thii
Copy link
Member

thii commented Feb 3, 2022

This is possible now with the new apple_static_xcframework_import rule.

apple_static_framework_import(
  name = "FirebaseAnalytics",
  xcframework_imports = glob(["FirebaseAnalytics.xcframework/**"]),
  visibility = ["//visibility:public"],
)

@thii thii closed this as completed Feb 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants