EmbraceIOS class
The iOS implementation of EmbracePlatform
.
- Inheritance
-
- Object
- PlatformInterface
- EmbracePlatform
- MethodChannelEmbrace
- EmbraceIOS
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- isStarted → bool
-
Whether the SDK has been started.
no setterinherited
- methodChannel → MethodChannel
-
The method channel used to interact with the native platform.
finalinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
addBreadcrumb(
String message) → void -
Adds a breadcrumb.
inherited
-
addSessionProperty(
String key, String value, {required bool permanent}) → void -
Annotates the session with a property defined by a
key
andvalue
.inherited -
addSpanAttribute(
String spanId, String key, String value) → Future< bool> -
Add an attribute to an active span with the given
spanId
. Returns true if the attribute is added and false otherwise.inherited -
addSpanEvent(
String spanId, String name, {int? timestampMs, Map< String, String> ? attributes}) → Future<bool> -
Create and add a Span Event with the given parameters to an active
span with the given
spanId
. Returns false if the event cannot be added.inherited -
addUserPersona(
String persona) → void -
Adds the current user persona to the provided
persona
.inherited -
attachToHostSdk(
{required bool enableIntegrationTesting}) → Future< bool> -
Starts the Embrace SDK.
inherited
-
clearAllUserPersonas(
) → void -
Clears the current users personas.
inherited
-
clearUserAsPayer(
) → void -
Clears the current user's payer status.
inherited
-
clearUserEmail(
) → void -
Clears the current user email.
inherited
-
clearUserIdentifier(
) → void -
Clears the current user identifier.
inherited
-
clearUserName(
) → void -
Clears the current user name.
inherited
-
clearUserPersona(
String persona) → void -
Clears the current user
persona
.inherited -
endSession(
{bool clearUserInfo = true}) → void -
Manually forces the end of the current session and starts a new session.
inherited
-
endView(
String name) → void -
Signifies that a view has been unmounted.
inherited
-
generateW3cTraceparent(
String? traceId, String? spanId) → Future< String?> -
Generates a W3C Traceparent.
inherited
-
getCurrentSessionId(
) → Future< String?> -
Returns the id of the current session.
inherited
-
getDeviceId(
) → Future< String?> -
Query the current device identifier.
inherited
-
getLastRunEndState(
) → Future< LastRunEndState> -
Returns the end state of the previous run of the application.
inherited
-
handleMethodCall(
MethodCall call) → Future -
Callback used to process incoming method calls from the native method
channel.
inherited
-
logBreadcrumb(
String message) → void -
Logs a breadcrumb.
inherited
-
logDartError(
String? stack, String? message, String? context, String? library, {String? errorType, bool wasHandled = false}) → void -
Sends information from a Dart error/exception to the host SDK
so that a log can be delivered.
inherited
-
logError(
String message, Map< String, String> ? properties) → void -
Log
message
and optionalproperties
using the error log level.inherited -
logInfo(
String message, Map< String, String> ? properties) → void -
Log
message
and optionalproperties
using the info log level.inherited -
logInternalError(
String message, String details) → void -
Logs an internal error within the SDK.
inherited
-
logNetworkRequest(
{required String url, required HttpMethod method, required int startTime, required int endTime, required int bytesSent, required int bytesReceived, required int statusCode, String? error, String? traceId, String? w3cTraceparent}) → void -
Log a network request.
inherited
-
logPushNotification(
{required String? title, required String? body, required String? subtitle, required int? badge, required String? category, required String? from, required String? messageId, required int? priority, required bool hasNotification, required bool hasData}) → void -
Logs a breadcrumb that indicates that the app received a push notification
inherited
-
logWarning(
String message, Map< String, String> ? properties) → void -
Log
message
and optionalproperties
using the warning log level.inherited -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
recordCompletedSpan(
String name, int startTimeMs, int endTimeMs, {ErrorCode? errorCode, String? parentSpanId, Map< String, String> ? attributes, List<Map< ? events}) → Future<String, dynamic> >bool> -
Record a completed span with the given parameters.
Returns true if the span is recorded and false otherwise.
inherited
-
removeSessionProperty(
String key) → void -
Remove an existing property from the session
inherited
-
setUserAsPayer(
) → void -
Sets the current user as a payer.
inherited
-
setUserEmail(
String email) → void -
Sets the current user email to the provided
email
.inherited -
setUserIdentifier(
String id) → void -
Sets the current user identifier to the provided
id
.inherited -
setUserName(
String name) → void -
Sets the current user name to the provided
name
.inherited -
startSpan(
String name, {String? parentSpanId, int? startTimeMs}) → Future< String?> -
Create and start a new span. Returns the spanId of the new span
if both operations are successful, and null if either fails.
inherited
-
startView(
String name) → void -
Signifies that a view has been mounted.
inherited
-
stopSpan(
String spanId, {ErrorCode? errorCode, int? endTimeMs}) → Future< bool> -
Stop an active span. Returns true if the span is stopped after the
method returns and false otherwise.
inherited
-
throwIfNotStarted(
) → void -
Throws a StateError if the SDK has not been started.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
triggerAnr(
) → void -
Triggers an ANR (Application Not Responding).
inherited
-
triggerMethodChannelError(
) → void -
Triggers a
MethodChannel
error.inherited -
triggerNativeSdkError(
) → void -
Trigger a native SDK error.
inherited
-
triggerRaisedSignal(
) → void -
Triggers a raised signal.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
registerWith(
) → void -
Registers this class as the default instance of
EmbracePlatform