Reputation: 121
Before Xcode 11.4 I built project and I also could found xxx.framework in the path of xxx/Build/Products/Debug-iphoneos.
After using Xcode 11.4, I can't found any xxx.framework in that path.
I have seen the link, How to archive/export Framework in Xcode? I follow the step to get the framework but Xcode 11.4 doesn't.
Does anybody know how to get the framework by using Xcode 11.4?
Upvotes: 1
Views: 1351
Reputation: 2490
Here's two methods.
Method 1 (The method you say is not working for you but most popular):
Clean your framework (Not necessary but good practice)
Shift + Command + K
orProduct > Clean Build Folder
(Some ask: where is thisProduct
. Just hover your mouse at the top of the screen whilst in Xcode, you'll see it there.)
Build your framework
Command + B
orProduct > Build
Export/Extract/Copy your framework
On the left panel of Xcode (Where you see all your folders and swift files), expand the folder that's named
Products
(tap on the little white arrow next to the folderProducts
to expand it and see its contents.)
Once you expanded the
Products
folder, you should see a very good looking framework staring right at you. The name should look something like thisYourProjectName.framework
Now to finally answer your question - HOW TO EXPORT THE FRAMEWORK...well right click on the framework (the
YourProjectName.framework
) and click onShow in Finder
.
Once you clicked on
Show in Finder
, you'll see yourYourProjectName.framework
folder. Yes yes, it looks like a normal folder. That's because it is. Everyone just makes it sound fancy.
And there you go. You can then just drag that fancy-ish
YourProjectName.framework
folder into you project.
Method 2 (Here I'll assume you already read method 1 so I'll explain with less detail):
Clean your framework (Not necessary but good practice)
Archive your framework
Product > Archive
(Don't be surprised if you wait a couple of seconds for it to archive.)
Once it's done archiving. You'll see it opens a new Xcode like window. If you don't see this window, it means you were busy with other stuff on your mac at the time it finished. Don't worry haha, just look around on your mac until you find it. If you still don't find it, chances are the archiving failed. If it failed, Xcode will give you an error log. Read it, fix it, try archiving again.
Once it finished archiving and you see the Xcode-like window. Your archive will be highlighted. It just shows its selected.
Export/Extract/Copy your framework
Right click on the archive and say
Show in Finder
The finder will open and have your archive selected.
Right click on that archive and select
Show Package Contents
The finder will open your archives contents.
Navigate to your framework which is located under
Products > Library > Frameworks
There you'll find your
YourProjectName.framework
folder. select that folder and drag it into your project.
If none of the above methods worked for you, I guess it opens the opportunity for you to find another way. When you do, come back to this answer and add your method so we all can learn.
Upvotes: 2