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:
But I'm still not getting the solution.
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.
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.
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.
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
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With