xcode is creating generic xcode archive instead of iOS App Archive
Question : 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.
-------------------------------------------------------------------------------------------------------------------------------------
Answer 1 :
I tried everything suggested but it didn't work. But when I was trying to follow what @acecilia said I went to check my info.plist
and the issue was my iOS target had a lot of stuff missing compared to the macOS info.plist
.
I solved it by clicking on the Target
, then Info
on top, and matching my two info.plist
and it finally let me Archive as an iOS build instead of a generic one.
-----------------------------------------------------------------------------------------------------------------------------------
I had the same problem in my tvOS app.
Solved it by disabling: "Build Documentation during 'Build'" flag in Build Settings.-----------------------------------------------------------------------------------------------------------------------------------
I was using Unity and my case was that the Edit -> Project Settings... -> Player -> iOS -> Other Settings -> Target SDK was set as Simulator SDK. Changing to Device SDK created the app archive correctly. I hope it can help others struggling with it too.
-----------------------------------------------------------------------------------------------------------------------------------
In my case, the issue was that my app name started with DOT symbol. MacOS treats files and folders starting with '.' as hidden, so Xcode doesn't see there is an actual app inside the archive.
I develop my game in Unity, and this worked fine up until Unity 2020.1.17. Apparently, something has changed, and newer versions of Unity started to produce this issue.
-----------------------------------------------------------------------------------------------------------------------------------
Delete/Move Xcode Developer Directory
After going through and trying nearly every provided solution on stackoverflow, including fully re-installing Xcode, and cocoapods, what resolved this for me was completely deleting the ~/Library/Developer
directory and letting Xcode recreate and populate it the next time I built/opened my project.
- Open Finder and select menu Go > "Go to Folder" and input "~/Library"
- Delete or move(archive somewhere just in case) the "Developer" directory
- Fully close out of Xcode and reopen project
- In Xcode Product > Archive
- This now created the correct iOS app archive and I was able to distribute and upload app to Testflight
-----------------------------------------------------------------------------------------------------------------------------------
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
-----------------------------------------------------------------------------------------------------------------------------------
Finally I solved this kind of issue. I think this issue comes in different scenarios.
I got Generic Xcode Archive Type. After that, generated archive build with distribute content.
Actually, In my case the issue with subproject header files path, I believe their path was missing while archiving.
I have tried, removed subproject references and added again. I have already set header search path correctly, Identified, paths were pointing to different folder location earlier under subproject. After added, it was pointing exact folder.
After that I tried archive and generated Archive build with distribute App option. Finally able to get iPa file and pushed to iTunes Connect :).
This may helpful for someone.
Thanks
-----------------------------------------------------------------------------------------------------------------------------------
For me, Xcode was creating a generic Xcode archive
because I was lacking the UISupportedInterfaceOrientations
field in my Info.plist
. After adding it, the app archive was created correctly
-----------------------------------------------------------------------------------------------------------------------------------
None of the above answers worked for me, once I followed Apple's Tech notes I started getting lot of linking errors and headers not found errors.
I tried solving those errors and no solutions worked for me, tried playing with header search paths, library search paths etc.
Finally if none of these solution works, kindly follow below steps to submit your app to app store
With XCode 11.x.x
Essentially, after you do the Clean Build Folder, and then Build, you find the .app file in: ~/Library/Developer/Xcode/DerivedData//Build/Products/Release-iphoneos/
Create a new folder on your desktop named Payload (this name is case-sensitive)
Copy your .app file and paste the copy in this Payload folder.
Right click the folder and choose “Compress Payload”
When you save this, do not save it with the .zip extension, but instead save it with a .ipa extension.
This is now your .ipa file for your app, and you can upload this through Xcode Transporter App
If you are still on older version of Xcode 10.x.x then follow same steps as given above but just change last step, instead of transporter app, use Application Loader App
-----------------------------------------------------------------------------------------------------------------------------------Answer 10 :
In XCode 11, in my case it was none of the aboves. I had some HTML files that were part of my target ("Target Membership") once I removed them, I was able to generate the proper archive.
Basically, just make sure that you don't put wrong files in the target.
Hope it helps!
-----------------------------------------------------------------------------------------------------------------------------------
I was using cocoa-pods and when you go to manage schemes the Container was set to the xcodeproj instead of the xcworkspace. When set to xcworkspace it worked.
-----------------------------------------------------------------------------------------------------------------------------------
In my case issue was in a scheme. I had two targets marked as "Archive". This happened when I duplicated one of my targets.
In Scheme -> Build -> Targets I just remove this one which I do not want, after that archive is in "iOS Apps" instead of "Other Items" section.
-----------------------------------------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------------------------------------
One of cases is you have to move headers (if any) from Public to Project in the Build Phase / Headers.
-----------------------------------------------------------------------------------------------------------------------------------
I know its late to reply, but yes i got the solution by following below steps:
- Go to Project NavigatorSelect 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 :)
-----------------------------------------------------------------------------------------------------------------------------------
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
-----------------------------------------------------------------------------------------------------------------------------------
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
---------------------------------------------------------------------------------------------------------------------------
Answer 19 :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
---------------------------------------------------------------------------------------------------------------------------
Answer 20 :
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.
Comments
Post a Comment