Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Code Sign Issue with Swift project

I have .p12 certificate installed and a provisioning profile. When i Run the Project Created in Objective -C , it runs perfectly fine in my iOS Device(ver 7.1) but when I run Project created in Swift it throws me an Code sign error as:

Couldn't codesign /Users/sulabh/Library/Developer/Xcode/DerivedData/FacebookTutorial-fcrwkfacnatqsfcowdihbdhybvhz/Build/Products/Debug-iphoneos/FacebookTutorial.app/Frameworks/libswiftCore.dylib: codesign failed with exit code 1 Command /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift-stdlib-tool failed with exit code 1

I have tried reinstalling xcode, and removing certificate from keychain, changing Build setting. but nothing works for Swift project. What is the issue and how could I resolve it?

like image 302
sulabh Avatar asked Dec 19 '22 03:12

sulabh


2 Answers

You need to re-generate your provisioning profile from Apple Developer Center. As far as I know they add something new to profiles and that causes the problem.

like image 169
Mert Buran Avatar answered Jan 02 '23 00:01

Mert Buran


For me, the problem was that I forgot to install my new provisioning profile after downloading it. I just had to click on it to open it in Keychain Access and all of a sudden the problem was fixed.

like image 24
bkSwifty Avatar answered Jan 01 '23 23:01

bkSwifty