可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
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:
- Skip install is NO for the main project target
- Skip install is YES for framework (sub-projects) targets
- Sub-projects need to have Copy Headers in Project not Public
- Installation Directory under Deployment is valid (/Applications for example)
But I'm still not getting the solution.
回答1:
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
回答2:
If you have any .xcodeproj files in Project>Targets>Build Phases>target dependencies remove it from there and then build your ipa. It works for me. Cheers
回答3:
I had a problem with Cocoapods 0.38.1, after upgrading some projects it was generating me the xCode Generic Archive... after following all the steps the only way to create an ipa again was downloading cocoapods to 0.37.1 and following the steps on this link: http://9elements.com/io/index.php/cocoapods-best-practices/.
I hope that helps!
回答4:
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.
回答5:
My case is I got 2 target in the project, and once I set one of the target to Skip Install = "YES", the issue resolved
回答6:
The problem that I had was CocoaPods version 0.38.2
., after upgrade CocoaPods
to the later version (0.39.0.beta.4)
all works fine.
$gem install cocoapods --pre
Then:
$pod update
回答7:
I know its late to reply, but yes i got the solution by following below steps:
- Go to Project Navigator
- Select Targets
- Go to Build Phases
- Check for Target Dependencies and remove it
- Clean & Build code
- Try to archive and you will get iOS app archive this time.
Best Luck & Cheer from KP :)
回答8:
In XCode 5 the same error occurs if you have multiple targets and wrong checkmarks in Manage Schemes. Then Xcode puts 2 binaries into 1 Generic Archive. This does not affect checked in files into e.g. git!
回答9:
I agree with @cat's response.
I by mistake had two build targets under manage scheme and that was the issue for me. Sip was NO already.
Checking this step can help you debug more if Skip is already set to no.
回答10:
None of these worked for me, it was cocoapods in my case, had to uninstall all and install the release version
sudo gem uninstall cocoapods sudo gem uninstall cocoapods-core sudo gem uninstall cocoapods-downloader sudo gem install cocoapods
回答11:
In my case none of the suggested solutions worked as the project file was fine. I simply had to remove everything in the Derived Data folder and things got back to normal. You can find it from the Preferences > Locations.
I think this was due to the new Xcode 6. I was previously using the beta.
回答12:
I have this problem too. And I tried every solution here.
(This is a project in an xcode-workspace)
Finally I solved...... I clean everything in Derived data folder, close the workspace, then close Xcode, the open the single target project.
Then, I do archive, it makes an iOS App archive.
I hope I can help someone.
回答13:
I had to do things:
go to Product -> Schemes -> Manage : Here make sure that only one scheme is selected and that is your current scheme
go to Product -> Schemes -> Edit: there are options such as this : Make sure only only one archive is selected.

回答14:
My issue started after a pod install, problem went away after updating cocoapods (from 0.38 to 0.39) and running pod install again.
回答15:
回答16:
Make sure that you have the Build field set under Project Settings > General.