-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[ios] Support bundling shared libraries into frameworks #96664
Comments
Tagging subscribers to 'os-ios': @steveisok, @akoeplinger, @kotlarmilos Issue DetailsDescriptionCurrently, we support building shared iOS libraries:
without depending on iOS workloads and pulling in Xamarin SDK. This means that when users write their class libraries that do not have a dependency on iOS-specific API, can build such libraries by using the standard target framework and iOS-specific runtime identifier (e.g., However, in order to properly consume a shared iOS library, one has to bundle it into a framework - Technical Note TN2435 which in most simplistic case comes down to generating the following bundle:
This was also reported in: #93366 ApproachesAt this point, I can think of two possible approaches we could take (there might be other solutions):
|
@rolfbjarne @steveisok what are your thoughts on the proposed approaches? |
Creating a .framework isn't very difficult:
The biggest complication is probably the Info.plist: should it be completely user-provided? do you generate a default file if the developer doesn't specify one? Note that the developer should at least be able to override any defaults. IMHO this the simplest is just to create your own logic, no need to copy/move ours (it's not trivially extractable anyway). |
Tagging subscribers to this area: @directhex Issue DetailsDescriptionCurrently, we support building shared iOS libraries:
without depending on iOS workloads and pulling in Xamarin SDK. This means that when users write their class libraries that do not have a dependency on iOS-specific API, can build such libraries by using the standard target framework and iOS-specific runtime identifier (e.g., However, in order to properly consume a shared iOS library, one has to bundle it into a framework - Technical Note TN2435 which in most simplistic case comes down to generating the following bundle:
This was also reported in: #93366 ApproachesAt this point, I can think of two possible approaches we could take (there might be other solutions):
|
If it is that simple, do we need the whole AppleAppBuilder for it? Can it be just a few lines of build targets (for native AOT at least)? |
Since we provided documentation on required steps to create and consume custom frameworks from shared native libraries, I will close this issue as out-of-scope. If it becomes necessary to automate these steps as part of the build, we can reopen the issue. |
Description
Currently, we support building shared iOS libraries:
without depending on iOS workloads and pulling in Xamarin SDK.
This means that when users write their class libraries that do not have a dependency on iOS-specific API, can build such libraries by using the standard target framework and iOS-specific runtime identifier (e.g.,
-f net8.0 -r ios-arm64
) in order to produce a shared native library -*.dylib
.However, in order to properly consume a shared iOS library, one has to bundle it into a framework - Technical Note TN2435 which in most simplistic case comes down to generating the following bundle:
This was also reported in: #93366
Approaches
At this point, I can think of two possible approaches we could take (there might be other solutions):
The text was updated successfully, but these errors were encountered: