Bug 40871 - iOS error during build with Ad-Hoc configuration
Summary: iOS error during build with Ad-Hoc configuration
Status: RESOLVED ANSWERED
Alias: None
Product: iOS
Classification: Xamarin
Component: XI runtime ()
Version: XI 9.10 (C8)
Hardware: PC All
: Normal normal
Target Milestone: 10.0.0 (C8)
Assignee: Bugzilla
URL:
: 42120 42768 46916 46927 47629 ()
Depends on:
Blocks:
 
Reported: 2016-05-04 18:22 UTC by Tiago Crizanto
Modified: 2016-11-22 15:32 UTC (History)
10 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:


Attachments
Full build log (2.46 MB, text/plain)
2016-05-04 19:21 UTC, Tiago Crizanto
Details


Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and 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 Links.

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.

Related Links:
Status:
RESOLVED ANSWERED

Description Tiago Crizanto 2016-05-04 18:22:36 UTC
I updated Xamarin iOS to version 9.9 to solve connection problems in MAC build server. If I try build and IPA file with Ad-Hoc configuration I get the error bellow. In debug configuration I can run/debug the application on MAC iOS simulator.

XCode version: 7.0.1 (7A1001)
SO: OS X Yosemite 10.10.5 and Windows 7 x64
Xamarin: 4.2.0.21 (a532c82)
Xamarin.Android: 6.1.99.224 (804c6cb)
Xamatin.iOS: 9.9.0.719 (3afb4af)
Visual Studio 2015 14.0.25123.00 Update 2

1>------ Build started: Project: Cnhi.Sfm.Droid, Configuration: Release Any CPU ------
2>------ Build started: Project: Cnhi.Sfm.iOS, Configuration: Ad-Hoc iPhone ------
1>D:\TFVC\Commercial.Farm\SFM\Dev\Cnhi.Sfm\Cnhi.Sfm\Cnhi.Sfm.Droid\Properties\AndroidManifest.xml : warning XA0101: @(Content) build action is not supported
1>  Consider app.config remapping of assembly "System.Runtime, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" from Version "1.5.11.0" [] to Version "4.0.0.0" [C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\MonoAndroid\v1.0\Facades\System.Runtime.dll] to solve conflict and get rid of warning.
1>  Consider app.config remapping of assembly "System.Net.Http, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" from Version "1.5.0.0" [] to Version "4.0.0.0" [C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\MonoAndroid\v1.0\System.Net.Http.dll] to solve conflict and get rid of warning.
1>  Consider app.config remapping of assembly "System.Threading.Tasks, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" from Version "1.5.11.0" [] to Version "4.0.0.0" [C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\MonoAndroid\v1.0\Facades\System.Threading.Tasks.dll] to solve conflict and get rid of warning.
1>C:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.Common.CurrentVersion.targets(1820,5): warning MSB3247: Found conflicts between different versions of the same dependent assembly. In Visual Studio, double-click this warning (or select it and press Enter) to fix the conflicts; otherwise, add the following binding redirects to the "runtime" node in the application configuration file: <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"><dependentAssembly><assemblyIdentity name="System.Runtime" culture="neutral" publicKeyToken="b03f5f7f11d50a3a" /><bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.0.0.0" /></dependentAssembly></assemblyBinding><assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"><dependentAssembly><assemblyIdentity name="System.Net.Http" culture="neutral" publicKeyToken="b03f5f7f11d50a3a" /><bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.0.0.0" /></dependentAssembly></assemblyBinding><assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"><dependentAssembly><assemblyIdentity name="System.Threading.Tasks" culture="neutral" publicKeyToken="b03f5f7f11d50a3a" /><bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.0.0.0" /></dependentAssembly></assemblyBinding>
1>  Cnhi.Sfm.Droid -> D:\TFVC\Commercial.Farm\SFM\Dev\Cnhi.Sfm\Cnhi.Sfm\Cnhi.Sfm.Droid\bin\Release\Cnhi.Sfm.Droid.dll
1>  Consider app.config remapping of assembly "System.Runtime, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" from Version "1.5.11.0" [] to Version "4.0.0.0" [C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\MonoAndroid\v1.0\Facades\System.Runtime.dll] to solve conflict and get rid of warning.
1>  Consider app.config remapping of assembly "System.Net.Http, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" from Version "1.5.0.0" [] to Version "4.0.0.0" [C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\MonoAndroid\v1.0\System.Net.Http.dll] to solve conflict and get rid of warning.
1>  Consider app.config remapping of assembly "System.Threading.Tasks, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" from Version "1.5.11.0" [] to Version "4.0.0.0" [C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\MonoAndroid\v1.0\Facades\System.Threading.Tasks.dll] to solve conflict and get rid of warning.
1>C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(2215,3): warning MSB3247: Found conflicts between different versions of the same dependent assembly. In Visual Studio, double-click this warning (or select it and press Enter) to fix the conflicts; otherwise, add the following binding redirects to the "runtime" node in the application configuration file: <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"><dependentAssembly><assemblyIdentity name="System.Runtime" culture="neutral" publicKeyToken="b03f5f7f11d50a3a" /><bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.0.0.0" /></dependentAssembly></assemblyBinding><assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"><dependentAssembly><assemblyIdentity name="System.Net.Http" culture="neutral" publicKeyToken="b03f5f7f11d50a3a" /><bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.0.0.0" /></dependentAssembly></assemblyBinding><assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"><dependentAssembly><assemblyIdentity name="System.Threading.Tasks" culture="neutral" publicKeyToken="b03f5f7f11d50a3a" /><bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.0.0.0" /></dependentAssembly></assemblyBinding>
1>    Processing: obj\Release\res\drawable\splashscreen.xml
1>    Processing: obj\Release\res\values\colors.xml
1>    Processing: obj\Release\res\values\styles.xml
2>  Generated session id: e615528d7e6c9fca84a0d773dbd5af58
2>  Generated build app name: CnhiSfmiOS
2>  Connecting to Mac server 172.18.24.138...
2>  Cnhi.Sfm.iOS -> D:\TFVC\Commercial.Farm\SFM\Dev\Cnhi.Sfm\Cnhi.Sfm\Cnhi.Sfm.iOS\bin\iPhone\Ad-Hoc\SFMCNHi.exe
2>  Detected signing identity:
2>    Code Signing Key: "iPhone Distribution: CompanyProfile (CODE)" (A8CEB837C978034F6057B2525F9D5FDF1919E4C5)
2>    Provisioning Profile: "PROFILENAME" (ID)
2>    Bundle Id: com.cnhi.sfm.ios
2>    App Id: DRSL4D29PE.com.cnhi.sfm.ios
2>  Process exited with code 1, command:
2>  /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang  -Wno-receiver-forward-class -gdwarf-2 -I/Library/Frameworks/Xamarin.iOS.framework/Versions/9.9.0.719/SDKs/MonoTouch.iphoneos.sdk/usr/include -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.0.sdk -Qunused-arguments -miphoneos-version-min=9.0 -arch arm64 -c -o /Users/AS/Library/Caches/Xamarin/mtbs/builds/CnhiSfmiOS/e615528d7e6c9fca84a0d773dbd5af58/obj/iPhone/Ad-Hoc/mtouch-cache/registrar.arm64.o -x objective-c++ /Users/AS/Library/Caches/Xamarin/mtbs/builds/CnhiSfmiOS/e615528d7e6c9fca84a0d773dbd5af58/obj/iPhone/Ad-Hoc/mtouch-cache/64/registrar.m
2>  /Users/AS/Library/Caches/Xamarin/mtbs/builds/CnhiSfmiOS/e615528d7e6c9fca84a0d773dbd5af58/obj/iPhone/Ad-Hoc/mtouch-cache/64/registrar.m:2176:124: error: unknown type name 'UIPress'
2>  static BOOL native_to_managed_trampoline_61 (id self, SEL _cmd, MonoMethod **managed_method_ptr, UIGestureRecognizer * p0, UIPress * p1, const char *r0, const char *r1, const char *r2, const char *r3)
2>                                                                                                                             ^ 
2>  /Users/AS/Library/Caches/Xamarin/mtbs/builds/CnhiSfmiOS/e615528d7e6c9fca84a0d773dbd5af58/obj/iPhone/Ad-Hoc/mtouch-cache/64/registrar.m:7751:74: error: expected a type
2>          -(BOOL) gestureRecognizer:(UIGestureRecognizer *)p0 shouldReceivePress:(UIPress *)p1;
2>                                                                                  ^ 
2>  /Users/AS/Library/Caches/Xamarin/mtbs/builds/CnhiSfmiOS/e615528d7e6c9fca84a0d773dbd5af58/obj/iPhone/Ad-Hoc/mtouch-cache/64/registrar.m:7793:74: error: expected a type
2>          -(BOOL) gestureRecognizer:(UIGestureRecognizer *)p0 shouldReceivePress:(UIPress *)p1
2>                                                                                  ^ 
2>  /Users/AS/Library/Caches/Xamarin/mtbs/builds/CnhiSfmiOS/e615528d7e6c9fca84a0d773dbd5af58/obj/iPhone/Ad-Hoc/mtouch-cache/64/registrar.m:7796:10: error: no matching function for call to 'native_to_managed_trampoline_61'
2>                  return native_to_managed_trampoline_61 (self, _cmd, &managed_method, p0, p1, "UIKit.UIGestureRecognizer, Xamarin.iOS", "UIKit.UIPress, Xamarin.iOS", "UIKit.UIGestureRecognizer+_UIGestureRecognizerDelegate, Xamarin.iOS", "ShouldReceivePress");
2>                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2>  /Users/AS/Library/Caches/Xamarin/mtbs/builds/CnhiSfmiOS/e615528d7e6c9fca84a0d773dbd5af58/obj/iPhone/Ad-Hoc/mtouch-cache/64/registrar.m:2176:13: note: candidate function not viable: no known conversion from 'id' to 'int *' for 5th argument
2>  static BOOL native_to_managed_trampoline_61 (id self, SEL _cmd, MonoMethod **managed_method_ptr, UIGestureRecognizer * p0, UIPress * p1, const char *r0, const char *r1, const char *r2, const char *r3)
2>              ^ 
2>  4 errors generated.
2>C:\Program Files (x86)\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets(680,3): error : Failed to compile the generated registrar code. Please file a bug report at http://bugzilla.xamarin.com
========== Build: 1 succeeded, 1 failed, 4 up-to-date, 0 skipped ==========
Comment 1 Sebastien Pouliot 2016-05-04 18:36:34 UTC
> error: unknown type name 'UIPress'

That's surprising, even if you're using an old Xcode (7.0.x). Still I suspect one of your assemblies is using types that are only available in newer Apple SDK (the latest is Xcode 7.3).

Can you attach the full build log, with `-v -v -v -v` added to the "Additional mtouch arguments" ?

note: do a Clean first so the build log will be complete, otherwise we'll be missing important parts of the build options being used.
Comment 2 Tiago Crizanto 2016-05-04 19:21:27 UTC
Created attachment 15910 [details]
Full build log
Comment 3 Tiago Crizanto 2016-05-04 19:21:41 UTC
Hi Sebastien!

I attached the full build log in a txt file with -v -v -v -v in Additional mtouch arguments.

I'll update the XCode Version. If I get another error or if I can build the IPA file I post the result here.

thanks
Comment 4 Rolf Bjarne Kvinge [MSFT] 2016-05-09 17:05:28 UTC
(In reply to Sebastien Pouliot from comment #1)
> > error: unknown type name 'UIPress'
> 
> That's surprising, even if you're using an old Xcode (7.0.x).

UIPress was introduced in iOS 9.1 (even though Apple's documentation states it was introduced in iOS 9.0, the class is nowhere to be found in the iOS 9.0 SDK).

That means updating to Xcode 7.1+ should fix the build error.
Comment 5 Tiago Crizanto 2016-05-09 17:11:26 UTC
It's right. I updated MAC OS to El Capitan, XCode to 7.3 and all works.
I don't know why I can run the application in debugg mode, but in Ad-Hoc or Release I receive this error.

Thanks for support!
Comment 6 Rolf Bjarne Kvinge [MSFT] 2016-07-28 08:27:03 UTC
*** Bug 42768 has been marked as a duplicate of this bug. ***
Comment 7 Rolf Bjarne Kvinge [MSFT] 2016-07-28 08:28:07 UTC
*** Bug 42120 has been marked as a duplicate of this bug. ***
Comment 8 Rolf Bjarne Kvinge [MSFT] 2016-11-14 15:27:02 UTC
*** Bug 46916 has been marked as a duplicate of this bug. ***
Comment 9 Rolf Bjarne Kvinge [MSFT] 2016-11-14 15:27:24 UTC
*** Bug 46927 has been marked as a duplicate of this bug. ***
Comment 10 Rolf Bjarne Kvinge [MSFT] 2016-11-22 15:32:46 UTC
*** Bug 47629 has been marked as a duplicate of this bug. ***