Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plugin on Nugets doesn't work on simulator #36

Closed
VikasN0204 opened this issue Aug 27, 2016 · 16 comments
Closed

Plugin on Nugets doesn't work on simulator #36

VikasN0204 opened this issue Aug 27, 2016 · 16 comments

Comments

@VikasN0204
Copy link

I tried using demo sample project , its works well on simulator. I want to try on Device too
But when i include the plugin 0.0.17 to my Xamarin Forms iOS/Android, it returns me below error.

I have update Xamarin on my windows Xamarin and Mac Xamarin
I even follow step at #3 --steps that are in Images you pushed but it doen't work for me..

O.s 9.3
SImulator - ios 9.3 Air 2 /iOS 9.2 iPad
android

I got this error when i call the FirstPopupPage.

{System.NullReferenceException: Object reference not set to an instance of an object
at Rg.Plugins.Popup.Animations.FadeContentAnimation.Preparing (Xamarin.Forms.View content, Rg.Plugins.Popup.Pages.PopupPage page) [0x00008] in :0
at Rg.Plugins.Popup.Animations.ScaleAnimation.Preparing (Xamarin.Forms.View content, Rg.Plugins.Popup.Pages.PopupPage page) [0x00000] in :0
at Rg.Plugins.Popup.Pages.PopupPage.PreparingAnimation () [0x0001c] in :0
at Rg.Plugins.Popup.Services.PopupNavigation.PushAsync (Rg.Plugins.Popup.Pages.PopupPage page, Boolean animate) [0x0002d] in :0
at Rg.Plugins.Popup.Extensions.NavigationExtension+d__0.MoveNext () [0x0000a] in :0
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in /Users/builder/data/lanes/3539/f37444ae/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/external/referencesource/mscorlib/system/runtime/exceptionservices/exceptionservicescommon.cs:143
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x00047] in /Users/builder/data/lanes/3539/f37444ae/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/external/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:187
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x0002e] in /Users/builder/data/lanes/3539/f37444ae/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/external/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:156
at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x0000b] in /Users/builder/data/lanes/3539/f37444ae/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/external/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:128
at System.Runtime.CompilerServices.TaskAwaiter.GetResult () [0x00000] in /Users/builder/data/lanes/3539/f37444ae/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/external/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:113
at bizzmapp.Videos+d__16.MoveNext () [0x0005d] in G:\Arjun_TL\Divyesh Patel Project\bizzmapp\bizzmapp\bizzmapp\Pages\Videos.xaml.cs:929 }

@acaliaro
Copy link

Have you init the plugin in AppDelegate?

@rotorgames
Copy link
Owner

@VikasN0204 Hello friend. Please, give me source code or link of you repository

@VikasN0204
Copy link
Author

VikasN0204 commented Aug 27, 2016

@acaliaro , Yes.I have added Popup.Init() in Appdelegate. I follow all instruction mentioned in the example.
@rotorgames , Sorry I cant give the original code. But I can create a sample project and give it to you which is similiar to the my project. It will fine for you.

@rotorgames
Copy link
Owner

@rotorgames , Sorry I cant give the original code. But I can create a sample project and give it to you which is similiar to the my project. It will fine for you.

@VikasN0204 Ok. Write me when create repository.

@VikasN0204
Copy link
Author

@rotorgames
https://github.com/VikasN0204/FormsiOSAndroid

I am new to Github. I have uploaded my repository. If you unable to get my repository,let me know, I will sent it again.

@rotorgames
Copy link
Owner

@VikasN0204 Your repository is empty. Please add files in your repository

@VikasN0204
Copy link
Author

@rotorgames ,
https://github.com/VikasN0204/FormsiOSAndroid >> bizzmapp.rar. Its a sample App.

Can you try once again.

@rotorgames
Copy link
Owner

@VikasN0204 This error is fix in 1.0.0.pre5.

Error throw because Content in PopupPage is empty.
You need create view and add is in Content before call PushPopupAsync

@VikasN0204
Copy link
Author

@rotorgames ,
If i upgrade to 1.0.0.pre5, still do i need to create view.
I am not getting you about creating view. I have 2 xaml page i.e on 1 xaml's click button i am calling 2nd xaml page which is similar to you sample project.

I am new to xamarin. Could you elaborate . Thanks.

@rotorgames
Copy link
Owner

@VikasN0204 This ticket only for Rg.Plugins.Pupup issues. You need stady Xamarin.Forms documentation before.

@VikasN0204
Copy link
Author

@rotorgames ,
Thanks . Do i still need to add view, if i upgrade to 1.0.0.pre5 ( i have 0.0.17 currently). Because when i refer your sample and run that at my end, it worked. It is a simple code and no view created. So i got confused and wanted to know regarding to it. As i have to call the firstPopuppage from Mainpage. I have integrated plugin to all projects.

@rotorgames
Copy link
Owner

@VikasN0204 You code is ok. You need create Content or update `1.0.0-pre5' for error not throw.

@VikasN0204
Copy link
Author

VikasN0204 commented Aug 28, 2016

@rotorgames , Thanks, Ok where do i need to create Content . My CategoryVideoView is content page & its on its button click , i am calling below method.

        private async void RightPopup()
        {
            try
            {
                var page = new RightPopupPage();              
                await Navigation.PushPopupAsync(page);
            }
            catch (Exception ex)
            {
                string mssg = ex.Message;
                //throw;
            }

        }

and RightPopUp page is inherited from PopupPage. Even PopupPage itself inherited from content Page.
PopupPagexaml.cs

public partial class RightPopupPage : PopupPage //: ContentPage
{
public RightPopupPage()
        {
            //InitializeComponent();
            this.BackgroundColor = Color.FromHex("#2B78E4");
        }
}

I am still clueless ? Do you mean inside xaml, i have to add <Content.page> </Content.page> tag around my controls.

@rotorgames
Copy link
Owner

I am still clueless ? Do you mean inside xaml, i have to add tag around my controls.

Yes or do:

public RightPopupPage()
        {
            //InitializeComponent();
            this.BackgroundColor = Color.FromHex("#2B78E4");

           Content = new ContentView();
        }
}

But if you use xaml page, you need invoke InitializeComponent in constructor.

@VikasN0204
Copy link
Author

@rotorgames Thanks. I will check at my end.

@VikasN0204
Copy link
Author

VikasN0204 commented Aug 29, 2016

@rotorgames , After including your code, the project doesn't not throw any error but also doesn't show up the popup at all. I can only see gray screen.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants