-
Notifications
You must be signed in to change notification settings - Fork 122
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
0.24.1 Change Causing -> iOS "Bundle with identifier *** not found" Error #747
Comments
I am also experiencing the same issue with the error |
hi @mattjung ! thx for analysis. can you please create reproducer of itssue from some sample? to deploy fix we should reproduce issue first |
Hello, @Alex009 I reproduced this error in my work project and also in ios-cocoapods-static-framework. So the main step is to create build configuration for xcode project, for example Debug_beta, Release_beta. Switching to Debug_beta and get this error. I hope this helps. I struggled with this bug in a long time, but didn't find time to create project with this error. |
I also want to add that we have the same issue when using SwiftUI previews and running unit tests. In these cases, the main bundle isn't the expected It would be great if we could configure the bundle path for these scenarios. And if the bundle path isn't provided then default to the main bundle. |
If you need another example, you can find it here: https://github.com/Egi10/resources. I have also experienced the same issue with this. |
I also think this is related with my |
I face same issue with SwiftUI previews in Framework Projects (bundle with identifier *** not found). App runs ok and all resources available. My projects structure (using framework, not cocoapods)
Nothing helps. Also adding resources as described in README.md not working. I written workaround for my project:
In xcode framework define method that will set nsBundle from code above:
And just call
That's all. Now previews are working in frameworks. |
issue also can be related to #762 |
i check details of issue and i think fix from 0.24.3 will not help. so i move this issue to next milestone |
@MAX-POLKOVNIK, Hi! I faced the same problem and decided to try your solution. After I overload the standard loadBundle method, my iOS project stops building. Haven't you had this? Maybe I'm putting the file with this code in the wrong place Where exactly do I need to create this file with method overloading for everything to work correctly? |
@TemaTerbi Hi. There is my project. I updated logic to search all available frameworks for bundle so I don't need any more to set nsBundle from ios. You can see logic here
Is there any error in build logs? It's hard to say what went wrong. Location of this file is not important. Important things are: same package name in file like in moko, same signature of method like in moko. This method might be not working with new K2 compiler (I'm not tested yet) |
@TemaTerbi Found your project on github thanks! Updated project - |
@MAX-POLKOVNIK OMG!!!! Is finally working!!!!!!! Thank you very match, u are my super hero))))) @Alex009 could this particular workaround help resolve the issues? |
Hi, we are experiencing the following error:
kotlin.IllegalArgumentException: bundle with identifier *** not found
We think it's due to the following changes introduced in
0.24.1
:https://github.com/icerockdev/moko-resources/pull/715/files#diff-74b2961a5d6d48ad53d5ab6e4529f3688bdae02391f7d66628bdb6086a06854eL14-L16
This change limits the use of bundles to be in the main bundle only.
We encounter the crash when attempting to access
MR.strings()
in a framework while running unit tests against the framework target. We are usingcopyFrameworkResourcesToApp
in a build phase for the framework target using$CONTENTS_FOLDER_PATH
, which, in this case, points to the framework product and not the path for the main bundle.Could you revert the line change from the PR or make it possible to inject a path to the moko-generated bundle via the moko plugin or some other method?
The text was updated successfully, but these errors were encountered: