Comments (8)
Which version of BTProgressHud?
from btprogresshud.
As title BTProgressHUD 1.3.1
from btprogresshud.
Same problem .
I cannot use the functions ShowSuccessWithStatus and ShowErrorWithStatus
the app crashes at line 440 of ProgressHUD.cs
System.NullReferenceException: Object reference not set to an instance of an object
at BigTed.ProgressHUD.ShowImageWorker (UIKit.UIImage image, System.String status, System.TimeSpan duration) [0x0005a] in D:\a\BTProgressHUD\BTProgressHUD\BTProgressHUD\ProgressHUD.cs:440
at BigTed.ProgressHUD+<>c__DisplayClass26_0.b__0 () [0x00000] in D:\a\BTProgressHUD\BTProgressHUD\BTProgressHUD\ProgressHUD.cs:179
at Foundation.NSActionDispatcher.Apply () [0x00000] in /Library/Frameworks/Xamarin.iOS.framework/Versions/13.14.1.39/src/Xamarin.iOS/Foundation/NSAction.cs:62
at at (wrapper managed-to-native) ObjCRuntime.Messaging.void_objc_msgSend_IntPtr_IntPtr_bool(intptr,intptr,intptr,intptr,bool)
at Foundation.NSObject.InvokeOnMainThread (System.Action action) [0x00007] in /Library/Frameworks/Xamarin.iOS.framework/Versions/13.14.1.39/src/Xamarin.iOS/Foundation/NSObject2.cs:605
at BigTed.ProgressHUD.ShowImage (UIKit.UIImage image, System.String status, System.Double timeoutMs) [0x00022] in D:\a\BTProgressHUD\BTProgressHUD\BTProgressHUD\ProgressHUD.cs:179
at BigTed.ProgressHUD.ShowErrorWithStatus (System.String status, System.Double timeoutMs) [0x00000] in D:\a\BTProgressHUD\BTProgressHUD\BTProgressHUD\ProgressHUD.cs:173
at BigTed.BTProgressHUD.ShowErrorWithStatus (System.String status, System.Double timeoutMs) [0x00000] in D:\a\BTProgressHUD\BTProgressHUD\BTProgressHUD\BTProgressHUD.cs:55
at KCAAPP2.Model.ReleTableCell.errorProgress () [0x00001] in /Users/Shared/Develop/apps/Kronotech/KCAAPP-IOS/KCAAPP2/Model/ReleTableCell.cs:149
at Foundation.NSActionDispatcher.Apply () [0x00000] in /Library/Frameworks/Xamarin.iOS.framework/Versions/13.14.1.39/src/Xamarin.iOS/Foundation/NSAction.cs:62
at at (wrapper managed-to-native) UIKit.UIApplication.UIApplicationMain(int,string[],intptr,intptr)
at UIKit.UIApplication.Main (System.String[] args, System.IntPtr principal, System.IntPtr delegate) [0x00005] in /Library/Frameworks/Xamarin.iOS.framework/Versions/13.14.1.39/src/Xamarin.iOS/UIKit/UIApplication.cs:86
at UIKit.UIApplication.Main (System.String[] args, System.String principalClassName, System.String delegateClassName) [0x0000e] in /Library/Frameworks/Xamarin.iOS.framework/Versions/13.14.1.39/src/Xamarin.iOS/UIKit/UIApplication.cs:65
at KCAAPP2.Application.Main (System.String[] args) [0x00001] in
from btprogresshud.
Hi Guys, think this is a problem with images not being included. Whenever i called ShowSuccessWithStatus i would get a null ref exception, this was due to the SuccessImage being null.
I downloaded the library and moved the images to my own resources folder and it fixed the problem for me.
The strange part was when i added the BTProgressHud folder to my project the images still had a build action of BundleResources but still caused the null ref exception. They did not load in correctly until i added them to my own Resources folder.
Think this is related
from btprogresshud.
@tony98789 looks like you are right. Tested #76 though and it doesn't seem to solve the issue. Will investigate this further.
@Redth do you have any idea, why BundleResources don't make it into the DLL?
from btprogresshud.
I think they may only get included if it’s a binding project. You might have to add a .targets file to the nuget package and include the assets directly in the nupkg and add the <ItemGroup><BundleResource Include=“$(MSBuildThisFileDirectory)\assets\image.png” /></ItemGroup>
(or similar - that’s a from memory typed on phone code snippet).
from btprogresshud.
@Redth I've just been working a bit on this. I managed to get the images and .targets file added to the NuGet package and the images seem to get included in the built IPA file when referencing the produced NuGet.
However, it still doesn't seem to pick up the images when trying to load them from bundle. I see the images on the simulator file system.
I added a file called BTProgressHud.targets
to the NuGet with following contents (My branch here):
<Project>
<ItemGroup>
<BundleResource Include="$(MSBuildThisFileDirectory)\BTProgressHud\error_7.png" />
<BundleResource Include="$(MSBuildThisFileDirectory)\BTProgressHud\[email protected]" />
<BundleResource Include="$(MSBuildThisFileDirectory)\BTProgressHud\error.png" />
<BundleResource Include="$(MSBuildThisFileDirectory)\BTProgressHud\[email protected]" />
<BundleResource Include="$(MSBuildThisFileDirectory)\BTProgressHud\success_7.png" />
<BundleResource Include="$(MSBuildThisFileDirectory)\BTProgressHud\[email protected]" />
<BundleResource Include="$(MSBuildThisFileDirectory)\BTProgressHud\success.png" />
<BundleResource Include="$(MSBuildThisFileDirectory)\BTProgressHud\[email protected]" />
</ItemGroup>
</Project>
I don't really see what else should be needed for this to work?
from btprogresshud.
BTProgressHUD.1.3.2-bugfix-missing-assets.1.zip
Here is a screenshot of the package contents exploring with NuGet Package Explorer. I've also attached a NuGet package (just rename to .nupkg)
from btprogresshud.
Related Issues (20)
- Can't resolve the reference 'UIKit.UIColor UIKit.UIColor::get_SystemBackground()' HOT 6
- Add NuGet to Maui Project HOT 8
- .NET MAUI Support? HOT 1
- ForDefaultWindow() can return `null`
- Nu get package HOT 2
- Crash: Window.Level not normal HOT 1
- iOS 11 - Appearance Changes HOT 6
- Using a lot of Memory on App HOT 2
- Doesn't supports .net standard 2.0 HOT 1
- Xamarin Forms : Acr userdialog loading indicator not showing in Center HOT 8
- Crashes on iOS 12 or older devices HOT 6
- reviving old xmaring project; type BTProgressHUD exists in Acr.UserDialogs HOT 2
- Crash on iOS 15 HOT 17
- Release 1.3.4 seems to break Acr.UserDialogs HOT 5
- Namespace change makes it inconvenient to use methods in BTProgressHUD static class HOT 3
- How to disable accessibility focus for indicator and label?
- Object reference not set to an instance of an object HOT 1
- iOS 15 still crashes intermittently HOT 3
- MacCatalyst Support HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from btprogresshud.