Code sign error : bundle format unrecognized, invalid, or unsuitable
IosSwiftIos8Xcode6Code SigningIos Problem Overview
Im working on an iOS app, Swift language, iOS8, Xcode 6.1. It was running fine on the iPad. Then I added a "Resource" folder reference to the project, after which I am getting the Code sign error.
The Resource folder contains some HTML files. I am not sure how this folder reference is causing this problem. Any help please?
Ios Solutions
Solution 1 - Ios
OK, solved it, This answer helped me.
I renamed the folder. Apparently Xcode does not like "Resources" file to be created manually.
Solution 2 - Ios
I have had this issue in two different projects, I done alot of the suggested stuff, cleared the DerivedData folder, re-installed pods etc.
In both projects it was complaining about a particular Pod and being unable to codesign it.
What fixed it for me was:
- Select the Pods Project
- In the main editor window, select the Pod in the targets dropdown
- Under the general tab, and under the identity header, click choose Info.plist file
- Select the plist file for the Pod
The project should now build. For some reason it seems to lose this setting, or not be able to reference it's own plist file.
This worked for me in both projects. Not 100% sure why, but I hope it helps someone else having the same issue.
Solution 3 - Ios
I have the same issue for some hours. But the following helped me.
- Delete Derived data
- Clean the project
Then running again, worked.
Solution 4 - Ios
Just in case someone else is having this issue: Make sure you didn't add a Static Framework into the "Embedded Binaries" section, only Dynamic Frameworks are required to be there.
Solution 5 - Ios
Clean Build Folder fixed this for me.
Solution 6 - Ios
Happened with me after a week of updating to Xcode 8.1, turns out I had to update cocoapods (sudo gem update cocoapods) and do pod install again to get it working.
Solution 7 - Ios
Addition to accepted answer I thought I should add this-
For me I am getting this error because Xcode-8 is actually using Test Target while running app on device. So if its the same then follow these steps:
Go to Edit Scheme in xcode -> In Build Target -> Remove MyProject.xctest completely or uncheck all the boxes of MyProject.xctest Analyze , Test etc..
Clean your project and then Run on the device.
PS: Answer is from this Link
Solution 8 - Ios
for me the problem was, in the info.plist, i forgot to update the url scheme to new bundle id
previous : com.test.app new : com.test.app1
this fixed the problem
Solution 9 - Ios
solved here
- make sure all frameworks used added to Embed Frameworks section in in build phases
- keep copy only when installing CHECKED on same section
good luck
Solution 10 - Ios
I know it's an old thread, but I just encountered this issue and none of the other answers helped. For me, this error occurred upon "Embed & Sign" of an old third-party framework, which I don't own. Looking inside that .framework
bundle, it did indeed have an incorrect directory format: the Versions/A/
directory was instead named Versions/1.0.0/
(the "1.0.0" of course being an arbitrary version number), which seems to confuse the CodeSign
command. So I did cd Versions
into the framework's directory, then mv 1.0.0 A
and ln -sf A Current
- after which the CodeSign and build succeeded.
Solution 11 - Ios
Problem started after upgrading to Xcode 8.1. My project utilizes CocoaPods. I had to delete the ./Pods
dir and run pod install
and pod update
(which updated Flurry-iOS-SDK to 7.8.1). Why? Because reasons.
Solution 12 - Ios
for me, after I upgraded my xcode to 8.1, similar problems occur. I have tried different ways, but seems update cocoapods to the lastest version is definitely worth to do at first. And then update pods with
pod install --verbose --no-repo-update
and
pod update --verbose --no-repo-update
would help.
Solution 13 - Ios
Experienced this issue after updating to Xcode 8.1. Simply updating cocoapods (by running 'sudo gem update cocoapods' in Terminal) fixed this issue for me
Solution 14 - Ios
For someone who like me, all the above solution can't work. You can double check your scheme name, there shouldn't be any space in there. Cocoapods can't handle scheme name with space with version 1.1.1. But I'm not sure why this happen only when I upgrade to Xcode 8.2. It worked pretty fine with Xcode 8.1.
It took me hours to figure out the issue. You can follow this thread
Hope this help.
Solution 15 - Ios
I had similar issue now and it has been actually caused by Fabric's Embed script and resolved by removing a space inside path to project file.
Having a perfectly buildable workspace in project folder called 'app-ios' I have made a copy named 'app-ios 2' and it was not possible to build that. codesign did report bundle format unrecognized, invalid, or unsuitable
and respective path was not to the bundle, but ended with /app-ios
instead of app-ios 2/DerivedData/...
After renaming the folder to app-ios-2
the workspace is buildable again.
Solution 16 - Ios
I had the same problem, and after unsuccessfully trying practically all solutions reported here, I found that simply deleting the product file (i.e. moving it to the trash in Finder) solved the problem for me.
Solution 17 - Ios
Had the problem on an app targeting MacOS (not iOS) using AppCode, but I believe that solution should work for all cases: In AppCode, just do a Run > Clean
before you build.