I’m running a piece of code that opens a db, then fires up the sync engine. On the iOS simulator it works, on the Mac it works and on iOS it doesn’t work, although it worked prior to the 3.1.0 release.
The error in iOS seems to be raised just after my replication change listener callback has completed, after being called with the ReplicatorActivityLevel.Connecting
state. This is the error message:
Attempting to JIT compile method '(wrapper managed-to-native) intptr Couchbase.Lite.Support.IOSProxy/CFNetworkCopySystemProxySettings:wrapper_aot_native (object)' while running in aot-only mode. See https://docs.microsoft.com/xamarin/ios/internals/limitations for more information.
Reviewing the forum history, I did find the previous occurrence of the above error here.
In that topic, i found the following comment from @borrrden:
Oh dear, this is a classic case of forgotten callback attribute on a method that is called from unmanaged code. That’s a bug on the Couchbase side.
Is it possible the same problem has resurfaced, or is this something new?
Some Details:
Hardware/OS: MacOS ventura, iOS 16.4.1, .Net 7, .Net for iOS.
Replication Configuration:
var url = new Uri(config.sync_url);
var target = new URLEndpoint(url);
var auth = new BasicAuthenticator(id, GetServerPassword());
var sync_config = new ReplicatorConfiguration(database, target)
{
ReplicatorType = ReplicatorType.PushAndPull,
Continuous = true,
Authenticator = auth,
ConflictResolver = new SyncConflictResolver(),
};
replicator = new Replicator(sync_config);
listenerToken = replicator.AddChangeListener(SyncStatusUpdate);
replicator.Start();
Thank you.
Paul.