Skip to content
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 Binding Library - Cannot find types declared #13283

Closed
orwo1 opened this issue Feb 12, 2023 · 5 comments
Closed

iOS Binding Library - Cannot find types declared #13283

orwo1 opened this issue Feb 12, 2023 · 5 comments
Labels
area-core-platform Integration with platforms external partner/macios Issues for the Mac / iOS SDK partner Issue or Request from a partner team platform/iOS 🍎 s/needs-attention Issue has more information and needs another look t/bug Something isn't working

Comments

@orwo1
Copy link

orwo1 commented Feb 12, 2023

Description

I've tried making an iOS binding library in VS for Mac.
I used Sharpie to create both definitions files, fixed what was wrong in them( NSArray -> T[] ).
The project compiles.
I reference it in MAUI app and MAUI class library with condition:
<ItemGroup Condition="$(TargetFramework.Contains('-ios')) != false "> <ProjectReference Include="..\iOSBinding1\iOSBinding1.csproj" /> </ItemGroup>
I Cannot access any type declared in the binding library, in my app/class library.

The Android Binding Library works fine under Visual Studio for Windows,
Under the reverse condition in the csproj.

Steps to Reproduce

  1. Create Binding Library wrapping a .framework with native reference and Sharpie's output in the:
    ApiDefinition.cs
    StructsAndEnums.cs
  2. Reference the project in a Maui Class Library/Maui App.
  3. Try to use any type declared in the binding library

Link to public reproduction project repository

NA

Version with bug

7.0 (current)

Last version that worked well

Unknown/Other

Affected platforms

iOS

Affected platform versions

iOS 15, iOS 15.5, iOS 16.1

Did you find any workaround?

No

Relevant log output

No response

@orwo1 orwo1 added the t/bug Something isn't working label Feb 12, 2023
@orwo1
Copy link
Author

orwo1 commented Feb 12, 2023

More info:
That same .framework wrapped in Xamarin.Formsm iOS binding library, works in a Xamarin.Forms project.
I believe with the same Api and Enums output from Sharpie.

@orwo1
Copy link
Author

orwo1 commented Feb 12, 2023

Using:
Visual Studio for Mac 17.4.4
XCode 14.2

@jsuarezruiz jsuarezruiz added platform/iOS 🍎 s/needs-repro Attach a solution or code which reproduces the issue labels Feb 13, 2023
@ghost
Copy link

ghost commented Feb 13, 2023

Hi @orwo1. We have added the "s/needs-repro" label to this issue, which indicates that we require steps and sample code to reproduce the issue before we can take further action. Please try to create a minimal sample project/solution or code samples which reproduce the issue, ideally as a GitHub repo that we can clone. See more details about creating repros here: https://github.com/dotnet/maui/blob/main/.github/repro.md

This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time.

@Eilon Eilon added the area-core-platform Integration with platforms label Feb 13, 2023
@orwo1
Copy link
Author

orwo1 commented Feb 14, 2023

@jsuarezruiz Hi
I can't upload propriety .framework to github, in order to create a repro.
I've just created a solution with a basic MAUI class library,
an ios binding library,
and referenced it in the class library using the condition above.
There's nothing much to it other than that.

@ghost ghost added s/needs-attention Issue has more information and needs another look and removed s/needs-repro Attach a solution or code which reproduces the issue labels Feb 14, 2023
@PureWeen
Copy link
Member

This issue was moved to xamarin/xamarin-macios#17541

@dotnet dotnet locked and limited conversation to collaborators Feb 14, 2023
@samhouts samhouts added partner Issue or Request from a partner team partner/macios Issues for the Mac / iOS SDK external labels May 3, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-core-platform Integration with platforms external partner/macios Issues for the Mac / iOS SDK partner Issue or Request from a partner team platform/iOS 🍎 s/needs-attention Issue has more information and needs another look t/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants