Base internationalization and multiple storyboard not working right

后端 未结 11 1812
遇见更好的自我
遇见更好的自我 2020-12-14 19:50

I\'m playing with multiple storyboards and base localization on xCode 4.6. In fact I

I did:

1) edit my project infos localisations: checked \"Use Base Inter

相关标签:
11条回答
  • 2020-12-14 20:20

    You get this error because for iOS 6 (which is required for Base Internationalization) the storyboard file gets compiled into a storyboardc file. Also it copies the strings files belonging to it to the target. Thus on an iOS 6 device there IS no .storyboard file.

    To get a storyboard file compiled you need to make sure that is in the Copy Bundle Resources build phase. Then the storyboard compiler (see build rules) kicks in and should compile it. If not, then this is a bug and you should report it.

    0 讨论(0)
  • 2020-12-14 20:28

    Since this was a warning and not an error, I didn’t think it would be a problem at first, but eventually it was my only load. In the right sidebar, leftmost option (the icon that looks like a document), I saw a Localization section with two checkboxes, Base and English. Base was checked and English unchecked.

    enter image description here

    Instead, I checked English, then changed the dropdown to Interface Builder. Then I unchecked Base.

    enter image description here

    When I checked the Build Rule again, Main.storyboard was no longer red. And when I tried to run the app in the 5.1 simulator again, it came up just fine. Note: just checking English/Interface Builder is enough to get the app to run in iOS 5.1, but then you’ll run into an issue where updates to the Storyboard won’t be reflected. You need to uncheck Base so that English is the only version of the storyboard there is; that way updates will always be reflected as soon as you rerun.

    0 讨论(0)
  • 2020-12-14 20:31

    I fixed the issue by dragging my story board into finder, then deleting the one in the Xcode side panel, then re-adding the one I originally dragged to finder back into the Xcode side panel. THEN removing the old RED storyboard file in "copy bundle resources" and adding the new one manually by dragging it in.

    0 讨论(0)
  • 2020-12-14 20:31

    Base Internationalization is only supported on iOS 6.

    I encountered the same problem as you, but worse, because I didn't test on iOS 5. I only knew about this after knowing many of my users experienced crashes.

    So, take heed.

    There are details on my blog about this. As you already know, xib still works. Therefore, convert all strings to xib (isn't hard at all).

    0 讨论(0)
  • 2020-12-14 20:32

    I faced the same problem and spend 2 days to resolve it.

    Of course I tried all things above, like: cleaning project, reseting Content and Settings in iOS Simulator, deleting all files in /Users/YourUsername/Library/Application Support/iPhone Simulator, deleting all files in /Users/YourUsername/Library/Developer/Xcode/DerivedData, deleting App in iOS device

    and nothing helps me to resolve my problem - Storyboard localisation using Base Internationalization + Storyboard.strings doesn't compiles localised Storyboards.

    And the reason was that the project previously was targeted for iOS 5.1 but now for iOS 6.1. After changing Project Deployment Target I forgot to change the Compiling settings in storyboard.

    What helps me - just change "Builds for" to at least "iOS6.1 and Later" in File Inspector of your storyboard.

    enter image description here

    0 讨论(0)
  • 2020-12-14 20:32

    Inside the storyboard localization settings, try remove the check next to the 'Base' option. It's not supported under iOS6

    0 讨论(0)
提交回复
热议问题