bitstadium / HockeySDK-Xamarin

HockeyApp was retired and the SDKs are deprecated. Please use App Center instead.
https://github.com/microsoft/appcenter-sdk-dotnet
Other
56 stars 34 forks source link

Don't build on iOS #56

Closed Spierki closed 7 years ago

Spierki commented 8 years ago

I followed your tutorial to install hockeyapp for iOS but I got this error:

Failed to resolve "System.Void ObjCRuntime.UserDelegateTypeAttribute::.ctor(System.Type)" reference from "Xamarin.iOS, Version=0.0.0.0, Culture=neutral, PublicKeyToken=84e04ff9cfb79065"

My code in my app delegatte is:

public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
            //Get the shared instance
            var manager = BITHockeyManager.SharedHockeyManager;

            //Configure it to use our APP_ID
            manager.Configure("my_key");

            manager.LogLevel = BITLogLevel.Debug;

            //Start the manager
            manager.StartManager();

            //Authenticate (there are other authentication options)
            manager.Authenticator.AuthenticateInstallation();

            global::Xamarin.Forms.Forms.Init();

            ZXing.Net.Mobile.Forms.iOS.Platform.Init();

            LoadApplication(new App());    

            return base.FinishedLaunching(app, options);
        }

I uninstalled the library and run my code again to see if the problem was in my project but it's running correctly until I had the HockeyApp code.

I saw this thread talking about the problem: https://support.hockeyapp.net/discussions/problems/62772-ios-build-error-on-xamarinforms But there is no solution.

Have you an idea ?

galdanay commented 8 years ago

i have also a problem when trying to build xamarin project ios at debug: /.....MTOUCH: Error MT3001: Could not AOT the assembly '..../obj/iPhone/Debug/mtouch-cache/64/Build/HockeySDK.iOSBindings.dll' (MT3001) and at relase: ..MTOUCH: Error MT2002: Failed to resolve "System.Void ObjCRuntime.UserDelegateTypeAttribute::.ctor(System.Type)" reference from "Xamarin.iOS, Version=0.0.0.0, Culture=neutral, PublicKeyToken=****" (MT2002)" any update?

ElektrojungeAtWork commented 8 years ago

Hey guys,

before I can look into your issues any further, I need some more context:

If you don't want to share publicly, please contact us via our support.

Thanks, Benny

galdanay commented 8 years ago

I am using :mtouch 9.8.1.4 (c7sr0: 3cf8aae) and HockeySDK.Xamarin 4.1.0 . (i also try to use Component : HockeyApp for ios 4.1.0.3 and i had the same build errors). Thanks Gal.

Update - i downgrade to HockeyApp for ios 4.1.0.2 and there no problem in this version.

Spierki commented 8 years ago

@TroubleMakerBen Hey, looking to your question, I decided to update everything on my side before answer.

The problem no longer exist. This is my configuration

ElektrojungeAtWork commented 8 years ago

@spierki thanks for letting me know. @galdanay can you please update your toolchain and see if this solves the issue for you, too?

njale commented 8 years ago

Having exactly the same problem. Reverting back to v. 4.1.0-beta3 avoids it.

ElektrojungeAtWork commented 8 years ago

@njale and your toolchain is also: Xamarin forms 2.3.2.127 HockeyApp 4.1.0 mtouch 10.0.1.8?

We're actively looking into this. Stay tuned!

njale commented 8 years ago

I dont use Xamarin forms, but MVVMCross 4.3

Microsoft Visual Studio Professional 2015 Version 14.0.25425.01 Update 3 Microsoft .NET Framework Version 4.6.01586 Xamarin 4.1.2.18 (fcbe082) Xamarin.Android 6.1.2.21 (1cf254d) Xamarin.iOS 9.8.2.22 (f37444a) HockeyApp v. 4.1.0-beta3 (Release Version 4.1.0 causes problem)

Problem: Error Failed to resolve "System.Void ObjCRuntime.UserDelegateTypeAttribute::.ctor(System.Type)" reference from "Xamarin.iOS, Version=0.0.0.0, Culture=neutral, PublicKeyToken=84e04ff9cfb79065"

Error does not occur on Android, only IOS

cjlotz commented 8 years ago

Getting the same issue on my side after updating from 4.1.0-beta1 to HockeyApp 4.1.0. Any further progress on the issue? Getting this when compiling in Xamarin Studio on Mac. My Xamarin/iOS dev tool chain:

Xamarin Studio Business Version 6.0.2 (build 73) Installation UUID: 7648f41a-6831-48ea-aa5c-08fb16cfd847 Runtime: Mono 4.4.2 (mono-4.4.0-branch-c7sr1/f72fe45) (64-bit) GTK+ 2.24.23 (Raleigh theme) Package version: 404020011

Apple Developer Tools Xcode 7.3 (10183.3) Build 7D175

Xamarin.iOS Version: 9.8.2.22 (Xamarin Business) Hash: f37444a Branch: cycle7-sr1 Build date: 2016-07-28 12:17:02-0400

cjlotz commented 8 years ago

Perhaps stating the obvious here, but this seems to be related to linking. If I turn off linking during the compilation it compiles successfully. Obviously not a workaround for production apps.

Also, looking through the other reports, it seems that it might work if you update your Xamarin toolchain to the latest with XCode 8?

MrLinDowsMac commented 8 years ago

iOS build only compiled when I updated Xamarin Forms to 2.3.2.127 and downgrade HockeySDK.Xamarin to 4.1.0-beta3

ElektrojungeAtWork commented 8 years ago

Hello everyone,

The issue you are seeing is a bug in the HockeySDK. Version 4.1.0 if the SDK (and 4.1.0.3 of the component) was build with cycle 8, which requires the 'UserDelegateTypeAttribute'. This is not present if you are using cycle 7. So if you upgrade to the latest and greatest of Xamarin Studio, mTouch, Xamarin.iOS, you should be able to build and run your app on an iOS device. This translates to the following version as of today:

That said, we're planning to release 4.1.1 of the SDK soon, which will include the latest native iOS SDK and bring back compatibility with older versions of the Xamarin toolchain.

Apologies for the delayed response from our side and thanks for your patience.

Best, Benny

AdamApplicita commented 8 years ago

If we run the app locally on a iOS device via Visual Studio it compiles and runs fine. The build breaks during our VSTS Xamarin iOS release build keeps failing with the following error after adding the HockeyApp SDK reference:

MTOUCH: error MT2002: Failed to resolve "System.Void ObjCRuntime.UserDelegateTypeAttribute::.ctor(System.Type)" reference from "Xamarin.iOS, Version=0.0.0.0, Culture=neutral, PublicKeyToken=84e04ff9cfb79065"

If I remove all references to the HockeyApp SDK the VSTS Xamarin iOS release build

ElektrojungeAtWork commented 8 years ago

@AdamApplicita please have a look at what I wrote above. You are running into the exact same issue that others are seeing where UserDelegateTypeAttribute is missing.

ElektrojungeAtWork commented 7 years ago

Closing this issue. We've talked about bringing back cycle 7 support, as cycle 8 is necessary to insure compatibility with Xcode 8 anyway, we won't provide downward compatibility.

Thx for understanding this decision =)