13

I am building a hybrid app using ionic and when I try to upload it to the app store, it gives me this error

Couldn't find platform family in Info.plist CFBundleSupportedPlatforms or Mach-O LC_VERSION_MIN for phantomjs

Has anyone encountered the same issue and found out how to fix it?

I suspect it comes from one the plugins or the node_modules that I use in my project that are causing the error..

Marc
  • 141
  • 1
  • 4

5 Answers5

16

Had the same error, in my case the problem was that I had some DSYM files among my bundle resources.

Fixed it by removing all .DSYM files form Copy Bundle Resources build phase.

More info on this thread: https://github.com/Alamofire/Alamofire/issues/823

marius
  • 2,077
  • 2
  • 16
  • 15
  • 1
    you're absolutely right! This also causes an error when you want to export an Archive from your project using xCode. Something like "bitcode_strip failed". Also checking the error logs helped me to find the solution. – Alchi Aug 09 '18 at 11:56
2

I had this issue in an ionic app when one of the plugins was added to the bower.json as a dependency instead of as a plugin. A copy of it ended up in the www/lib folder and once it was removed I stopped getting that error.

mplaza
  • 31
  • 2
  • This was also the case for me. Whenever I add a new lib with bower it re-adds the facebook plugin to the lib folder and causes this error. Removing it from the lib folder and then running ionic build ios again solved it. – Rob Evans Oct 12 '16 at 18:01
2

I solved this issue by removing unneeded files in my project. Specifically I have a Cartfile in my project and the Carthage Folder reference so that I can easily access it.

I removed the folder reference but I kept the Cartfile in my project. I made sure that the Cartfile is not in my Copy Bundle Resources build phase. One of these 2 fixed my problem.

Jacob
  • 1,052
  • 8
  • 10
1

I have had the same issue with my native application.

I am using Carthage (https://github.com/Carthage/Carthage v.0.15.2) where I have a dependency D1 which have a nested dependency D2.

I'm not exactly sure what went wrong, but when archiving these dependencies it happened that a dSYM file from D2 sneaked into the archive in the framework folder of D1. I deleted the dSYM file from the archive, and I was able to submit.

So please take a look at your archive and see if there are any .bundle, .dSYM or the like, a place where it shouldn't be.

This is where I found the source of my troubles:

~/Library/Developer/Xcode/Archives/2016-04-14/ARCHIVENAME.xcarchive/Products/Applications/APPNAME.app/Frameworks/D1.framework

This issue might be caused by either Carthage or the frameworks, or something completely different, so the above mentioned "solution" is a workaround for now.

Morten
  • 69
  • 1
  • 5
-1

I know it's late to reply but I have face this issue recently when I am creating an archive for my application. For that I found that I have added one of my framework (which creates error) in Project Targets->General->Embedded Binaries.

instead of adding it in:

Project Targets->General->Linked Frameworks and Libraries. Simply by deleting the framework from Embedded Binaries and re-adding it to Linked Frameworks and Libraries solve my problem.

halfer
  • 19,824
  • 17
  • 99
  • 186
Er. Vihar
  • 1,495
  • 1
  • 15
  • 29
  • Please do not add requests for upvotes, Er. Vihar. We want voting to be organic here. Once something has been amended in a post, please do ping the editor involved so the change can be discussed, rather than summarily rolling it back. Thank you. – halfer Jun 04 '17 at 08:27
  • @halfer I got your point and will take in consideration. But please guide me that isn't my answer is useful? If not then please update me at what point you think it's not useful like, not helpful, not technical, not related, duplicate or any other. – Er. Vihar Jun 05 '17 at 05:01
  • It looks useful to me, but I am not sure why you would ask that. It is not relevant to the point I have made. I've pointed out that we don't like explicit requests for upvotes, and we _really_ don't like people undoing another person's work. Hope that helps! – halfer Jun 05 '17 at 08:39
  • Its valid answer. but doesn't work in all the scenario. it worked for my coworker. but not working for me. hence I am still looking – Alok C Sep 06 '17 at 14:55