Could not load the framework 'IBFoundation' - xamarin.forms

I am using XCode 13 Beta 3 build 13A5192j on macOS Monterey (Version 12.0 Beta 21A5284e) with Visual Studio 2020 Preview.
When ever I am trying to run the Xamarin-Form application on real device, I am getting below error, but I am able to create archive :
Could not load the framework 'IBFoundation' (path: /Applications/XCode-beta.app/Contents/Frameworks/IBFoundation.framework/IBFoundation): not found.
I tried with visual studio 2019 (stable Version) and Xcode 12.* (stable version) but getting some connectivity error

Xamarin is working on an update: https://github.com/xamarin/xamarin-macios/issues/12778
They give 3 possible workarounds:
You can download Xcode 12.5 from the downloads page in the Apple Developer Portal and continue to use it.
If you need to keep Xcode 13 but want to use our current stable d16-10 bits you will need to install the following in you macOS machine
xamarin.ios-14.20.0.27.pkg
xamarin.mac-7.14.0.27.pkg
Use a build from our xcode13-ios branch, this is where our next stable release is coming out and it includes all the iOS 15 SDKs APIs, that said we are still ironing it out.
xamarin.ios-15.0.0.0.pkg

Looks like it was issue with the Beta version of both softwares.
I was using Beta version of MacOs (Monterey beta 4), Beta Version of XCode (XCode 13) and Preview Version of Visual Studio 2022 on Windows 11 Insider Preview.
When I removed the XCode 13 with xCode 12 then also it was showing same error. It worked when I removed Visual Studio 2022 Preview also.
So everything fine now with Windows 11 Insider Preview, Visaul Studio 2017 (Latest), XCode 12.5.1 and MacOs Monterey Beta.
Hope it will help someone if facing same issue as I was facing.

Related

Application could not be uploaded to the device

Following are the details about Xamarin, studio and Mac:
Visual Studio Community 2019 for Mac
Version 8.6.8 (build 2)
Xamarin.Mac 6.18.0.23
.NET Core SDK
SDK: /usr/local/share/dotnet/sdk/3.1.302/Sdks
SDK Version: 3.1.302
MSBuild SDKs: /Library/Frameworks/Mono.framework/Versions/6.10.0/lib/mono/msbuild/Current/bin/Sdks
.NET Core Runtime
Runtime: /usr/local/share/dotnet/dotnet
Runtime Versions:
3.1.6
2.1.20
Xamarin.Profiler
Version: 1.6.15.68
Location: /Applications/Xamarin Profiler.app/Contents/MacOS/Xamarin Profiler
Updater
Version: 11
Apple Developer Tools
Xcode 12.0 (17189.4)
Build 12A8169g
Xamarin.iOS
Version: 13.18.2.1 (Visual Studio Community)
Operating System
Mac OS X 10.15.6
Darwin 19.6.0 Darwin Kernel Version 19.6.0
Issue:
/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/bin/mlaunch -sdkroot "/Applications/Xcode-beta.app/Contents/Developer" --installdev "/Users/*******/Projects/testApp/testApp/bin/iPhone/Debug/device-builds/iphone11.6-13.5.1/testApp.app" --device ios "--devname=iPhone XS Max" --install-progress
error HE0004: Could not load the framework 'IDEKit' (path: /Applications/Xcode-beta.app/Contents/Frameworks/IDEKit.framework/IDEKit): dlopen(/Applications/Xcode-beta.app/Contents/Frameworks/IDEKit.framework/IDEKit, 1): Library not loaded: #rpath/DVTAnalyticsKit.framework/Versions/A/DVTAnalyticsKit
Referenced from: /Applications/Xcode-beta.app/Contents/Frameworks/IDEKit.framework/Versions/A/IDEKit
Reason: image not found
All the paths are correct and file exist there.
This is just a sample project and its failing to deploy on physical device. I am able to deploy via XCode but it fails via Mac Visual Studio. Need some help here. I am going to install different version of XCode and try it.
If you are using Xcode 12 beta you need a newer version of Xamarin.iOS from the xcode12 branch. Quoting from the wiki on how to get a build from the said branch:
If you go to our commits page you should be able to see a green checkmark (✔) or a red cross mark (✘) at the right side of the committer's handle. If you click the checkmark (it's usually best to use builds with green checkmarks, but in some cases there may be none, in which case you can likely use builds with red checkmarks as well) you should see a details link which will provide download links for both Xamarin.iOS and Xamarin.Mac packages for that specific commit. Once in a while a commit may not have associated builds (this can occur both for red and green builds) - just try a different commit.
Make sure you download the "Notarized" version of the pkgs.
Uninstalled Xcode 12 beta and installed Xcode 11.6 (Hosted in VM).
It worked successfully.
Now i am able to deploy from Visual Studio 2019 running on windows.

Xamarin iOS build error - Native linking failed (Link Framework SDKs Only)

Not able to run Xamarin iOS project after Visual studio update.
Because updated IDE requires the latest Xcode (iOS 13.4 SDK shipped with Xcode 11.4)
Environment Details
OS Version : macOS Mojave, OS X 10.14.6
IDE : Visual Studio Community 2019 for Mac Version 8.5.1 (build 42)
Xamarin.iOS Version: 13.16.0.11 (Visual Studio Community)
Xamarin.Mac Version: 6.16.0.11 (Visual Studio Community)
Xcode Version 13.2
What I tried.
Instead of updating the Xcode, I simply changed the Linker Behaviour to Link Framework SDKs Only.
No luck, I got the following errors.
Error MT5210: Native linking failed, undefined symbol: ___darwin_check_fd_set_overflow.
Please verify that all the necessary frameworks have been referenced and native libraries are properly linked in. (MT5210)
Error MT5202: Native linking failed. Please review the build log. (MT5202)
Error: linker command failed with exit code 1 (use -v to see invocation)
Reference.
Linker Behaviour
mtouch arguments
Is there any other option to resolve the issue without update the Xcode and macOS?
Any help will be really appreciated.
Thank you
Cause : Latest visual studio requires latest Xcode (iOS 13.4 SDK
shipped with Xcode 11.4)
To solve the issue install the latest Xcode or use a lower
Xamarin.iOS Version
if you are on a mac, you might be able to find the previous installer here:
~/Library/Caches/VisualStudio/[Replace with Visual Studio Version]/TempDownload
or, if you know the version of the previous version of ios, you can download it from here (change the version number to suite your needs:
https://dl.xamarin.com/MonoTouch/Mac/xamarin.ios-13.14.1.39.pkg.
Xamarin/xamarin-macios Releases, which contains every version
if you are on windows, this post might give you some clues on where to find the local cache instead: https://montemagno.com/cleanup-up-space-xamarin-dev-machine/
For more details: Ans-1 | Ans-2
The latest version of Visual-Studio use the latest version of Xamarin.iOS which may not work with the lower version of Xcode .
So use a lower Xamarin.iOS Version would solve this problem.
It looks like Apple have broken usage of -no_weak_imports with a recent XCode (see https://github.com/mono/mono/issues/19393#issuecomment-606852342 and https://github.com/mono/mono/issues/19393#issuecomment-607126761 ). Upstream Mono appears to have worked around the issue with https://github.com/dotnet/runtime/pull/36436 ) but one wonders why Apple introduced a hard dependency on a weak symbol in their system libraries while still providing the option to disable weak symbols...

Cannot run Qt example in Qt creator: The program has unexpectedly finished

Recently I tried to upgrade Qt to 5.8.0 on Windows 7 32bit from Qt5.6.2 MSVC 2013, and I saw strange issues.
I downloaded and installed Visual Studio 2015 from this link: https://www.visualstudio.com/downloads/
After I installed Qt 5.8.0 MSVC 2015 version, Qt Creator 4.2.1 can be launched. From the welcome page, I selected the example named: "Address Book Example". And then after clicking "Configure" project, the project is listed in Qt Creator.
Now I tried to build the project, which was successful. But when I tried to run the project, I got the following error messages:
Starting C:\Qt\Examples\Qt-5.8\widgets\itemviews\build-addressbook-Desktop_Qt_5_8_0_MSVC2015_32bit-Debug\debug\addressbook.exe...
The program has unexpectedly finished.
C:\Qt\Examples\Qt-5.8\widgets\itemviews\build-addressbook-Desktop_Qt_5_8_0_MSVC2015_32bit-Debug\debug\addressbook.exe crashed.
I didn't see this kind of error before when I was using Qt5.6.2 with MSVC 2013. I also tried the following things:
Reinstall Qt5.8.0 MSVC 2015 using offline installer
Reinstall Qt5.7.1 MSVC 2015 using offline installer
Reinstall Qt5.6.2 MSVC 2015 using offline installer
Reinstall Qt5.8.0 using online installer, in which I chose MSVC 2013 and MSVC 2015
I still kept getting the same error messages.
When I went to the debug folder, double clicked the exe file, it said some Qt dlls were missing. I then manually copied to the debug folder, then the exe can be run with no problem.
Now I want to run app from inside Qt Creator, but not sure what is the issue with Qt Creator 4.2.1. I researched in Google for a few hours, but still cannot find out the reason why Qt Creator cannot run projects even it's own Example projects. (same errors for my own projects)
I feel it must be something to do with Qt creator environment/settings. Anyone has any ideas about this problem?
Update 1:
I tried to use MinGW with Qt Creator, the addressbook example can be run correctly. Looks like it's related to MSVC 2015. I need MSVC 2015, because all other environments don't support webenginewidgets, and I got:
:-1: error: Unknown module(s) in QT: webenginewidgets
Not sure if this is a bug in Qt or Qt creator.
Update 2:
In my Qt Creator, I saw warning icons for MSVC 2013 and MSVC 2015 compilers, please see the screenshots below:
I finally resolved the issue. The reason is that the Windows 10 SDK is missing.
After I download and install all default components of the Windows 10 SDK, everything worked on Windows 7 32bit.
Basically, to make sure we can use Qt5.8.0+ on Windows (including Qt WebEngine), we need to install both:
Visual Studio 2015, and
Windows 10 SDK
I'm late but I've found the main culprit is "ucrtbased.dll".
I didn’t install Windows 10 SDK.
I'm on Windows 7 SP1 x64, Qt 5.9.2 with Visual Studio Build Tools 2015 (v14.0.25420.1) and Windows 8.1 SDK with MS Debugger Tools (CDB) installed. The Release Configuration builds are without any issue but the Debug Configuration exhibits the same crash behavior. The fix is simple. The normal install of Visual Studio Build Tools 2015 with Win8.1 SDK places "ucrtbased.dll" in "C:\Program Files (x86)\Windows Kits\10\bin\x64\ucrt" for 64-bit and "..\x86\ucrt" for 32-bit builds - even the Windows 10 SDK is not installed. If these are included in system path, or copied to the Qt's current project build folder, the issue is simply resolved.

Installation of Qt 5.6.1 MSVC 2015 Update 3

I have encountered the following problem during a routine Qt 5 installation combined with Visual Studio 2015:
I did these steps:
Installed visual studio 2015 enterprise
Updated it to Update 3 (recent)
Installed X64 Debuggers And Tools-x64_en-us + 32bit
Installed Qt 5.6
I inspected the automatic detection of compiler, debuggers and the build environment comparing it to another machine, and all look OK.
Created new test projects using empty console application, Qt quick.
All fail during compilation step, with exactly 20 errors:
20 compile errors
I noted that the errors appears in code files of VC++ include path
for example in the code file xtr1common (first error in the picture).
I installed and used Qt with MSVC including MSVC Update 2 many times before but not with Update 3. What went wrong? How do I fix the problem?
Just go to windows updates and remove the visual studio update 3. This will return visual studio to original status including the C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE folder.
I hope there is a better answer than this because I needed the visual studio update 3 for other purposes than Qt. But what to do if the Qt 5.6.1 is not compatible with Visual Studio 2015 update 3. If someone have a better answer please hit me.

Qt in Visual Studio 2012, "error C1083: Cannot open include file: 'stddef.h': No such file or directory"

I errors and a warning when I try to compile some openGL projects for Qt.
Many of them are:
error C1083: Cannot open include file: 'stddef.h': No such file or directory d:\documents\code\qt5pack\qt-everywhere-opensource-src-5.0.1\qtbase\src\corelib\global\qglobal.h 46 1 01-createcontext
Using Qt and OpenGL with Visual Studio or Creator is giving me a headache. I noticed that my $VCInstallDir is to VC10.. I don't know if that is anything important.
I had this exact problem and struggled with it for a few days. My situation was this:
Had VSE 2013 installed, Qt 5.3.1 (64 bit), and OpenCV 2.4.9 (64 bit). Was working fine, building projects in QtCreator + OpenCV using the VS 2013 compiler. Then I was trying to incorporate CUDA and found that the CUDA compiler was not compatible with VS 2013 so had to downgrade to 2012. That's when the problem started. Tried repairing, uninstalling, reinstalling...nothing seemed to work. I kept reading in posts that it probably had something to do with the Microsoft Platform SDK not being installed or installed correctly. So I went to this site to download a fresh copy and noticed that down the page there was a section that described how to uninstall it, including some manual steps.
http://msdn.microsoft.com/en-us/windows/desktop/bg162891.aspx
So, here's what I did to get everything working. Maybe all these steps were not required, but this is what I did.
1) uninstall VSE 2012 (I had already gotten rid of VSE 2013), and deleted the folders C:\Program Files (x86)\Microsoft Visual Studio 11.0 and C:\Program Files (x86)\Microsoft Visual Studio 10.0 which both had some residual stuff in them after the uninstall. NOTE: Remember that VS 2012 is really Visual Studio 11.0 and VS 2010 is Visual Studio 10.0.
2) uninstall all Microsoft .NET Framework SDKs (there were a few on my machine 4.5 and 4.51)
3) uninstall all Microsoft .NET Framework Multi-Targeting Packs, which apparently is part of the SDK. Again, there were several on my machine...I guess from different versions.
4) reinstall VSE 2012
5) reinstall the Microsoft SDK. For me this was the latest version 8.1 which works for Windows 7, 8, and 8.1.
6) made sure all my kits were right in QtCreator, which they were, and it all worked again.
Hope this helps someone.
Now I can get back to re-compiling OpenCV with all the NVidia/GPU options. :-)
VS2012 should actually point to VC11...
Have you checked your projects properties? Have you installed the Windows SDK?
I am very new to building, making and configuring projects and compiling from source. I don't know what exactly was wrong, but I think it might have had to do with the VS2010 express installation I did earlier this month. I "repaired" VS2012 using the uninstaller and now it seems to work.

Resources