Xcode 13+ Missing "Products" folder when creating a framework
Asked Answered
M

2

10

In Xcode 13+ When I create a framework, there is no "Products" folder as it used to be there prior to that version same like the below image

products folder as it appears in Xcode.X <13

Even when I build the project, I still cannot find the ".framework" file anywhere. All tutorials on google follow the same flow of creating the framework project, building then extracting the .framework binary from the Products folder, but that doesn't seem to be available in Xcode 13+ Any one have a clue?

Mendelson answered 8/1, 2022 at 18:52 Comment(0)
C
15

In some reason, Products folder is missing in the project tree if no framework is linked against the app.
Note: worked with Xcode 13.2.1

Simple way
Just add any framework to any of your targets. The folders "Products" and "Frameworks" will appear.
Next just delete this framework from project

Details
The reason is a bit different Xcode project file content.
I've compared a bit projects with and without "Product" folder reference.

In my case, the folder appears "as should" when I recovered another folder called "Frameworks". Yes, that sounds very weirds but it worked!

I need to perform 2 modifications of the project file.

First: in the end of PBXGroup section add group 'Frameworks'

        BDA596AF271F808000093C27 /* Frameworks */ = {
            isa = PBXGroup;
            children = (
            );
            name = Frameworks;
            sourceTree = "<group>";
        };
/* End PBXGroup section */

Second: in the very beginning of PBXGroup section refer 'Frameworks' group

/* Begin PBXGroup section */
        A463827B279AF34300EBE05C = {
            isa = PBXGroup;
            children = (
                A4638286279AF34300EBE05C /* SomeApp */,
                A4638285279AF34300EBE05C /* Products */,
                BDA596AF271F808000093C27 /* Frameworks */,
            );
            sourceTree = "<group>";
        };

These simple and strange changes do the trick! "Products" folder comes back

Collapse answered 21/1, 2022 at 14:25 Comment(3)
it worked using the simple way !! Weird behaviorMendelson
The solution given in the "Simple Way" section worked like charm.Wheresoever
Give this man a medal! Thank youUnvalued
W
9

The Products folder has been removed from the file navigator by Apple. You can access framework using below alternative way.

Click On : Product -> Show Build Folder in Finder

Source: https://developer.apple.com/forums/thread/691136

Whitaker answered 17/11, 2022 at 11:41 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.