CocoaPods/CocoaPods

Cannot set the CFBundleDevelopmentRegion in Info.plist of resource bundles

Aberta

#7.486 aberto em 7 de mar. de 2018

 (10 comentários) (0 reação) (0 responsável)Ruby (2.685 forks)batch import
d2:moderatehelp wanteds7:workaround availablet1:enhancement

Métricas do repositório

Stars
 (14.815 estrelas)
Métricas de merge de PR
 (Nenhuma PRs mesclada em 30d)

Description

Report

What did you do?

Clone the lastest CocoaPods project to review the resource bundle's Info.plist's generate rules. Check the issue list.

What did you expect to happen?

Apply the app target's development region to all the pods' resource bundle.

What happened instead?

The CFBundleDevelopmentRegion key in Info.plist is set to en with a default key.

CocoaPods Environment

Stack

   CocoaPods : 1.3.1
        Ruby : ruby 2.4.1p111 (2017-03-22 revision 58053) [x86_64-darwin16]
    RubyGems : 2.6.13
        Host : Mac OS X 10.12.6 (16G29)
       Xcode : 9.2 (9C40b)
         Git : git version 2.14.3 (Apple Git-98)
Ruby lib dir : /Users/hanwei/.rvm/rubies/ruby-2.4.1/lib
Repositories : bitbucket - https://bitbucket.org/UItachi/specs.git @ 6aa9c96ed1c82b32f906285dc004c0a50bc16666
               master - https://github.com/CocoaPods/Specs.git @ bec882057e88704a796126484d0e627b654b43eb

Installation Source

Executable Path: /Users/hanwei/.rvm/gems/ruby-2.4.1/bin/pod

Plugins

cocoapods-deintegrate : 1.0.1
cocoapods-plugins     : 1.0.0
cocoapods-search      : 1.0.0
cocoapods-stats       : 1.0.0
cocoapods-trunk       : 1.3.0
cocoapods-try         : 1.1.0

...

Project that demonstrates the issue

I found the onepassword-app-extension has the same issue there.


Additional

I found this issue is the starter, resource bundle needs an Info.plist as a standard. For the CFBundleDevelopmentRegion key, the region will be used in some system API to localize some identifiers like UIBarButtonSystemItemDone and UIBarButtonSystemItemCancel in pod projects.

Currently, the https://github.com/CocoaPods/CocoaPods/blob/3edf0f3fdc4e34327e5a9507b4d933fd325339b8/lib/cocoapods/generator/info_plist_file.rb#L105 uses the en for all the cases, this should be configurable like a property in cocoapods.

I'm not good at ruby here, sorry! Please confirm this, thanks! Besides, I'm happy for that there are some official post_install hooks, too.

Guia do colaborador