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

sample app crashing using xcframework + bazel #32

Closed
johndpope opened this issue Sep 5, 2022 · 0 comments
Closed

sample app crashing using xcframework + bazel #32

johndpope opened this issue Sep 5, 2022 · 0 comments

Comments

@johndpope
Copy link

johndpope commented Sep 5, 2022

I've isolated the class - and made a complete minimal example using bazel.

git clone https://github.com/wweevv-johndpope/DemoBazel/tree/supabase
./xcodegen app

you may need to enable auto signing of app

Screen Shot 2022-09-05 at 10 19 59 pm

Please help - I'm a bit behind on timelines because of this crash.

related - duplicated
binaryscraping/swift-composable-keychain#1

(it seems like because the xcframework is not around - the keychain is deallocated - and not retaining itself?)
I'm not sure the approach using self inside xcframework is doable?

UPDATE
I made this cheatsheet for bazel + XCFRAMEWORKS
there's a way to do xcframeworks via zip + sha - but for now just dumping them into repo works for me.
https://docs.google.com/presentation/d/1ZYwyA_zHjDugt4UH-APJt4qBSt_fbY_286WrgFQvdfA/edit#slide=id.p

related
supabase/supabase-swift#38

I don't know why the zombies doesn't work for these xcframeworks... that should stop the deallocation - and allow app to continue...
Screen Shot 2022-09-05 at 10 43 56 pm

UPDATE
I made some effort to rewire the classes so that a chunk is instantiate from swift file locally from app.
Good news is - it doesn't crash.

https://github.com/wweevv-johndpope/DemoBazel/tree/gotrue-swift

it's less than ideal - but can live with it for time being.
So there's no supabase.xcframework
and there's no gotrue.xcframework

The BUILD files x2 compile the swift files

Screen Shot 2022-09-05 at 11 36 26 pm

https://github.com/wweevv-johndpope/DemoBazel/tree/gotrue-swift/GoTrue

https://github.com/wweevv-johndpope/DemoBazel/tree/gotrue-swift/Thirdparty/Supabase

not the bundle is dirty and there's problem some clean up necessary but it's working locally.
We need to get the classes working within framework.

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

2 participants