lex.db icon indicating copy to clipboard operation
lex.db copied to clipboard

Xamarin Forms iOS - Path is Null

Open iupchris10 opened this issue 8 years ago • 4 comments

I'm developing a cross platform app in Xamarin Forms. I have added Lex.DB to my Portable Class Library. When I try to call Initialize() on DbInstance, I receive a NullReferenceException error. This only happens in iOS (both device and simulator), but it works fine on Android. I notice that the Path property is null on DbInstance (see screenshot).

What am I doing wrong here? screen shot 2016-02-22 at 1 19 25 pm

screen shot 2016-02-22 at 1 23 30 pm

iupchris10 avatar Feb 22 '16 18:02 iupchris10

I'm not 100% sure, but I guess that your main iOS application does not reference Lex.DB. This is required step for bait&switch PCL deployment.

Kind regards, Lex

On 22 Feb 2016, at 19:24, "iupchris10" [email protected] wrote:

I'm developing a cross platform app in Xamarin Forms. I have added Lex.DB to my Portable Class Library. When I try to call Initialize() on DbInstance, I receive a NullReferenceException error. This only happens in iOS (both device and simulator), but it works fine on Android. I notice that the Path property is null on DbInstance (see screenshot).

What am I doing wrong here?

— Reply to this email directly or view it on GitHub.

demigor avatar Feb 22 '16 20:02 demigor

Thanks for responding - I have tried both with & without reference in the native iOS project, to no avail. I should note that it also does not work in Native Xamarin.iOS (see screenshot).

I am using Xamarin Studio, if that matters...

screen shot 2016-02-22 at 3 38 34 pm

I'm using v1.2.6

iupchris10 avatar Feb 22 '16 20:02 iupchris10

UPDATE:

I manage to get it working if I build the Lex.Db.IOS project from source and then reference the resulting Lex.Db.DLL file in my iOS project, instead of using the NuGet package. My PCL is still using the NuGet package.

It seems I only have an issue when I add Lex.Db from NuGet.

iupchris10 avatar Feb 23 '16 16:02 iupchris10

@iupchris10 Hi Cris, I am too developing app in Xamarin forms. Me too getting https://github.com/step-up-labs/firebase-database-dotnet/issues/75 error. Does it required to install NuGet Package in all Platforms specific projects too. Can you share your sample project. Thanks in advance.

pallavbohara avatar May 29 '17 13:05 pallavbohara