14

I am using cocoapods in my project and it was working fine but after upgrade to Xcode 14 it is giving different kind or errors.

Firstly it was asking for bit code and later asked for the development team which I resolved using following script in podfile

post_install do |installer|
  installer.pods_project.targets.each do |target|
    target.build_configurations.each do |config|
      #config.build_settings['BITCODE_GENERATION_MODE'] = 'bitcode'
      config.build_settings['ENABLE_BITCODE'] = 'YES'
      config.build_settings["DEVELOPMENT_TEAM"] = " Your Team ID "
    end
  end
end

After resolving those error another one has started to appear i.e.

error build: Cannot code sign because the target does not have an Info.plist file and one is not being generated automatically. Apply an Info.plist file to the target using the INFOPLIST_FILE build setting or generate one automatically by setting the GENERATE_INFOPLIST_FILE build setting to YES (recommended).

my pods are updated and cocoa pod version is 1.11.3. How can i resolve this error?

EDIT:

Some details are mentioned here but none is working for me.

Crazy Developer
  • 3,464
  • 3
  • 28
  • 62
Hassy
  • 5,068
  • 5
  • 38
  • 63
  • 1
    Hey Hassy! Do you have any news/updates? Thanks. – Alexander Khitev Oct 28 '22 at 10:36
  • Hey Hassy. Have you resolved this issue? – Amjad Tubasi Dec 03 '22 at 18:22
  • #Added for resolving xcode 14 cocoapods post_install do |installer| installer.pods_project.targets.each do |target| if target.respond_to?(:product_type) and target.product_type == "com.apple.product-type.bundle" target.build_configurations.each do |config| config.build_settings['CODE_SIGNING_ALLOWED'] = 'NO' end end end end I have added above in pod file just before the last end of pod file. – Hassy Dec 05 '22 at 11:28
  • Further I have disabled the bitcode in my projects as it is not required now in most of the cases. Apple have removed it as required. I was using bit code for Dsym symbols which do not require bitcode for now. You can check details https://stackoverflow.com/questions/72543728/xcode-14-deprecates-bitcode-but-why – Hassy Dec 05 '22 at 11:28
  • When i build it for real device all working fine. but when build for simulator it has the above issue – Engr.Aftab Ufaq Jun 07 '23 at 09:04

4 Answers4

25

I Solved it making this change:

Pods -> Build Settings -> Packaging -> Generate Info.plist File = Yes

  • I had a similar issue and also had to do the same thing on the app project, selecting the specific build target (also select the "All" tab and use the filter box if having a hard time finding the "Generate Info.plist File" item). Changing these settings adds `GENERATE_INFOPLIST_FILE = YES;` lines to the `.pbxproj` files that can be committed. – user56reinstatemonica8 Apr 14 '23 at 13:54
  • When i build it for real device all working fine. but when build for simulator it has the above issue – Engr.Aftab Ufaq Jun 07 '23 at 09:05
  • @Engr.AftabUfaqey, sorry for late response... to solve that error you need upgrade your project because React-codegen have some issues, solved in 0.70.8 and in Podfile add this in post install: installer.pods_project.targets.each do |t| t.build_configurations.each do |config| config.build_settings['ONLY_ACTIVE_ARCH'] = 'NO' end end – lucas emanuel himelfarb Jul 19 '23 at 14:23
5

This hack(i.e. setting CODE_SIGNING_ALLOWED to NO for pod's build setting) fixed for me.

3

In my case I solved it adding the Info.plist path to: Pods -> Build Settings -> Packaging -> Info.plist File

fabio
  • 43
  • 7
0

All the above solution not worked for me. the final solution that had worked for me is that. Pod -> Build Setting -> Generate Info.plist to NO And React-Codegen to YES

Engr.Aftab Ufaq
  • 3,356
  • 3
  • 21
  • 47