Comments (19)
We do not have dependency on any 3rd party sqlite libraries on Xamarin.iOS, we use the system one and that conflicts at runtime with Avakache which uses a 3rd party library for sqlite.
What Jae answered is that the runtime error can be avoided by initializing MobileCenter before.
from appcenter-sdk-dotnet.
I am considering leaving this one opened for visibility and avoid duplicates.
from appcenter-sdk-dotnet.
Howdy,
One of the maintainers for Akavache here. We aren't a huge fan of bundle_green, because it means an app is not using the same SQLite version on all platforms. This logic was part of the discussion back when Akavache chose to use bundle_e_sqlite3.
Eventually Microsoft is going to get an edge case where tests are green and they'll ship a a red build unknowingly for the iOS platform.
Eric (author of sqlpcliteraw) advocates using bundle_e_sqlite3 for these reasons but agrees that standardizing on a single bundle is not the 100% path to success. Rather it is just a path to a different kind of frustration. For example there are alternatives implementations of Sqlite such as Chipher and Couchbase.Lite.
This is discussed further over at
https://reactivex.slack.com/archives/C02CBKUV8/p1504541597000250 - send an email to [email protected] for a slack invitation.
from appcenter-sdk-dotnet.
MobileCenter must be started prior to any 3rd party libraries that are using custom SQLite. If you do so, there shouldn't be any issues with Akavache 5.0.
from appcenter-sdk-dotnet.
No answer in 7 days, closing. Will reopen if needed.
from appcenter-sdk-dotnet.
@guperrot and @jaelim-ms there are issues and will be more issues like this raised in the future. Please start a conversation with the library author that you build upon and use as a dependancy for more specifics. This is a design issue, not a support issue.
from appcenter-sdk-dotnet.
@guperrot thanks for the convo. Learned a few things (thank-you) - not sure how we can resolve this one considering how Mobile Centre for .NET is constructed. Please close this issue out and Akavache will keep tracking over at reactiveui/Akavache#382
Summary:
- Azure Mobile Centre is actually developed as objective-c first; then that library is bundled up into an assembly w/p/invoke headers/bindings. See https://github.com/Microsoft/mobile-center-sdk-ios/tree/develop/MobileCenter/MobileCenter
- There's no easy way out of this situation; the only way out of this hot mess would be if the entire .NET ecosystem started using and standardized on
bundle_green
(i.e. don't ship sqlite for ios) but that still wouldn't fix consumers who use sqlite encryption or couchbase lite.
from appcenter-sdk-dotnet.
I send the code to Azure Mobility group, too.
The code where to init is into app.cs and I init the Mobile Library into appstart before Akavache.
`Xamarin Forms.
public App()
{
InitializeComponent();
FlowListView.Init();
//MainPage = new Harley_Davidson_Protection.MainPage();
//BlobCache.ApplicationName = "HDAkavache"; // Init Akavache
var menuPage = new MenuPage();
NavigationPage = new NavigationPage(new DashboardPage())
{
BarBackgroundColor = Color.FromHex("#000"),
BarTextColor = Color.White
};
//NavigationPage.BarBackgroundColor = Color.Black;
//NavigationPage.BarTextColor = Color.FromHex("#f48322");
//NavigationPage.BarTextColor = Color.White;
RootPage = new RootPage();
RootPage.Master = menuPage;
RootPage.Detail = NavigationPage;
MainPage = RootPage;
Color origPageBgColor = Color.Black;
RootPage.IsPresentedChanged += async (object sender, EventArgs e) =>
{
if (Xamarin.Forms.Device.OS == TargetPlatform.iOS)
{
if (RootPage.IsPresented)
{
var currentPage = ((NavigationPage)RootPage.Detail).CurrentPage;
origPageBgColor = currentPage.BackgroundColor;
currentPage.BackgroundColor = Color.Black;
currentPage.FadeTo(0.5);
if (currentPage.BackgroundColor == Color.Default)
{
currentPage.BackgroundColor = Color.White;
}
menuPage.Icon = "cross16.png";
}
else
{
var currentPage = ((NavigationPage)RootPage.Detail).CurrentPage;
currentPage.BackgroundColor = origPageBgColor;
menuPage.Icon = "menu16.png";
currentPage.FadeTo(1.0);
}
}
};
}
protected override void OnStart()
{
// Handle when your app starts
Push.PushNotificationReceived += (sender, e) => {
// Add the notification message and title to the message
var summary = $"Push notification received:" +
$"\n\tNotification title: {e.Title}" +
$"\n\tMessage: {e.Message}";
// If there is custom data associated with the notification,
// print the entries
if (e.CustomData != null)
{
summary += "\n\tCustom data:\n";
foreach (var key in e.CustomData.Keys)
{
summary += $"\t\t{key} : {e.CustomData[key]}\n";
}
}
// Send the notification summary to debug output
System.Diagnostics.Debug.WriteLine(summary);
CrossLocalNotifications.Current.Show("Harley Davidson Protection", summary);
};
MobileCenter.Start("ios=xyzagd;" +
"android=dfghtke;",
typeof(Analytics), typeof(Crashes), typeof(Push));
}`
from appcenter-sdk-dotnet.
I replied to you already, looks you are initializing Akavache in a constructor. Please move it after MobileCenter Start call.
from appcenter-sdk-dotnet.
You can call MobileCenter.Start in constructor if you want by the way.
from appcenter-sdk-dotnet.
I already did what you say but I had the same problem.
from appcenter-sdk-dotnet.
@biapar can you test with 0.16.0? A change has been made in iOS database implementation that could improve compatibility.
from appcenter-sdk-dotnet.
@biapar did you get a chance to test with 0.16.0?
from appcenter-sdk-dotnet.
I had the same issue and can confirm that 0.16.0 fixed it.
from appcenter-sdk-dotnet.
from appcenter-sdk-dotnet.
from appcenter-sdk-dotnet.
@biapar when you said "very good", that means it worked for you?
from appcenter-sdk-dotnet.
from appcenter-sdk-dotnet.
Ok, based on @l3xer answer, 0.16.0 seems to fix the issue, so will wait another week before closing this ticket if I don't hear anything bad here.
from appcenter-sdk-dotnet.
Related Issues (20)
- Wrong version is reported in crashes if the app is updated in between
- `SystemInformation.Instance.LaunchTime` doesn't get the launch time correctly HOT 2
- AppCenter.Start causes error : "database is locked" HOT 9
- WPF Desktop bridge app does not report crashes to the AppCenter HOT 12
- AppCenter thinks the application is WPF but it is actually a WinForms application when using a WPF component. HOT 4
- WPF App does not report crash with specified supported OS version HOT 1
- MAUI Blazor Hybrid - linker error on iOS Simulator HOT 7
- Could not create an native instance of the type 'Microsoft.AppCenter.Apple.Bindings.MSACWrapperSdk HOT 8
- How can I use AppCenter in uwp c++/cx project? HOT 1
- Distribute.IsEnabledAsync always returns false; AppCenter.Start was called earlier. HOT 21
- [ macOS ] [ 5.0.2 ] "Asset validation failed" error when submitting to App Store HOT 5
- Microsoft.AppCenter.Crashes clang++ exited with code 1 when compiling for ios-simulator on pair arm64 mac in VS for Windows HOT 78
- Package Microsoft.AppCenter 5.0.3 is not compatible with net7.0-windows10.0.22621 HOT 8
- Use DefaultApplicationSettings from UWP in packaged WinUI 3 project? HOT 1
- WinUI 3: AppCenter includes dependency to UniversalWindowsPlatform HOT 12
- [Feature request] the custmize option of DB type HOT 1
- Building .NET 8 WPF app produces warning NETSDK1206 HOT 1
- MAUI .NET8 cannot deploy to remoted iOS Simulator - linker issues HOT 1
- iOS Build fails because of AppCenterCrashes.a HOT 2
- On .NET for iOS crash stack trace gets cut off whenever an exception happens in a synchronous callback method 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 appcenter-sdk-dotnet.