No code signature found after pod installed in Xcode 8

匿名 (未验证) 提交于 2019-12-03 01:25:01

问题:

My test project running successfully in my physical device(iPhone).But, After I installed a pod into my project.I am getting error saying NO CODE SIGNATURE FOUND.I found some article related to the issue.https://michiganlabs.com/ios/development/2015/11/30/code-sign-error-building-cocoapods-framework-targets/ The article suggest that need to be include some code signing bypass to the pod file as below

  post_install do |installer|    installer.pods_project.targets.each do |target|     target.build_configurations.each do |config|         config.build_settings['EXPANDED_CODE_SIGN_IDENTITY'] = ""         config.build_settings['CODE_SIGNING_REQUIRED'] = "NO"         config.build_settings['CODE_SIGNING_ALLOWED'] = "NO"     end    end  end

Code didn't fix the issue.Thanks in advance....

回答1:

From Rashwan L answer. I tried those 3 steps. But, It didn't solved my problem.May be it could works for different scenario.I was reading the same article link is in the post.Article mentioned the error can be solved by either code signing the pod project or bypass code signing to modify the pod file.

As soon as,I code signed the pod project.Everything start working on a first go...

Article Info as below:

Swift Framework Libraries Require Code Signing but NOT Objective-C

Digging into the problem a bit further, we discovered that the new Swift framework was building properly and just the pre-existing Objective-C Pods (formerly static libraries) were failing with the Code Sign Error. Time to hit the Google! After much research on CocoaPods GitHub Issues page and looking over some similar problems with the latest iOS/OS X dependency manager Carthage, I realized that the Objective-C libraries should NOT be getting code signed. Swift frameworks require code signing because they embed the Swift standard library and runtime, enabling use of older Swift code in a newer project. Apple requires Code Signing to verify the runtime code that’s being copied into an iOS app (helps enforce the iOS security sandbox). The old school Objective-C static libraries do not need this and actually do not even support it, hence the weird build error about “No signing identities matching team ID (null).”

The Solution - Disable Code Signing One solution would be to manually edit each Pod library target and disable Code Signing. Not a great option since those build settings will be re-created each time pod install is re-run. After perusing the CocoaPods documentation, we found the solution. A “Post Install” script that modifies the Pod targets before they are saved to disk (and integrated into the Xcode Workspace.) We manually disable Code Signing via the appropriate Build Settings for each of the Pod dependencies. Add this to the bottom of your Podfile and your Code Signing error will be resolved!

  post_install do |installer|     installer.pods_project.targets.each do |target|       target.build_configurations.each do |config|         config.build_settings['EXPANDED_CODE_SIGN_IDENTITY'] = ""         config.build_settings['CODE_SIGNING_REQUIRED'] = "NO"         config.build_settings['CODE_SIGNING_ALLOWED'] = "NO"        end     end   end

I hope, This answer will helps someone...



标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!