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

Bundle.module が呼ばれない理由の調査 #43

Open
crane-hiromu opened this issue Sep 3, 2022 · 5 comments
Open

Bundle.module が呼ばれない理由の調査 #43

crane-hiromu opened this issue Sep 3, 2022 · 5 comments
Assignees
Labels
bug Something isn't working

Comments

@crane-hiromu
Copy link
Owner

crane-hiromu commented Sep 3, 2022

#39 のスレッドにメモ記載

@crane-hiromu
Copy link
Owner Author

これができれば、ライセンスも対応できる(はず)

@crane-hiromu crane-hiromu self-assigned this Sep 7, 2022
@crane-hiromu
Copy link
Owner Author

crane-hiromu commented Sep 7, 2022

1回戻してみて問題なさそうなら stencil を削除する
-> OK

@crane-hiromu
Copy link
Owner Author

crane-hiromu commented Sep 7, 2022

clone もテストする
-> OK

@crane-hiromu
Copy link
Owner Author

Swift Playgrounds では動作する🙆‍♂️
Xcode では動作しない🙅‍♂️

そのためPRをrevertして、チケットはreopenした。

@crane-hiromu crane-hiromu removed this from the 1.5.1 milestone Sep 8, 2022
@crane-hiromu
Copy link
Owner Author

crane-hiromu commented Sep 8, 2022

https://qiita.com/kazuhiro4949/items/0378e163fa00a79eb00a

SwiftPM専用のものなのでXcode上で直接呼び出してもエラーになってしまいます。使うときは↓のようにします。

#if SWIFT_PACKAGE
return Bundle.module
#else
return Bundle(for: HogeViewController.self)
#endif

この辺りもSwiftPM用にコードの書き換えが必要になってくるため、ちょっと面倒なところではあります。

Xcode でも SPM プロジェクト(Swift Playgrounds 製アプリ)は SWIFT_PACKAGE 側を通ってしまう模様

@crane-hiromu crane-hiromu added the bug Something isn't working label Sep 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant