-
Notifications
You must be signed in to change notification settings - Fork 736
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
Storyboard.swift and symbol(s) not found for architecture, only in Release #57
Comments
Maybe related to #56 (I mean, that might be a compiler bug due to Whole Module Optimization turned on)? |
Note that in the meantime, until Apple fixes that bug, you can disable WMO in your Release build to workaround this linker bug. |
Unfortunately I didn't have WMO enabled 😕 |
@alessandroorru I can't reproduce the issue on a simple project here. Could you create a sample project to demonstrate the issue and help us reproduce? |
@AliSoftware sure! Here is a sample project. The scheme setting is already set at "Release" also for running in simulator, so if you just press play you should see it fail. If you change it back to "Debug" it will work as expected. BTW, I'm using Xcode 7.1.1 (7B1005), so the last stable version. Let me know if it fails also for you.. hope it helps ;) https://www.dropbox.com/s/v4rm0w11q2x2go9/TestFailingSwiftgen.zip?dl=1 |
I hit this bug too. I also did not have the whole module optimiser enabled, but just set to the default for release builds (Fast [-O]). When I disabled the optimiser, I no longer encountered the error. |
Ah thx for the feedback @jmacmullin that's definitely worth filing a dedicated radar to Apple! |
Ok so I can confirm that:
(†) For the second workaround, the fix consists of generating top-level |
What names should the top level structs have? Calling them UIXXX seems risky and UIStoryboardSegue already exists, obviously. I was thinking to drop the UI prefix. I need this too, so I'll just fix it if no one else has. :) |
@ryanbooker One can always choose different enum names using the |
I'm currently having an issue with generated Storyboard.swift code, but only in release mode. I'm using Xcode 7.1, targeting iOS 9 just for iOS.
The affected code is the call to
initialViewController()
, while using other methods works fine.For example in my case:
let navigationController = UIStoryboard.Scene.Main.initialViewController() as! UINavigationController
.Building for archive spits out this error:
I don't know if this is just a compiler bug due to a specific optimization flag or if it is related to swiftgen. Anyone else is having the same issue?
The text was updated successfully, but these errors were encountered: