Reputation: 685
After sending out my update to App Store, the app crashes when downloading it from the App store, however debugging via Xamarin Studio works just fine.
But now when trying to release/debug on my device it starts crashing giving this error:
2013-05-21 10:20:30.933 nytLectio[10969:c07] Could not register the assembly 'MBProgressHUD': MonoTouch.MonoTouchException: Cannot register two managed types ('MBProgressHUD.MTMBProgressHUD' and 'AlexTouch.MBProgressHUD.MBProgressHUD') with the same native name ('MBProgressHUD').
at MonoTouch.Registrar.Registrar.RegisterType (System.Type type, System.Collections.Generic.List`1 exceptions) [0x00000] in <filename unknown>:0
at MonoTouch.Registrar.Registrar.RegisterAssembly (System.Reflection.Assembly assembly) [0x00000] in <filename unknown>:0
I think thats whats leading to the crash, but I have no clue how to fix it, and it confuses me as it works with debug and release in the simulator but not on my device.
Upvotes: 2
Views: 301
Reputation: 43553
Beside @dalexsoto suggestion (to use only one version of the library) you need to find out why this works for you.
But now when trying to release/debug on my device it starts crashing giving this error:
My best guess is that you updated your version of Xamarin.iOS between your original debugging/testing and your application submission to the AppStore.
That why you now have the same issue on your Debug/Release device builds. The newer version reports an error condition where two different types gets registered with the same name (the final behaviour is undefined since we can't predict the registration order).
If this still worked on your local Mac (in Debug/Release builds) then my second best guess would be that your build options for Debug (and/or Release) have different options than your AppStore configuration. That would mean you might not be testing what you're shipping to your customers.
In such case you should review your options, parameters (and if needed the build logs) to ensure they only differ (e.g. debug builds) in ways normal (anticipated) ways (e.g. to create debugging symbols or not).
Upvotes: 1
Reputation: 3412
Hello You are using 2 libraries that binds MBProgressHUD
, MBProgressHUD.MTMBProgressHUD
and AlexTouch.MBProgressHUD.MBProgressHUD
Please just use one, I would recommend using the one on the Xamarin Components Store This a more recent Release of MBProgressHUD
and you can safely replace the current ones you are using.
Btw im the author of AlexTouch.MBProgressHUD.MBProgressHUD
C# Binding and I can tell you it has not been updated recently so I encourage you to use the one on the Components Store. Kudos to Jonathan George for his amazing library.
Hope this helps
Alex
Upvotes: 5
Reputation: 3358
Have you tried changing the name of the class AlexTouch.MBProgressHUD.MBProgressHUD which the error is eluding to?
Upvotes: 0