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

[BUG] iOS Value Null When First Time Accessing BlobCache #608

Open
albilaga opened this issue Oct 16, 2020 · 1 comment
Open

[BUG] iOS Value Null When First Time Accessing BlobCache #608

albilaga opened this issue Oct 16, 2020 · 1 comment
Labels

Comments

@albilaga
Copy link
Contributor

Describe the bug
I got error value is null on akavache. This is happened only when app get deployed into real device via testflight. Not happening when using debug or even release mode in real device. After rge

Steps To Reproduce

  1. Add Akavache and AppCenter into iOS and Xamarin.Forms project
  2. Add
Akavache.Registrations.Start("Mobile Timesheet");
BlobCache.ForcedDateTimeKind = DateTimeKind.Local;
BlobCache.EnsureInitialized();

in App.xaml.cs constructor
3. Add some service to use Akavache
4. Deploy in real device via testflight with linker behavior : Link SDK only
5. When accessing akavache it got error Value cannot be null. Parameter name: source
6. This is not happen when debug or release mode in real device without testflight

Expected behavior
The app should can access akavache even when deployed via testflight

Environment

  • OS: iOS 13.6, iOS 14.0
  • Version: 6.10.20
@albilaga albilaga added the Bug label Oct 16, 2020
@albilaga
Copy link
Contributor Author

Just got notified from my coworker that it is working with adding

[Preserve]
    public static class LinkerPreserve
    {
        static LinkerPreserve()
        {
            throw new Exception(typeof(SQLitePersistentBlobCache).FullName);
        }
    }


    public class PreserveAttribute : Attribute
    {
    }

which should be not needed according to docs if already have

Akavache.Registrations.Start("Mobile Timesheet");

Maybe we should update the docs?

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

No branches or pull requests

1 participant