Created attachment 23905 [details]
Output from build
I have created an iOS Bindings Library for my cross platform project called iOS.Crop. The native library I'm linking to is TOCropViewController 2.0.12. I used a couple of tutorials for using cocoa pods.
I added the iOS.Crop Bindings Library to the project on my Mac as well as all of the Objective Sharpie commands (obviously). I added the generated ToCropViewController.framework as a Native Reference and updated the APIDefinition and Structs. The iOS.Crop project compiled fine.
I then added a reference to iOS.Crop in my iOS project and made calls to the native library and everything worked fine on my Mac. The problem is when I go back to my windows machine with VS 2017. The native project (iOS.Crop) builds fine, but my iOS project throws the following error (Krizzma.iOS is the name of my iOS project) .
Error Native linking failed for '/Users/jeremyalley/Library/Caches/Xamarin/mtbs/builds/Krizzma.iOS/77444036d2543f1c892fafac1b7559f2/obj/iPhone/Debug/device-builds/iphone7.2-10.3.2/mtouch-cache/arm64/libiOS.Crop.dll.dylib'. Please file a bug report at http://bugzilla.xamarin.com Krizzma.iOS C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets 747
Microsoft Visual Studio Professional 2017
Version 15.2 (26430.16) Release
Microsoft .NET Framework
Installed Version: Professional
Visual Basic 2017 00369-60000-00001-AA948
Microsoft Visual Basic 2017
Visual C# 2017 00369-60000-00001-AA948
Microsoft Visual C# 2017
Visual F# 4.1 00369-60000-00001-AA948
Microsoft Visual F# 4.1
Application Insights Tools for Visual Studio Package 8.6.00404.2
Application Insights Tools for Visual Studio
ASP.NET and Web Tools 2017 15.0.30503.0
ASP.NET and Web Tools 2017
ASP.NET Web Frameworks and Tools 2017 5.2.50303.0
For additional information, visit https://www.asp.net/
Azure App Service Tools v3.0.0 15.0.30209.0
Azure App Service Tools v3.0.0
Azure Data Lake Node 1.0
This package contains the Data Lake integration nodes for Server Explorer.
Azure Data Lake Tools for Visual Studio 2.2.5000.0
Microsoft Azure Data Lake Tools for Visual Studio
Common Azure Tools 1.9
Provides common services for use by Azure Mobile Services and Microsoft Azure Tools.
Fabric Diagnostic Events
KofePackagePackage Extension 1.0
KofePackagePackage Visual Studio Extension Detailed Info
Merq 1.1.17-rc (cba4571)
Command Bus, Event Stream and Async Manager for Visual Studio extensions.
Microsoft Azure Hive Query Language Service 2.2.5000.0
Language service for Hive query
Microsoft Azure Tools 2.9
Microsoft Azure Tools for Microsoft Visual Studio 2017 - v2.9.50131.1
Microsoft MI-Based Debugger 1.0
Provides support for connecting Visual Studio to MI compatible debuggers
Mono Debugging for Visual Studio Mono.Debugging.VisualStudio
Support for debugging Mono processes with Visual Studio.
NuGet Package Manager 4.2.0
NuGet Package Manager in Visual Studio. For more information about NuGet, visit http://docs.nuget.org/.
SQL Server Data Tools 15.1.61702.140
Microsoft SQL Server Data Tools
Hosting json editor into a tool window
TypeScript tools for Visual Studio
Xamarin 188.8.131.526 (fec6f88)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.
Xamarin.Android SDK 184.108.40.206 (9dbc4c5)
Xamarin.Android Reference Assemblies and MSBuild support.
Xamarin.iOS and Xamarin.Mac SDK 10.10.0.37 (ad35de4)
Xamarin.iOS and Xamarin.Mac Reference Assemblies and MSBuild support.
Thanks so much for taking the time to submit this report! I’m unable to reproduce this issue using the latest Visual Studio 2017 Preview version 15.3. Please attach the following to help us reproduce this issue:
-Detailed reproduction steps
-Version information (Help → About Microsoft Visual Studio → Copy Info)
-Optional: project to reproduce your issue
Created attachment 23927 [details]
Thanks for looking into this. I have attached a sample project.
Hi Prashant, any update on this issue? Is there anything else I can provide?
# Non Engineering team observations -
Building solution from VS on Windows and **Mac** fails with following error
> error : Native linking error: framework not found TOCropViewController
While building just a binding project works on both Mac and Windows
Looks like the attached test case is missing the TOCropViewController.framework
Could you share it with us? It will help us to troubleshoot the issue
I am marking this bug RESOLVED INVALID.
In the sample the _TOCropViewController_ static library is targeting devices (armv7 & arm7s), we get build errors on building the project targeting simulator.
To fix this issue -
Remove TOCropViewController.framework from native references
Rename `TOCropViewController` to `TOCropViewController.a`
Add TOCropViewController.a to the iOS.Crop project
Use the device build configuration i.e Debug|iPhone or Release|iPhone
@Jeremy, please reopen the bug if you continue to have an issue with the build
Thanks again for the assistance. I followed the steps above and I was able to get the BindingsTest.iOS project to build. However, when I deploy to my device using Debug|iPhone the app crashes. If I remove all references to the iOS.Crop project everything works fine. Were you able to deploy it to a device?
You mentioned that the static library is targeting devices (armv7 & arm7s). When I do a lipo -info on the library on my mac, it states the architectures are: armv7 and arm64. Are you seeing something different?
> However, when I deploy to my device using Debug|iPhone the app crashes.
Could you share the new crash logs? I am not able to see this issue.
> Are you seeing something different?
armv7 and arm64 indicate that library is built for devices. I see same output.
Simulator architecture is `i386`
Because we have not received a reply to our request for more information in over 14 days, we are closing this issue. If you are still encountering this issue, please reopen the ticket with the requested information so we can continue looking into this. Thanks!