Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
Mono organizations on
GitHub to continue tracking issues. Bugzilla will remain
available for reference in read-only mode. We will continue to work
on open Bugzilla bugs, copy them to the new locations
as needed for follow-up, and add the new items under Related
Our sincere thanks to everyone who has contributed on this bug
tracker over the years. Thanks also for your understanding as we
make these adjustments and improvements for the future.
Please create a new report on
Developer Community or GitHub with
your current version information, steps to reproduce, and relevant error
messages or log files if you are hitting an issue that looks similar to
this resolved bug and you do not yet see a matching new report.
Created attachment 16469 [details]
"Could not AOT the assembly ... Facebook.dll" when attempting to build for device in the Debug configuration with "Enable incremental builds" switched on
## Temporary Workaround
Switch off "Project Options > Build > iOS Build > Enable incremental builds".
## Regression status: a bug in the Xamarin.Facebook.iOS library, exposed by the more precise AOT build process in Xamarin.iOS 9.8
BAD: Xamarin.Facebook.iOS 4.12.0 + Xamarin.iOS 18.104.22.168 (3cf8aae)
BAD: Xamarin.Facebook.iOS 4.12.0 + Xamarin.iOS 22.214.171.1243 (39ebb77)
GOOD: Xamarin.Facebook.iOS 4.12.0 + Xamarin.iOS 126.96.36.199 (d8bedd0)
Although Xamarin.iOS 9.6 does not hit this issue, the new behavior of the Xamarin.iOS 9.8 AOT process is in fact more "correct." The bug in this case is that none of the `.linkwith.cs` files in the Xamarin.Facebook.iOS library  specify a dependency on the CoreGraphics framework. Those `.linwith.cs` files will need to be updated to address this issue.
(For example, in my quick local tests, adding `Frameworks = "CoreGraphics"` at the end of the `LinkWith` attribute in `Frameworks = "CoreGraphics"` in `FBSDKCoreKit.linkwith.cs` was sufficient to stop the problem.)
## Steps to replicate
Attempt to build the attached test case in the "Debug|iPhone" configuration.
### Steps followed to create the test case
1. Create a new Single View iPhone application.
2. Add the Xamarin.Facebook.iOS 4.12.0 NuGet package to the project.
3. Reference a type from the Facebook library in one of the C# files. For example, add the following line somewhere:
var x = typeof (Facebook.CoreKit.AccessToken);
## BAD Results (on Xamarin.iOS 9.8)
### Error list
> Error MT3001: Could not AOT the assembly '/Users/Shared/Projects/UnifiedSingleViewIphone1/UnifiedSingleViewIphone1/obj/iPhone/Debug/mtouch-cache/64/Build/Facebook.dll'
### Excerpt from the diagnostic build output
> Process exited with code 1, command:
> -framework Foundation
> -framework UIKit
> -lz -ObjC -isysroot
> -Qunused-arguments -miphoneos-version-min=8.0 -arch arm64
> -shared -read_only_relocs suppress -install_name
> @executable_path/libFacebook.dll.dylib -fapplication-extension
> -x assembler
> Undefined symbols for architecture arm64:
> "_CGAffineTransformIdentity", referenced from:
> -[FBSDKWebDialog _transformForOrientation] in FBSDKCoreKit.a(FBSDKWebDialog.o)
> -[FBSDKWebDialog _updateViewsWithScale:alpha:animationDuration:completion:] in FBSDKCoreKit.a(FBSDKWebDialog.o)
## GOOD Results (on Xamarin.iOS 9.6)
The `clang` command line includes 3 more framework options compared to Xamarin.iOS 9.8:
The `clang` command line on Xamarin.iOS 9.6 also _omits_ a few options that are _present_ on Xamarin.iOS 9.8, but I believe those can be ignored for this particular issue:
Created attachment 16470 [details]
Diagnostic build output, detailed version info
*** Bug 41234 has been marked as a duplicate of this bug. ***
*** Bug 41999 has been marked as a duplicate of this bug. ***
## Additional information from one of the duplicate bugs
Why does disabling incremental builds help?
> The reason this works when incremental builds is off, is that in that
> case we build everything together at once, and there are other parts
> of your app that makes us link with CoreGraphics. When incremental
> builds are on, we build each assembly separately, and that also means
> that the dependencies for each assembly must be correct.
Brendan, so this sounds like it can be fixed by the Xamarin.Facebook.iOS team. When can we expect a fix?
Added these frameworks in WeakFrameworks parameter:
As it states Facebook on its cocoapods spec:
Adding these missing frameworks make the app build without a problem.
This fix will be available on version 188.8.131.52 of Facebook iOS component or, for now until the component is released, you can build it by yourself in the following GitHub Xamarin repo:
If you have any doubt, don't hesitate to ask.
Just to let you know this happens also with Google.SignIn.dll (from nuget package https://www.nuget.org/packages/Xamarin.Google.iOS.SignIn/)
Thanks for the workaround and the fix
This is still happening with Google.MobileAds on iOS as well.
Valero, in your App project options, go to Build > iOS Build, select Debug configuration and iPhone platform and verify if you have checked "Enable incremental builds", if so, please uncheck that option and try to compile again.
Let me know your status.
Yes, disabling incremental builds solves the problem. It would be nice to be able to keep it enabled if at all possible though
@Valero, this is a known issue, we are working to solve it. You can follow the bug here: