CocoaPods icon indicating copy to clipboard operation
CocoaPods copied to clipboard

Xcode 14 podspec lint error

Open saltcoffee opened this issue 2 years ago • 16 comments

I used pod spec lint command, it says

" 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). (in target 'App' from project 'App') "

the issues likes this one https://github.com/CocoaPods/CocoaPods/issues/11402, but all answers not work.

saltcoffee avatar Sep 19 '22 11:09 saltcoffee

Hi, Can you provide a example project?

xuzhongping avatar Sep 19 '22 12:09 xuzhongping

That should've been a warning. Not an error. By any chance do you support watchOS architecture? My error was that the watchOS simulator that was picked by the linter tool (fourflusher) wasn't paired with any iOS simulator. After pairing them with xcrun simctl pair <UUID> <UUID> I got it working.

moisesolmedo-okta avatar Sep 21 '22 19:09 moisesolmedo-okta

did you get this to work?

emmanueltugado avatar Oct 25 '22 11:10 emmanueltugado

Been having the same issue. None of the post_install scripts I've found seem to work. Everything builds fine in XCode, but pod trunk push fails.

- NOTE | [iOS] xcodebuild: error: 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). (in target 'App' from project 'App')

Current podfile: https://github.com/ObjectVoice/ObjectVoice-iOS-SDK/blob/0.1.16/Example/Podfile

ItsJamesTice avatar Nov 07 '22 04:11 ItsJamesTice

Experiencing the same issue as well

helloandrewpark avatar Dec 06 '22 22:12 helloandrewpark

My experience that root cause is your version cocoapods. I upgraded to version 1.11.3 and it worked without change any config.

y4gamilight avatar Dec 14 '22 03:12 y4gamilight

Add 'GENERATE_INFOPLIST_FILE' => 'YES' to podspec's user_target_xcconfig could solve this issue.

However, this might infect user's xcworkspace, thus, I only add this setting when running pod lint.

yzlai avatar Dec 14 '22 07:12 yzlai

My experience that root cause is your version cocoapods. I upgraded to version 1.11.3 and it worked without change any config.

Not working for me, I'm using 1.11.3. I resorted to below workaround by changing the build_settings to disable code signing as suggested here.

installer.generated_projects.each do |project|
      project.targets.each do |target|
        target.build_configurations.each do |config|
            config.build_settings['CODE_SIGNING_ALLOWED'] = 'NO'
          end
      end
    end

anniewey avatar Dec 15 '22 00:12 anniewey

This is fixed if you use the cocoapods version 1.11.3

ruimesquitafarfetch avatar Dec 19 '22 17:12 ruimesquitafarfetch

We also got the same error when we used 1.10.2. But this issue has been solved by simply updating to 1.11.3 for us.

Buju77 avatar Dec 23 '22 18:12 Buju77

Unfortunately I am getting this error, even though I'm running 1.11.3. I am just trying to use the standard library that you get with pod lib create MyLibrary. Any suggestions?

rob-deutsch avatar Feb 06 '23 12:02 rob-deutsch

Here's how to fix it.

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

https://stackoverflow.com/questions/73729653/xcode-14-cannot-code-sign-because-the-target-does-not-have-an-info-plist-file

Chauncy-Guo avatar Mar 13 '23 06:03 Chauncy-Guo

https://github.com/CocoaPods/CocoaPods/issues/11658#issuecomment-1573278854 This contains the screen print

AppSphere avatar Jun 02 '23 07:06 AppSphere

My experience that root cause is your version cocoapods. I upgraded to version 1.11.3 and it worked without change any config.

very good!

WCMYCML avatar Dec 22 '23 07:12 WCMYCML

I'm developing a pod and having the same issue (Cannot code sign because the target does not have an Info.plist file...) when running Cocoapods versions 1.11.3 (which is mentioned above to fix the error) or the latest 1.15.0.

Adding the following instruction to the Podspec "user_target_xcconfig": { "GENERATE_INFOPLIST_FILE": "YES" } resolves the linter issue, but I can't keep this instruction with yes-value in my lib's Podspec file since it interferes with other project settings.

Did 1.11.3 introduce changes to the configuration of the internal App project so that it has a Info.plist and it doesn't require GENERATE_INFOPLIST_FILE set to YES?

What is the solution to this issue?

RomanSlyepko avatar Feb 05 '24 14:02 RomanSlyepko

I'm developing a pod and having the same issue (Cannot code sign because the target does not have an Info.plist file...) when running Cocoapods versions 1.11.3 (which is mentioned above to fix the error) or the latest 1.15.0.

Adding the following instruction to the Podspec "user_target_xcconfig": { "GENERATE_INFOPLIST_FILE": "YES" } resolves the linter issue, but I can't keep this instruction with yes-value in my lib's Podspec file since it interferes with other project settings.

Did 1.11.3 introduce changes to the configuration of the internal App project so that it has a Info.plist and it doesn't require GENERATE_INFOPLIST_FILE set to YES?

What is the solution to this issue?

Same issue here.

B0janDS avatar Feb 06 '24 20:02 B0janDS