Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

xcode is creating generic xcode archive instead of iOS App Archive

Tags:

xcode

ios

I'm a beginner in iPhone development and I tried to create an ipa with my profile and valid certificate but xcode is creating a generic xcode archive file instead of iOS app archive because in my code there are two .xcodeproj in there.

And from one of the stack overflow answer I followed the following steps:

  1. Skip install is NO for the main project target
  2. Skip install is YES for framework (sub-projects) targets
  3. Sub-projects need to have Copy Headers in Project not Public
  4. Installation Directory under Deployment is valid (/Applications for example)

But I'm still not getting the solution.

like image 408
Kalpesh Panchasara Avatar asked Oct 21 '22 08:10

Kalpesh Panchasara


People also ask

Why I can't archive in Xcode?

Archive menu option grayed out If you can't create an archive in Xcode, usually it's because you have the destination set to the simulator. Switch to an iOS device (it should work even if you don't have one connected). Another cause for the grayed-out archive option is that it's disabled for your scheme.

How do I archive iOS apps in Xcode?

Archive your App In Xcode with your project open, select the simulator (button near the top of the window next to your project name, typically named as a specific type of iPhone) – change it to Generic iOS Device. Open the Product menu and choose Archive. You will see the archive information. Click Validate App.

What is an Xcode archive?

Archive: As its name says, it is the overall package (that contains . app and other related files). From archive you can create . IPA file similar to . apk file (android) with that you can distribute your application.


2 Answers

In my case problem was "Skip install" set to "NO" for one of embedded static libraries. Also useful link: https://developer.apple.com/library/mac/technotes/tn2215/_index.html

like image 37
AlexeyVMP Avatar answered Oct 23 '22 22:10

AlexeyVMP


My case wasn't 'skip install' nor a cocoapods issue. It appears that one of the 3rd party frameworks which I ended up not using was the cause for this. The solution was simply removing it.

In order to track this issue I right clicked the generic archive file in Xcode's organizer and selected 'show in finder' -> right click the archive file -> select Show Package Contents -> Products -> Applications and inside this folder you can see what other files are in it besides the {project-name}.app file. In my case there was a file with the prefix of the framework I wasn't using, which led to its removal from the project's workspace.

like image 13
Got99Errors Avatar answered Oct 23 '22 20:10

Got99Errors