简体   繁体   中英

Why does Acknowledgements.plist from CocoaPods look messed up on iOS 9 and what can you do about it?

CocoaPods auto-generates the Acknowledgements.plist file so that you can include that in your settings.bundle.

Following this , I have added Acknowledgements.plist into settings.bundle.

Acknowledgements.plist looks like this:

在此输入图像描述

This appears nicely on iOS 8 like this (as intended):

在此输入图像描述

However, iOS 9 inserts big blank spaces between title and footerText, which makes it ugly:

在此输入图像描述

It looks like this is not this file (Acknowledgements) specific and iOS 9 in general puts huge vertical spaces between title and footerText. The question is, how can you solve this situation and put nicely formatted Acknowledgements in plist?

Good observation! I noticed the same some time ago, too. Hoped that this was already fixed.

Investigation
For me some footer texts are shown correctly. Those were very short, like just two lines. The longer the FooterText is, the larger is the empty space. Eg Realm Database has a very long license text which leads to an empty space larger than one single device screen after its title and before its Footer.

I edited the Acknowledgements.plist manually to see if the line breaks make a difference: While keeping the text as long as it is I removed the line breaks.

Results
Unfortunately removing the line breaks does not help. So it's really related to the content length. Looks like it's a TableView and the row height calculation is just far off.

However, I didn't find any workaround. Title key is limited in its length so this cannot be used as a workaround. FooterText really needs to be fixed by Apple.

I filed it under rdar://24837397

There are several other bugs in the System Settings.app which are disturbing during development:

  • (Crash) Open the Acknowledgements section of your App. Run a new debug build of your App via Xcode and try to switch back to the Settings.app. Due to copying a new Settings.bundle with updated Acknowledgements.plist the Settings.app crashes.
  • (Missing content) Open Device Settings and scroll to your App's settings, but do not open them yet. Repeat the step from above and run a new debug build via Xcode. Switch back to Settings.app and try opening your App settings: Empty settings page shown, only permissions like Core Location and Mobile Data are available. You have to close Settings.app via the task switcher to see the new content of your Settings.bundle.

Beside those two bugs it drives me nuts that Settings.app doesn't have a section index. Scrolling to my own Apps during development is an unnecessary waste of time.. I know about the new search but that's also slower that an index just for the 3rd party Apps.

Edit: If you stumble upon this, please file a Radar too! This is important to really get it fixed, see https://blackpixel.com/writing/2012/02/radar-or-gtfo.html .

This is a bug in iOS 9, the problem has been fixed in iOS 10. Unfortunately nothing can be done for users that are still running iOS 9.

If you're using CocoaPods or Carthage, AckAck works well to generate the Acknowledgements plist for you. It removes unnecessary line breaks/indentation and generates a separate plist for each framework (making it less of an issue on iOS 9).

https://github.com/Building42/AckAck

(I'm the creator of AckAck)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM