12

enter image description here

Xcode:8.1

language:Objective-C

I can run the project on my iPhone, but can't run on the simulator.

I tried:

1)deleting all data of the DerivedData folder

2)cleaning the project and restart the project.

3)deleting the resources folder.

but that didn't work!

Chris Harrison
  • 5,512
  • 3
  • 28
  • 36
fzh
  • 688
  • 1
  • 6
  • 14
  • [This](http://stackoverflow.com/a/38905949/1126520) answer worked for me for cocoapods version - 1.1.0 – sco Nov 04 '16 at 08:39

6 Answers6

16

For those for whom updating Cocoapods or reverting Xcode to 8.0 is not an option, here is a solution that worked for me:

  1. Right click on Pods in the Project Navigator
  2. Click New File...
  3. Select Property List
  4. Save the file under the name Pods-Info.plist (for example) and leave it empty
  5. Select Pods in the Project Navigator
  6. Select the Pods project, then Build Settings
  7. Search for Info.plist
  8. Set the value of Info.plist File to Pods-Info.plist
Loïc Gardiol
  • 361
  • 3
  • 7
7

Are you using CocoaPods? Updating CocoaPods itself + then all the pods worked from me.

Note: this is right after the Xcode autoupdate today.

Airman00
  • 306
  • 5
  • 12
  • 1
    Does anyone have an alternative? Updating CocoaPods creates too many issues for me to deal with right now. – JoshK Nov 01 '16 at 12:33
  • @JoshK have you found any alternative solution ? – Bittoo Dec 05 '16 at 04:50
  • @Bittoo I did! http://stackoverflow.com/questions/40481800/project-wont-run-on-simulator-in-xcode-8/40484324#40484324 Although I ended up updating CocoaPods. I highly recommend taking the time to sort it out now. It'll save you from endless headaches in the future. – JoshK Dec 08 '16 at 17:38
7

I had the same problem. I did the following steps, and it sovled. Select Pods in the navigation --> TARGETS --> your FDTakeResources --> Signing(Enable Development Signing) --> Identity(Choose Info.plist File). Then I can run it on my simulator.

Zhen Zhang
  • 71
  • 3
  • 2
    Pods project is not supposed to be modified. – aelam Nov 03 '16 at 01:26
  • @aelam as JoshK said on accepted answer, - Updating cocoaPods creates too many issues for me to deal with right now, so.. this works, and I can move on with my life for now :) – Guntis Treulands Nov 09 '16 at 16:33
  • @GuntisTreulands I'm kinda sure now, you can downgrade your Xcode 8.0- and it's fine with whatever version of cocoapods. Or you can use Xcode 8.1 + Cocoapods 1.1.1 – aelam Nov 10 '16 at 01:32
  • @aelam If you also need to work with latest iOS versions (or betas), downgrading is not an option – Guntis Treulands Nov 11 '16 at 13:58
0

This is not the solution for topic-starter, however in my case I've recieved this error about 'bundle format unrecognized, invalid, or unsuitable' during CocoaPods post-build embed frameworks action on attempt to sign any framework. More of that, the issue was reproduced only when running build on Jenkins.

The reason was really stupid. Jenkins was using the custom output directory, which did include space char in the middle. The CP post-build generated script doesn't handle paths with spaces properly, so the codesign tool actually was not fed with the correct path to framework.

SOLUTION: double check you have no spaces in your path :)

Hope this will help somebody to save some time :)

Denis
  • 6,313
  • 1
  • 28
  • 27
0

One other thing to watch out for is if something is getting put into the output folder that should not be there or removed from that output folder. For example, in our old builds we put our documentation into the output folder that now gets signed. Now we can't do that, we have to put it alongside the signed output folder. Moving that out solved the unrecognized bundle format error. Hope this helps someone.

possen
  • 8,596
  • 2
  • 39
  • 48
0

I was seeing a similar issue with CocoaPods 0.39.0, in the end I solved it by modifying my pod spec:

Commenting out

s.resource_bundles = {
  'DHSErdi' => ['Pod/Assets/*.png']
}

And adding this

s.resources = ['Pod/Assets/*.xib', 'Pod/Assets/*.png', 'Pod/Assets/*.jpg', 'Pod/Assets/*.html', 'Pod/Assets/javascript/dist/**/*.js','Pod/Assets/javascript/src/**/*.html']
Mat
  • 66
  • 7