removed logrocket and fixed Drawing UX

This commit is contained in:
Savya Bikram Shah
2026-06-01 16:04:27 +05:45
parent 28810235a5
commit 89011184d5
141 changed files with 27 additions and 1179741 deletions

View File

@@ -1,134 +0,0 @@
package com.darkmatter.logrocket;
import android.app.Activity;
import android.app.Application;
import android.util.Log;
import com.logrocket.core.CustomEventBuilder;
import com.logrocket.core.LogRocket;
import org.json.JSONException;
import org.json.JSONObject;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
/**
* Unity to LogRocket Android bridge.
*
* This is a loose .java source file: Unity compiles it into the unityLibrary
* Gradle module, which carries the LogRocket Maven dependency added by the
* External Dependency Manager (see LogRocketDependencies.xml). That lets us call
* the SDK directly - including the init/getSessionURL lambdas - instead of
* reflecting, so there is no functional-interface name to guess.
*
* Because the calls are direct, Android builds REQUIRE the LogRocket AAR: keep
* the androidPackage entry in LogRocketDependencies.xml enabled, or this file
* will fail to compile.
*
* API verified against the LogRocket Android SDK 3.x
* (docs.logrocket.com/reference/android): com.logrocket.core.LogRocket,
* com.logrocket.core.CustomEventBuilder.
*/
public final class LogRocketUnityBridge {
private static final String TAG = "LogRocketBridge";
private static volatile String sessionUrl;
private LogRocketUnityBridge() {
}
public static void init(Activity activity, String appId) {
try {
Application app = activity.getApplication();
// Docs recommend init from a custom Application.attachBaseContext for
// earliest-startup capture. Runtime init from the current activity
// (as the React Native SDK does) works but misses the launch window.
LogRocket.init(app, app.getBaseContext(), options -> options.setAppID(appId));
LogRocket.getSessionURL(url -> sessionUrl = url);
Log.i(TAG, "LogRocket initialized: " + appId);
} catch (Throwable t) {
Log.e(TAG, "init failed", t);
}
}
public static void identify(String userId, String traitsJson) {
try {
Map<String, String> traits = parse(traitsJson);
if (traits.isEmpty()) {
LogRocket.identify(userId);
} else {
LogRocket.identify(userId, traits);
}
} catch (Throwable t) {
Log.e(TAG, "identify failed", t);
}
}
public static void track(String name, String propsJson) {
try {
CustomEventBuilder builder = new CustomEventBuilder(name);
for (Map.Entry<String, String> e : parse(propsJson).entrySet()) {
builder.put(e.getKey(), e.getValue());
}
LogRocket.track(builder);
} catch (Throwable t) {
Log.e(TAG, "track failed", t);
}
}
public static void log(String severity, String message) {
// LogRocket auto-captures logcat, so emitting here is enough to record it.
Log.println(level(severity), TAG, message == null ? "" : message);
}
public static void logException(String message, String stack) {
Log.e(TAG, (message == null ? "" : message) + "\n" + (stack == null ? "" : stack));
}
public static String getSessionUrl() {
return sessionUrl;
}
// Recording starts automatically at init. These provide manual control,
// verified against the 3.1.0 AAR: endSession() halts the current recording
// (SDK stays alive), startNewSession() begins a fresh one.
public static void startReplay() {
try {
LogRocket.startNewSession();
} catch (Throwable t) {
Log.e(TAG, "startReplay failed", t);
}
}
public static void stopReplay() {
try {
LogRocket.endSession();
} catch (Throwable t) {
Log.e(TAG, "stopReplay failed", t);
}
}
private static int level(String severity) {
if ("error".equals(severity)) return Log.ERROR;
if ("warn".equals(severity)) return Log.WARN;
if ("debug".equals(severity)) return Log.DEBUG;
return Log.INFO;
}
private static Map<String, String> parse(String json) {
Map<String, String> out = new HashMap<>();
if (json == null || json.isEmpty()) return out;
try {
JSONObject obj = new JSONObject(json);
Iterator<String> it = obj.keys();
while (it.hasNext()) {
String key = it.next();
out.put(key, String.valueOf(obj.get(key)));
}
} catch (JSONException e) {
Log.w(TAG, "bad json: " + json);
}
return out;
}
}

View File

@@ -1,2 +0,0 @@
fileFormatVersion: 2
guid: 75d114ce17de24caba8e420437ed31c9

View File

@@ -1,22 +0,0 @@
LOGROCKET_VERSION = "3.1.0"
Pod::Spec.new do |s|
s.name = "LogRocket"
s.version = LOGROCKET_VERSION
s.summary = "LogRocket SDK"
s.author = { "LogRocket" => "support@logrocket.com" }
s.description = <<-DESC
LogRocket SDK for iOS
DESC
s.homepage = "https://logrocket.com/"
s.license = { :type => "Proprietary", :file => "ACKNOWLEDGEMENTS" }
s.platform = :ios
s.ios.deployment_target = '12.0'
s.swift_version = '5.0'
s.source = {
:http => "https://storage.googleapis.com/logrocket-ios/#{LOGROCKET_VERSION}/LogRocket.xcframework.zip",
}
s.vendored_frameworks = "LogRocket.xcframework"
end
# vi: ft=ruby

View File

@@ -1,7 +0,0 @@
fileFormatVersion: 2
guid: 2fcded7614e15402d9650eafcb201109
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,2 +0,0 @@
fileFormatVersion: 2
guid: 1e12f3dbdb3af4b97bf684bc7dbab090

View File

@@ -1,48 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>AvailableLibraries</key>
<array>
<dict>
<key>BinaryPath</key>
<string>LogRocket.framework/LogRocket</string>
<key>DebugSymbolsPath</key>
<string>dSYMs</string>
<key>LibraryIdentifier</key>
<string>ios-arm64_x86_64-simulator</string>
<key>LibraryPath</key>
<string>LogRocket.framework</string>
<key>SupportedArchitectures</key>
<array>
<string>arm64</string>
<string>x86_64</string>
</array>
<key>SupportedPlatform</key>
<string>ios</string>
<key>SupportedPlatformVariant</key>
<string>simulator</string>
</dict>
<dict>
<key>BinaryPath</key>
<string>LogRocket.framework/LogRocket</string>
<key>DebugSymbolsPath</key>
<string>dSYMs</string>
<key>LibraryIdentifier</key>
<string>ios-arm64</string>
<key>LibraryPath</key>
<string>LogRocket.framework</string>
<key>SupportedArchitectures</key>
<array>
<string>arm64</string>
</array>
<key>SupportedPlatform</key>
<string>ios</string>
</dict>
</array>
<key>CFBundlePackageType</key>
<string>XFWK</string>
<key>XCFrameworkFormatVersion</key>
<string>1.0</string>
</dict>
</plist>

View File

@@ -1,15 +0,0 @@
#ifndef LROAppStartTracker_h
#define LROAppStartTracker_h
@interface LROAppStartTracker : NSObject
+ (double)getInitTime;
+ (double)getFinishLaunchingTime;
+ (bool)isFirstPageLoad;
+ (void)markFirstPageLoaded;
+ (void)resetFirstPageLoad;
+ (void)uploadPendingCrashReports;
@end
#endif /* LROAppStartTracker_h */

View File

@@ -1,10 +0,0 @@
#ifndef LROBinaryObjects_h
#define LROBinaryObjects_h
@interface LROBinaryObjects : NSObject
+ (NSArray<NSDictionary*>*)getModuleInfo;
@end
#endif /* LROBinaryObjects_h */

View File

@@ -1,351 +0,0 @@
// Adapted from: https://github.com/kstenerud/KSCrash
//
// LROCLogger.h
//
// Created by Karl Stenerud on 11-06-25.
//
// Copyright (c) 2011 Karl Stenerud. All rights reserved.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall remain in place
// in this source code.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
//
/**
* LROCLogger
* ========
*
* Prints log entries to the console consisting of:
* - Level (Error, Warn, Info, Debug, Trace)
* - File
* - Line
* - Function
* - Message
*
* Allows setting the minimum logging level in the preprocessor.
*
* Works in C or Objective-C contexts, with or without ARC, using CLANG or GCC.
*
*
* =====
* USAGE
* =====
*
* Set the log level in your "Preprocessor Macros" build setting. You may choose
* TRACE, DEBUG, INFO, WARN, ERROR. If nothing is set, it defaults to ERROR.
*
* Example: LROCLogger_Level=WARN
*
* Anything below the level specified for LROCLogger_Level will not be compiled
* or printed.
*
*
* Next, include the header file:
*
* #include "LROCLogger.h"
*
*
* Next, call the logger functions from your in C or objective-C code:
*
* Code:
* LROLOG_ERROR(@"Some error message");
*
* Prints:
* 2011-07-16 05:41:01.379 TestApp[4439:f803] ERROR: SomeClass.m (21): -[SomeFunction]: Some error message
*
* Code:
* LROLOG_INFO(@"Info about %@", someObject);
*
* Prints:
* 2011-07-16 05:44:05.239 TestApp[4473:f803] INFO : SomeClass.m (20): -[SomeFunction]: Info about <NSObject: 0xb622840>
*
*
* The "BASIC" versions of the macros behave exactly like printf(),
* except they respect the LROCLogger_Level setting:
*
* Code:
* LROLOGBASIC_ERROR(@"A basic log entry");
*
* Prints:
* 2011-07-16 05:44:05.916 TestApp[4473:f803] A basic log entry
*
* =============
* LOCAL LOGGING
* =============
*
* You can control logging messages at the local file level using the
* "LROCLogger_LocalLevel" define. Note that it must be defined BEFORE
* including LROCLogger.h
*
* The LROLOG_XX() and LROLOGBASIC_XX() macros will print out based on the LOWER
* of LROCLogger_Level and LROCLogger_LocalLevel, so if LROCLogger_Level is DEBUG
* and LROCLogger_LocalLevel is TRACE, it will print all the way down to the trace
* level for the local file where LROCLogger_LocalLevel was defined, and to the
* debug level everywhere else.
*
* Example:
*
* // LROCLogger_LocalLevel, if defined, MUST come BEFORE including LROCLogger.h
* #define LROCLogger_LocalLevel TRACE
* #import "LROCLogger.h"
*
*
* ===============
* IMPORTANT NOTES
* ===============
*
* The C logger changes its behavior depending on the value of the preprocessor
* define LROCLogger_CBufferSize.
*
* If LROCLogger_CBufferSize is > 0, the C logger will behave in an async-safe
* manner, calling write() instead of printf(). Any log messages that exceed the
* length specified by LROCLogger_CBufferSize will be truncated.
*
* If LROCLogger_CBufferSize == 0, the C logger will use printf(), and there will
* be no limit on the log message length.
*
* LROCLogger_CBufferSize can only be set as a preprocessor define, and will
* default to 1024 if not specified during compilation.
*/
// ============================================================================
#pragma mark - (internal) -
// ============================================================================
#ifndef HDR_LROCLogger_h
#define HDR_LROCLogger_h
#ifdef __cplusplus
extern "C" {
#endif
#include <stdbool.h>
void i_lrolog_logC(const char* level,
const char* file,
int line,
const char* function,
const char* fmt, ...);
void i_lrolog_logCBasic(const char* fmt, ...);
/* Back up any existing defines by the same name */
#ifdef LRO_NONE
#define LROLOG_BAK_NONE LRO_NONE
#undef LRO_NONE
#endif
#ifdef ERROR
#define LROLOG_BAK_ERROR ERROR
#undef ERROR
#endif
#ifdef WARN
#define LROLOG_BAK_WARN WARN
#undef WARN
#endif
#ifdef INFO
#define LROLOG_BAK_INFO INFO
#undef INFO
#endif
#ifdef DEBUG
#define LROLOG_BAK_DEBUG DEBUG
#undef DEBUG
#endif
#ifdef TRACE
#define LROLOG_BAK_TRACE TRACE
#undef TRACE
#endif
#define LROCLogger_Level_None 0
#define LROCLogger_Level_Error 10
#define LROCLogger_Level_Warn 20
#define LROCLogger_Level_Info 30
#define LROCLogger_Level_Debug 40
#define LROCLogger_Level_Trace 50
#define LRO_NONE LROCLogger_Level_None
#define ERROR LROCLogger_Level_Error
#define WARN LROCLogger_Level_Warn
#define INFO LROCLogger_Level_Info
#define DEBUG LROCLogger_Level_Debug
#define TRACE LROCLogger_Level_Trace
#ifndef LROCLogger_Level
#define LROCLogger_Level LROCLogger_Level_Error
#endif
#ifndef LROCLogger_LocalLevel
#define LROCLogger_LocalLevel LROCLogger_Level_None
#endif
#define a_LROLOG_FULL(LEVEL, FMT, ...) \
i_lrolog_logC(LEVEL, \
__FILE__, \
__LINE__, \
__PRETTY_FUNCTION__, \
FMT, \
##__VA_ARGS__)
// ============================================================================
#pragma mark - API -
// ============================================================================
/** Set the filename to log to.
*
* @param filename The file to write to (NULL = write to stdout).
*
* @param overwrite If true, overwrite the log file.
*/
bool lrolog_setLogFilename(const char* filename, bool overwrite);
/** Clear the log file. */
bool lrolog_clearLogFile(void);
/** Tests if the logger would print at the specified level.
*
* @param LEVEL The level to test for. One of:
* LROCLogger_Level_Error,
* LROCLogger_Level_Warn,
* LROCLogger_Level_Info,
* LROCLogger_Level_Debug,
* LROCLogger_Level_Trace,
*
* @return TRUE if the logger would print at the specified level.
*/
#define LROLOG_PRINTS_AT_LEVEL(LEVEL) \
(LROCLogger_Level >= LEVEL || LROCLogger_LocalLevel >= LEVEL)
/** Log a message regardless of the log settings.
* Normal version prints out full context. Basic version prints directly.
*
* @param FMT The format specifier, followed by its arguments.
*/
#define LROLOG_ALWAYS(FMT, ...) a_LROLOG_FULL("FORCE", FMT, ##__VA_ARGS__)
#define LROLOGBASIC_ALWAYS(FMT, ...) i_lrolog_logCBasic(FMT, ##__VA_ARGS__)
/** Log an error.
* Normal version prints out full context. Basic version prints directly.
*
* @param FMT The format specifier, followed by its arguments.
*/
#if LROLOG_PRINTS_AT_LEVEL(LROCLogger_Level_Error)
#define LROLOG_ERROR(FMT, ...) a_LROLOG_FULL("ERROR", FMT, ##__VA_ARGS__)
#define LROLOGBASIC_ERROR(FMT, ...) i_lrolog_logCBasic(FMT, ##__VA_ARGS__)
#else
#define LROLOG_ERROR(FMT, ...)
#define LROLOGBASIC_ERROR(FMT, ...)
#endif
/** Log a warning.
* Normal version prints out full context. Basic version prints directly.
*
* @param FMT The format specifier, followed by its arguments.
*/
#if LROLOG_PRINTS_AT_LEVEL(LROCLogger_Level_Warn)
#define LROLOG_WARN(FMT, ...) a_LROLOG_FULL("WARN ", FMT, ##__VA_ARGS__)
#define LROLOGBASIC_WARN(FMT, ...) i_lrolog_logCBasic(FMT, ##__VA_ARGS__)
#else
#define LROLOG_WARN(FMT, ...)
#define LROLOGBASIC_WARN(FMT, ...)
#endif
/** Log an info message.
* Normal version prints out full context. Basic version prints directly.
*
* @param FMT The format specifier, followed by its arguments.
*/
#if LROLOG_PRINTS_AT_LEVEL(LROCLogger_Level_Info)
#define LROLOG_INFO(FMT, ...) a_LROLOG_FULL("INFO ", FMT, ##__VA_ARGS__)
#define LROLOGBASIC_INFO(FMT, ...) i_lrolog_logCBasic(FMT, ##__VA_ARGS__)
#else
#define LROLOG_INFO(FMT, ...)
#define LROLOGBASIC_INFO(FMT, ...)
#endif
/** Log a debug message.
* Normal version prints out full context. Basic version prints directly.
*
* @param FMT The format specifier, followed by its arguments.
*/
#if LROLOG_PRINTS_AT_LEVEL(LROCLogger_Level_Debug)
#define LROLOG_DEBUG(FMT, ...) a_LROLOG_FULL("DEBUG", FMT, ##__VA_ARGS__)
#define LROLOGBASIC_DEBUG(FMT, ...) i_lrolog_logCBasic(FMT, ##__VA_ARGS__)
#else
#define LROLOG_DEBUG(FMT, ...)
#define LROLOGBASIC_DEBUG(FMT, ...)
#endif
/** Log a trace message.
* Normal version prints out full context. Basic version prints directly.
*
* @param FMT The format specifier, followed by its arguments.
*/
#if LROLOG_PRINTS_AT_LEVEL(LROCLogger_Level_Trace)
#define LROLOG_TRACE(FMT, ...) a_LROLOG_FULL("TRACE", FMT, ##__VA_ARGS__)
#define LROLOGBASIC_TRACE(FMT, ...) i_lrolog_logCBasic(FMT, ##__VA_ARGS__)
#else
#define LROLOG_TRACE(FMT, ...)
#define LROLOGBASIC_TRACE(FMT, ...)
#endif
// ============================================================================
#pragma mark - (internal) -
// ============================================================================
/* Put everything back to the way we found it. */
#undef ERROR
#ifdef LROLOG_BAK_ERROR
#define ERROR LROLOG_BAK_ERROR
#undef LROLOG_BAK_ERROR
#endif
#undef WARNING
#ifdef LROLOG_BAK_WARN
#define WARNING LROLOG_BAK_WARN
#undef LROLOG_BAK_WARN
#endif
#undef INFO
#ifdef LROLOG_BAK_INFO
#define INFO LROLOG_BAK_INFO
#undef LROLOG_BAK_INFO
#endif
#undef DEBUG
#ifdef LROLOG_BAK_DEBUG
#define DEBUG LROLOG_BAK_DEBUG
#undef LROLOG_BAK_DEBUG
#endif
#undef TRACE
#ifdef LROLOG_BAK_TRACE
#define TRACE LROLOG_BAK_TRACE
#undef LROLOG_BAK_TRACE
#endif
#ifdef __cplusplus
}
#endif
#endif // HDR_LROCLogger_h

View File

@@ -1,99 +0,0 @@
// Adapted from: https://github.com/kstenerud/KSCrash
//
// LROCPU.h
//
// Created by Karl Stenerud on 2012-01-29.
//
// Copyright (c) 2012 Karl Stenerud. All rights reserved.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall remain in place
// in this source code.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
//
/*
* Base class for populating CPU state information in LROMachineContext objects
* used by LROStackCursor to traverse the call stack and record each level's
* symbol and image name and address information
*/
#ifndef HDR_LROCPU_h
#define HDR_LROCPU_h
#ifdef __cplusplus
extern "C" {
#endif
#include "LROMachineContext.h"
#include <stdbool.h>
#include <stdint.h>
/** Get the frame pointer for a machine context.
* The frame pointer marks the top of the call stack.
*
* @param context The machine context
*
* @return The context's frame pointer
*/
uintptr_t lrocpu_framePointer(const struct LROMachineContext* const context);
/** Get the address of the instruction about to be, or being executed by a
* machine context.
*
* @param context The machine context
*
* @return The context's next instruction address
*/
uintptr_t lrocpu_instructionAddress(const struct LROMachineContext* const context);
/** Get the address stored in the link register (arm only). This may
* contain the first return address of the stack.
*
* @param context The machine context
*
* @return The link register value
*/
uintptr_t lrocpu_linkRegister(const struct LROMachineContext* const context);
/** Get the address whose access caused the last fault.
*
* @param context The machine context
*
* @return The faulting address
*/
uintptr_t lrocpu_faultAddress(const struct LROMachineContext* const context);
/** Fetch the CPU state for this context and store it in the context.
*
* @param destinationContext The context to fill
*/
void lrocpu_getState(struct LROMachineContext* destinationContext);
/** Strip Pointer Authentication Code (PAC) from an instruction pointer.
*
* @param ip PAC encoded instruction pointer
*
* @return Instruction pointer without PAC
*/
uintptr_t lrocpu_normaliseInstructionPointer(uintptr_t ip);
#ifdef __cplusplus
}
#endif
#endif // HDR_LROCPU_h

View File

@@ -1,59 +0,0 @@
// Adapted from: https://github.com/kstenerud/KSCrash
//
// LROCPU_Apple.h
//
// Created by Karl Stenerud on 2012-01-29.
//
// Copyright (c) 2012 Karl Stenerud. All rights reserved.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall remain in place
// in this source code.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
//
#ifndef HDR_LROCPU_Apple_h
#define HDR_LROCPU_Apple_h
#ifdef __cplusplus
extern "C" {
#endif
#include <mach/mach_types.h>
/** Fill in state information about a thread.
*
* @param thread The thread to get information about
*
* @param state Pointer to buffer for state information
*
* @param flavor The kind of information to get (arch specific)
*
* @param stateCount Number of entries in the state information buffer
*
* @return true if state fetching was successful
*/
bool lrocpu_i_fillState(thread_t thread,
thread_state_t state,
thread_state_flavor_t flavor,
mach_msg_type_number_t stateCount);
#ifdef __cplusplus
}
#endif
#endif // HDR_LROCPU_Apple_h

View File

@@ -1,124 +0,0 @@
// Adapted from: https://github.com/kstenerud/KSCrash
//
// LROCrashC.h
//
// Created by Karl Stenerud on 2012-01-28.
//
// Copyright (c) 2012 Karl Stenerud. All rights reserved.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall remain in place
// in this source code.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
//
/* Primary C entry point into the crash reporting system.
* Handles callback execution on final exception context, and manages individual
* monitors for each exception type and context area
* (As of 12/20/2023 this only includes the MachException monitor)
*/
#ifndef HDR_LROCrashC_h
#define HDR_LROCrashC_h
#ifdef __cplusplus
extern "C" {
#endif
#include "LROCrashMonitorType.h"
#include "LROCrashMonitorEventCallback.h"
#include "LROSessionDetails.h"
#include <stdbool.h>
typedef void (*LROCaptureCrashCallback)(const char *reason, const char *errorType, char **stackFrames);
/** Install the crash reporter. The reporter will record the next crash and then
* terminate the program.
*
* @param handleCrash The callback to which we pass the reason, errorType, and
* callStackSymbols parsed from the gathered exception context
*
* @return The crash types that are being handled
*/
LROCrashMonitorType lrocrash_install(LROCaptureCrashCallback handleCrash);
void lrocrash_uninstall(void);
/** Set the crash types that will be handled and enable their monitors.
* Some crash types may not be enabled depending on circumstances (e.g. running
* in a debugger).
*
* @param monitors The monitors to install
*
* @return The monitors that were installed. If LROCrash has been
* installed, the return value represents the monitors that were
* successfully installed. Otherwise it represents which monitors it
* will attempt to activate when LROCrash installs.
*/
LROCrashMonitorType lrocrash_setMonitoring(LROCrashMonitorType monitors);
void captureCrashC(const char * errorType,
const char * reason,
char ** callStackSymbols);
const bool getEnabled(void);
void setEnabled(bool enabled);
/**
Set session details used to fill crash reports.
*/
void setSessionDetails(const LROSessionDetails * sessionDetails);
/**
Clear session details memory
*/
void freeSessionDetails(void);
/**
Get session details used to fill crash reports.
*/
const LROSessionDetails getSessionDetails(void);
/**
Freeze access to the session details
*/
int freezeSessionDetails(void);
/**
Unfreeze access to the session details
*/
void unfreezeSessionDetails(void);
void setSessionDetails_startTime(double value);
void setSessionDetails_recordingID(const char* value);
void setSessionDetails_sessionID(const char* value);
void setSessionDetails_appID(const char* value);
void setSessionDetails_currentURL(const char* value);
void setSessionDetails_release(const char* value);
void setSessionDetails_debugModules(const char* value);
void setSessionDetails_tabID(const char* value);
void setSessionDetails_userID(const char* value);
void setSessionDetails_serverURL(const char* value);
#ifdef __cplusplus
}
#endif
#endif // HDR_LROCrashC_h

View File

@@ -1,103 +0,0 @@
// Adapted from: https://github.com/kstenerud/KSCrash
//
// LROCrashMonitor.h
//
// Created by Karl Stenerud on 2012-02-04.
//
// Copyright (c) 2012 Karl Stenerud. All rights reserved.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall remain in place
// in this source code.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
//
/** Keeps watch for crashes and informs via callback when one occurs.
*/
#ifndef HDR_LROCrashMonitor_h
#define HDR_LROCrashMonitor_h
#ifdef __cplusplus
extern "C" {
#endif
#include "LROCrashMonitorType.h"
#include "LROThread.h"
#include "LROCrashMonitorEventCallback.h"
#include <stdbool.h>
struct LROCrash_MonitorContext;
// ============================================================================
#pragma mark - External API -
// ============================================================================
/** Set which monitors are active.
*
* @param monitorTypes Which monitors should be active
*/
void lrocm_setActiveMonitors(LROCrashMonitorType monitorTypes);
/** Get the currently active monitors.
*/
LROCrashMonitorType lrocm_getActiveMonitors(void);
/** Set the callback to call when an event is captured.
*
* @param onEvent Called whenever an event is captured
*/
void lrocm_setEventCallback(LROCrashMonitorEventCallback onEvent);
/** Get the current LROCrashMonitorEventCallback. Only needed for testing.
*
*/
LROCrashMonitorEventCallback lrocm_getEventCallback(void);
// ============================================================================
#pragma mark - Internal API -
// ============================================================================
typedef struct
{
void (*setEnabled)(bool isEnabled);
bool (*isEnabled)(void);
void (*addContextualInfoToEvent)(struct LROCrash_MonitorContext* eventContext);
} LROCrashMonitorAPI;
/** Notify that a fatal exception has been captured.
* This allows the system to take appropriate steps in preparation.
*
* @param isAsyncSafeEnvironment If true, only async-safe functions are allowed from now on
*/
bool lrocm_notifyFatalExceptionCaptured(bool isAsyncSafeEnvironment);
/** Start general exception processing.
*
* @param context Contextual information about the exception
*/
void lrocm_handleException(struct LROCrash_MonitorContext* context);
#ifdef __cplusplus
}
#endif
#endif // HDR_LROCrashMonitor_h

View File

@@ -1,95 +0,0 @@
// Adapted from: https://github.com/kstenerud/KSCrash
//
// LROCrashMonitorContext.h
//
// Created by Karl Stenerud on 2012-02-12.
//
// Copyright (c) 2012 Karl Stenerud. All rights reserved.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall remain in place
// in this source code.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
//
#ifndef HDR_LROCrashMonitorContext_h
#define HDR_LROCrashMonitorContext_h
#ifdef __cplusplus
extern "C" {
#endif
#include "LROCrashMonitorType.h"
#include <stdbool.h>
#include <stdint.h>
typedef struct LROCrash_MonitorContext
{
/** If true, the environment has crashed hard, and only async-safe
* functions should be used.
*/
bool requiresAsyncSafety;
/** If true, the crash handling system is currently handling a crash.
* When false, all values below this field are considered invalid.
*/
bool handlingCrash;
/** If true, a second crash occurred while handling a crash. */
bool crashedDuringCrashHandling;
/** Address that caused the fault. */
uintptr_t faultAddress;
/** The type of crash that occurred.
* This determines which other fields are valid. */
LROCrashMonitorType crashType;
/** The stack cursor for the trace leading up to the crash.
* Note: Actual type is LROStackCursor*
*/
void* stackCursor;
struct
{
/** The mach exception type. */
int type;
/** The mach exception code. */
int64_t code;
/** The mach exception subcode. */
int64_t subcode;
} mach;
struct
{
/** The exception name. */
const char* name;
/** Short description of why the crash occurred. */
const char* crashReason;
} CPPException;
} LROCrash_MonitorContext;
#ifdef __cplusplus
}
#endif
#endif // HDR_LROCrashMonitorContext_h

View File

@@ -1,16 +0,0 @@
#include "LROCrashMonitorContext.h"
#ifndef LROCrashMonitorEventCallback_h
#define LROCrashMonitorEventCallback_h
#ifdef __cplusplus
extern "C" {
#endif
typedef void (*LROCrashMonitorEventCallback)(struct LROCrash_MonitorContext *);
#ifdef __cplusplus
}
#endif
#endif /* LROCrashMonitorEventCallback_h */

View File

@@ -1,144 +0,0 @@
// Adapted from: https://github.com/kstenerud/KSCrash
//
// LROCrashMonitorType.h
//
// Copyright (c) 2012 Karl Stenerud. All rights reserved.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall remain in place
// in this source code.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
//
#ifndef HDR_LROCrashMonitorType_h
#define HDR_LROCrashMonitorType_h
#ifdef __cplusplus
extern "C" {
#endif
/** Various aspects of the system that can be monitored:
* - Mach kernel exception
* - Fatal signal
* - Uncaught C++ exception
* - Uncaught Objective-C NSException
* - Deadlock on the main thread
* - User reported custom exception
*/
typedef enum
{
/* Captures and reports Mach exceptions. */
LROCrashMonitorTypeMachException = 0x01,
/* Captures and reports POSIX signals. */
LROCrashMonitorTypeSignal = 0x02,
/* Captures and reports C++ exceptions.
* Note: This will slightly slow down exception processing.
*/
LROCrashMonitorTypeCPPException = 0x04,
/* Captures and reports NSExceptions. */
LROCrashMonitorTypeNSException = 0x08,
/* Detects and reports a deadlock in the main thread. */
LROCrashMonitorTypeMainThreadDeadlock = 0x10,
/* Accepts and reports user-generated exceptions. */
LROCrashMonitorTypeUserReported = 0x20,
/* Keeps track of and injects system information. */
LROCrashMonitorTypeSystem = 0x40,
/* Keeps track of and injects application state. */
LROCrashMonitorTypeApplicationState = 0x80,
/* Keeps track of zombies, and injects the last zombie NSException. */
LROCrashMonitorTypeZombie = 0x100,
} LROCrashMonitorType;
#define LROCrashMonitorTypeAll \
( \
LROCrashMonitorTypeMachException | \
LROCrashMonitorTypeSignal | \
LROCrashMonitorTypeCPPException | \
LROCrashMonitorTypeNSException | \
LROCrashMonitorTypeMainThreadDeadlock | \
LROCrashMonitorTypeUserReported | \
LROCrashMonitorTypeSystem | \
LROCrashMonitorTypeApplicationState | \
LROCrashMonitorTypeZombie \
)
#define LROCrashMonitorTypeExperimental \
( \
LROCrashMonitorTypeMainThreadDeadlock \
)
#define LROCrashMonitorTypeDebuggerUnsafe \
( \
LROCrashMonitorTypeMachException | \
LROCrashMonitorTypeSignal | \
LROCrashMonitorTypeCPPException | \
LROCrashMonitorTypeNSException \
)
#define LROCrashMonitorTypeAsyncSafe \
( \
LROCrashMonitorTypeMachException | \
LROCrashMonitorTypeSignal \
)
#define LROCrashMonitorTypeOptional \
( \
LROCrashMonitorTypeZombie \
)
#define LROCrashMonitorTypeAsyncUnsafe (LROCrashMonitorTypeAll & (~LROCrashMonitorTypeAsyncSafe))
/** Monitors that are safe to enable in a debugger. */
#define LROCrashMonitorTypeDebuggerSafe (LROCrashMonitorTypeAll & (~LROCrashMonitorTypeDebuggerUnsafe))
/** Monitors that are safe to use in a production environment
* All other monitors should be considered experimental.
*/
#define LROCrashMonitorTypeProductionSafe (LROCrashMonitorTypeAll & (~LROCrashMonitorTypeExperimental))
/** Production safe monitors, minus the optional ones. */
#define LROCrashMonitorTypeProductionSafeMinimal (LROCrashMonitorTypeProductionSafe & (~LROCrashMonitorTypeOptional))
/** Monitors that are required for proper operation
* These add essential information to the reports, but do not trigger reporting.
*/
#define LROCrashMonitorTypeRequired (LROCrashMonitorTypeSystem | LROCrashMonitorTypeApplicationState)
/** Effectively disables automatic reporting. The only way to generate a report
* in this mode is by manually calling lrocrash_reportUserException().
*/
#define LROCrashMonitorTypeManual (LROCrashMonitorTypeRequired | LROCrashMonitorTypeUserReported)
#define LROCrashMonitorTypeNone 0
const char* lrocrashmonitortype_name(LROCrashMonitorType monitorType);
#ifdef __cplusplus
}
#endif
#endif // HDR_LROCrashMonitorType_h

View File

@@ -1,42 +0,0 @@
// Adapted from: https://github.com/kstenerud/KSCrash
//
// LROCrashMonitor_CPPException.h
//
// Copyright (c) 2012 Karl Stenerud. All rights reserved.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall remain in place
// in this source code.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
#ifndef HDR_LROCrashMonitor_CPPException_h
#define HDR_LROCrashMonitor_CPPException_h
#ifdef __cplusplus
extern "C" {
#endif
#include "LROCrashMonitor.h"
/** Access the Monitor API.
*/
LROCrashMonitorAPI* lrocm_cppexception_getAPI(void);
#ifdef __cplusplus
}
#endif
#endif /* HDR_LROCrashMonitor_CPPException_h */

View File

@@ -1,55 +0,0 @@
// Adapted from: https://github.com/kstenerud/KSCrash
//
// LROCrashMonitor_MachException.h
//
// Created by Karl Stenerud on 2012-02-04.
//
// Copyright (c) 2012 Karl Stenerud. All rights reserved.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall remain in place
// in this source code.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
//
/* Catches mach exceptions
*/
#ifndef HDR_CrashMonitor_MachException_h
#define HDR_CrashMonitor_MachException_h
#ifdef __cplusplus
extern "C" {
#endif
#include "LROCrashMonitor.h"
#include <mach/mach.h>
#include <stdbool.h>
/** Access the Monitor API
*/
LROCrashMonitorAPI *lrocm_machexception_getAPI(void);
bool lrocm_isReservedThread(thread_t thread);
// Only needed for testing
bool lrocm_hasReservedThreads(void);
#ifdef __cplusplus
}
#endif
#endif // HDR_CrashMonitor_MachException_h

View File

@@ -1,33 +0,0 @@
// Adapted from: https://github.com/kstenerud/KSCrash
//
// LROCrashReportC.h
//
// Created by Karl Stenerud on 2012-01-28.
//
// Copyright (c) 2012 Karl Stenerud. All rights reserved.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall remain in place
// in this source code.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
//
/**
Set the file system path to which crash reports are published.
*/
void setReportPath(const char * path);
void writeReportC(const char *errorType, const char *reason, char **callStackSymbols);

View File

@@ -1,82 +0,0 @@
// Adapted from: https://github.com/kstenerud/KSCrash
//
// LROCrashReportFields.h
//
// Created by Karl Stenerud on 2012-10-07.
//
// Copyright (c) 2012 Karl Stenerud. All rights reserved.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall remain in place
// in this source code.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
//
#ifndef HDR_LROCrashReportFields_h
#define HDR_LROCrashReportFields_h
#ifdef __OBJC__
#include <Foundation/Foundation.h>
typedef NSString *LROCrashReportField;
#define LROCRF_CONVERT_STRING(str) @str
#else /* __OBJC__ */
typedef const char *LROCrashReportField;
#define LROCRF_CONVERT_STRING(str) str
#endif /* __OBJC__ */
#ifndef NS_TYPED_ENUM
#define NS_TYPED_ENUM
#endif
#ifndef NS_SWIFT_NAME
#define NS_SWIFT_NAME(_name)
#endif
#define LROCRF_DEFINE_CONSTANT(type, name, swift_name, string) \
static type const type##_##name NS_SWIFT_NAME(swift_name) = LROCRF_CONVERT_STRING(string);
#ifdef __cplusplus
extern "C" {
#endif
#pragma mark - Report Types -
typedef LROCrashReportField LROCrashReportType NS_TYPED_ENUM NS_SWIFT_NAME(ReportType);
LROCRF_DEFINE_CONSTANT(LROCrashReportType, Crash, crash, "crash")
typedef LROCrashReportField LROCrashField NS_TYPED_ENUM NS_SWIFT_NAME(CrashField);
LROCRF_DEFINE_CONSTANT(LROCrashField, Type, type, "type")
LROCRF_DEFINE_CONSTANT(LROCrashField, Reason, reason, "reason")
LROCRF_DEFINE_CONSTANT(LROCrashField, StackFrames, stackFrames, "stackFrames")
LROCRF_DEFINE_CONSTANT(LROCrashField, Body, body, "body")
LROCRF_DEFINE_CONSTANT(LROCrashField, DebugModules, debugModules, "debugModules")
LROCRF_DEFINE_CONSTANT(LROCrashField, Url, url, "url")
LROCRF_DEFINE_CONSTANT(LROCrashField, Age, age, "age")
LROCRF_DEFINE_CONSTANT(LROCrashField, RecordingId, recordingId, "recordingID")
LROCRF_DEFINE_CONSTANT(LROCrashField, AppId, appId, "appID")
LROCRF_DEFINE_CONSTANT(LROCrashField, TabId, tabId, "tabID")
LROCRF_DEFINE_CONSTANT(LROCrashField, TimeOffset, timeOffset, "timeOffset")
LROCRF_DEFINE_CONSTANT(LROCrashField, Release, release, "release")
LROCRF_DEFINE_CONSTANT(LROCrashField, UserId, userId, "userID")
LROCRF_DEFINE_CONSTANT(LROCrashField, ServerUrl, serverUrl, "serverURL")
#ifdef __cplusplus
}
#endif
#endif // HDR_LROCrashReportFields_h

View File

@@ -1,236 +0,0 @@
// Adapted from: https://github.com/kstenerud/KSCrash
//
// LROCrashReportWriter.h
//
// Created by Karl Stenerud on 2012-01-28.
//
// Copyright (c) 2012 Karl Stenerud. All rights reserved.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall remain in place
// in this source code.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
//
/* Pointers to functions for writing to a crash report. All JSON types are
* supported.
*/
#ifndef HDR_LROCrashReportWriter_h
#define HDR_LROCrashReportWriter_h
#include <stdbool.h>
#include <stdint.h>
#ifdef __OBJC__
#include <Foundation/Foundation.h>
#endif
#ifndef NS_SWIFT_NAME
#define NS_SWIFT_NAME(_name)
#endif
#ifndef NS_SWIFT_UNAVAILABLE
#define NS_SWIFT_UNAVAILABLE(_msg)
#endif
#ifdef __cplusplus
extern "C" {
#endif
/**
* Encapsulates report writing functionality.
*/
typedef struct LROCrashReportWriter {
/** Add a boolean element to the report.
*
* @param writer This writer.
*
* @param name The name to give this element.
*
* @param value The value to add.
*/
void (*addBooleanElement)(const struct LROCrashReportWriter *writer, const char *name, bool value);
/** Add a floating point element to the report.
*
* @param writer This writer.
*
* @param name The name to give this element.
*
* @param value The value to add.
*/
void (*addFloatingPointElement)(const struct LROCrashReportWriter *writer, const char *name, double value);
/** Add an integer element to the report.
*
* @param writer This writer.
*
* @param name The name to give this element.
*
* @param value The value to add.
*/
void (*addIntegerElement)(const struct LROCrashReportWriter *writer, const char *name, int64_t value);
/** Add an unsigned integer element to the report.
*
* @param writer This writer.
*
* @param name The name to give this element.
*
* @param value The value to add.
*/
void (*addUIntegerElement)(const struct LROCrashReportWriter *writer, const char *name, uint64_t value);
/** Add a string element to the report.
*
* @param writer This writer.
*
* @param name The name to give this element.
*
* @param value The value to add.
*/
void (*addStringElement)(const struct LROCrashReportWriter *writer, const char *name, const char *value);
/** Add a string element from a text file to the report.
*
* @param writer This writer.
*
* @param name The name to give this element.
*
* @param filePath The path to the file containing the value to add.
*/
void (*addTextFileElement)(const struct LROCrashReportWriter *writer, const char *name, const char *filePath);
/** Add an array of string elements representing lines from a text file to the report.
*
* @param writer This writer.
*
* @param name The name to give this element.
*
* @param filePath The path to the file containing the value to add.
*/
void (*addTextFileLinesElement)(const struct LROCrashReportWriter *writer, const char *name, const char *filePath);
/** Add a JSON element from a text file to the report.
*
* @param writer This writer.
*
* @param name The name to give this element.
*
* @param filePath The path to the file containing the value to add.
*
* @param closeLastContainer If false, do not close the last container.
*/
void (*addJSONFileElement)(const struct LROCrashReportWriter *writer, const char *name, const char *filePath,
const bool closeLastContainer);
/** Add a hex encoded data element to the report.
*
* @param writer This writer.
*
* @param name The name to give this element.
*
* @param value A pointer to the binary data.
*
* @paramn length The length of the data.
*/
void (*addDataElement)(const struct LROCrashReportWriter *writer, const char *name, const char *value,
const int length);
/** Begin writing a hex encoded data element to the report.
*
* @param writer This writer.
*
* @param name The name to give this element.
*/
void (*beginDataElement)(const struct LROCrashReportWriter *writer, const char *name);
/** Append hex encoded data to the current data element in the report.
*
* @param writer This writer.
*
* @param value A pointer to the binary data.
*
* @paramn length The length of the data.
*/
void (*appendDataElement)(const struct LROCrashReportWriter *writer, const char *value, const int length);
/** Complete writing a hex encoded data element to the report.
*
* @param writer This writer.
*/
void (*endDataElement)(const struct LROCrashReportWriter *writer);
/** Add a UUID element to the report.
*
* @param writer This writer.
*
* @param name The name to give this element.
*
* @param value A pointer to the binary UUID data.
*/
void (*addUUIDElement)(const struct LROCrashReportWriter *writer, const char *name, const unsigned char *value);
/** Add a preformatted JSON element to the report.
*
* @param writer This writer.
*
* @param name The name to give this element.
*
* @param jsonElement A pointer to the JSON data.
*
* @param closeLastContainer If false, do not close the last container.
*/
void (*addJSONElement)(const struct LROCrashReportWriter *writer, const char *name, const char *jsonElement,
bool closeLastContainer);
/** Begin a new object container.
*
* @param writer This writer.
*
* @param name The name to give this element.
*/
void (*beginObject)(const struct LROCrashReportWriter *writer, const char *name);
/** Begin a new array container.
*
* @param writer This writer.
*
* @param name The name to give this element.
*/
void (*beginArray)(const struct LROCrashReportWriter *writer, const char *name);
/** Leave the current container, returning to the next higher level
* container.
*
* @param writer This writer.
*/
void (*endContainer)(const struct LROCrashReportWriter *writer);
/** Internal contextual data for the writer */
void *context;
} NS_SWIFT_NAME(ReportWriter) LROCrashReportWriter;
typedef void (*LROReportWriteCallback)(const LROCrashReportWriter *writer)
NS_SWIFT_UNAVAILABLE("Use Swift closures instead!");
#ifdef __cplusplus
}
#endif
#endif // HDR_LROCrashReportWriter_h

View File

@@ -1,54 +0,0 @@
// Adapted from: https://github.com/kstenerud/KSCrash
//
// LRODebug.h
//
// Created by Karl Stenerud on 2012-01-29.
//
// Copyright (c) 2012 Karl Stenerud. All rights reserved.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall remain in place
// in this source code.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
//
/* Utility functions for querying the mach kernel
*/
#ifndef HDR_LRODebug_h
#define HDR_LRODebug_h
#ifdef __cplusplus
extern "C" {
#endif
#include <stdbool.h>
/** Check if the current process is being traced or not.
*
* @return true if we're being traced
*/
bool lrodebug_isBeingTraced(void);
#ifdef __cplusplus
}
#endif
#endif // HDR_LRODebug_h

View File

@@ -1,17 +0,0 @@
#ifndef LROException_h
#define LROException_h
@interface LROException : NSObject
/** It is not possible to catch NSExceptions from Swift code directly.
* This function handles execution of a block of Swift code that may throw an
* NSException, surfacing it to the Swift code environment in a form that it
* _can_ catch and handle, an NSError.
*
* @param tryBlock The Swift code to execute
*/
+ (BOOL)catchException:(void(^)(void))tryBlock error:(__autoreleasing NSError **)error;
@end
#endif /* LROException_h */

View File

@@ -1,284 +0,0 @@
// Adapted from: https://github.com/kstenerud/KSCrash
//
// LROFileUtils.h
//
// Created by Karl Stenerud on 2012-01-28.
//
// Copyright (c) 2012 Karl Stenerud. All rights reserved.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall remain in place
// in this source code.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
//
/* Basic file reading/writing functions.
*/
#ifndef HDR_LROFileUtils_h
#define HDR_LROFileUtils_h
#include <stdarg.h>
#include <stdbool.h>
#ifdef __cplusplus
extern "C" {
#endif
#define LROFU_MAX_PATH_LENGTH 500
/** Get the last entry in a file path. Assumes UNIX style separators.
*
* @param path The file path.
*
* @return the last entry in the path.
*/
const char *lrofu_lastPathEntry(const char *path);
/** Write bytes to a file descriptor.
*
* @param fd The file descriptor.
*
* @param bytes Buffer containing the bytes.
*
* @param length The number of bytes to write.
*
* @return true if the operation was successful.
*/
bool lrofu_writeBytesToFD(const int fd, const char *bytes, int length);
/** Read bytes from a file descriptor.
*
* @param fd The file descriptor.
*
* @param bytes Buffer to store the bytes in.
*
* @param length The number of bytes to read.
*
* @return true if the operation was successful.
*/
bool lrofu_readBytesFromFD(const int fd, char *bytes, int length);
/** Read an entire file. Returns a buffer of file size + 1, null terminated.
*
* @param path The path to the file.
*
* @param data Place to store a pointer to the loaded data (must be freed).
*
* @param length Place to store the length of the loaded data (can be NULL).
*
* @param maxLength the maximum amount of bytes to read. It will skip beginning
* bytes if necessary, and always get the latter part of the file.
* 0 = no maximum.
*
* @return true if the operation was successful.
*/
bool lrofu_readEntireFile(const char *path, char **data, int *length, int maxLength);
/** Write a string to a file.
*
* @param fd The file descriptor.
*
* @param string The string to write.
*
* @return true if successful.
*/
bool lrofu_writeStringToFD(const int fd, const char *string);
/** Write a formatted string to a file.
*
* @param fd The file descriptor.
*
* @param fmt The format specifier, followed by its arguments.
*
* @return true if successful.
*/
bool lrofu_writeFmtToFD(const int fd, const char *fmt, ...);
/** Write a formatted string to a file.
*
* @param fd The file descriptor.
*
* @param fmt The format specifier.
*
* @param args The arguments list.
*
* @return true if successful.
*/
bool lrofu_writeFmtArgsToFD(const int fd, const char *fmt, va_list args);
/** Read a single line from a file.
*
* @param fd The file descriptor.
*
* @param buffer The buffer to read into.
*
* @param maxLength The maximum length to read.
*
* @return The number of bytes read.
*/
int lrofu_readLineFromFD(const int fd, char *buffer, int maxLength);
/** Make all directories in a path.
*
* @param absolutePath The full, absolute path to create.
*
* @return true if successful.
*/
bool lrofu_makePath(const char *absolutePath);
/** Remove a file or directory.
*
* @param path Path to the file to remove.
*
* @param mustExist If true, and the path doesn't exist, log an error.
*
* @return true if successful.
*/
bool lrofu_removeFile(const char *path, bool mustExist);
/** Delete the contents of a directory.
*
* @param path The path of the directory whose contents to delete.
*
* @return true if successful.
*/
bool lrofu_deleteContentsOfPath(const char *path);
/** Buffered writer structure. Everything inside should be considered internal use only. */
typedef struct {
char *buffer;
int bufferLength;
int position;
int fd;
} LROBufferedWriter;
/** Open a file for buffered writing.
*
* @param writer The writer to initialize.
*
* @param path The path of the file to open.
*
* @param writeBuffer Memory to use as the write buffer.
*
* @param writeBufferLength Length of the memory to use as the write buffer.
*
* @return True if the file was successfully opened.
*/
bool lrofu_openBufferedWriter(LROBufferedWriter *writer, const char *const path, char *writeBuffer,
int writeBufferLength);
/** Close a buffered writer.
*
* @param writer The writer to close.
*/
void lrofu_closeBufferedWriter(LROBufferedWriter *writer);
/** Write to a buffered writer.
*
* @param writer The writer to write to.
*
* @param data The data to write.
*
* @param length The length of the data to write.
*
* @return True if the data was successfully written.
*/
bool lrofu_writeBufferedWriter(LROBufferedWriter *writer, const char *restrict const data, const int length);
/** Flush a buffered writer, writing all uncommitted data to disk.
*
* @param writer The writer to flush.
*
* @return True if the buffer was successfully flushed.
*/
bool lrofu_flushBufferedWriter(LROBufferedWriter *writer);
/** Buffered reader structure. Everything inside should be considered internal use only. */
typedef struct {
char *buffer;
int bufferLength;
int dataStartPos;
int dataEndPos;
int fd;
} LROBufferedReader;
/** Open a file for buffered reading.
*
* @param reader The reader to initialize.
*
* @param path The path to the file to open.
*
* @param readBuffer The memory to use for buffered reading.
*
* @param readBufferLength The length of the memory to use for buffered reading.
*
* @return True if the file was successfully opened.
*/
bool lrofu_openBufferedReader(LROBufferedReader *reader, const char *const path, char *readBuffer, int readBufferLength);
/** Close a buffered reader.
*
* @param reader The reader to close.
*/
void lrofu_closeBufferedReader(LROBufferedReader *reader);
/** Read from a buffered reader.
*
* @param reader The reader to read from.
*
* @param dstBuffer The buffer to read into.
*
* @param byteCount The number of bytes to read.
*
* @return The number of bytes actually read.
*/
int lrofu_readBufferedReader(LROBufferedReader *reader, char *dstBuffer, int byteCount);
/** Read from a buffered reader until the specified character is encountered.
* All bytes up to and including the character will be read.
*
* @param reader The reader to read from.
*
* @param ch The character to look for.
*
* @param dstBuffer The buffer to read into.
*
* @param length in: The maximum number of bytes to read before giving up the search.
* out: The actual number of bytes read.
*
* @return True if the character was found before giving up.
*/
bool lrofu_readBufferedReaderUntilChar(LROBufferedReader *reader, int ch, char *dstBuffer, int *length);
/** Memory maps an entire file of size and returns the mapped pointer.
*
* @param path The path to the file.
*
* @param size The size of the map.
*
* @return the mapped pointer if successful, NULL otherwise.
* The return value must be unmapped using `munmap` when done
* with the returned pointer. It is ok to let the pointer live up to termination,
* the system will unmap on termination if required.
*/
void *lrofu_mmap(const char *path, int size);
#ifdef __cplusplus
}
#endif
#endif // HDR_LROFileUtils_h

View File

@@ -1,513 +0,0 @@
// Adapted from: https://github.com/kstenerud/KSCrash
//
// LROJSONCodec.h
//
// Created by Karl Stenerud on 2012-01-07.
//
// Copyright (c) 2012 Karl Stenerud. All rights reserved.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall remain in place
// in this source code.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
//
/* Reads and writes JSON encoded data.
*/
#ifndef HDR_LROJSONCodec_h
#define HDR_LROJSONCodec_h
#include <stdbool.h>
#include <stdint.h>
#ifdef __cplusplus
extern "C" {
#endif
/* Tells the encoder to automatically determine the length of a field value.
* Currently, this is done using strlen().
*/
#define LROJSON_SIZE_AUTOMATIC -1
enum {
/** Encoding or decoding: Everything completed without error */
LROJSON_OK = 0,
/** Encoding or decoding: Encountered an unexpected or invalid character */
LROJSON_ERROR_INVALID_CHARACTER = 1,
/** Decoding: Source data was too long. */
LROJSON_ERROR_DATA_TOO_LONG = 2,
/** Encoding: addJSONData could not handle the data.
* This code is not used by the decoder, but is meant to be returned by
* the addJSONData callback method if it couldn't handle the data.
*/
LROJSON_ERROR_CANNOT_ADD_DATA = 3,
/** Decoding: Source data appears to be truncated. */
LROJSON_ERROR_INCOMPLETE = 4,
/** Decoding: Parsing failed due to bad data structure/type/contents.
* This code is not used by the decoder, but is meant to be returned
* by the user callback methods if the decoded data is incorrect for
* semantic or structural reasons.
*/
LROJSON_ERROR_INVALID_DATA = 5,
};
/** Get a description for an error code.
*
* @param error The error code.
*
* @return A string describing the error.
*/
const char *lrojson_stringForError(const int error);
// ============================================================================
// Encode
// ============================================================================
/** Function pointer for adding more UTF-8 encoded JSON data.
*
* @param data The UTF-8 data to add.
*
* @param length The length of the data.
*
* @param userData user-specified contextual data.
*
* @return LROJSON_OK if the data was handled.
* otherwise LROJSON_ERROR_CANNOT_ADD_DATA.
*/
typedef int (*LROJSONAddDataFunc)(const char *data, int length, void *userData);
typedef struct {
/** Function to call to add more encoded JSON data. */
LROJSONAddDataFunc addJSONData;
/** User-specified data */
void *userData;
/** How many containers deep we are. */
int containerLevel;
/** Whether or not the current container is an object. */
bool isObject[200];
/** true if this is the first entry at the current container level. */
bool containerFirstEntry;
bool prettyPrint;
} LROJSONEncodeContext;
/** Begin a new encoding process.
*
* @param context The encoding context.
*
* @param prettyPrint If true, insert whitespace to make the output pretty.
*
* @param addJSONData Function to handle adding data.
*
* @param userData User-specified data which gets passed to addJSONData.
*/
void lrojson_beginEncode(LROJSONEncodeContext *context, bool prettyPrint, LROJSONAddDataFunc addJSONData, void *userData);
/** End the encoding process, ending any remaining open containers.
*
* @return LROJSON_OK if the process was successful.
*/
int lrojson_endEncode(LROJSONEncodeContext *context);
/** Add a boolean element.
*
* @param context The encoding context.
*
* @param name The element's name.
*
* @param value The element's value.
*
* @return LROJSON_OK if the process was successful.
*/
int lrojson_addBooleanElement(LROJSONEncodeContext *context, const char *name, bool value);
/** Add an integer element.
*
* @param context The encoding context.
*
* @param name The element's name.
*
* @param value The element's value.
*
* @return LROJSON_OK if the process was successful.
*/
int lrojson_addIntegerElement(LROJSONEncodeContext *context, const char *name, int64_t value);
/** Add an unsigned integer element.
*
* @param context The encoding context.
*
* @param name The element's name.
*
* @param value The element's value.
*
* @return LROJSON_OK if the process was successful.
*/
int lrojson_addUIntegerElement(LROJSONEncodeContext *const context, const char *const name, uint64_t value);
/** Add a floating point element.
*
* @param context The encoding context.
*
* @param name The element's name.
*
* @param value The element's value.
*
* @return LROJSON_OK if the process was successful.
*/
int lrojson_addFloatingPointElement(LROJSONEncodeContext *context, const char *name, double value);
/** Add a null element.
*
* @param context The encoding context.
*
* @param name The element's name.
*
* @return LROJSON_OK if the process was successful.
*/
int lrojson_addNullElement(LROJSONEncodeContext *context, const char *name);
/** Add a string element.
*
* @param context The encoding context.
*
* @param name The element's name.
*
* @param value The element's value.
*
* @param length the length of the string, or LROJSON_SIZE_AUTOMATIC.
*
* @return LROJSON_OK if the process was successful.
*/
int lrojson_addStringElement(LROJSONEncodeContext *context, const char *name, const char *value, int length);
/** Start an incrementally-built string element.
*
* Use this for constructing very large strings.
*
* @param context The encoding context.
*
* @param name The element's name.
*
* @return LROJSON_OK if the process was successful.
*/
int lrojson_beginStringElement(LROJSONEncodeContext *context, const char *name);
/** Add a string fragment to an incrementally-built string element.
*
* @param context The encoding context.
*
* @param value The string fragment.
*
* @param length the length of the string fragment.
*
* @return LROJSON_OK if the process was successful.
*/
int lrojson_appendStringElement(LROJSONEncodeContext *context, const char *value, int length);
/** End an incrementally-built string element.
*
* @param context The encoding context.
*
* @return LROJSON_OK if the process was successful.
*/
int lrojson_endStringElement(LROJSONEncodeContext *context);
/** Add a string element. The element will be converted to string-coded hex.
*
* @param context The encoding context.
*
* @param name The element's name.
*
* @param value The element's value.
*
* @param length The length of the data.
*
* @return LROJSON_OK if the process was successful.
*/
int lrojson_addDataElement(LROJSONEncodeContext *const context, const char *name, const char *value, int length);
/** Start an incrementally-built data element. The element will be converted
* to string-coded hex.
*
* Use this for constructing very large data elements.
*
* @param context The encoding context.
*
* @param name The element's name.
*
* @return LROJSON_OK if the process was successful.
*/
int lrojson_beginDataElement(LROJSONEncodeContext *const context, const char *const name);
/** Add a data fragment to an incrementally-built data element.
*
* @param context The encoding context.
*
* @param value The data fragment.
*
* @param length the length of the data fragment.
*
* @return LROJSON_OK if the process was successful.
*/
int lrojson_appendDataElement(LROJSONEncodeContext *const context, const char *const value, int length);
/** End an incrementally-built data element.
*
* @param context The encoding context.
*
* @return LROJSON_OK if the process was successful.
*/
int lrojson_endDataElement(LROJSONEncodeContext *const context);
/** Add a pre-formatted JSON element.
*
* @param encodeContext The encoding context.
*
* @param name The element's name.
*
* @param jsonData The element's value. MUST BE VALID JSON!
*
* @param jsonDataLength The length of the element.
*
* @param closeLastContainer If false, do not close the last container.
*
* @return LROJSON_OK if the process was successful.
*/
int lrojson_addJSONElement(LROJSONEncodeContext *const encodeContext, const char *restrict const name,
const char *restrict const jsonData, const int jsonDataLength, const bool closeLastContainer);
/** Begin a new object container.
*
* @param context The encoding context.
*
* @param name The object's name.
*
* @return LROJSON_OK if the process was successful.
*/
int lrojson_beginObject(LROJSONEncodeContext *context, const char *name);
/** Begin a new array container.
*
* @param context The encoding context.
*
* @param name The array's name.
*
* @return LROJSON_OK if the process was successful.
*/
int lrojson_beginArray(LROJSONEncodeContext *context, const char *name);
/** Begin a generic JSON element, adding any necessary JSON preamble text,
* including commas and names.
* Note: This does not add any object or array specifiers ('{', '[').
*
* @param context The JSON context.
*
* @param name The name of the next element (only needed if parent is a dictionary).
*/
int lrojson_beginElement(LROJSONEncodeContext *const context, const char *const name);
/** Add JSON data manually.
* This function just passes your data directly through, even if it's malforned.
*
* @param context The encoding context.
*
* @param data The data to write.
*
* @param length The length of the data.
*
* @return LROJSON_OK if the process was successful.
*/
int lrojson_addRawJSONData(LROJSONEncodeContext *const context, const char *const data, const int length);
/** End the current container and return to the next higher level.
*
* @param context The encoding context.
*
* @return LROJSON_OK if the process was successful.
*/
int lrojson_endContainer(LROJSONEncodeContext *context);
/** Decode and add JSON data from a file.
*
* @param context The encoding context.
*
* @param name The name to give the top element from the file.
*
* @param filename The file to read from.
*
* @param closeLastContainer If false, do not close the last container.
*/
int lrojson_addJSONFromFile(LROJSONEncodeContext *const context, const char *restrict const name,
const char *restrict const filename, const bool closeLastContainer);
// ============================================================================
// Decode
// ============================================================================
/**
* Callbacks called during a JSON decode process.
* All function pointers must point to valid functions.
*/
typedef struct LROJSONDecodeCallbacks {
/** Called when a boolean element is decoded.
*
* @param name The element's name.
*
* @param value The element's value.
*
* @param userData Data that was specified when calling lrojson_decode().
*
* @return LROJSON_OK if decoding should continue.
*/
int (*onBooleanElement)(const char *name, bool value, void *userData);
/** Called when a floating point element is decoded.
*
* @param name The element's name.
*
* @param value The element's value.
*
* @param userData Data that was specified when calling lrojson_decode().
*
* @return LROJSON_OK if decoding should continue.
*/
int (*onFloatingPointElement)(const char *name, double value, void *userData);
/** Called when an integer element is decoded.
*
* @param name The element's name.
*
* @param value The element's value.
*
* @param userData Data that was specified when calling lrojson_decode().
*
* @return LROJSON_OK if decoding should continue.
*/
int (*onIntegerElement)(const char *name, int64_t value, void *userData);
/** Called when an unsigned integer element is decoded.
*
* @param name The element's name.
*
* @param value The element's value.
*
* @param userData Data that was specified when calling lrojson_decode().
*
* @return LROJSON_OK if decoding should continue.
*/
int (*onUnsignedIntegerElement)(const char *name, uint64_t value, void *userData);
/** Called when a null element is decoded.
*
* @param name The element's name.
*
* @param userData Data that was specified when calling lrojson_decode().
*
* @return LROJSON_OK if decoding should continue.
*/
int (*onNullElement)(const char *name, void *userData);
/** Called when a string element is decoded.
*
* @param name The element's name.
*
* @param value The element's value.
*
* @param userData Data that was specified when calling lrojson_decode().
*
* @return LROJSON_OK if decoding should continue.
*/
int (*onStringElement)(const char *name, const char *value, void *userData);
/** Called when a new object is encountered.
*
* @param name The object's name.
*
* @param userData Data that was specified when calling lrojson_decode().
*
* @return LROJSON_OK if decoding should continue.
*/
int (*onBeginObject)(const char *name, void *userData);
/** Called when a new array is encountered.
*
* @param name The array's name.
*
* @param userData Data that was specified when calling lrojson_decode().
*
* @return LROJSON_OK if decoding should continue.
*/
int (*onBeginArray)(const char *name, void *userData);
/** Called when leaving the current container and returning to the next
* higher level container.
*
* @param userData Data that was specified when calling lrojson_decode().
*
* @return LROJSON_OK if decoding should continue.
*/
int (*onEndContainer)(void *userData);
/** Called when the end of the input data is reached.
*
* @param userData Data that was specified when calling lrojson_decode().
*
* @return LROJSON_OK if decoding should continue.
*/
int (*onEndData)(void *userData);
} LROJSONDecodeCallbacks;
/** Read a JSON encoded file from the specified FD.
*
* @param data UTF-8 encoded JSON data.
*
* @param length Length of the data.
*
* @param stringBuffer A buffer to use for decoding strings.
* Note: 1/4 of this buffer will be used for dictionary name decoding.
*
* @param stringBufferLength The length of the string buffer.
*
* @param callbacks The callbacks to call while decoding.
*
* @param userData Any data you would like passed to the callbacks.
*
* @oaram errorOffset If not null, will contain the offset into the data
* where the error (if any) occurred.
*
* @return LROJSON_OK if succesful. An error code otherwise.
*/
int lrojson_decode(const char *data, int length, char *stringBuffer, int stringBufferLength,
LROJSONDecodeCallbacks *callbacks, void *userData, int *errorOffset);
#ifdef __cplusplus
}
#endif
#endif // HDR_LROJSONCodec_h

View File

@@ -1,59 +0,0 @@
// Adapted from: https://github.com/kstenerud/KSCrash
//
// LROMach.h
//
// Copyright 2016 Karl Stenerud.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall remain in place
// in this source code.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
//
/*
* Utility functions for parsing different mach-specific values
*/
#ifndef HDR_LROMach_h
#define HDR_LROMach_h
#ifdef __cplusplus
extern "C" {
#endif
#include <stdint.h>
/** Get the name of a mach exception.
*
* @param exceptionType The exception type
*
* @return The exception's name or NULL if not found
*/
const char* lromach_exceptionName(int64_t exceptionType);
/** Get the name of a mach kernel return code.
*
* @param returnCode The return code
*
* @return The code's name or NULL if not found
*/
const char* lromach_kernelReturnCodeName(int64_t returnCode);
#ifdef __cplusplus
}
#endif
#endif // HDR_LROMach_h

View File

@@ -1,114 +0,0 @@
// Adapted from: https://github.com/kstenerud/KSCrash
//
// LROMachineContext.h
//
// Created by Karl Stenerud on 2016-12-02.
//
// Copyright (c) 2012 Karl Stenerud. All rights reserved.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall remain in place
// in this source code.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
//
/*
* Handles thread management for the task in which a detected exception occurred
* - util for suspending current task's threads and recording which threads were suspended
* - util for resuming a given array of threads
*
* Also collects CPU state information for callstack traversal
*/
#ifndef HDR_LROMachineContext_h
#define HDR_LROMachineContext_h
#ifdef __cplusplus
extern "C" {
#endif
#include "LROThread.h"
#include <mach/mach.h>
#include <stdbool.h>
/** Suspend the runtime environment
*/
void lromc_suspendEnvironment(
thread_act_array_t *suspendedThreads, mach_msg_type_number_t *numSuspendedThreads);
/** Resume the runtime environment
*/
void lromc_resumeEnvironment(thread_act_array_t threads, mach_msg_type_number_t numThreads);
/** Create a new machine context on the stack.
* This macro creates a storage object on the stack, as well as a pointer of type
* struct LROMachineContext* in the current scope, which points to the storage object.
*
* Example usage: LROMC_NEW_CONTEXT(a_context);
* This creates a new pointer at the current scope that behaves as if:
* struct LROMachineContext* a_context = some_storage_location;
*
* @param NAME The C identifier to give the pointer
*/
#define LROMC_NEW_CONTEXT(NAME) \
char lromc_##NAME##_storage[lromc_contextSize()]; \
struct LROMachineContext* NAME = (struct LROMachineContext*)lromc_##NAME##_storage
struct LROMachineContext;
/** Get the internal size of a machine context.
*/
int lromc_contextSize(void);
/** Fill in a machine context from a thread.
*
* @param thread The thread from which to get information
* @param destinationContext The context to fill
* @param isCrashedContext Used to indicate that this is the thread that crashed,
*
* @return true if successful
*/
bool lromc_getContextForThread(LROThread thread, struct LROMachineContext* destinationContext, bool isCrashedContext);
/** Get the thread associated with a machine context.
*
* @param context The machine context
*
* @return The associated thread
*/
LROThread lromc_getThreadFromContext(const struct LROMachineContext* const context);
/** Check if this is a crashed context.
*/
bool lromc_isCrashedContext(const struct LROMachineContext* const context);
/** Check if this context can have stored CPU state.
*/
bool lromc_canHaveCPUState(const struct LROMachineContext* const context);
/** Add a thread to the reserved threads list.
*
* @param thread The thread to add to the list
*/
void lromc_addReservedThread(LROThread thread);
#ifdef __cplusplus
}
#endif
#endif // HDR_LROMachineContext_h

View File

@@ -1,10 +0,0 @@
#ifndef LRORNSVGSwizzle_h
#define LRORNSVGSwizzle_h
@interface LRORNSVGSwizzle : NSObject
+ (void)swizzle;
@end
#endif /* LRORNSVGSwizzle_h */

View File

@@ -1,10 +0,0 @@
#ifndef LROReactNativeSwizzler_h
#define LROReactNativeSwizzler_h
@interface LROReactNativeSwizzler : NSObject
+ (void)swizzle;
@end
#endif /* LROReactNativeSwizzler_h */

View File

@@ -1,13 +0,0 @@
#ifndef LRORenderingTracker_h
#define LRORenderingTracker_h
@protocol LRORenderableCache
- (void)markAsDirty:(id <NSObject>)obj;
@end
@interface LRORenderingTracker : NSObject
+(void)start:(id <LRORenderableCache>)renderableCache;
+(void)stop;
@end
#endif /* Header_h */

View File

@@ -1,11 +0,0 @@
#ifndef LROScrollSwizzle_h
#define LROScrollSwizzle_h
#import <UIKit/UIKit.h>
@interface LROScrollSwizzle : NSObject
+ (void)swizzle;
@end
#endif /* Header_h */

View File

@@ -1,20 +0,0 @@
#ifndef LROSessionDetails_h
#define LROSessionDetails_h
typedef struct LROSessionDetails {
char *recordingID;
char *sessionID;
char *appID;
char *currentURL;
/// The session start time measured as milliseconds from the Unix epoch.
double startTime;
/// The session start time measured in ticks since system boot.
double startTimeTicks;
char *release;
char *debugModules;
char *tabID;
char *userID;
char *serverURL;
} LROSessionDetails;
#endif /* LROSessionDetails_h */

View File

@@ -1,59 +0,0 @@
// Adapted from: https://github.com/kstenerud/KSCrash
//
// LROSystemCapabilities.h
//
// Copyright (c) 2012 Karl Stenerud. All rights reserved.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall remain in place
// in this source code.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
//
#ifndef HDR_CrashSystemCapabilities_h
#define HDR_CrashSystemCapabilities_h
#ifdef __APPLE__
#include <TargetConditionals.h>
#define LROCRASH_HOST_APPLE 1
#endif
#define LROCRASH_HOST_IOS (LROCRASH_HOST_APPLE && TARGET_OS_IOS)
#define LROCRASH_HOST_TV (LROCRASH_HOST_APPLE && TARGET_OS_TV)
#define LROCRASH_HOST_WATCH (LROCRASH_HOST_APPLE && TARGET_OS_WATCH)
#define LROCRASH_HOST_MAC (LROCRASH_HOST_APPLE && TARGET_OS_MAC && !(TARGET_OS_IOS || TARGET_OS_TV || TARGET_OS_WATCH))
#if LROCRASH_HOST_APPLE
#define LROCRASH_HAS_OBJC 1
#define LROCRASH_HAS_SWIFT 1
#else
#define LROCRASH_HAS_OBJC 0
#define LROCRASH_HAS_SWIFT 0
#endif
#if LROCRASH_HOST_IOS || LROCRASH_HOST_MAC
#define LROCRASH_HAS_MACH 1
#else
#define LROCRASH_HAS_MACH 0
#endif
#if LROCRASH_HOST_MAC || LROCRASH_HOST_IOS || LROCRASH_HOST_TV
#define LROCRASH_HAS_THREADS_API 1
#else
#define LROCRASH_HAS_THREADS_API 0
#endif
#endif // HDR_CrashSystemCapabilities_h

View File

@@ -1,60 +0,0 @@
// Adapted from: https://github.com/kstenerud/KSCrash
//
// LROThread.h
//
// Created by Karl Stenerud on 2012-01-29.
//
// Copyright (c) 2012 Karl Stenerud. All rights reserved.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall remain in place
// in this source code.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
//
/*
* TODO:
* In [SSDK-1198] explain usage of LROThread in collecting stack trace
*/
#ifndef HDR_LROThread_h
#define HDR_LROThread_h
#ifdef __cplusplus
extern "C" {
#endif
#include <stdbool.h>
#include <sys/types.h>
typedef uintptr_t LROThread;
/* Get the current mach thread ID.
* mach_thread_self() receives a send right for the thread port which needs to
* be deallocated to balance the reference count. This function takes care of
* all of that for you.
*
* @return The current thread ID
*/
LROThread lrothread_self(void);
#ifdef __cplusplus
}
#endif
#endif // HDR_LROThread_h

View File

@@ -1,19 +0,0 @@
#import <Foundation/Foundation.h>
#ifndef LROUncaughtExceptionHandler_h
#define LROUncaughtExceptionHandler_h
@interface LROUncaughtExceptionHandler : NSObject
+ (void)initializeSessionDetailsWithRecordingID:(NSString *)recordingID sessionID:(NSString *)sessionID appID:(NSString *)appID tabID:(NSString *)tabID startTime:(double)startTime startTimeTicks:(UInt64)startTimeTicks release:(NSString *)release debugModules:(NSData *)debugModules userID:(NSString *)userID serverURL:(NSString *)serverURL;
+ (void)setEnabled:(bool)isEnabled;
+ (void)updateCurrentURL:(NSString *)currentURL;
+ (void)updateUserID:(NSString *)userID;
+ (void)updateSessionDetailsWithRecordingID:(NSString *)recordingID sessionID:(NSString *)sessionID tabID:(NSString *)tabID startTime:(double)startTime userID:(NSString *)userID;
@end
#endif /* LROUncaughtExceptionHandler_h */

View File

@@ -1,10 +0,0 @@
#ifndef LROViewTracker_h
#define LROViewTracker_h
@interface LROViewTracker : NSObject
+ (void)swizzle;
@end
#endif /* LROViewTracker_h */

View File

@@ -1,3 +0,0 @@
#import <CoreGraphics/CoreGraphics.h>
CFDataRef __nullable LROWebPEncode(CGImageRef _Nonnull image);

View File

@@ -1,690 +0,0 @@
#if 0
#elif defined(__arm64__) && __arm64__
// Generated by Apple Swift version 6.2 effective-5.10 (swiftlang-6.2.0.19.9 clang-1700.3.19.1)
#ifndef LOGROCKET_SWIFT_H
#define LOGROCKET_SWIFT_H
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wgcc-compat"
#if !defined(__has_include)
# define __has_include(x) 0
#endif
#if !defined(__has_attribute)
# define __has_attribute(x) 0
#endif
#if !defined(__has_feature)
# define __has_feature(x) 0
#endif
#if !defined(__has_warning)
# define __has_warning(x) 0
#endif
#if __has_include(<swift/objc-prologue.h>)
# include <swift/objc-prologue.h>
#endif
#pragma clang diagnostic ignored "-Wauto-import"
#if defined(__OBJC__)
#include <Foundation/Foundation.h>
#endif
#if defined(__cplusplus)
#include <cstdint>
#include <cstddef>
#include <cstdbool>
#include <cstring>
#include <stdlib.h>
#include <new>
#include <type_traits>
#else
#include <stdint.h>
#include <stddef.h>
#include <stdbool.h>
#include <string.h>
#endif
#if defined(__cplusplus)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wnon-modular-include-in-framework-module"
#if defined(__arm64e__) && __has_include(<ptrauth.h>)
# include <ptrauth.h>
#else
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wreserved-macro-identifier"
# ifndef __ptrauth_swift_value_witness_function_pointer
# define __ptrauth_swift_value_witness_function_pointer(x)
# endif
# ifndef __ptrauth_swift_class_method_pointer
# define __ptrauth_swift_class_method_pointer(x)
# endif
#pragma clang diagnostic pop
#endif
#pragma clang diagnostic pop
#endif
#if !defined(SWIFT_TYPEDEFS)
# define SWIFT_TYPEDEFS 1
# if __has_include(<uchar.h>)
# include <uchar.h>
# elif !defined(__cplusplus)
typedef unsigned char char8_t;
typedef uint_least16_t char16_t;
typedef uint_least32_t char32_t;
# endif
typedef float swift_float2 __attribute__((__ext_vector_type__(2)));
typedef float swift_float3 __attribute__((__ext_vector_type__(3)));
typedef float swift_float4 __attribute__((__ext_vector_type__(4)));
typedef double swift_double2 __attribute__((__ext_vector_type__(2)));
typedef double swift_double3 __attribute__((__ext_vector_type__(3)));
typedef double swift_double4 __attribute__((__ext_vector_type__(4)));
typedef int swift_int2 __attribute__((__ext_vector_type__(2)));
typedef int swift_int3 __attribute__((__ext_vector_type__(3)));
typedef int swift_int4 __attribute__((__ext_vector_type__(4)));
typedef unsigned int swift_uint2 __attribute__((__ext_vector_type__(2)));
typedef unsigned int swift_uint3 __attribute__((__ext_vector_type__(3)));
typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4)));
#endif
#if !defined(SWIFT_PASTE)
# define SWIFT_PASTE_HELPER(x, y) x##y
# define SWIFT_PASTE(x, y) SWIFT_PASTE_HELPER(x, y)
#endif
#if !defined(SWIFT_METATYPE)
# define SWIFT_METATYPE(X) Class
#endif
#if !defined(SWIFT_CLASS_PROPERTY)
# if __has_feature(objc_class_property)
# define SWIFT_CLASS_PROPERTY(...) __VA_ARGS__
# else
# define SWIFT_CLASS_PROPERTY(...)
# endif
#endif
#if !defined(SWIFT_RUNTIME_NAME)
# if __has_attribute(objc_runtime_name)
# define SWIFT_RUNTIME_NAME(X) __attribute__((objc_runtime_name(X)))
# else
# define SWIFT_RUNTIME_NAME(X)
# endif
#endif
#if !defined(SWIFT_COMPILE_NAME)
# if __has_attribute(swift_name)
# define SWIFT_COMPILE_NAME(X) __attribute__((swift_name(X)))
# else
# define SWIFT_COMPILE_NAME(X)
# endif
#endif
#if !defined(SWIFT_METHOD_FAMILY)
# if __has_attribute(objc_method_family)
# define SWIFT_METHOD_FAMILY(X) __attribute__((objc_method_family(X)))
# else
# define SWIFT_METHOD_FAMILY(X)
# endif
#endif
#if !defined(SWIFT_NOESCAPE)
# if __has_attribute(noescape)
# define SWIFT_NOESCAPE __attribute__((noescape))
# else
# define SWIFT_NOESCAPE
# endif
#endif
#if !defined(SWIFT_RELEASES_ARGUMENT)
# if __has_attribute(ns_consumed)
# define SWIFT_RELEASES_ARGUMENT __attribute__((ns_consumed))
# else
# define SWIFT_RELEASES_ARGUMENT
# endif
#endif
#if !defined(SWIFT_WARN_UNUSED_RESULT)
# if __has_attribute(warn_unused_result)
# define SWIFT_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
# else
# define SWIFT_WARN_UNUSED_RESULT
# endif
#endif
#if !defined(SWIFT_NORETURN)
# if __has_attribute(noreturn)
# define SWIFT_NORETURN __attribute__((noreturn))
# else
# define SWIFT_NORETURN
# endif
#endif
#if !defined(SWIFT_CLASS_EXTRA)
# define SWIFT_CLASS_EXTRA
#endif
#if !defined(SWIFT_PROTOCOL_EXTRA)
# define SWIFT_PROTOCOL_EXTRA
#endif
#if !defined(SWIFT_ENUM_EXTRA)
# define SWIFT_ENUM_EXTRA
#endif
#if !defined(SWIFT_CLASS)
# if __has_attribute(objc_subclassing_restricted)
# define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_CLASS_EXTRA
# define SWIFT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA
# else
# define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA
# define SWIFT_CLASS_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA
# endif
#endif
#if !defined(SWIFT_RESILIENT_CLASS)
# if __has_attribute(objc_class_stub)
# define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME) __attribute__((objc_class_stub))
# define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_class_stub)) SWIFT_CLASS_NAMED(SWIFT_NAME)
# else
# define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME)
# define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) SWIFT_CLASS_NAMED(SWIFT_NAME)
# endif
#endif
#if !defined(SWIFT_PROTOCOL)
# define SWIFT_PROTOCOL(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA
# define SWIFT_PROTOCOL_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA
#endif
#if !defined(SWIFT_EXTENSION)
# define SWIFT_EXTENSION(M) SWIFT_PASTE(M##_Swift_, __LINE__)
#endif
#if !defined(OBJC_DESIGNATED_INITIALIZER)
# if __has_attribute(objc_designated_initializer)
# define OBJC_DESIGNATED_INITIALIZER __attribute__((objc_designated_initializer))
# else
# define OBJC_DESIGNATED_INITIALIZER
# endif
#endif
#if !defined(SWIFT_ENUM_ATTR)
# if __has_attribute(enum_extensibility)
# define SWIFT_ENUM_ATTR(_extensibility) __attribute__((enum_extensibility(_extensibility)))
# else
# define SWIFT_ENUM_ATTR(_extensibility)
# endif
#endif
#if !defined(SWIFT_ENUM)
# define SWIFT_ENUM(_type, _name, _extensibility) enum _name : _type _name; enum SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type
# if __has_feature(generalized_swift_name)
# define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) enum _name : _type _name SWIFT_COMPILE_NAME(SWIFT_NAME); enum SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type
# else
# define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) SWIFT_ENUM(_type, _name, _extensibility)
# endif
#endif
#if !defined(SWIFT_UNAVAILABLE)
# define SWIFT_UNAVAILABLE __attribute__((unavailable))
#endif
#if !defined(SWIFT_UNAVAILABLE_MSG)
# define SWIFT_UNAVAILABLE_MSG(msg) __attribute__((unavailable(msg)))
#endif
#if !defined(SWIFT_AVAILABILITY)
# define SWIFT_AVAILABILITY(plat, ...) __attribute__((availability(plat, __VA_ARGS__)))
#endif
#if !defined(SWIFT_WEAK_IMPORT)
# define SWIFT_WEAK_IMPORT __attribute__((weak_import))
#endif
#if !defined(SWIFT_DEPRECATED)
# define SWIFT_DEPRECATED __attribute__((deprecated))
#endif
#if !defined(SWIFT_DEPRECATED_MSG)
# define SWIFT_DEPRECATED_MSG(...) __attribute__((deprecated(__VA_ARGS__)))
#endif
#if !defined(SWIFT_DEPRECATED_OBJC)
# if __has_feature(attribute_diagnose_if_objc)
# define SWIFT_DEPRECATED_OBJC(Msg) __attribute__((diagnose_if(1, Msg, "warning")))
# else
# define SWIFT_DEPRECATED_OBJC(Msg) SWIFT_DEPRECATED_MSG(Msg)
# endif
#endif
#if defined(__OBJC__)
#if !defined(IBSegueAction)
# define IBSegueAction
#endif
#endif
#if !defined(SWIFT_EXTERN)
# if defined(__cplusplus)
# define SWIFT_EXTERN extern "C"
# else
# define SWIFT_EXTERN extern
# endif
#endif
#if !defined(SWIFT_CALL)
# define SWIFT_CALL __attribute__((swiftcall))
#endif
#if !defined(SWIFT_INDIRECT_RESULT)
# define SWIFT_INDIRECT_RESULT __attribute__((swift_indirect_result))
#endif
#if !defined(SWIFT_CONTEXT)
# define SWIFT_CONTEXT __attribute__((swift_context))
#endif
#if !defined(SWIFT_ERROR_RESULT)
# define SWIFT_ERROR_RESULT __attribute__((swift_error_result))
#endif
#if defined(__cplusplus)
# define SWIFT_NOEXCEPT noexcept
#else
# define SWIFT_NOEXCEPT
#endif
#if !defined(SWIFT_C_INLINE_THUNK)
# if __has_attribute(always_inline)
# if __has_attribute(nodebug)
# define SWIFT_C_INLINE_THUNK inline __attribute__((always_inline)) __attribute__((nodebug))
# else
# define SWIFT_C_INLINE_THUNK inline __attribute__((always_inline))
# endif
# else
# define SWIFT_C_INLINE_THUNK inline
# endif
#endif
#if defined(_WIN32)
#if !defined(SWIFT_IMPORT_STDLIB_SYMBOL)
# define SWIFT_IMPORT_STDLIB_SYMBOL __declspec(dllimport)
#endif
#else
#if !defined(SWIFT_IMPORT_STDLIB_SYMBOL)
# define SWIFT_IMPORT_STDLIB_SYMBOL
#endif
#endif
#if defined(__OBJC__)
#if __has_feature(objc_modules)
#if __has_warning("-Watimport-in-framework-header")
#pragma clang diagnostic ignored "-Watimport-in-framework-header"
#endif
@import CoreFoundation;
@import Foundation;
@import ObjectiveC;
@import UIKit;
#endif
#import <LogRocket/LogRocket.h>
#endif
#pragma clang diagnostic ignored "-Wproperty-attribute-mismatch"
#pragma clang diagnostic ignored "-Wduplicate-method-arg"
#if __has_warning("-Wpragma-clang-attribute")
# pragma clang diagnostic ignored "-Wpragma-clang-attribute"
#endif
#pragma clang diagnostic ignored "-Wunknown-pragmas"
#pragma clang diagnostic ignored "-Wnullability"
#pragma clang diagnostic ignored "-Wdollar-in-identifier-extension"
#pragma clang diagnostic ignored "-Wunsafe-buffer-usage"
#if __has_attribute(external_source_symbol)
# pragma push_macro("any")
# undef any
# pragma clang attribute push(__attribute__((external_source_symbol(language="Swift", defined_in="LogRocket",generated_declaration))), apply_to=any(function,enum,objc_interface,objc_category,objc_protocol))
# pragma pop_macro("any")
#endif
#if defined(__OBJC__)
@class UIViewController;
SWIFT_PROTOCOL_NAMED("LifecycleDelegate")
@protocol LROLifecycleDelegate
- (void)viewControllerDidAppear:(UIViewController * _Nonnull)_;
- (void)viewControllerDidDisappear:(UIViewController * _Nonnull)_;
@end
SWIFT_CLASS_NAMED("ApplicationLifecycleObserver")
@interface LROApplicationLifecycleObserver : NSObject <LROLifecycleDelegate>
- (void)viewControllerDidAppear:(UIViewController * _Nonnull)viewController;
- (void)viewControllerDidDisappear:(UIViewController * _Nonnull)viewController;
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
@end
@class NSString;
SWIFT_CLASS_NAMED("CaptureMessageBuilder")
@interface LROCaptureMessageBuilder : NSObject
- (nonnull instancetype)init:(NSString * _Nonnull)message OBJC_DESIGNATED_INITIALIZER;
- (LROCaptureMessageBuilder * _Nonnull)putTagString:(NSString * _Nonnull)key value:(NSString * _Nonnull)value SWIFT_WARN_UNUSED_RESULT;
- (LROCaptureMessageBuilder * _Nonnull)putTagBoolean:(NSString * _Nonnull)key value:(BOOL)value SWIFT_WARN_UNUSED_RESULT;
- (LROCaptureMessageBuilder * _Nonnull)putTagDouble:(NSString * _Nonnull)key value:(double)value SWIFT_WARN_UNUSED_RESULT;
- (LROCaptureMessageBuilder * _Nonnull)putTagInt:(NSString * _Nonnull)key value:(NSInteger)value SWIFT_WARN_UNUSED_RESULT;
- (LROCaptureMessageBuilder * _Nonnull)putExtraString:(NSString * _Nonnull)key value:(NSString * _Nonnull)value SWIFT_WARN_UNUSED_RESULT;
- (LROCaptureMessageBuilder * _Nonnull)putExtraBoolean:(NSString * _Nonnull)key value:(BOOL)value SWIFT_WARN_UNUSED_RESULT;
- (LROCaptureMessageBuilder * _Nonnull)putExtraDouble:(NSString * _Nonnull)key value:(double)value SWIFT_WARN_UNUSED_RESULT;
- (LROCaptureMessageBuilder * _Nonnull)putExtraInt:(NSString * _Nonnull)key value:(NSInteger)value SWIFT_WARN_UNUSED_RESULT;
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
@end
@class NSMutableSet;
enum LROSanitizerType : NSInteger;
@protocol LRORequestSanitizer;
@protocol LROResponseSanitizer;
@class LROProxyConfigurationBuilder;
enum LogLevel : NSInteger;
/// warning:
/// Be careful when using <code>viewCaptureTimeoutThreshold</code>, see parameter description for details
/// \param viewCaptureTimeoutThreshold
/// <em>WARNING</em>
/// Changing this setting may result in highly limited capture or causing the app to hang for extreme lengths of time. Proceed at your own risk!
/// Specifies, in milliseconds, how long the LogRocket SDK should attempt to capture a view before timing out to prevent the app from hanging.
///
SWIFT_CLASS_NAMED("Configuration")
@interface LROConfiguration : NSObject
@property (nonatomic, copy) NSString * _Nonnull serverURL;
@property (nonatomic, strong) NSMutableSet * _Nonnull allowTags;
@property (nonatomic, strong) NSMutableSet * _Nonnull redactionTags;
@property (nonatomic, strong) NSMutableSet * _Nonnull inputRedactionTags;
@property (nonatomic) enum LROSanitizerType textSanitizer;
@property (nonatomic) BOOL redactMenus;
@property (nonatomic) BOOL captureRedactedViewTouches;
@property (nonatomic) BOOL viewScanningEnabled;
@property (nonatomic) BOOL networkCaptureEnabled;
@property (nonatomic) BOOL logCaptureEnabled;
@property (nonatomic, strong) id <LRORequestSanitizer> _Nullable requestSanitizer;
@property (nonatomic, strong) id <LROResponseSanitizer> _Nullable responseSanitizer;
@property (nonatomic) BOOL registerTouchHandlers;
@property (nonatomic) CGFloat scaleFactor;
@property (nonatomic) BOOL ipCaptureEnabled;
@property (nonatomic) BOOL persistenceEnabled;
@property (nonatomic) uint32_t bufferTimeoutSeconds;
@property (nonatomic) NSInteger uploadIntervalMs;
@property (nonatomic, strong) LROProxyConfigurationBuilder * _Nonnull proxyConfiguration;
@property (nonatomic) BOOL experimentalBidiCapture;
@property (nonatomic) BOOL disableScrollDelegate;
@property (nonatomic) BOOL forceCleanStart;
@property (nonatomic) BOOL throughputTrackingEnabled;
@property (nonatomic) BOOL extendedViewTextCaptureEnabled;
@property (nonatomic, copy) NSString * _Nonnull updateId;
@property (nonatomic, copy) NSString * _Nonnull expoChannel;
@property (nonatomic) enum LogLevel logLevel;
@property (nonatomic) BOOL requestHttpBodyStreamCaptureEnabled;
@property (nonatomic) BOOL isReactNative;
@property (nonatomic) BOOL isRNNewArchEnabled;
@property (nonatomic) BOOL requireRNNetworkSanitizer;
@property (nonatomic) BOOL isFlutter;
@property (nonatomic) NSInteger viewCaptureTimeoutThreshold SWIFT_DEPRECATED_MSG("\n **WARNING**\n Changing this setting may result in highly limited capture or causing the app to hang for extreme lengths of time. Proceed at your own risk!\n\n Specifies, in milliseconds, how long the LogRocket SDK should attempt to capture a view before timing out to prevent the app from hanging.\n ");
@property (nonatomic) NSInteger viewCaptureAdditionalWireframeDuration;
/// Control whether automatically registered navigation events
/// for iOS view lifecycle changes are disabled.
/// This configuration option does not affect manual page tagging behavior.
@property (nonatomic) BOOL enableAutomaticLifecycleCapture;
@property (nonatomic) BOOL unexpectedExceptionCaptureEnabled;
/// Network requests from your app to any of these origins will not be tracked by network capture. Use network sanitizers for more fine-grained control
/// over network capture.
@property (nonatomic, strong) NSMutableSet * _Nonnull networkCaptureRedactedOrigins;
@property (nonatomic) BOOL lottieCaptureEnabled;
@property (nonatomic) NSInteger maxCapturedIosVersion;
@property (nonatomic) BOOL requestDebugLoggingEnabled;
@property (nonatomic) BOOL enableViewCaptureV2;
@property (nonatomic) BOOL reduceViewCaptureBandwidthWhenIdle;
/// warning:
/// Be careful when using <code>viewCaptureTimeoutThreshold</code>, see parameter description for details
/// \param viewCaptureTimeoutThreshold
/// <em>WARNING</em>
/// Changing this setting may result in highly limited capture or causing the app to hang for extreme lengths of time. Proceed at your own risk!
/// Specifies, in milliseconds, how long the LogRocket SDK should attempt to capture a view before timing out to prevent the app from hanging.
///
- (nonnull instancetype)initWithAppID:(NSString * _Nonnull)appID OBJC_DESIGNATED_INITIALIZER;
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
@end
@class NSURL;
SWIFT_CLASS_NAMED("CrashReportUploader")
@interface LROCrashReportUploader : NSObject
- (void)uploadWithCrashReportDirectory:(NSURL * _Nonnull)crashReportDirectory;
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
@end
SWIFT_CLASS_NAMED("CustomEvent")
@interface LROCustomEvent : NSObject
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
@end
SWIFT_CLASS_NAMED("CustomEventBuilder")
@interface LROCustomEventBuilder : NSObject
- (nonnull instancetype)init:(NSString * _Nonnull)name OBJC_DESIGNATED_INITIALIZER;
- (void)putRevenue:(double)value;
- (void)putString:(NSString * _Nonnull)key value:(NSString * _Nonnull)value;
- (void)putStringArray:(NSString * _Nonnull)key value:(NSArray<NSString *> * _Nonnull)value;
- (void)putDouble:(NSString * _Nonnull)key value:(double)value;
- (void)putDoubleArray:(NSString * _Nonnull)key value:(NSArray<NSNumber *> * _Nonnull)value;
- (void)putBool:(NSString * _Nonnull)key value:(BOOL)value;
- (void)putBoolArray:(NSString * _Nonnull)key value:(NSArray<NSNumber *> * _Nonnull)value;
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
@end
@class NSCoder;
SWIFT_CLASS("_TtC9LogRocket24LRBackgroundMarkerUIView")
@interface LRBackgroundMarkerUIView : UIView
- (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)_ SWIFT_UNAVAILABLE;
- (void)didMoveToWindow;
- (nonnull instancetype)initWithFrame:(CGRect)frame SWIFT_UNAVAILABLE;
@end
SWIFT_CLASS("_TtC9LogRocket21LROverlayMarkerUIView")
@interface LROverlayMarkerUIView : UIView
- (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)_ SWIFT_UNAVAILABLE;
- (void)didMoveToWindow;
- (nonnull instancetype)initWithFrame:(CGRect)frame SWIFT_UNAVAILABLE;
@end
typedef SWIFT_ENUM(NSInteger, LifecycleEventType, open) {
LifecycleEventTypeViewAppeared = 0,
LifecycleEventTypeViewDisappeared = 1,
LifecycleEventTypePageTag = 2,
LifecycleEventTypeUnrecognized = 3,
};
SWIFT_CLASS_NAMED("LifecycleManager")
@interface LROLifecycleManager : NSObject
+ (BOOL)captureEventWithBase:(NSString * _Nonnull)base path:(NSString * _Nonnull)path lifecycleType:(enum LifecycleEventType)lifecycleType error:(NSError * _Nullable * _Nullable)error;
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
@end
SWIFT_CLASS_NAMED("LogHandler")
@interface LROLogHandler : NSObject
+ (void)swift_load;
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
@end
@class NSError;
@class NSException;
@class NSNumber;
@class NSMutableArray;
@class LRORequestBuilder;
@class WKWebView;
SWIFT_CLASS_NAMED("LogRocketSDK")
@interface LROSDK : NSObject
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
+ (BOOL)initializeInternalWithConfiguration:(LROConfiguration * _Nonnull)configuration SWIFT_WARN_UNUSED_RESULT;
+ (void)initializeWithConfiguration:(LROConfiguration * _Nonnull)configuration;
+ (void)addLogWithLevel:(NSString * _Nonnull)level args:(NSArray<NSString *> * _Nonnull)args;
/// Deprecated: Use <a href="x-source-tag://correctCaptureException">Logger.captureException</a> instead
+ (void)captureExceptionWithErrorMessage:(NSString * _Nonnull)errorMessage errorType:(NSString * _Nonnull)errorType exceptionType:(NSString * _Nonnull)exceptionType stackTrace:(NSString * _Nonnull)stackTrace SWIFT_DEPRECATED_MSG("Helper for capturing properly encoded exception data. This method is deprecated, exceptions should be captured with Logger.captureException instead.");
+ (void)captureExceptionWithError:(NSError * _Nonnull)error;
+ (void)captureExceptionWithException:(NSException * _Nonnull)exception;
+ (void)captureMessage:(LROCaptureMessageBuilder * _Nonnull)builder;
+ (void)captureReduxActionWithAction:(NSString * _Nonnull)action storeId:(NSNumber * _Nonnull)storeId duration:(NSNumber * _Nonnull)duration stateDelta:(NSString * _Nonnull)stateDelta count:(NSNumber * _Nonnull)count;
+ (void)captureReduxInitialStateWithState:(NSString * _Nonnull)state storeId:(NSNumber * _Nonnull)storeId;
+ (void)rebuildMessage:(NSMutableArray * _Nonnull)messageArray;
+ (void)getSessionURL:(void (^ _Nonnull)(NSString * _Nonnull))completion;
+ (void)getSessionURLStatus:(void (^ _Nonnull)(NSString * _Nonnull))completion;
+ (void)identifyWithUserID:(NSString * _Nonnull)userID userInfo:(NSDictionary<NSString *, NSString *> * _Nullable)userInfo;
+ (void)identifyAsAnonymousWithUserID:(NSString * _Nonnull)userID userInfo:(NSDictionary<NSString *, NSString *> * _Nullable)userInfo;
+ (LRORequestBuilder * _Nullable)newRequestBuilder SWIFT_WARN_UNUSED_RESULT;
+ (void)pauseViewCapture;
+ (BOOL)isViewCapturePaused SWIFT_WARN_UNUSED_RESULT;
+ (void)shutDownCurrentSessionWithHardShutdown:(BOOL)hardShutdown purgeSession:(BOOL)purgeSession shutdownReason:(NSString * _Nullable)shutdownReason;
+ (void)startNewSessionNoConfig:(void (^ _Nullable)(BOOL))handler;
+ (void)startNewSessionWithConfiguration:(LROConfiguration * _Nonnull)configuration handler:(void (^ _Nullable)(BOOL))handler;
+ (void)endSession;
+ (void)shutdown;
+ (void)hardShutdown;
+ (void)track:(LROCustomEventBuilder * _Nonnull)builder;
+ (void)tagPage:(NSString * _Nonnull)relativePage;
+ (void)unpauseViewCapture;
+ (void)captureSingleView;
+ (void)viewControllerDidAppear:(UIViewController * _Nonnull)controller;
+ (void)viewControllerDidDisappear:(UIViewController * _Nonnull)controller;
+ (void)registerWebView:(WKWebView * _Nonnull)webView;
+ (BOOL)isInitialized SWIFT_WARN_UNUSED_RESULT;
+ (void)redactView:(UIView * _Nonnull)view;
+ (void)allowView:(UIView * _Nonnull)view;
+ (void)setReactNativeNetworkSanitizersWithRequestSanitizer:(id <LRORequestSanitizer> _Nullable)requestSanitizer responseSanitizer:(id <LROResponseSanitizer> _Nullable)responseSanitizer;
+ (enum LogLevel)logLevelFromString:(NSString * _Nonnull)logLevel SWIFT_WARN_UNUSED_RESULT;
@end
typedef SWIFT_ENUM(NSInteger, LogLevel, open) {
LogLevelFAULT = 5,
LogLevelERROR = 4,
LogLevelNOTICE = 3,
LogLevelINFO = 2,
LogLevelDEBUG = 1,
LogLevelVERBOSE = 0,
};
@class UIScrollView;
SWIFT_CLASS_NAMED("LogRocketScrollTracker")
@interface LROScrollTracker : NSObject <UIScrollViewDelegate>
- (void)scrollViewWillBeginDragging:(UIScrollView * _Nonnull)view;
- (void)scrollViewDidEndDecelerating:(UIScrollView * _Nonnull)view;
- (void)scrollViewDidEndDragging:(UIScrollView * _Nonnull)view willDecelerate:(BOOL)decelerate;
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
@end
SWIFT_CLASS_NAMED("Logger")
@interface LROLogger : NSObject
+ (void)debugWithMessage:(NSString * _Nonnull)message;
+ (void)infoWithMessage:(NSString * _Nonnull)message;
+ (void)errorWithMessage:(NSString * _Nonnull)message;
+ (void)warningWithMessage:(NSString * _Nonnull)message;
+ (void)captureCrashWithReason:(NSString * _Nonnull)reason errorType:(NSString * _Nonnull)errorType callStackSymbols:(NSArray<NSString *> * _Nullable)callStackSymbols;
+ (void)captureExceptionWithException:(NSException * _Nonnull)exception;
+ (void)captureExceptionWithError:(NSError * _Nonnull)error;
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
@end
SWIFT_CLASS_NAMED("ProxyConfigurationBuilder")
@interface LROProxyConfigurationBuilder : NSObject
- (void)proxyUsername:(NSString * _Nonnull)username;
- (void)proxyPassword:(NSString * _Nonnull)password;
- (void)httpEnable:(BOOL)enable;
- (void)httpProxy:(NSString * _Nonnull)proxy;
- (void)httpPort:(NSInteger)port;
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
@end
@protocol NSObject;
SWIFT_CLASS("_TtC9LogRocket15RenderableCache")
@interface RenderableCache : NSObject <LRORenderableCache>
- (void)markAsDirty:(id <NSObject> _Nonnull)obj;
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
@end
@class NSData;
SWIFT_CLASS_NAMED("Request")
@interface LRORequest : NSObject
@property (nonatomic, copy) NSString * _Nullable arsonBody;
@property (nonatomic, copy) NSData * _Nullable body;
@property (nonatomic, copy) NSDictionary<NSString *, NSString *> * _Nullable headers;
@property (nonatomic, readonly, copy) NSString * _Nonnull method;
@property (nonatomic, readonly) NSInteger reqID;
@property (nonatomic, copy) NSString * _Nullable url;
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
@end
@class LROResponseBuilder;
SWIFT_CLASS_NAMED("RequestBuilder")
@interface LRORequestBuilder : NSObject
@property (nonatomic, copy) NSString * _Nullable arsonBody;
@property (nonatomic, copy) NSData * _Nullable body;
@property (nonatomic, copy) NSDictionary<NSString *, NSString *> * _Nonnull headers;
@property (nonatomic, copy) NSString * _Nullable method;
@property (nonatomic, readonly) NSInteger reqID;
@property (nonatomic, copy) NSString * _Nullable url;
- (LROResponseBuilder * _Nullable)captureWithTimeOverride:(double)timeOverride SWIFT_WARN_UNUSED_RESULT;
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
@end
SWIFT_PROTOCOL_NAMED("RequestSanitizer")
@protocol LRORequestSanitizer
- (LRORequest * _Nullable)sanitizeWithRequest:(LRORequest * _Nonnull)request SWIFT_WARN_UNUSED_RESULT;
@end
SWIFT_CLASS_NAMED("Response")
@interface LROResponse : NSObject
@property (nonatomic, copy) NSString * _Nullable arsonBody;
@property (nonatomic, copy) NSData * _Nullable body;
@property (nonatomic, copy) NSDictionary<NSString *, NSString *> * _Nullable headers;
@property (nonatomic, readonly, copy) NSString * _Nonnull method;
@property (nonatomic, readonly) NSInteger reqID;
@property (nonatomic, readonly) uint32_t status;
@property (nonatomic, copy) NSString * _Nullable url;
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
@end
SWIFT_CLASS_NAMED("ResponseBuilder")
@interface LROResponseBuilder : NSObject
@property (nonatomic, copy) NSString * _Nullable arsonBody;
@property (nonatomic, copy) NSData * _Nullable body;
@property (nonatomic, copy) NSDictionary<NSString *, NSString *> * _Nonnull headers;
@property (nonatomic, copy) NSString * _Nonnull method;
@property (nonatomic, readonly) NSInteger reqID;
@property (nonatomic) NSInteger status;
@property (nonatomic, copy) NSString * _Nonnull url;
@property (nonatomic) double duration;
- (BOOL)captureWithTimeOverride:(double)timeOverride SWIFT_WARN_UNUSED_RESULT;
- (BOOL)capture SWIFT_WARN_UNUSED_RESULT;
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
@end
SWIFT_PROTOCOL_NAMED("ResponseSanitizer")
@protocol LROResponseSanitizer
- (LROResponse * _Nullable)sanitizeWithResponse:(LROResponse * _Nonnull)response SWIFT_WARN_UNUSED_RESULT;
@end
typedef SWIFT_ENUM_NAMED(NSInteger, LROSanitizerType, "SanitizerType", open) {
LROSanitizerTypeExcluded = 0,
LROSanitizerTypeNone = 1,
};
SWIFT_CLASS_NAMED("TaggedLogger")
@interface LROTaggedLogger : NSObject
- (nonnull instancetype)initWithCategory:(NSString * _Nonnull)category OBJC_DESIGNATED_INITIALIZER;
- (void)debugWithMessage:(NSString * _Nonnull)message;
- (void)infoWithMessage:(NSString * _Nonnull)message;
- (void)noticeWithMessage:(NSString * _Nonnull)message;
- (void)errorWithMessage:(NSString * _Nonnull)message;
- (void)faultWithMessage:(NSString * _Nonnull)message;
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
@end
@class UITouch;
@class UIEvent;
@class UIPress;
@class UIPressesEvent;
SWIFT_CLASS_NAMED("TouchShim")
@interface LROTouchShim : UIGestureRecognizer <UIGestureRecognizerDelegate>
- (BOOL)canBePreventedByGestureRecognizer:(UIGestureRecognizer * _Nonnull)_ SWIFT_WARN_UNUSED_RESULT;
- (BOOL)canPreventGestureRecognizer:(UIGestureRecognizer * _Nonnull)_ SWIFT_WARN_UNUSED_RESULT;
- (void)ignoreTouch:(UITouch * _Nonnull)_ forEvent:(UIEvent * _Nonnull)_;
- (void)ignorePress:(UIPress * _Nonnull)_ forEvent:(UIPressesEvent * _Nonnull)_;
- (BOOL)shouldRequireFailureOfGestureRecognizer:(UIGestureRecognizer * _Nonnull)_ SWIFT_WARN_UNUSED_RESULT;
- (BOOL)shouldBeRequiredToFailByGestureRecognizer:(UIGestureRecognizer * _Nonnull)_ SWIFT_WARN_UNUSED_RESULT;
- (void)reset;
- (void)touchesBegan:(NSSet<UITouch *> * _Nonnull)touches withEvent:(UIEvent * _Nonnull)_;
- (void)touchesCancelled:(NSSet<UITouch *> * _Nonnull)touches withEvent:(UIEvent * _Nonnull)event;
- (void)touchesEnded:(NSSet<UITouch *> * _Nonnull)touches withEvent:(UIEvent * _Nonnull)_;
- (void)touchesMoved:(NSSet<UITouch *> * _Nonnull)touches withEvent:(UIEvent * _Nonnull)_;
- (BOOL)gestureRecognizer:(UIGestureRecognizer * _Nonnull)_ shouldRecognizeSimultaneouslyWithGestureRecognizer:(UIGestureRecognizer * _Nonnull)_ SWIFT_WARN_UNUSED_RESULT;
- (nonnull instancetype)initWithTarget:(id _Nullable)target action:(SEL _Nullable)action SWIFT_UNAVAILABLE;
@end
#endif
#if __has_attribute(external_source_symbol)
# pragma clang attribute pop
#endif
#if defined(__cplusplus)
#endif
#pragma clang diagnostic pop
#endif
#else
#error unsupported Swift architecture
#endif

View File

@@ -1,46 +0,0 @@
#ifndef LogRocket_h
#define LogRocket_h
#import <Foundation/Foundation.h>
@protocol LROLifecycleDelegate;
//! Project version number for LogRocket.
FOUNDATION_EXPORT double LogRocketVersionNumber;
//! Project version string for LogRocket.
FOUNDATION_EXPORT const unsigned char LogRocketVersionString[];
// In this header, you should import all the public headers of your framework using statements like #import <LogRocket/PublicHeader.h>
// Note that any new header files also need to be added in project editor -> Build Phases -> Headers
#import <LogRocket/LROAppStartTracker.h>
#import <LogRocket/LROBinaryObjects.h>
#import <LogRocket/LROCLogger.h>
#import <LogRocket/LROCPU.h>
#import <LogRocket/LROCPU_Apple.h>
#import <LogRocket/LROCrashC.h>
#import <LogRocket/LROCrashMonitor.h>
#import <LogRocket/LROCrashMonitorContext.h>
#import <LogRocket/LROCrashMonitorEventCallback.h>
#import <LogRocket/LROCrashMonitor_CPPException.h>
#import <LogRocket/LROCrashMonitor_MachException.h>
#import <LogRocket/LROCrashReportC.h>
#import <LogRocket/LROCrashReportFields.h>
#import <LogRocket/LROCrashReportWriter.h>
#import <LogRocket/LRODebug.h>
#import <LogRocket/LROException.h>
#import <LogRocket/LROFileUtils.h>
#import <LogRocket/LROJSONCodec.h>
#import <LogRocket/LROMach.h>
#import <LogRocket/LROMachineContext.h>
#import <LogRocket/LRORNSVGSwizzle.h>
#import <LogRocket/LROReactNativeSwizzler.h>
#import <LogRocket/LROScrollSwizzle.h>
#import <LogRocket/LROSessionDetails.h>
#import <LogRocket/LROSystemCapabilities.h>
#import <LogRocket/LROUncaughtExceptionHandler.h>
#import <LogRocket/LROViewTracker.h>
#import <LogRocket/LROWebPEncode.h>
#import <LogRocket/LRORenderingTracker.h>
#endif

View File

@@ -1,418 +0,0 @@
// swift-interface-format-version: 1.0
// swift-compiler-version: Apple Swift version 6.2 effective-5.10 (swiftlang-6.2.0.19.9 clang-1700.3.19.1)
// swift-module-flags: -target arm64-apple-ios12.0 -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -O -enable-experimental-feature DebugDescriptionMacro -enable-bare-slash-regex -module-name LogRocket
// swift-module-flags-ignorable: -no-verify-emitted-module-interface -formal-cxx-interoperability-mode=off -interface-compiler-version 6.2
import CommonCrypto
import Dispatch
import Foundation
@_exported import LogRocket
import NaturalLanguage
import ObjectiveC
import QuartzCore
import Swift
import SwiftUI
import UIKit
import WebKit
import _Concurrency
import _StringProcessing
import _SwiftConcurrencyShims
import os
@available(iOS 13.0, *)
extension SwiftUICore.View {
@_Concurrency.MainActor @preconcurrency public func lrAddClass(_ viewSelector: Swift.String) -> some SwiftUICore.View
@_Concurrency.MainActor @preconcurrency public func lrHide() -> some SwiftUICore.View
@_Concurrency.MainActor @preconcurrency public func lrShow() -> some SwiftUICore.View
@_Concurrency.MainActor @preconcurrency public func lrAddClassWithContainer(_ viewSelector: Swift.String) -> some SwiftUICore.View
@_Concurrency.MainActor @preconcurrency public func lrHideWithContainer() -> some SwiftUICore.View
@_Concurrency.MainActor @preconcurrency public func lrShowWithContainer() -> some SwiftUICore.View
}
@objc @_hasMissingDesignatedInitializers @_Concurrency.MainActor @preconcurrency public class LROverlayMarkerUIView : UIKit.UIView {
@_Concurrency.MainActor @preconcurrency @objc override dynamic public func didMoveToWindow()
@objc deinit
}
@objc @_hasMissingDesignatedInitializers @_Concurrency.MainActor @preconcurrency public class LRBackgroundMarkerUIView : UIKit.UIView {
@_Concurrency.MainActor @preconcurrency @objc override dynamic public func didMoveToWindow()
@objc deinit
}
@objc(LRORequestSanitizer) public protocol RequestSanitizer {
#if compiler(>=5.3) && $NonescapableTypes
@objc func sanitize(request: LogRocket.Request) -> LogRocket.Request?
#endif
}
@_hasMissingDesignatedInitializers public class CanvasReplayConfiguration {
public static let minDebounceDelay: Swift.Int
public static let idleMinDebounceDelay: Swift.Int
public static let idleThresholdMs: Swift.Int
public static let maxDebounceDelay: Swift.Int
public static let maxCaptureDuration: Swift.Int
public static let maxTimeoutRetries: Swift.Int
public static let singleBitmapCaptureLimit: Swift.Int
public static let totalBitmapCaptureLimit: Swift.Int
public static let maxUnencodedImageBytes: Swift.Int
@objc deinit
}
@objc @_hasMissingDesignatedInitializers public class RenderableCache : ObjectiveC.NSObject, LogRocket.LRORenderableCache {
@objc public func mark(asDirty obj: any ObjectiveC.NSObjectProtocol)
@objc deinit
}
@_hasMissingDesignatedInitializers @objc(LROResponseBuilder) public class ResponseBuilder : ObjectiveC.NSObject {
@objc public var arsonBody: Swift.String?
@objc public var body: Foundation.Data?
@objc public var headers: [Swift.String : Swift.String]
@objc public var method: Swift.String
@objc final public let reqID: Swift.Int
@objc public var status: Swift.Int
@objc public var url: Swift.String
@objc public var duration: Swift.Double
@objc public func capture(timeOverride: Swift.Double = 0) -> Swift.Bool
@objc public func capture() -> Swift.Bool
@objc deinit
}
@objc(LROTaggedLogger) public class TaggedLogger : ObjectiveC.NSObject {
@objc public init(category: Swift.String)
@objc public func debug(message: Swift.String)
@objc public func info(message: Swift.String)
@objc public func notice(message: Swift.String)
@objc public func error(message: Swift.String)
@objc public func fault(message: Swift.String)
@objc deinit
}
@objc(LROCaptureMessageBuilder) public class CaptureMessageBuilder : ObjectiveC.NSObject {
@objc public init(_ message: Swift.String)
@objc(putTagString:value:) public func putTag(_ key: Swift.String, _ value: Swift.String) -> LogRocket.CaptureMessageBuilder
@objc(putTagBoolean:value:) public func putTag(_ key: Swift.String, _ value: Swift.Bool) -> LogRocket.CaptureMessageBuilder
@objc(putTagDouble:value:) public func putTag(_ key: Swift.String, _ value: Swift.Double) -> LogRocket.CaptureMessageBuilder
@objc(putTagInt:value:) public func putTag(_ key: Swift.String, _ value: Swift.Int) -> LogRocket.CaptureMessageBuilder
@objc(putExtraString:value:) public func putExtra(_ key: Swift.String, _ value: Swift.String) -> LogRocket.CaptureMessageBuilder
@objc(putExtraBoolean:value:) public func putExtra(_ key: Swift.String, _ value: Swift.Bool) -> LogRocket.CaptureMessageBuilder
@objc(putExtraDouble:value:) public func putExtra(_ key: Swift.String, _ value: Swift.Double) -> LogRocket.CaptureMessageBuilder
@objc(putExtraInt:value:) public func putExtra(_ key: Swift.String, _ value: Swift.Int) -> LogRocket.CaptureMessageBuilder
@objc deinit
}
@_inheritsConvenienceInitializers @objc(LROProxyConfigurationBuilder) public class ProxyConfigurationBuilder : ObjectiveC.NSObject {
@objc public func proxyUsername(_ username: Swift.String)
@objc public func proxyPassword(_ password: Swift.String)
@objc public func httpEnable(_ enable: Swift.Bool)
@objc public func httpProxy(_ proxy: Swift.String)
@objc public func httpPort(_ port: Swift.Int)
@objc override dynamic public init()
@objc deinit
}
@_hasMissingDesignatedInitializers public class FlutterTouchEncoder {
public static func encode(x: Swift.Double, y: Swift.Double, text: Swift.String, nodeNames: [Swift.String], motionType: Swift.Int, timestamp: Swift.Double, moves: [Swift.Dictionary<Swift.String, Swift.Double>], url: Swift.String)
@objc deinit
}
@_inheritsConvenienceInitializers @_hasMissingDesignatedInitializers @objc(LROLogHandler) public class LogHandler : ObjectiveC.NSObject {
@objc public class func swift_load()
@objc deinit
}
public let systemViews: [Swift.String]
@_hasMissingDesignatedInitializers @objc(LROApplicationLifecycleObserver) public class ApplicationLifecycleObserver : ObjectiveC.NSObject, LogRocket.LifecycleDelegate {
@objc public func viewControllerDidAppear(_ viewController: UIKit.UIViewController)
public func restoreViewFromLastSession()
@objc public func viewControllerDidDisappear(_ viewController: UIKit.UIViewController)
@objc deinit
}
@_inheritsConvenienceInitializers @_hasMissingDesignatedInitializers @objc(LROSDK) public class LogRocketSDK : ObjectiveC.NSObject {
@objc public static func initializeInternal(configuration: LogRocket.Configuration) -> Swift.Bool
@objc public static func initialize(configuration: LogRocket.Configuration)
@objc public static func addLog(level: Swift.String, args: [Swift.String])
@available(*, deprecated, message: "Helper for capturing properly encoded exception data. This method is deprecated, exceptions should be captured with Logger.captureException instead.")
@objc public static func captureException(errorMessage: Swift.String, errorType: Swift.String, exceptionType: Swift.String, stackTrace: Swift.String)
@objc public static func captureException(error: Foundation.NSError)
@objc public static func captureException(exception: Foundation.NSException)
@objc public static func captureMessage(_ builder: LogRocket.CaptureMessageBuilder)
@objc public static func captureReduxAction(action: Swift.String, storeId: Foundation.NSNumber, duration: Foundation.NSNumber, stateDelta: Swift.String, count: Foundation.NSNumber)
@objc public static func captureReduxInitialState(state: Swift.String, storeId: Foundation.NSNumber)
@objc public static func rebuildMessage(_ messageArray: Foundation.NSMutableArray)
@objc public static func getSessionURL(_ completion: @escaping (Swift.String) -> Swift.Void)
@objc public static func getSessionURLStatus(_ completion: @escaping (Swift.String) -> Swift.Void)
#if compiler(>=5.3) && $NonescapableTypes
@objc public static func identify(userID: Swift.String, userInfo: [Swift.String : Swift.String]? = nil)
#endif
#if compiler(>=5.3) && $NonescapableTypes
@objc public static func identifyAsAnonymous(userID: Swift.String, userInfo: [Swift.String : Swift.String]? = nil)
#endif
#if compiler(>=5.3) && $NonescapableTypes
@objc public static func newRequestBuilder() -> LogRocket.RequestBuilder?
#endif
@objc public static func pauseViewCapture()
@objc public static func isViewCapturePaused() -> Swift.Bool
#if compiler(>=5.3) && $NonescapableTypes
@objc public static func shutDownCurrentSession(hardShutdown: Swift.Bool = false, purgeSession: Swift.Bool = false, shutdownReason: Swift.String? = nil)
#endif
#if compiler(>=5.3) && $NonescapableTypes
@objc(startNewSessionNoConfig:) public static func startNewSession(handler: ((Swift.Bool) -> Swift.Void)? = nil)
#endif
#if compiler(>=5.3) && $NonescapableTypes
@objc(startNewSessionWithConfiguration:handler:) public static func startNewSession(configuration: LogRocket.Configuration, handler: ((Swift.Bool) -> Swift.Void)? = nil)
#endif
@objc public static func endSession()
@objc public static func shutdown()
@objc public static func hardShutdown()
@objc public static func track(_ builder: LogRocket.CustomEventBuilder)
@objc public static func tagPage(_ relativePage: Swift.String)
@objc public static func unpauseViewCapture()
@objc public static func captureSingleView()
@objc public static func viewControllerDidAppear(_ controller: UIKit.UIViewController)
@objc public static func viewControllerDidDisappear(_ controller: UIKit.UIViewController)
@objc public static func registerWebView(_ webView: WebKit.WKWebView)
@objc public static func isInitialized() -> Swift.Bool
@objc public static func redactView(_ view: UIKit.UIView)
@objc public static func allowView(_ view: UIKit.UIView)
#if compiler(>=5.3) && $NonescapableTypes
@objc public static func setReactNativeNetworkSanitizers(requestSanitizer: (any LogRocket.RequestSanitizer)? = nil, responseSanitizer: (any LogRocket.ResponseSanitizer)? = nil)
#endif
@objc public enum LogLevel : Swift.Int {
case FAULT = 5
case ERROR = 4
case NOTICE = 3
case INFO = 2
case DEBUG = 1
case VERBOSE = 0
#if compiler(>=5.3) && $NonescapableTypes
public init?(rawValue: Swift.Int)
#endif
public typealias RawValue = Swift.Int
public var rawValue: Swift.Int {
get
}
}
@objc public static func logLevelFromString(_ logLevel: Swift.String) -> LogRocket.LogRocketSDK.LogLevel
@objc deinit
}
@available(*, deprecated, message: "Use LogRocketSDK instead.")
public typealias SDK = LogRocket.LogRocketSDK
@objc(LROLifecycleDelegate) public protocol LifecycleDelegate {
@objc func viewControllerDidAppear(_: UIKit.UIViewController)
@objc func viewControllerDidDisappear(_: UIKit.UIViewController)
}
@objc(LROCustomEventBuilder) public class CustomEventBuilder : ObjectiveC.NSObject {
@objc public init(_ name: Swift.String)
@objc public func putRevenue(_ value: Swift.Double)
@objc(putString:value:) public func put(_ key: Swift.String, _ value: Swift.String)
@objc(putStringArray:value:) public func put(_ key: Swift.String, _ value: [Swift.String])
@objc(putDouble:value:) public func put(_ key: Swift.String, _ value: Swift.Double)
@objc(putDoubleArray:value:) public func put(_ key: Swift.String, _ value: [Swift.Double])
@objc(putBool:value:) public func put(_ key: Swift.String, _ value: Swift.Bool)
@objc(putBoolArray:value:) public func put(_ key: Swift.String, _ value: [Swift.Bool])
@objc deinit
}
@_hasMissingDesignatedInitializers public class FrameProcessTimer {
public func elapsed() -> Swift.Int64
public func hasTakenTooLong(caller: Swift.String = #function) -> Swift.Bool
public func end()
public func getWireFrameMode() -> Swift.Bool
@objc deinit
}
@_hasMissingDesignatedInitializers public class ScreenshotViewEncoder {
#if compiler(>=5.3) && $NonescapableTypes
public static func captureScreenshot(bitmapId: Swift.Int, imageBytes: Foundation.Data?, x: Swift.Int, y: Swift.Int, width: Swift.Int, height: Swift.Int)
#endif
@objc deinit
}
@objc(LROResponseSanitizer) public protocol ResponseSanitizer {
#if compiler(>=5.3) && $NonescapableTypes
@objc func sanitize(response: LogRocket.Response) -> LogRocket.Response?
#endif
}
public enum LookbackType : Swift.String {
case NONE
case LIMITED
case FULL
#if compiler(>=5.3) && $NonescapableTypes
public init?(rawValue: Swift.String)
#endif
public typealias RawValue = Swift.String
public var rawValue: Swift.String {
get
}
}
@_inheritsConvenienceInitializers @objc(LROCrashReportUploader) public class CrashReportUploader : ObjectiveC.NSObject {
@objc public func upload(crashReportDirectory: Foundation.URL)
@objc override dynamic public init()
@objc deinit
}
@_inheritsConvenienceInitializers @objc(LROLogger) public class Logger : ObjectiveC.NSObject {
@objc public static func debug(message: Swift.String)
@objc public static func info(message: Swift.String)
@objc public static func error(message: Swift.String)
@objc public static func warning(message: Swift.String)
#if compiler(>=5.3) && $NonescapableTypes
@objc public static func captureCrash(reason: Swift.String, errorType: Swift.String, callStackSymbols: [Swift.String]?)
#endif
@objc public static func captureException(exception: Foundation.NSException)
@objc public static func captureException(error: Foundation.NSError)
public static func captureException(error: any Swift.Error)
@objc override dynamic public init()
@objc deinit
}
@objc public enum LifecycleEventType : Swift.Int {
case viewAppeared
case viewDisappeared
case pageTag
case unrecognized
#if compiler(>=5.3) && $NonescapableTypes
public init?(rawValue: Swift.Int)
#endif
public typealias RawValue = Swift.Int
public var rawValue: Swift.Int {
get
}
}
@_inheritsConvenienceInitializers @objc(LROLifecycleManager) public class LifecycleManager : ObjectiveC.NSObject {
@objc public static func captureEvent(base: Swift.String, path: Swift.String, lifecycleType: LogRocket.LifecycleEventType) throws
@objc override dynamic public init()
@objc deinit
}
@objc(LROConfiguration) public class Configuration : ObjectiveC.NSObject {
final public let appID: Swift.String
@objc public var serverURL: Swift.String
@objc public var allowTags: Foundation.NSMutableSet
@objc public var redactionTags: Foundation.NSMutableSet
@objc public var inputRedactionTags: Foundation.NSMutableSet
@objc public var textSanitizer: LogRocket.SanitizerType
@objc public var redactMenus: Swift.Bool
@objc public var captureRedactedViewTouches: Swift.Bool
@objc public var viewScanningEnabled: Swift.Bool
@objc public var networkCaptureEnabled: Swift.Bool
@objc public var logCaptureEnabled: Swift.Bool
@objc public var requestSanitizer: (any LogRocket.RequestSanitizer)?
@objc public var responseSanitizer: (any LogRocket.ResponseSanitizer)?
@objc public var registerTouchHandlers: Swift.Bool
@objc public var scaleFactor: CoreFoundation.CGFloat {
@objc get
@objc set
}
@objc public var ipCaptureEnabled: Swift.Bool
@objc public var persistenceEnabled: Swift.Bool
@objc public var bufferTimeoutSeconds: Swift.UInt32
@objc public var uploadIntervalMs: Swift.Int
@objc public var proxyConfiguration: LogRocket.ProxyConfigurationBuilder
@objc public var experimentalBidiCapture: Swift.Bool
@objc public var disableScrollDelegate: Swift.Bool
@objc public var forceCleanStart: Swift.Bool
@objc public var throughputTrackingEnabled: Swift.Bool
@objc public var extendedViewTextCaptureEnabled: Swift.Bool
@objc public var updateId: Swift.String
@objc public var expoChannel: Swift.String
@objc public var logLevel: LogRocket.LogRocketSDK.LogLevel
@objc public var requestHttpBodyStreamCaptureEnabled: Swift.Bool
@objc public var isReactNative: Swift.Bool
@objc public var isRNNewArchEnabled: Swift.Bool
@objc public var requireRNNetworkSanitizer: Swift.Bool
@objc public var isFlutter: Swift.Bool
@available(*, deprecated, message: "**WARNING**\nChanging this setting may result in highly limited capture or causing the app to hang for extreme lengths of time. Proceed at your own risk!\n\nSpecifies, in milliseconds, how long the LogRocket SDK should attempt to capture a view before timing out to prevent the app from hanging.")
@objc public var viewCaptureTimeoutThreshold: Swift.Int
@objc public var viewCaptureAdditionalWireframeDuration: Swift.Int
@objc public var enableAutomaticLifecycleCapture: Swift.Bool
@objc public var unexpectedExceptionCaptureEnabled: Swift.Bool
@objc public var networkCaptureRedactedOrigins: Foundation.NSMutableSet
@objc public var lottieCaptureEnabled: Swift.Bool
@objc public var maxCapturedIosVersion: Swift.Int
@objc public var requestDebugLoggingEnabled: Swift.Bool
@objc public var enableViewCaptureV2: Swift.Bool
@objc public var reduceViewCaptureBandwidthWhenIdle: Swift.Bool
@objc public init(appID: Swift.String)
#if compiler(>=5.3) && $NonescapableTypes
convenience public init(appID: Swift.String, serverURL: Swift.String = "https://r.lr-intake.com/i", allowTags: [Swift.String] = [], redactionTags: [Swift.String] = [], inputRedactionTags: [Swift.String] = [], textSanitizer: LogRocket.SanitizerType = .none, redactMenus: Swift.Bool = false, viewScanningEnabled: Swift.Bool = true, networkCaptureEnabled: Swift.Bool = true, logCaptureEnabled: Swift.Bool = true, requestSanitizer: (any LogRocket.RequestSanitizer)? = nil, responseSanitizer: (any LogRocket.ResponseSanitizer)? = nil, registerTouchHandlers: Swift.Bool = true, ipCaptureEnabled: Swift.Bool = true, scaleFactor: CoreFoundation.CGFloat? = nil, persistenceEnabled: Swift.Bool = true, bufferTimeoutSeconds: Swift.UInt32 = 60, uploadIntervalMs: Swift.Int = 30000, proxyConfigurationBuilder: LogRocket.ProxyConfigurationBuilder? = nil, experimentalBidiCapture: Swift.Bool = false, disableScrollDelegate: Swift.Bool = false, forceCleanStart: Swift.Bool = false, throughputTrackingEnabled: Swift.Bool = true, extendedViewTextCaptureEnabled: Swift.Bool = true, captureRedactedViewTouches: Swift.Bool = true, updateId: Swift.String = "", expoChannel: Swift.String = "", logLevel: LogRocket.LogRocketSDK.LogLevel = LogRocketSDK.LogLevel.INFO, requestHttpBodyStreamCaptureEnabled: Swift.Bool = true, viewCaptureTimeoutThreshold: Swift.Int = CanvasReplayConfiguration.maxCaptureDuration, viewCaptureAdditionalWireframeDuration: Swift.Int = 20, enableAutomaticLifecycleCapture: Swift.Bool = true, unexpectedExceptionCaptureEnabled: Swift.Bool = true, networkCaptureRedactedOrigins: [Swift.String] = [], lottieCaptureEnabled: Swift.Bool = false, maxCapturedIosVersion: Swift.Int = -1, requestDebugLoggingEnabled: Swift.Bool = false, enableViewCaptureV2: Swift.Bool = true, reduceViewCaptureBandwidthWhenIdle: Swift.Bool = true)
#endif
@objc deinit
}
@objc(LRORequest) public class Request : ObjectiveC.NSObject {
@objc public var arsonBody: Swift.String?
@objc public var body: Foundation.Data?
@objc public var headers: [Swift.String : Swift.String]?
@objc final public let method: Swift.String
@objc final public let reqID: Swift.Int
@objc public var url: Swift.String?
public init(method: Swift.String, reqID: Swift.Int)
#if compiler(>=5.3) && $NonescapableTypes
convenience public init(arsonBody: Swift.String? = nil, body: Foundation.Data? = nil, headers: [Swift.String : Swift.String], method: Swift.String, reqID: Swift.Int, url: Swift.String)
#endif
@objc deinit
}
extension UIKit.UIDevice {
@_Concurrency.MainActor @preconcurrency public static let modelName: Swift.String
}
@_inheritsConvenienceInitializers @objc(LROScrollTracker) @_Concurrency.MainActor @preconcurrency public class LogRocketScrollTracker : ObjectiveC.NSObject, UIKit.UIScrollViewDelegate {
@_Concurrency.MainActor @preconcurrency @objc public func scrollViewWillBeginDragging(_ view: UIKit.UIScrollView)
@_Concurrency.MainActor @preconcurrency @objc public func scrollViewDidEndDecelerating(_ view: UIKit.UIScrollView)
@_Concurrency.MainActor @preconcurrency @objc public func scrollViewDidEndDragging(_ view: UIKit.UIScrollView, willDecelerate decelerate: Swift.Bool)
@_Concurrency.MainActor @preconcurrency @objc override dynamic public init()
@objc deinit
}
@objc(LROSanitizerType) public enum SanitizerType : Swift.Int {
case excluded
case none
#if compiler(>=5.3) && $NonescapableTypes
public init?(rawValue: Swift.Int)
#endif
public typealias RawValue = Swift.Int
public var rawValue: Swift.Int {
get
}
}
@_hasMissingDesignatedInitializers @objc(LROCustomEvent) public class CustomEvent : ObjectiveC.NSObject {
@objc deinit
}
@objc(LROResponse) public class Response : ObjectiveC.NSObject {
@objc public var arsonBody: Swift.String?
@objc public var body: Foundation.Data?
@objc public var headers: [Swift.String : Swift.String]?
@objc final public let method: Swift.String
@objc final public let reqID: Swift.Int
@objc final public let status: Swift.UInt32
@objc public var url: Swift.String?
public init(method: Swift.String, reqID: Swift.Int, status: Swift.UInt32)
#if compiler(>=5.3) && $NonescapableTypes
convenience public init(arsonBody: Swift.String? = nil, body: Foundation.Data? = nil, headers: [Swift.String : Swift.String], method: Swift.String, reqID: Swift.Int, status: Swift.UInt32, url: Swift.String)
#endif
@objc deinit
}
@_hasMissingDesignatedInitializers @objc(LRORequestBuilder) public class RequestBuilder : ObjectiveC.NSObject {
@objc public var arsonBody: Swift.String?
@objc public var body: Foundation.Data?
@objc public var headers: [Swift.String : Swift.String]
@objc public var method: Swift.String?
@objc final public let reqID: Swift.Int
@objc public var url: Swift.String?
#if compiler(>=5.3) && $NonescapableTypes
@objc public func capture(timeOverride: Swift.Double = 0) -> LogRocket.ResponseBuilder?
#endif
@objc deinit
}
@_hasMissingDesignatedInitializers @objc(LROTouchShim) @_Concurrency.MainActor @preconcurrency public class TouchShim : UIKit.UIGestureRecognizer, UIKit.UIGestureRecognizerDelegate {
@_Concurrency.MainActor @preconcurrency @objc override dynamic public func canBePrevented(by _: UIKit.UIGestureRecognizer) -> Swift.Bool
@_Concurrency.MainActor @preconcurrency @objc override dynamic public func canPrevent(_: UIKit.UIGestureRecognizer) -> Swift.Bool
@_Concurrency.MainActor @preconcurrency @objc override dynamic public func ignore(_: UIKit.UITouch, for _: UIKit.UIEvent)
@_Concurrency.MainActor @preconcurrency @objc override dynamic public func ignore(_: UIKit.UIPress, for _: UIKit.UIPressesEvent)
@_Concurrency.MainActor @preconcurrency @objc override dynamic public func shouldRequireFailure(of _: UIKit.UIGestureRecognizer) -> Swift.Bool
@_Concurrency.MainActor @preconcurrency @objc override dynamic public func shouldBeRequiredToFail(by _: UIKit.UIGestureRecognizer) -> Swift.Bool
@_Concurrency.MainActor @preconcurrency @objc override dynamic public func reset()
@_Concurrency.MainActor @preconcurrency @objc override dynamic public func touchesBegan(_ touches: Swift.Set<UIKit.UITouch>, with _: UIKit.UIEvent)
@_Concurrency.MainActor @preconcurrency @objc override dynamic public func touchesCancelled(_ touches: Swift.Set<UIKit.UITouch>, with event: UIKit.UIEvent)
@_Concurrency.MainActor @preconcurrency @objc override dynamic public func touchesEnded(_ touches: Swift.Set<UIKit.UITouch>, with _: UIKit.UIEvent)
@_Concurrency.MainActor @preconcurrency @objc override dynamic public func touchesMoved(_ touches: Swift.Set<UIKit.UITouch>, with _: UIKit.UIEvent)
@_Concurrency.MainActor @preconcurrency @objc public func gestureRecognizer(_: UIKit.UIGestureRecognizer, shouldRecognizeSimultaneouslyWith _: UIKit.UIGestureRecognizer) -> Swift.Bool
@objc deinit
}
extension LogRocket.LogRocketSDK.LogLevel : Swift.Equatable {}
extension LogRocket.LogRocketSDK.LogLevel : Swift.Hashable {}
extension LogRocket.LogRocketSDK.LogLevel : Swift.RawRepresentable {}
extension LogRocket.LookbackType : Swift.Equatable {}
extension LogRocket.LookbackType : Swift.Hashable {}
extension LogRocket.LookbackType : Swift.RawRepresentable {}
extension LogRocket.LifecycleEventType : Swift.Equatable {}
extension LogRocket.LifecycleEventType : Swift.Hashable {}
extension LogRocket.LifecycleEventType : Swift.RawRepresentable {}
extension LogRocket.LogRocketScrollTracker : Swift.Sendable {}
extension LogRocket.SanitizerType : Swift.Equatable {}
extension LogRocket.SanitizerType : Swift.Hashable {}
extension LogRocket.SanitizerType : Swift.RawRepresentable {}

View File

@@ -1,418 +0,0 @@
// swift-interface-format-version: 1.0
// swift-compiler-version: Apple Swift version 6.2 effective-5.10 (swiftlang-6.2.0.19.9 clang-1700.3.19.1)
// swift-module-flags: -target arm64-apple-ios12.0 -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -O -enable-experimental-feature DebugDescriptionMacro -enable-bare-slash-regex -module-name LogRocket
// swift-module-flags-ignorable: -no-verify-emitted-module-interface -formal-cxx-interoperability-mode=off -interface-compiler-version 6.2
import CommonCrypto
import Dispatch
import Foundation
@_exported import LogRocket
import NaturalLanguage
import ObjectiveC
import QuartzCore
import Swift
import SwiftUI
import UIKit
import WebKit
import _Concurrency
import _StringProcessing
import _SwiftConcurrencyShims
import os
@available(iOS 13.0, *)
extension SwiftUICore.View {
@_Concurrency.MainActor @preconcurrency public func lrAddClass(_ viewSelector: Swift.String) -> some SwiftUICore.View
@_Concurrency.MainActor @preconcurrency public func lrHide() -> some SwiftUICore.View
@_Concurrency.MainActor @preconcurrency public func lrShow() -> some SwiftUICore.View
@_Concurrency.MainActor @preconcurrency public func lrAddClassWithContainer(_ viewSelector: Swift.String) -> some SwiftUICore.View
@_Concurrency.MainActor @preconcurrency public func lrHideWithContainer() -> some SwiftUICore.View
@_Concurrency.MainActor @preconcurrency public func lrShowWithContainer() -> some SwiftUICore.View
}
@objc @_hasMissingDesignatedInitializers @_Concurrency.MainActor @preconcurrency public class LROverlayMarkerUIView : UIKit.UIView {
@_Concurrency.MainActor @preconcurrency @objc override dynamic public func didMoveToWindow()
@objc deinit
}
@objc @_hasMissingDesignatedInitializers @_Concurrency.MainActor @preconcurrency public class LRBackgroundMarkerUIView : UIKit.UIView {
@_Concurrency.MainActor @preconcurrency @objc override dynamic public func didMoveToWindow()
@objc deinit
}
@objc(LRORequestSanitizer) public protocol RequestSanitizer {
#if compiler(>=5.3) && $NonescapableTypes
@objc func sanitize(request: LogRocket.Request) -> LogRocket.Request?
#endif
}
@_hasMissingDesignatedInitializers public class CanvasReplayConfiguration {
public static let minDebounceDelay: Swift.Int
public static let idleMinDebounceDelay: Swift.Int
public static let idleThresholdMs: Swift.Int
public static let maxDebounceDelay: Swift.Int
public static let maxCaptureDuration: Swift.Int
public static let maxTimeoutRetries: Swift.Int
public static let singleBitmapCaptureLimit: Swift.Int
public static let totalBitmapCaptureLimit: Swift.Int
public static let maxUnencodedImageBytes: Swift.Int
@objc deinit
}
@objc @_hasMissingDesignatedInitializers public class RenderableCache : ObjectiveC.NSObject, LogRocket.LRORenderableCache {
@objc public func mark(asDirty obj: any ObjectiveC.NSObjectProtocol)
@objc deinit
}
@_hasMissingDesignatedInitializers @objc(LROResponseBuilder) public class ResponseBuilder : ObjectiveC.NSObject {
@objc public var arsonBody: Swift.String?
@objc public var body: Foundation.Data?
@objc public var headers: [Swift.String : Swift.String]
@objc public var method: Swift.String
@objc final public let reqID: Swift.Int
@objc public var status: Swift.Int
@objc public var url: Swift.String
@objc public var duration: Swift.Double
@objc public func capture(timeOverride: Swift.Double = 0) -> Swift.Bool
@objc public func capture() -> Swift.Bool
@objc deinit
}
@objc(LROTaggedLogger) public class TaggedLogger : ObjectiveC.NSObject {
@objc public init(category: Swift.String)
@objc public func debug(message: Swift.String)
@objc public func info(message: Swift.String)
@objc public func notice(message: Swift.String)
@objc public func error(message: Swift.String)
@objc public func fault(message: Swift.String)
@objc deinit
}
@objc(LROCaptureMessageBuilder) public class CaptureMessageBuilder : ObjectiveC.NSObject {
@objc public init(_ message: Swift.String)
@objc(putTagString:value:) public func putTag(_ key: Swift.String, _ value: Swift.String) -> LogRocket.CaptureMessageBuilder
@objc(putTagBoolean:value:) public func putTag(_ key: Swift.String, _ value: Swift.Bool) -> LogRocket.CaptureMessageBuilder
@objc(putTagDouble:value:) public func putTag(_ key: Swift.String, _ value: Swift.Double) -> LogRocket.CaptureMessageBuilder
@objc(putTagInt:value:) public func putTag(_ key: Swift.String, _ value: Swift.Int) -> LogRocket.CaptureMessageBuilder
@objc(putExtraString:value:) public func putExtra(_ key: Swift.String, _ value: Swift.String) -> LogRocket.CaptureMessageBuilder
@objc(putExtraBoolean:value:) public func putExtra(_ key: Swift.String, _ value: Swift.Bool) -> LogRocket.CaptureMessageBuilder
@objc(putExtraDouble:value:) public func putExtra(_ key: Swift.String, _ value: Swift.Double) -> LogRocket.CaptureMessageBuilder
@objc(putExtraInt:value:) public func putExtra(_ key: Swift.String, _ value: Swift.Int) -> LogRocket.CaptureMessageBuilder
@objc deinit
}
@_inheritsConvenienceInitializers @objc(LROProxyConfigurationBuilder) public class ProxyConfigurationBuilder : ObjectiveC.NSObject {
@objc public func proxyUsername(_ username: Swift.String)
@objc public func proxyPassword(_ password: Swift.String)
@objc public func httpEnable(_ enable: Swift.Bool)
@objc public func httpProxy(_ proxy: Swift.String)
@objc public func httpPort(_ port: Swift.Int)
@objc override dynamic public init()
@objc deinit
}
@_hasMissingDesignatedInitializers public class FlutterTouchEncoder {
public static func encode(x: Swift.Double, y: Swift.Double, text: Swift.String, nodeNames: [Swift.String], motionType: Swift.Int, timestamp: Swift.Double, moves: [Swift.Dictionary<Swift.String, Swift.Double>], url: Swift.String)
@objc deinit
}
@_inheritsConvenienceInitializers @_hasMissingDesignatedInitializers @objc(LROLogHandler) public class LogHandler : ObjectiveC.NSObject {
@objc public class func swift_load()
@objc deinit
}
public let systemViews: [Swift.String]
@_hasMissingDesignatedInitializers @objc(LROApplicationLifecycleObserver) public class ApplicationLifecycleObserver : ObjectiveC.NSObject, LogRocket.LifecycleDelegate {
@objc public func viewControllerDidAppear(_ viewController: UIKit.UIViewController)
public func restoreViewFromLastSession()
@objc public func viewControllerDidDisappear(_ viewController: UIKit.UIViewController)
@objc deinit
}
@_inheritsConvenienceInitializers @_hasMissingDesignatedInitializers @objc(LROSDK) public class LogRocketSDK : ObjectiveC.NSObject {
@objc public static func initializeInternal(configuration: LogRocket.Configuration) -> Swift.Bool
@objc public static func initialize(configuration: LogRocket.Configuration)
@objc public static func addLog(level: Swift.String, args: [Swift.String])
@available(*, deprecated, message: "Helper for capturing properly encoded exception data. This method is deprecated, exceptions should be captured with Logger.captureException instead.")
@objc public static func captureException(errorMessage: Swift.String, errorType: Swift.String, exceptionType: Swift.String, stackTrace: Swift.String)
@objc public static func captureException(error: Foundation.NSError)
@objc public static func captureException(exception: Foundation.NSException)
@objc public static func captureMessage(_ builder: LogRocket.CaptureMessageBuilder)
@objc public static func captureReduxAction(action: Swift.String, storeId: Foundation.NSNumber, duration: Foundation.NSNumber, stateDelta: Swift.String, count: Foundation.NSNumber)
@objc public static func captureReduxInitialState(state: Swift.String, storeId: Foundation.NSNumber)
@objc public static func rebuildMessage(_ messageArray: Foundation.NSMutableArray)
@objc public static func getSessionURL(_ completion: @escaping (Swift.String) -> Swift.Void)
@objc public static func getSessionURLStatus(_ completion: @escaping (Swift.String) -> Swift.Void)
#if compiler(>=5.3) && $NonescapableTypes
@objc public static func identify(userID: Swift.String, userInfo: [Swift.String : Swift.String]? = nil)
#endif
#if compiler(>=5.3) && $NonescapableTypes
@objc public static func identifyAsAnonymous(userID: Swift.String, userInfo: [Swift.String : Swift.String]? = nil)
#endif
#if compiler(>=5.3) && $NonescapableTypes
@objc public static func newRequestBuilder() -> LogRocket.RequestBuilder?
#endif
@objc public static func pauseViewCapture()
@objc public static func isViewCapturePaused() -> Swift.Bool
#if compiler(>=5.3) && $NonescapableTypes
@objc public static func shutDownCurrentSession(hardShutdown: Swift.Bool = false, purgeSession: Swift.Bool = false, shutdownReason: Swift.String? = nil)
#endif
#if compiler(>=5.3) && $NonescapableTypes
@objc(startNewSessionNoConfig:) public static func startNewSession(handler: ((Swift.Bool) -> Swift.Void)? = nil)
#endif
#if compiler(>=5.3) && $NonescapableTypes
@objc(startNewSessionWithConfiguration:handler:) public static func startNewSession(configuration: LogRocket.Configuration, handler: ((Swift.Bool) -> Swift.Void)? = nil)
#endif
@objc public static func endSession()
@objc public static func shutdown()
@objc public static func hardShutdown()
@objc public static func track(_ builder: LogRocket.CustomEventBuilder)
@objc public static func tagPage(_ relativePage: Swift.String)
@objc public static func unpauseViewCapture()
@objc public static func captureSingleView()
@objc public static func viewControllerDidAppear(_ controller: UIKit.UIViewController)
@objc public static func viewControllerDidDisappear(_ controller: UIKit.UIViewController)
@objc public static func registerWebView(_ webView: WebKit.WKWebView)
@objc public static func isInitialized() -> Swift.Bool
@objc public static func redactView(_ view: UIKit.UIView)
@objc public static func allowView(_ view: UIKit.UIView)
#if compiler(>=5.3) && $NonescapableTypes
@objc public static func setReactNativeNetworkSanitizers(requestSanitizer: (any LogRocket.RequestSanitizer)? = nil, responseSanitizer: (any LogRocket.ResponseSanitizer)? = nil)
#endif
@objc public enum LogLevel : Swift.Int {
case FAULT = 5
case ERROR = 4
case NOTICE = 3
case INFO = 2
case DEBUG = 1
case VERBOSE = 0
#if compiler(>=5.3) && $NonescapableTypes
public init?(rawValue: Swift.Int)
#endif
public typealias RawValue = Swift.Int
public var rawValue: Swift.Int {
get
}
}
@objc public static func logLevelFromString(_ logLevel: Swift.String) -> LogRocket.LogRocketSDK.LogLevel
@objc deinit
}
@available(*, deprecated, message: "Use LogRocketSDK instead.")
public typealias SDK = LogRocket.LogRocketSDK
@objc(LROLifecycleDelegate) public protocol LifecycleDelegate {
@objc func viewControllerDidAppear(_: UIKit.UIViewController)
@objc func viewControllerDidDisappear(_: UIKit.UIViewController)
}
@objc(LROCustomEventBuilder) public class CustomEventBuilder : ObjectiveC.NSObject {
@objc public init(_ name: Swift.String)
@objc public func putRevenue(_ value: Swift.Double)
@objc(putString:value:) public func put(_ key: Swift.String, _ value: Swift.String)
@objc(putStringArray:value:) public func put(_ key: Swift.String, _ value: [Swift.String])
@objc(putDouble:value:) public func put(_ key: Swift.String, _ value: Swift.Double)
@objc(putDoubleArray:value:) public func put(_ key: Swift.String, _ value: [Swift.Double])
@objc(putBool:value:) public func put(_ key: Swift.String, _ value: Swift.Bool)
@objc(putBoolArray:value:) public func put(_ key: Swift.String, _ value: [Swift.Bool])
@objc deinit
}
@_hasMissingDesignatedInitializers public class FrameProcessTimer {
public func elapsed() -> Swift.Int64
public func hasTakenTooLong(caller: Swift.String = #function) -> Swift.Bool
public func end()
public func getWireFrameMode() -> Swift.Bool
@objc deinit
}
@_hasMissingDesignatedInitializers public class ScreenshotViewEncoder {
#if compiler(>=5.3) && $NonescapableTypes
public static func captureScreenshot(bitmapId: Swift.Int, imageBytes: Foundation.Data?, x: Swift.Int, y: Swift.Int, width: Swift.Int, height: Swift.Int)
#endif
@objc deinit
}
@objc(LROResponseSanitizer) public protocol ResponseSanitizer {
#if compiler(>=5.3) && $NonescapableTypes
@objc func sanitize(response: LogRocket.Response) -> LogRocket.Response?
#endif
}
public enum LookbackType : Swift.String {
case NONE
case LIMITED
case FULL
#if compiler(>=5.3) && $NonescapableTypes
public init?(rawValue: Swift.String)
#endif
public typealias RawValue = Swift.String
public var rawValue: Swift.String {
get
}
}
@_inheritsConvenienceInitializers @objc(LROCrashReportUploader) public class CrashReportUploader : ObjectiveC.NSObject {
@objc public func upload(crashReportDirectory: Foundation.URL)
@objc override dynamic public init()
@objc deinit
}
@_inheritsConvenienceInitializers @objc(LROLogger) public class Logger : ObjectiveC.NSObject {
@objc public static func debug(message: Swift.String)
@objc public static func info(message: Swift.String)
@objc public static func error(message: Swift.String)
@objc public static func warning(message: Swift.String)
#if compiler(>=5.3) && $NonescapableTypes
@objc public static func captureCrash(reason: Swift.String, errorType: Swift.String, callStackSymbols: [Swift.String]?)
#endif
@objc public static func captureException(exception: Foundation.NSException)
@objc public static func captureException(error: Foundation.NSError)
public static func captureException(error: any Swift.Error)
@objc override dynamic public init()
@objc deinit
}
@objc public enum LifecycleEventType : Swift.Int {
case viewAppeared
case viewDisappeared
case pageTag
case unrecognized
#if compiler(>=5.3) && $NonescapableTypes
public init?(rawValue: Swift.Int)
#endif
public typealias RawValue = Swift.Int
public var rawValue: Swift.Int {
get
}
}
@_inheritsConvenienceInitializers @objc(LROLifecycleManager) public class LifecycleManager : ObjectiveC.NSObject {
@objc public static func captureEvent(base: Swift.String, path: Swift.String, lifecycleType: LogRocket.LifecycleEventType) throws
@objc override dynamic public init()
@objc deinit
}
@objc(LROConfiguration) public class Configuration : ObjectiveC.NSObject {
final public let appID: Swift.String
@objc public var serverURL: Swift.String
@objc public var allowTags: Foundation.NSMutableSet
@objc public var redactionTags: Foundation.NSMutableSet
@objc public var inputRedactionTags: Foundation.NSMutableSet
@objc public var textSanitizer: LogRocket.SanitizerType
@objc public var redactMenus: Swift.Bool
@objc public var captureRedactedViewTouches: Swift.Bool
@objc public var viewScanningEnabled: Swift.Bool
@objc public var networkCaptureEnabled: Swift.Bool
@objc public var logCaptureEnabled: Swift.Bool
@objc public var requestSanitizer: (any LogRocket.RequestSanitizer)?
@objc public var responseSanitizer: (any LogRocket.ResponseSanitizer)?
@objc public var registerTouchHandlers: Swift.Bool
@objc public var scaleFactor: CoreFoundation.CGFloat {
@objc get
@objc set
}
@objc public var ipCaptureEnabled: Swift.Bool
@objc public var persistenceEnabled: Swift.Bool
@objc public var bufferTimeoutSeconds: Swift.UInt32
@objc public var uploadIntervalMs: Swift.Int
@objc public var proxyConfiguration: LogRocket.ProxyConfigurationBuilder
@objc public var experimentalBidiCapture: Swift.Bool
@objc public var disableScrollDelegate: Swift.Bool
@objc public var forceCleanStart: Swift.Bool
@objc public var throughputTrackingEnabled: Swift.Bool
@objc public var extendedViewTextCaptureEnabled: Swift.Bool
@objc public var updateId: Swift.String
@objc public var expoChannel: Swift.String
@objc public var logLevel: LogRocket.LogRocketSDK.LogLevel
@objc public var requestHttpBodyStreamCaptureEnabled: Swift.Bool
@objc public var isReactNative: Swift.Bool
@objc public var isRNNewArchEnabled: Swift.Bool
@objc public var requireRNNetworkSanitizer: Swift.Bool
@objc public var isFlutter: Swift.Bool
@available(*, deprecated, message: "**WARNING**\nChanging this setting may result in highly limited capture or causing the app to hang for extreme lengths of time. Proceed at your own risk!\n\nSpecifies, in milliseconds, how long the LogRocket SDK should attempt to capture a view before timing out to prevent the app from hanging.")
@objc public var viewCaptureTimeoutThreshold: Swift.Int
@objc public var viewCaptureAdditionalWireframeDuration: Swift.Int
@objc public var enableAutomaticLifecycleCapture: Swift.Bool
@objc public var unexpectedExceptionCaptureEnabled: Swift.Bool
@objc public var networkCaptureRedactedOrigins: Foundation.NSMutableSet
@objc public var lottieCaptureEnabled: Swift.Bool
@objc public var maxCapturedIosVersion: Swift.Int
@objc public var requestDebugLoggingEnabled: Swift.Bool
@objc public var enableViewCaptureV2: Swift.Bool
@objc public var reduceViewCaptureBandwidthWhenIdle: Swift.Bool
@objc public init(appID: Swift.String)
#if compiler(>=5.3) && $NonescapableTypes
convenience public init(appID: Swift.String, serverURL: Swift.String = "https://r.lr-intake.com/i", allowTags: [Swift.String] = [], redactionTags: [Swift.String] = [], inputRedactionTags: [Swift.String] = [], textSanitizer: LogRocket.SanitizerType = .none, redactMenus: Swift.Bool = false, viewScanningEnabled: Swift.Bool = true, networkCaptureEnabled: Swift.Bool = true, logCaptureEnabled: Swift.Bool = true, requestSanitizer: (any LogRocket.RequestSanitizer)? = nil, responseSanitizer: (any LogRocket.ResponseSanitizer)? = nil, registerTouchHandlers: Swift.Bool = true, ipCaptureEnabled: Swift.Bool = true, scaleFactor: CoreFoundation.CGFloat? = nil, persistenceEnabled: Swift.Bool = true, bufferTimeoutSeconds: Swift.UInt32 = 60, uploadIntervalMs: Swift.Int = 30000, proxyConfigurationBuilder: LogRocket.ProxyConfigurationBuilder? = nil, experimentalBidiCapture: Swift.Bool = false, disableScrollDelegate: Swift.Bool = false, forceCleanStart: Swift.Bool = false, throughputTrackingEnabled: Swift.Bool = true, extendedViewTextCaptureEnabled: Swift.Bool = true, captureRedactedViewTouches: Swift.Bool = true, updateId: Swift.String = "", expoChannel: Swift.String = "", logLevel: LogRocket.LogRocketSDK.LogLevel = LogRocketSDK.LogLevel.INFO, requestHttpBodyStreamCaptureEnabled: Swift.Bool = true, viewCaptureTimeoutThreshold: Swift.Int = CanvasReplayConfiguration.maxCaptureDuration, viewCaptureAdditionalWireframeDuration: Swift.Int = 20, enableAutomaticLifecycleCapture: Swift.Bool = true, unexpectedExceptionCaptureEnabled: Swift.Bool = true, networkCaptureRedactedOrigins: [Swift.String] = [], lottieCaptureEnabled: Swift.Bool = false, maxCapturedIosVersion: Swift.Int = -1, requestDebugLoggingEnabled: Swift.Bool = false, enableViewCaptureV2: Swift.Bool = true, reduceViewCaptureBandwidthWhenIdle: Swift.Bool = true)
#endif
@objc deinit
}
@objc(LRORequest) public class Request : ObjectiveC.NSObject {
@objc public var arsonBody: Swift.String?
@objc public var body: Foundation.Data?
@objc public var headers: [Swift.String : Swift.String]?
@objc final public let method: Swift.String
@objc final public let reqID: Swift.Int
@objc public var url: Swift.String?
public init(method: Swift.String, reqID: Swift.Int)
#if compiler(>=5.3) && $NonescapableTypes
convenience public init(arsonBody: Swift.String? = nil, body: Foundation.Data? = nil, headers: [Swift.String : Swift.String], method: Swift.String, reqID: Swift.Int, url: Swift.String)
#endif
@objc deinit
}
extension UIKit.UIDevice {
@_Concurrency.MainActor @preconcurrency public static let modelName: Swift.String
}
@_inheritsConvenienceInitializers @objc(LROScrollTracker) @_Concurrency.MainActor @preconcurrency public class LogRocketScrollTracker : ObjectiveC.NSObject, UIKit.UIScrollViewDelegate {
@_Concurrency.MainActor @preconcurrency @objc public func scrollViewWillBeginDragging(_ view: UIKit.UIScrollView)
@_Concurrency.MainActor @preconcurrency @objc public func scrollViewDidEndDecelerating(_ view: UIKit.UIScrollView)
@_Concurrency.MainActor @preconcurrency @objc public func scrollViewDidEndDragging(_ view: UIKit.UIScrollView, willDecelerate decelerate: Swift.Bool)
@_Concurrency.MainActor @preconcurrency @objc override dynamic public init()
@objc deinit
}
@objc(LROSanitizerType) public enum SanitizerType : Swift.Int {
case excluded
case none
#if compiler(>=5.3) && $NonescapableTypes
public init?(rawValue: Swift.Int)
#endif
public typealias RawValue = Swift.Int
public var rawValue: Swift.Int {
get
}
}
@_hasMissingDesignatedInitializers @objc(LROCustomEvent) public class CustomEvent : ObjectiveC.NSObject {
@objc deinit
}
@objc(LROResponse) public class Response : ObjectiveC.NSObject {
@objc public var arsonBody: Swift.String?
@objc public var body: Foundation.Data?
@objc public var headers: [Swift.String : Swift.String]?
@objc final public let method: Swift.String
@objc final public let reqID: Swift.Int
@objc final public let status: Swift.UInt32
@objc public var url: Swift.String?
public init(method: Swift.String, reqID: Swift.Int, status: Swift.UInt32)
#if compiler(>=5.3) && $NonescapableTypes
convenience public init(arsonBody: Swift.String? = nil, body: Foundation.Data? = nil, headers: [Swift.String : Swift.String], method: Swift.String, reqID: Swift.Int, status: Swift.UInt32, url: Swift.String)
#endif
@objc deinit
}
@_hasMissingDesignatedInitializers @objc(LRORequestBuilder) public class RequestBuilder : ObjectiveC.NSObject {
@objc public var arsonBody: Swift.String?
@objc public var body: Foundation.Data?
@objc public var headers: [Swift.String : Swift.String]
@objc public var method: Swift.String?
@objc final public let reqID: Swift.Int
@objc public var url: Swift.String?
#if compiler(>=5.3) && $NonescapableTypes
@objc public func capture(timeOverride: Swift.Double = 0) -> LogRocket.ResponseBuilder?
#endif
@objc deinit
}
@_hasMissingDesignatedInitializers @objc(LROTouchShim) @_Concurrency.MainActor @preconcurrency public class TouchShim : UIKit.UIGestureRecognizer, UIKit.UIGestureRecognizerDelegate {
@_Concurrency.MainActor @preconcurrency @objc override dynamic public func canBePrevented(by _: UIKit.UIGestureRecognizer) -> Swift.Bool
@_Concurrency.MainActor @preconcurrency @objc override dynamic public func canPrevent(_: UIKit.UIGestureRecognizer) -> Swift.Bool
@_Concurrency.MainActor @preconcurrency @objc override dynamic public func ignore(_: UIKit.UITouch, for _: UIKit.UIEvent)
@_Concurrency.MainActor @preconcurrency @objc override dynamic public func ignore(_: UIKit.UIPress, for _: UIKit.UIPressesEvent)
@_Concurrency.MainActor @preconcurrency @objc override dynamic public func shouldRequireFailure(of _: UIKit.UIGestureRecognizer) -> Swift.Bool
@_Concurrency.MainActor @preconcurrency @objc override dynamic public func shouldBeRequiredToFail(by _: UIKit.UIGestureRecognizer) -> Swift.Bool
@_Concurrency.MainActor @preconcurrency @objc override dynamic public func reset()
@_Concurrency.MainActor @preconcurrency @objc override dynamic public func touchesBegan(_ touches: Swift.Set<UIKit.UITouch>, with _: UIKit.UIEvent)
@_Concurrency.MainActor @preconcurrency @objc override dynamic public func touchesCancelled(_ touches: Swift.Set<UIKit.UITouch>, with event: UIKit.UIEvent)
@_Concurrency.MainActor @preconcurrency @objc override dynamic public func touchesEnded(_ touches: Swift.Set<UIKit.UITouch>, with _: UIKit.UIEvent)
@_Concurrency.MainActor @preconcurrency @objc override dynamic public func touchesMoved(_ touches: Swift.Set<UIKit.UITouch>, with _: UIKit.UIEvent)
@_Concurrency.MainActor @preconcurrency @objc public func gestureRecognizer(_: UIKit.UIGestureRecognizer, shouldRecognizeSimultaneouslyWith _: UIKit.UIGestureRecognizer) -> Swift.Bool
@objc deinit
}
extension LogRocket.LogRocketSDK.LogLevel : Swift.Equatable {}
extension LogRocket.LogRocketSDK.LogLevel : Swift.Hashable {}
extension LogRocket.LogRocketSDK.LogLevel : Swift.RawRepresentable {}
extension LogRocket.LookbackType : Swift.Equatable {}
extension LogRocket.LookbackType : Swift.Hashable {}
extension LogRocket.LookbackType : Swift.RawRepresentable {}
extension LogRocket.LifecycleEventType : Swift.Equatable {}
extension LogRocket.LifecycleEventType : Swift.Hashable {}
extension LogRocket.LifecycleEventType : Swift.RawRepresentable {}
extension LogRocket.LogRocketScrollTracker : Swift.Sendable {}
extension LogRocket.SanitizerType : Swift.Equatable {}
extension LogRocket.SanitizerType : Swift.Hashable {}
extension LogRocket.SanitizerType : Swift.RawRepresentable {}

View File

@@ -1,11 +0,0 @@
framework module LogRocket {
umbrella header "LogRocket.h"
export *
module * { export * }
}
module LogRocket.Swift {
header "LogRocket-Swift.h"
requires objc
}

View File

@@ -1,14 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>NSPrivacyTracking</key>
<false/>
<key>NSPrivacyAccessedAPITypes</key>
<array/>
<key>NSPrivacyCollectedDataTypes</key>
<array/>
<key>NSPrivacyTrackingDomains</key>
<array/>
</dict>
</plist>

View File

@@ -1,411 +0,0 @@
/**
The MIT License (MIT)
Copyright (c) 2015 Sentry
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#import <Foundation/Foundation.h>
#pragma mark - Macros Based API
/// A macro for wrapping the return type of the swizzled method.
#define LogRocketSWReturnType(type) type
/// A macro for wrapping arguments of the swizzled method.
#define LogRocketSWArguments(arguments...) _LogRocketSWArguments(arguments)
/// A macro for wrapping the replacement code for the swizzled method.
#define LogRocketSWReplacement(code...) code
/// A macro for casting and calling original implementation.
/// May be used only in LogRocketSwizzleInstanceMethod or LogRocketSwizzleClassMethod
/// macros.
#define LogRocketSWCallOriginal(arguments...) _LogRocketSWCallOriginal(arguments)
#pragma mark └ Swizzle Instance Method
/**
Swizzles the instance method of the class with the new implementation.
Example for swizzling `-(int)calculate:(int)number;` method:
@code
LogRocketSwizzleInstanceMethod(classToSwizzle,
@selector(calculate:),
LogRocketSWReturnType(int),
LogRocketSWArguments(int number),
LogRocketSWReplacement(
{
// Calling original implementation.
int res = LogRocketSWCallOriginal(number);
// Returning modified return value.
return res + 1;
}), 0, NULL);
@endcode
Swizzling frequently goes along with checking whether this particular class (or
one of its superclasses) has been already swizzled. Here the
`LogRocketSwizzleMode` and `key` parameters can help. See +[LogRocketSwizzle
swizzleInstanceMethod:inClass:newImpFactory:mode:key:] for details.
Swizzling is fully thread-safe.
@param classToSwizzle The class with the method that should be swizzled.
@param selector Selector of the method that should be swizzled.
@param LogRocketSWReturnType The return type of the swizzled method wrapped in the
LogRocketSWReturnType macro.
@param LogRocketSWArguments The arguments of the swizzled method wrapped in the
LogRocketSWArguments macro.
@param LogRocketSWReplacement The code of the new implementation of the swizzled
method wrapped in the LogRocketSWReplacement macro.
@param LogRocketSwizzleMode The mode is used in combination with the key to
indicate whether the swizzling should be done for the given class. You can pass
0 for LogRocketSwizzleModeAlways.
@param key The key is used in combination with the mode to indicate whether the
swizzling should be done for the given class. May be NULL if the mode is
LogRocketSwizzleModeAlways.
@return YES if successfully swizzled and NO if swizzling has been already done
for given key and class (or one of superclasses, depends on the mode).
*/
#define LogRocketSwizzleInstanceMethod(classToSwizzle, selector, LogRocketSWReturnType, \
LogRocketSWArguments, LogRocketSWReplacement, LogRocketSwizzleMode, key) \
_LogRocketSwizzleInstanceMethod(classToSwizzle, selector, LogRocketSWReturnType, \
_LogRocketSWWrapArg(LogRocketSWArguments), _LogRocketSWWrapArg(LogRocketSWReplacement), \
LogRocketSwizzleMode, key)
#pragma mark └ Swizzle Class Method
/**
Swizzles the class method of the class with the new implementation.
Example for swizzling `+(int)calculate:(int)number;` method:
@code
LogRocketSwizzleClassMethod(classToSwizzle,
@selector(calculate:),
LogRocketSWReturnType(int),
LogRocketSWArguments(int number),
LogRocketSWReplacement(
{
// Calling original implementation.
int res = LogRocketSWCallOriginal(number);
// Returning modified return value.
return res + 1;
}));
@endcode
Swizzling is fully thread-safe.
@param classToSwizzle The class with the method that should be swizzled.
@param selector Selector of the method that should be swizzled.
@param LogRocketSWReturnType The return type of the swizzled method wrapped in the
LogRocketSWReturnType macro.
@param LogRocketSWArguments The arguments of the swizzled method wrapped in the
LogRocketSWArguments macro.
@param LogRocketSWReplacement The code of the new implementation of the swizzled
method wrapped in the LogRocketSWReplacement macro.
*/
#define LogRocketSwizzleClassMethod( \
classToSwizzle, selector, LogRocketSWReturnType, LogRocketSWArguments, LogRocketSWReplacement) \
_LogRocketSwizzleClassMethod(classToSwizzle, selector, LogRocketSWReturnType, \
_LogRocketSWWrapArg(LogRocketSWArguments), _LogRocketSWWrapArg(LogRocketSWReplacement))
#pragma mark - Main API
/**
A function pointer to the original implementation of the swizzled method.
*/
typedef void (*LogRocketSwizzleOriginalIMP)(void /* id, SEL, ... */);
/**
LogRocketSwizzleInfo is used in the new implementation block to get and call
original implementation of the swizzled method.
*/
@interface LogRocketSwizzleInfo : NSObject
/**
Returns the original implementation of the swizzled method.
It is actually either an original implementation if the swizzled class
implements the method itself; or a super implementation fetched from one of the
superclasses.
@note You must always cast returned implementation to the appropriate function
pointer when calling.
@return A function pointer to the original implementation of the swizzled
method.
*/
- (LogRocketSwizzleOriginalIMP)getOriginalImplementation;
/// The selector of the swizzled method.
@property (nonatomic, readonly) SEL selector;
#if TEST
// A flag to check whether the original implementation was called.
@property (nonatomic) BOOL originalCalled;
#endif
@end
/**
A factory block returning the block for the new implementation of the swizzled
method.
You must always obtain original implementation with swizzleInfo and call it
from the new implementation.
@param swizzleInfo An info used to get and call the original implementation of
the swizzled method.
@return A block that implements a method.
Its signature should be: `method_return_type ^(id self, method_args...)`.
The selector is not available as a parameter to this block.
*/
typedef id (^LogRocketSwizzleImpFactoryBlock)(LogRocketSwizzleInfo *swizzleInfo);
typedef NS_ENUM(NSUInteger, LogRocketSwizzleMode) {
/// LogRocketSwizzle always does swizzling.
LogRocketSwizzleModeAlways = 0,
/// LogRocketSwizzle does not do swizzling if the same class has been swizzled
/// earlier with the same key.
LogRocketSwizzleModeOncePerClass = 1,
/// LogRocketSwizzle does not do swizzling if the same class or one of its
/// superclasses have been swizzled earlier with the same key.
/// @note There is no guarantee that your implementation will be called only
/// once per method call. If the order of swizzling is: first inherited
/// class, second superclass, then both swizzlings will be done and the new
/// implementation will be called twice.
LogRocketSwizzleModeOncePerClassAndSuperclasses = 2
};
@interface LogRocketSwizzle : NSObject
#pragma mark └ Swizzle Instance Method
/**
Swizzles the instance method of the class with the new implementation.
Original implementation must always be called from the new implementation. And
because of the the fact that for safe and robust swizzling original
implementation must be dynamically fetched at the time of calling and not at
the time of swizzling, swizzling API is a little bit complicated.
You should pass a factory block that returns the block for the new
implementation of the swizzled method. And use swizzleInfo argument to retrieve
and call original implementation.
Example for swizzling `-(int)calculate:(int)number;` method:
@code
SEL selector = @selector(calculate:);
[LogRocketSwizzle
swizzleInstanceMethod:selector
inClass:classToSwizzle
newImpFactory:^id(LogRocketSwizzleInfo *swizzleInfo) {
// This block will be used as the new implementation.
return ^int(__unsafe_unretained id self, int num){
// You MUST always cast implementation to the correct function
pointer. int (*originalIMP)(__unsafe_unretained id, SEL, int); originalIMP =
(__typeof(originalIMP))[swizzleInfo getOriginalImplementation];
// Calling original implementation.
int res = originalIMP(self,selector,num);
// Returning modified return value.
return res + 1;
};
}
mode:LogRocketSwizzleModeAlways
key:NULL];
@endcode
Swizzling frequently goes along with checking whether this particular class (or
one of its superclasses) has been already swizzled. Here the `mode` and `key`
parameters can help.
Here is an example of swizzling `-(void)dealloc;` only in case when neither
class and no one of its superclasses has been already swizzled with our key.
However "Deallocating ..." message still may be logged multiple times per
method call if swizzling was called primarily for an inherited class and later
for one of its superclasses.
@code
static const void *key = &key;
SEL selector = NSSelectorFromString(@"dealloc");
[LogRocketSwizzle
swizzleInstanceMethod:selector
inClass:classToSwizzle
newImpFactory:^id(LogRocketSwizzleInfo *swizzleInfo) {
return ^void(__unsafe_unretained id self){
NSLog(@"Deallocating %@.",self);
void (*originalIMP)(__unsafe_unretained id, SEL);
originalIMP = (__typeof(originalIMP))[swizzleInfo
getOriginalImplementation]; originalIMP(self,selector);
};
}
mode:LogRocketSwizzleModeOncePerClassAndSuperclasses
key:key];
@endcode
Swizzling is fully thread-safe.
@param selector Selector of the method that should be swizzled.
@param classToSwizzle The class with the method that should be swizzled.
@param factoryBlock The factory block returning the block for the new
implementation of the swizzled method.
@param mode The mode is used in combination with the key to indicate whether
the swizzling should be done for the given class.
@param key The key is used in combination with the mode to indicate whether the
swizzling should be done for the given class. May be NULL if the mode is
LogRocketSwizzleModeAlways.
@return YES if successfully swizzled and NO if swizzling has been already done
for given key and class (or one of superclasses, depends on the mode).
*/
+ (BOOL)swizzleInstanceMethod:(SEL)selector
inClass:(Class)classToSwizzle
newImpFactory:(LogRocketSwizzleImpFactoryBlock)factoryBlock
mode:(LogRocketSwizzleMode)mode
key:(const void *)key;
#pragma mark └ Swizzle Class method
/**
Swizzles the class method of the class with the new implementation.
Original implementation must always be called from the new implementation. And
because of the the fact that for safe and robust swizzling original
implementation must be dynamically fetched at the time of calling and not at
the time of swizzling, swizzling API is a little bit complicated.
You should pass a factory block that returns the block for the new
implementation of the swizzled method. And use swizzleInfo argument to retrieve
and call original implementation.
Example for swizzling `+(int)calculate:(int)number;` method:
@code
SEL selector = @selector(calculate:);
[LogRocketSwizzle
swizzleClassMethod:selector
inClass:classToSwizzle
newImpFactory:^id(LogRocketSwizzleInfo *swizzleInfo) {
// This block will be used as the new implementation.
return ^int(__unsafe_unretained id self, int num){
// You MUST always cast implementation to the correct function
pointer. int (*originalIMP)(__unsafe_unretained id, SEL, int); originalIMP =
(__typeof(originalIMP))[swizzleInfo getOriginalImplementation];
// Calling original implementation.
int res = originalIMP(self,selector,num);
// Returning modified return value.
return res + 1;
};
}];
@endcode
Swizzling is fully thread-safe.
@param selector Selector of the method that should be swizzled.
@param classToSwizzle The class with the method that should be swizzled.
@param factoryBlock The factory block returning the block for the new
implementation of the swizzled method.
*/
+ (void)swizzleClassMethod:(SEL)selector
inClass:(Class)classToSwizzle
newImpFactory:(LogRocketSwizzleImpFactoryBlock)factoryBlock;
@end
#pragma mark - Implementation details
// Do not write code that depends on anything below this line.
// Wrapping arguments to pass them as a single argument to another macro.
#define _LogRocketSWWrapArg(args...) args
#define _LogRocketSWDel2Arg(a1, a2, args...) a1, ##args
#define _LogRocketSWDel3Arg(a1, a2, a3, args...) a1, a2, ##args
// To prevent comma issues if there are no arguments we add one dummy argument
// and remove it later.
#define _LogRocketSWArguments(arguments...) DEL, ##arguments
#if TEST
# define _LogRocketSWReplacement(code...) \
@try { \
code \
} @finally { \
if (!swizzleInfo.originalCalled) \
@throw([NSException exceptionWithName:@"SwizzlingError" \
reason:@"Original method not called" \
userInfo:nil]); \
}
#else
# define _LogRocketSWReplacement(code...) code
#endif
#define _LogRocketSwizzleInstanceMethod(classToSwizzle, selector, LogRocketSWReturnType, \
LogRocketSWArguments, LogRocketSWReplacement, LogRocketSwizzleMode, KEY) \
[LogRocketSwizzle \
swizzleInstanceMethod:selector \
inClass:[classToSwizzle class] \
newImpFactory:^id(LogRocketSwizzleInfo *swizzleInfo) { \
LogRocketSWReturnType (*originalImplementation_)( \
_LogRocketSWDel3Arg(__unsafe_unretained id, SEL, LogRocketSWArguments)); \
SEL selector_ = selector; \
return ^LogRocketSWReturnType(_LogRocketSWDel2Arg(__unsafe_unretained id self, \
LogRocketSWArguments)) { _LogRocketSWReplacement(LogRocketSWReplacement) }; \
} \
mode:LogRocketSwizzleMode \
key:KEY];
#define _LogRocketSwizzleClassMethod( \
classToSwizzle, selector, LogRocketSWReturnType, LogRocketSWArguments, LogRocketSWReplacement) \
[LogRocketSwizzle \
swizzleClassMethod:selector \
inClass:[classToSwizzle class] \
newImpFactory:^id(LogRocketSwizzleInfo *swizzleInfo) { \
LogRocketSWReturnType (*originalImplementation_)( \
_LogRocketSWDel3Arg(__unsafe_unretained id, SEL, LogRocketSWArguments)); \
SEL selector_ = selector; \
return ^LogRocketSWReturnType(_LogRocketSWDel2Arg(__unsafe_unretained id self, \
LogRocketSWArguments)) { _LogRocketSWReplacement(LogRocketSWReplacement) }; \
}];
#define _LogRocketSWCallOriginal(arguments...) \
((__typeof(originalImplementation_))[swizzleInfo getOriginalImplementation])( \
self, selector_, ##arguments)

View File

@@ -1,74 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>NSPrivacyAccessedAPITypes</key>
<array>
<dict>
<key>NSPrivacyAccessedAPITypeReasons</key>
<array>
<string>E174.1</string>
</array>
<key>NSPrivacyAccessedAPIType</key>
<string>NSPrivacyAccessedAPICategoryDiskSpace</string>
</dict>
<dict>
<key>NSPrivacyAccessedAPITypeReasons</key>
<array>
<string>C617.1</string>
</array>
<key>NSPrivacyAccessedAPIType</key>
<string>NSPrivacyAccessedAPICategoryFileTimestamp</string>
</dict>
<dict>
<key>NSPrivacyAccessedAPITypeReasons</key>
<array>
<string>35F9.1</string>
</array>
<key>NSPrivacyAccessedAPIType</key>
<string>NSPrivacyAccessedAPICategorySystemBootTime</string>
</dict>
</array>
<key>NSPrivacyCollectedDataTypes</key>
<array>
<dict>
<key>NSPrivacyCollectedDataType</key>
<string>NSPrivacyCollectedDataTypeCrashData</string>
<key>NSPrivacyCollectedDataTypeLinked</key>
<false/>
<key>NSPrivacyCollectedDataTypeTracking</key>
<false/>
<key>NSPrivacyCollectedDataTypePurposes</key>
<array>
<string>NSPrivacyCollectedDataTypePurposeAppFunctionality</string>
</array>
</dict>
<dict>
<key>NSPrivacyCollectedDataType</key>
<string>NSPrivacyCollectedDataTypePerformanceData</string>
<key>NSPrivacyCollectedDataTypeLinked</key>
<false/>
<key>NSPrivacyCollectedDataTypeTracking</key>
<false/>
<key>NSPrivacyCollectedDataTypePurposes</key>
<array>
<string>NSPrivacyCollectedDataTypePurposeAppFunctionality</string>
</array>
</dict>
<dict>
<key>NSPrivacyCollectedDataType</key>
<string>NSPrivacyCollectedDataTypeOtherUsageData</string>
<key>NSPrivacyCollectedDataTypeLinked</key>
<false/>
<key>NSPrivacyCollectedDataTypeTracking</key>
<false/>
<key>NSPrivacyCollectedDataTypePurposes</key>
<array>
<string>NSPrivacyCollectedDataTypePurposeAppFunctionality</string>
</array>
</dict>
</array>
<key>NSPrivacyTracking</key>
<false/>
</dict>
</plist>

View File

@@ -1,20 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleIdentifier</key>
<string>com.apple.xcode.dsym.com.logrocket.LogRocket</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundlePackageType</key>
<string>dSYM</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleShortVersionString</key>
<string>3.1.0</string>
<key>CFBundleVersion</key>
<string>1</string>
</dict>
</plist>

View File

@@ -1,15 +0,0 @@
#ifndef LROAppStartTracker_h
#define LROAppStartTracker_h
@interface LROAppStartTracker : NSObject
+ (double)getInitTime;
+ (double)getFinishLaunchingTime;
+ (bool)isFirstPageLoad;
+ (void)markFirstPageLoaded;
+ (void)resetFirstPageLoad;
+ (void)uploadPendingCrashReports;
@end
#endif /* LROAppStartTracker_h */

View File

@@ -1,10 +0,0 @@
#ifndef LROBinaryObjects_h
#define LROBinaryObjects_h
@interface LROBinaryObjects : NSObject
+ (NSArray<NSDictionary*>*)getModuleInfo;
@end
#endif /* LROBinaryObjects_h */

View File

@@ -1,351 +0,0 @@
// Adapted from: https://github.com/kstenerud/KSCrash
//
// LROCLogger.h
//
// Created by Karl Stenerud on 11-06-25.
//
// Copyright (c) 2011 Karl Stenerud. All rights reserved.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall remain in place
// in this source code.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
//
/**
* LROCLogger
* ========
*
* Prints log entries to the console consisting of:
* - Level (Error, Warn, Info, Debug, Trace)
* - File
* - Line
* - Function
* - Message
*
* Allows setting the minimum logging level in the preprocessor.
*
* Works in C or Objective-C contexts, with or without ARC, using CLANG or GCC.
*
*
* =====
* USAGE
* =====
*
* Set the log level in your "Preprocessor Macros" build setting. You may choose
* TRACE, DEBUG, INFO, WARN, ERROR. If nothing is set, it defaults to ERROR.
*
* Example: LROCLogger_Level=WARN
*
* Anything below the level specified for LROCLogger_Level will not be compiled
* or printed.
*
*
* Next, include the header file:
*
* #include "LROCLogger.h"
*
*
* Next, call the logger functions from your in C or objective-C code:
*
* Code:
* LROLOG_ERROR(@"Some error message");
*
* Prints:
* 2011-07-16 05:41:01.379 TestApp[4439:f803] ERROR: SomeClass.m (21): -[SomeFunction]: Some error message
*
* Code:
* LROLOG_INFO(@"Info about %@", someObject);
*
* Prints:
* 2011-07-16 05:44:05.239 TestApp[4473:f803] INFO : SomeClass.m (20): -[SomeFunction]: Info about <NSObject: 0xb622840>
*
*
* The "BASIC" versions of the macros behave exactly like printf(),
* except they respect the LROCLogger_Level setting:
*
* Code:
* LROLOGBASIC_ERROR(@"A basic log entry");
*
* Prints:
* 2011-07-16 05:44:05.916 TestApp[4473:f803] A basic log entry
*
* =============
* LOCAL LOGGING
* =============
*
* You can control logging messages at the local file level using the
* "LROCLogger_LocalLevel" define. Note that it must be defined BEFORE
* including LROCLogger.h
*
* The LROLOG_XX() and LROLOGBASIC_XX() macros will print out based on the LOWER
* of LROCLogger_Level and LROCLogger_LocalLevel, so if LROCLogger_Level is DEBUG
* and LROCLogger_LocalLevel is TRACE, it will print all the way down to the trace
* level for the local file where LROCLogger_LocalLevel was defined, and to the
* debug level everywhere else.
*
* Example:
*
* // LROCLogger_LocalLevel, if defined, MUST come BEFORE including LROCLogger.h
* #define LROCLogger_LocalLevel TRACE
* #import "LROCLogger.h"
*
*
* ===============
* IMPORTANT NOTES
* ===============
*
* The C logger changes its behavior depending on the value of the preprocessor
* define LROCLogger_CBufferSize.
*
* If LROCLogger_CBufferSize is > 0, the C logger will behave in an async-safe
* manner, calling write() instead of printf(). Any log messages that exceed the
* length specified by LROCLogger_CBufferSize will be truncated.
*
* If LROCLogger_CBufferSize == 0, the C logger will use printf(), and there will
* be no limit on the log message length.
*
* LROCLogger_CBufferSize can only be set as a preprocessor define, and will
* default to 1024 if not specified during compilation.
*/
// ============================================================================
#pragma mark - (internal) -
// ============================================================================
#ifndef HDR_LROCLogger_h
#define HDR_LROCLogger_h
#ifdef __cplusplus
extern "C" {
#endif
#include <stdbool.h>
void i_lrolog_logC(const char* level,
const char* file,
int line,
const char* function,
const char* fmt, ...);
void i_lrolog_logCBasic(const char* fmt, ...);
/* Back up any existing defines by the same name */
#ifdef LRO_NONE
#define LROLOG_BAK_NONE LRO_NONE
#undef LRO_NONE
#endif
#ifdef ERROR
#define LROLOG_BAK_ERROR ERROR
#undef ERROR
#endif
#ifdef WARN
#define LROLOG_BAK_WARN WARN
#undef WARN
#endif
#ifdef INFO
#define LROLOG_BAK_INFO INFO
#undef INFO
#endif
#ifdef DEBUG
#define LROLOG_BAK_DEBUG DEBUG
#undef DEBUG
#endif
#ifdef TRACE
#define LROLOG_BAK_TRACE TRACE
#undef TRACE
#endif
#define LROCLogger_Level_None 0
#define LROCLogger_Level_Error 10
#define LROCLogger_Level_Warn 20
#define LROCLogger_Level_Info 30
#define LROCLogger_Level_Debug 40
#define LROCLogger_Level_Trace 50
#define LRO_NONE LROCLogger_Level_None
#define ERROR LROCLogger_Level_Error
#define WARN LROCLogger_Level_Warn
#define INFO LROCLogger_Level_Info
#define DEBUG LROCLogger_Level_Debug
#define TRACE LROCLogger_Level_Trace
#ifndef LROCLogger_Level
#define LROCLogger_Level LROCLogger_Level_Error
#endif
#ifndef LROCLogger_LocalLevel
#define LROCLogger_LocalLevel LROCLogger_Level_None
#endif
#define a_LROLOG_FULL(LEVEL, FMT, ...) \
i_lrolog_logC(LEVEL, \
__FILE__, \
__LINE__, \
__PRETTY_FUNCTION__, \
FMT, \
##__VA_ARGS__)
// ============================================================================
#pragma mark - API -
// ============================================================================
/** Set the filename to log to.
*
* @param filename The file to write to (NULL = write to stdout).
*
* @param overwrite If true, overwrite the log file.
*/
bool lrolog_setLogFilename(const char* filename, bool overwrite);
/** Clear the log file. */
bool lrolog_clearLogFile(void);
/** Tests if the logger would print at the specified level.
*
* @param LEVEL The level to test for. One of:
* LROCLogger_Level_Error,
* LROCLogger_Level_Warn,
* LROCLogger_Level_Info,
* LROCLogger_Level_Debug,
* LROCLogger_Level_Trace,
*
* @return TRUE if the logger would print at the specified level.
*/
#define LROLOG_PRINTS_AT_LEVEL(LEVEL) \
(LROCLogger_Level >= LEVEL || LROCLogger_LocalLevel >= LEVEL)
/** Log a message regardless of the log settings.
* Normal version prints out full context. Basic version prints directly.
*
* @param FMT The format specifier, followed by its arguments.
*/
#define LROLOG_ALWAYS(FMT, ...) a_LROLOG_FULL("FORCE", FMT, ##__VA_ARGS__)
#define LROLOGBASIC_ALWAYS(FMT, ...) i_lrolog_logCBasic(FMT, ##__VA_ARGS__)
/** Log an error.
* Normal version prints out full context. Basic version prints directly.
*
* @param FMT The format specifier, followed by its arguments.
*/
#if LROLOG_PRINTS_AT_LEVEL(LROCLogger_Level_Error)
#define LROLOG_ERROR(FMT, ...) a_LROLOG_FULL("ERROR", FMT, ##__VA_ARGS__)
#define LROLOGBASIC_ERROR(FMT, ...) i_lrolog_logCBasic(FMT, ##__VA_ARGS__)
#else
#define LROLOG_ERROR(FMT, ...)
#define LROLOGBASIC_ERROR(FMT, ...)
#endif
/** Log a warning.
* Normal version prints out full context. Basic version prints directly.
*
* @param FMT The format specifier, followed by its arguments.
*/
#if LROLOG_PRINTS_AT_LEVEL(LROCLogger_Level_Warn)
#define LROLOG_WARN(FMT, ...) a_LROLOG_FULL("WARN ", FMT, ##__VA_ARGS__)
#define LROLOGBASIC_WARN(FMT, ...) i_lrolog_logCBasic(FMT, ##__VA_ARGS__)
#else
#define LROLOG_WARN(FMT, ...)
#define LROLOGBASIC_WARN(FMT, ...)
#endif
/** Log an info message.
* Normal version prints out full context. Basic version prints directly.
*
* @param FMT The format specifier, followed by its arguments.
*/
#if LROLOG_PRINTS_AT_LEVEL(LROCLogger_Level_Info)
#define LROLOG_INFO(FMT, ...) a_LROLOG_FULL("INFO ", FMT, ##__VA_ARGS__)
#define LROLOGBASIC_INFO(FMT, ...) i_lrolog_logCBasic(FMT, ##__VA_ARGS__)
#else
#define LROLOG_INFO(FMT, ...)
#define LROLOGBASIC_INFO(FMT, ...)
#endif
/** Log a debug message.
* Normal version prints out full context. Basic version prints directly.
*
* @param FMT The format specifier, followed by its arguments.
*/
#if LROLOG_PRINTS_AT_LEVEL(LROCLogger_Level_Debug)
#define LROLOG_DEBUG(FMT, ...) a_LROLOG_FULL("DEBUG", FMT, ##__VA_ARGS__)
#define LROLOGBASIC_DEBUG(FMT, ...) i_lrolog_logCBasic(FMT, ##__VA_ARGS__)
#else
#define LROLOG_DEBUG(FMT, ...)
#define LROLOGBASIC_DEBUG(FMT, ...)
#endif
/** Log a trace message.
* Normal version prints out full context. Basic version prints directly.
*
* @param FMT The format specifier, followed by its arguments.
*/
#if LROLOG_PRINTS_AT_LEVEL(LROCLogger_Level_Trace)
#define LROLOG_TRACE(FMT, ...) a_LROLOG_FULL("TRACE", FMT, ##__VA_ARGS__)
#define LROLOGBASIC_TRACE(FMT, ...) i_lrolog_logCBasic(FMT, ##__VA_ARGS__)
#else
#define LROLOG_TRACE(FMT, ...)
#define LROLOGBASIC_TRACE(FMT, ...)
#endif
// ============================================================================
#pragma mark - (internal) -
// ============================================================================
/* Put everything back to the way we found it. */
#undef ERROR
#ifdef LROLOG_BAK_ERROR
#define ERROR LROLOG_BAK_ERROR
#undef LROLOG_BAK_ERROR
#endif
#undef WARNING
#ifdef LROLOG_BAK_WARN
#define WARNING LROLOG_BAK_WARN
#undef LROLOG_BAK_WARN
#endif
#undef INFO
#ifdef LROLOG_BAK_INFO
#define INFO LROLOG_BAK_INFO
#undef LROLOG_BAK_INFO
#endif
#undef DEBUG
#ifdef LROLOG_BAK_DEBUG
#define DEBUG LROLOG_BAK_DEBUG
#undef LROLOG_BAK_DEBUG
#endif
#undef TRACE
#ifdef LROLOG_BAK_TRACE
#define TRACE LROLOG_BAK_TRACE
#undef LROLOG_BAK_TRACE
#endif
#ifdef __cplusplus
}
#endif
#endif // HDR_LROCLogger_h

View File

@@ -1,99 +0,0 @@
// Adapted from: https://github.com/kstenerud/KSCrash
//
// LROCPU.h
//
// Created by Karl Stenerud on 2012-01-29.
//
// Copyright (c) 2012 Karl Stenerud. All rights reserved.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall remain in place
// in this source code.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
//
/*
* Base class for populating CPU state information in LROMachineContext objects
* used by LROStackCursor to traverse the call stack and record each level's
* symbol and image name and address information
*/
#ifndef HDR_LROCPU_h
#define HDR_LROCPU_h
#ifdef __cplusplus
extern "C" {
#endif
#include "LROMachineContext.h"
#include <stdbool.h>
#include <stdint.h>
/** Get the frame pointer for a machine context.
* The frame pointer marks the top of the call stack.
*
* @param context The machine context
*
* @return The context's frame pointer
*/
uintptr_t lrocpu_framePointer(const struct LROMachineContext* const context);
/** Get the address of the instruction about to be, or being executed by a
* machine context.
*
* @param context The machine context
*
* @return The context's next instruction address
*/
uintptr_t lrocpu_instructionAddress(const struct LROMachineContext* const context);
/** Get the address stored in the link register (arm only). This may
* contain the first return address of the stack.
*
* @param context The machine context
*
* @return The link register value
*/
uintptr_t lrocpu_linkRegister(const struct LROMachineContext* const context);
/** Get the address whose access caused the last fault.
*
* @param context The machine context
*
* @return The faulting address
*/
uintptr_t lrocpu_faultAddress(const struct LROMachineContext* const context);
/** Fetch the CPU state for this context and store it in the context.
*
* @param destinationContext The context to fill
*/
void lrocpu_getState(struct LROMachineContext* destinationContext);
/** Strip Pointer Authentication Code (PAC) from an instruction pointer.
*
* @param ip PAC encoded instruction pointer
*
* @return Instruction pointer without PAC
*/
uintptr_t lrocpu_normaliseInstructionPointer(uintptr_t ip);
#ifdef __cplusplus
}
#endif
#endif // HDR_LROCPU_h

View File

@@ -1,59 +0,0 @@
// Adapted from: https://github.com/kstenerud/KSCrash
//
// LROCPU_Apple.h
//
// Created by Karl Stenerud on 2012-01-29.
//
// Copyright (c) 2012 Karl Stenerud. All rights reserved.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall remain in place
// in this source code.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
//
#ifndef HDR_LROCPU_Apple_h
#define HDR_LROCPU_Apple_h
#ifdef __cplusplus
extern "C" {
#endif
#include <mach/mach_types.h>
/** Fill in state information about a thread.
*
* @param thread The thread to get information about
*
* @param state Pointer to buffer for state information
*
* @param flavor The kind of information to get (arch specific)
*
* @param stateCount Number of entries in the state information buffer
*
* @return true if state fetching was successful
*/
bool lrocpu_i_fillState(thread_t thread,
thread_state_t state,
thread_state_flavor_t flavor,
mach_msg_type_number_t stateCount);
#ifdef __cplusplus
}
#endif
#endif // HDR_LROCPU_Apple_h

View File

@@ -1,124 +0,0 @@
// Adapted from: https://github.com/kstenerud/KSCrash
//
// LROCrashC.h
//
// Created by Karl Stenerud on 2012-01-28.
//
// Copyright (c) 2012 Karl Stenerud. All rights reserved.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall remain in place
// in this source code.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
//
/* Primary C entry point into the crash reporting system.
* Handles callback execution on final exception context, and manages individual
* monitors for each exception type and context area
* (As of 12/20/2023 this only includes the MachException monitor)
*/
#ifndef HDR_LROCrashC_h
#define HDR_LROCrashC_h
#ifdef __cplusplus
extern "C" {
#endif
#include "LROCrashMonitorType.h"
#include "LROCrashMonitorEventCallback.h"
#include "LROSessionDetails.h"
#include <stdbool.h>
typedef void (*LROCaptureCrashCallback)(const char *reason, const char *errorType, char **stackFrames);
/** Install the crash reporter. The reporter will record the next crash and then
* terminate the program.
*
* @param handleCrash The callback to which we pass the reason, errorType, and
* callStackSymbols parsed from the gathered exception context
*
* @return The crash types that are being handled
*/
LROCrashMonitorType lrocrash_install(LROCaptureCrashCallback handleCrash);
void lrocrash_uninstall(void);
/** Set the crash types that will be handled and enable their monitors.
* Some crash types may not be enabled depending on circumstances (e.g. running
* in a debugger).
*
* @param monitors The monitors to install
*
* @return The monitors that were installed. If LROCrash has been
* installed, the return value represents the monitors that were
* successfully installed. Otherwise it represents which monitors it
* will attempt to activate when LROCrash installs.
*/
LROCrashMonitorType lrocrash_setMonitoring(LROCrashMonitorType monitors);
void captureCrashC(const char * errorType,
const char * reason,
char ** callStackSymbols);
const bool getEnabled(void);
void setEnabled(bool enabled);
/**
Set session details used to fill crash reports.
*/
void setSessionDetails(const LROSessionDetails * sessionDetails);
/**
Clear session details memory
*/
void freeSessionDetails(void);
/**
Get session details used to fill crash reports.
*/
const LROSessionDetails getSessionDetails(void);
/**
Freeze access to the session details
*/
int freezeSessionDetails(void);
/**
Unfreeze access to the session details
*/
void unfreezeSessionDetails(void);
void setSessionDetails_startTime(double value);
void setSessionDetails_recordingID(const char* value);
void setSessionDetails_sessionID(const char* value);
void setSessionDetails_appID(const char* value);
void setSessionDetails_currentURL(const char* value);
void setSessionDetails_release(const char* value);
void setSessionDetails_debugModules(const char* value);
void setSessionDetails_tabID(const char* value);
void setSessionDetails_userID(const char* value);
void setSessionDetails_serverURL(const char* value);
#ifdef __cplusplus
}
#endif
#endif // HDR_LROCrashC_h

View File

@@ -1,103 +0,0 @@
// Adapted from: https://github.com/kstenerud/KSCrash
//
// LROCrashMonitor.h
//
// Created by Karl Stenerud on 2012-02-04.
//
// Copyright (c) 2012 Karl Stenerud. All rights reserved.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall remain in place
// in this source code.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
//
/** Keeps watch for crashes and informs via callback when one occurs.
*/
#ifndef HDR_LROCrashMonitor_h
#define HDR_LROCrashMonitor_h
#ifdef __cplusplus
extern "C" {
#endif
#include "LROCrashMonitorType.h"
#include "LROThread.h"
#include "LROCrashMonitorEventCallback.h"
#include <stdbool.h>
struct LROCrash_MonitorContext;
// ============================================================================
#pragma mark - External API -
// ============================================================================
/** Set which monitors are active.
*
* @param monitorTypes Which monitors should be active
*/
void lrocm_setActiveMonitors(LROCrashMonitorType monitorTypes);
/** Get the currently active monitors.
*/
LROCrashMonitorType lrocm_getActiveMonitors(void);
/** Set the callback to call when an event is captured.
*
* @param onEvent Called whenever an event is captured
*/
void lrocm_setEventCallback(LROCrashMonitorEventCallback onEvent);
/** Get the current LROCrashMonitorEventCallback. Only needed for testing.
*
*/
LROCrashMonitorEventCallback lrocm_getEventCallback(void);
// ============================================================================
#pragma mark - Internal API -
// ============================================================================
typedef struct
{
void (*setEnabled)(bool isEnabled);
bool (*isEnabled)(void);
void (*addContextualInfoToEvent)(struct LROCrash_MonitorContext* eventContext);
} LROCrashMonitorAPI;
/** Notify that a fatal exception has been captured.
* This allows the system to take appropriate steps in preparation.
*
* @param isAsyncSafeEnvironment If true, only async-safe functions are allowed from now on
*/
bool lrocm_notifyFatalExceptionCaptured(bool isAsyncSafeEnvironment);
/** Start general exception processing.
*
* @param context Contextual information about the exception
*/
void lrocm_handleException(struct LROCrash_MonitorContext* context);
#ifdef __cplusplus
}
#endif
#endif // HDR_LROCrashMonitor_h

View File

@@ -1,95 +0,0 @@
// Adapted from: https://github.com/kstenerud/KSCrash
//
// LROCrashMonitorContext.h
//
// Created by Karl Stenerud on 2012-02-12.
//
// Copyright (c) 2012 Karl Stenerud. All rights reserved.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall remain in place
// in this source code.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
//
#ifndef HDR_LROCrashMonitorContext_h
#define HDR_LROCrashMonitorContext_h
#ifdef __cplusplus
extern "C" {
#endif
#include "LROCrashMonitorType.h"
#include <stdbool.h>
#include <stdint.h>
typedef struct LROCrash_MonitorContext
{
/** If true, the environment has crashed hard, and only async-safe
* functions should be used.
*/
bool requiresAsyncSafety;
/** If true, the crash handling system is currently handling a crash.
* When false, all values below this field are considered invalid.
*/
bool handlingCrash;
/** If true, a second crash occurred while handling a crash. */
bool crashedDuringCrashHandling;
/** Address that caused the fault. */
uintptr_t faultAddress;
/** The type of crash that occurred.
* This determines which other fields are valid. */
LROCrashMonitorType crashType;
/** The stack cursor for the trace leading up to the crash.
* Note: Actual type is LROStackCursor*
*/
void* stackCursor;
struct
{
/** The mach exception type. */
int type;
/** The mach exception code. */
int64_t code;
/** The mach exception subcode. */
int64_t subcode;
} mach;
struct
{
/** The exception name. */
const char* name;
/** Short description of why the crash occurred. */
const char* crashReason;
} CPPException;
} LROCrash_MonitorContext;
#ifdef __cplusplus
}
#endif
#endif // HDR_LROCrashMonitorContext_h

View File

@@ -1,16 +0,0 @@
#include "LROCrashMonitorContext.h"
#ifndef LROCrashMonitorEventCallback_h
#define LROCrashMonitorEventCallback_h
#ifdef __cplusplus
extern "C" {
#endif
typedef void (*LROCrashMonitorEventCallback)(struct LROCrash_MonitorContext *);
#ifdef __cplusplus
}
#endif
#endif /* LROCrashMonitorEventCallback_h */

View File

@@ -1,144 +0,0 @@
// Adapted from: https://github.com/kstenerud/KSCrash
//
// LROCrashMonitorType.h
//
// Copyright (c) 2012 Karl Stenerud. All rights reserved.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall remain in place
// in this source code.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
//
#ifndef HDR_LROCrashMonitorType_h
#define HDR_LROCrashMonitorType_h
#ifdef __cplusplus
extern "C" {
#endif
/** Various aspects of the system that can be monitored:
* - Mach kernel exception
* - Fatal signal
* - Uncaught C++ exception
* - Uncaught Objective-C NSException
* - Deadlock on the main thread
* - User reported custom exception
*/
typedef enum
{
/* Captures and reports Mach exceptions. */
LROCrashMonitorTypeMachException = 0x01,
/* Captures and reports POSIX signals. */
LROCrashMonitorTypeSignal = 0x02,
/* Captures and reports C++ exceptions.
* Note: This will slightly slow down exception processing.
*/
LROCrashMonitorTypeCPPException = 0x04,
/* Captures and reports NSExceptions. */
LROCrashMonitorTypeNSException = 0x08,
/* Detects and reports a deadlock in the main thread. */
LROCrashMonitorTypeMainThreadDeadlock = 0x10,
/* Accepts and reports user-generated exceptions. */
LROCrashMonitorTypeUserReported = 0x20,
/* Keeps track of and injects system information. */
LROCrashMonitorTypeSystem = 0x40,
/* Keeps track of and injects application state. */
LROCrashMonitorTypeApplicationState = 0x80,
/* Keeps track of zombies, and injects the last zombie NSException. */
LROCrashMonitorTypeZombie = 0x100,
} LROCrashMonitorType;
#define LROCrashMonitorTypeAll \
( \
LROCrashMonitorTypeMachException | \
LROCrashMonitorTypeSignal | \
LROCrashMonitorTypeCPPException | \
LROCrashMonitorTypeNSException | \
LROCrashMonitorTypeMainThreadDeadlock | \
LROCrashMonitorTypeUserReported | \
LROCrashMonitorTypeSystem | \
LROCrashMonitorTypeApplicationState | \
LROCrashMonitorTypeZombie \
)
#define LROCrashMonitorTypeExperimental \
( \
LROCrashMonitorTypeMainThreadDeadlock \
)
#define LROCrashMonitorTypeDebuggerUnsafe \
( \
LROCrashMonitorTypeMachException | \
LROCrashMonitorTypeSignal | \
LROCrashMonitorTypeCPPException | \
LROCrashMonitorTypeNSException \
)
#define LROCrashMonitorTypeAsyncSafe \
( \
LROCrashMonitorTypeMachException | \
LROCrashMonitorTypeSignal \
)
#define LROCrashMonitorTypeOptional \
( \
LROCrashMonitorTypeZombie \
)
#define LROCrashMonitorTypeAsyncUnsafe (LROCrashMonitorTypeAll & (~LROCrashMonitorTypeAsyncSafe))
/** Monitors that are safe to enable in a debugger. */
#define LROCrashMonitorTypeDebuggerSafe (LROCrashMonitorTypeAll & (~LROCrashMonitorTypeDebuggerUnsafe))
/** Monitors that are safe to use in a production environment
* All other monitors should be considered experimental.
*/
#define LROCrashMonitorTypeProductionSafe (LROCrashMonitorTypeAll & (~LROCrashMonitorTypeExperimental))
/** Production safe monitors, minus the optional ones. */
#define LROCrashMonitorTypeProductionSafeMinimal (LROCrashMonitorTypeProductionSafe & (~LROCrashMonitorTypeOptional))
/** Monitors that are required for proper operation
* These add essential information to the reports, but do not trigger reporting.
*/
#define LROCrashMonitorTypeRequired (LROCrashMonitorTypeSystem | LROCrashMonitorTypeApplicationState)
/** Effectively disables automatic reporting. The only way to generate a report
* in this mode is by manually calling lrocrash_reportUserException().
*/
#define LROCrashMonitorTypeManual (LROCrashMonitorTypeRequired | LROCrashMonitorTypeUserReported)
#define LROCrashMonitorTypeNone 0
const char* lrocrashmonitortype_name(LROCrashMonitorType monitorType);
#ifdef __cplusplus
}
#endif
#endif // HDR_LROCrashMonitorType_h

View File

@@ -1,42 +0,0 @@
// Adapted from: https://github.com/kstenerud/KSCrash
//
// LROCrashMonitor_CPPException.h
//
// Copyright (c) 2012 Karl Stenerud. All rights reserved.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall remain in place
// in this source code.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
#ifndef HDR_LROCrashMonitor_CPPException_h
#define HDR_LROCrashMonitor_CPPException_h
#ifdef __cplusplus
extern "C" {
#endif
#include "LROCrashMonitor.h"
/** Access the Monitor API.
*/
LROCrashMonitorAPI* lrocm_cppexception_getAPI(void);
#ifdef __cplusplus
}
#endif
#endif /* HDR_LROCrashMonitor_CPPException_h */

View File

@@ -1,55 +0,0 @@
// Adapted from: https://github.com/kstenerud/KSCrash
//
// LROCrashMonitor_MachException.h
//
// Created by Karl Stenerud on 2012-02-04.
//
// Copyright (c) 2012 Karl Stenerud. All rights reserved.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall remain in place
// in this source code.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
//
/* Catches mach exceptions
*/
#ifndef HDR_CrashMonitor_MachException_h
#define HDR_CrashMonitor_MachException_h
#ifdef __cplusplus
extern "C" {
#endif
#include "LROCrashMonitor.h"
#include <mach/mach.h>
#include <stdbool.h>
/** Access the Monitor API
*/
LROCrashMonitorAPI *lrocm_machexception_getAPI(void);
bool lrocm_isReservedThread(thread_t thread);
// Only needed for testing
bool lrocm_hasReservedThreads(void);
#ifdef __cplusplus
}
#endif
#endif // HDR_CrashMonitor_MachException_h

View File

@@ -1,33 +0,0 @@
// Adapted from: https://github.com/kstenerud/KSCrash
//
// LROCrashReportC.h
//
// Created by Karl Stenerud on 2012-01-28.
//
// Copyright (c) 2012 Karl Stenerud. All rights reserved.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall remain in place
// in this source code.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
//
/**
Set the file system path to which crash reports are published.
*/
void setReportPath(const char * path);
void writeReportC(const char *errorType, const char *reason, char **callStackSymbols);

View File

@@ -1,82 +0,0 @@
// Adapted from: https://github.com/kstenerud/KSCrash
//
// LROCrashReportFields.h
//
// Created by Karl Stenerud on 2012-10-07.
//
// Copyright (c) 2012 Karl Stenerud. All rights reserved.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall remain in place
// in this source code.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
//
#ifndef HDR_LROCrashReportFields_h
#define HDR_LROCrashReportFields_h
#ifdef __OBJC__
#include <Foundation/Foundation.h>
typedef NSString *LROCrashReportField;
#define LROCRF_CONVERT_STRING(str) @str
#else /* __OBJC__ */
typedef const char *LROCrashReportField;
#define LROCRF_CONVERT_STRING(str) str
#endif /* __OBJC__ */
#ifndef NS_TYPED_ENUM
#define NS_TYPED_ENUM
#endif
#ifndef NS_SWIFT_NAME
#define NS_SWIFT_NAME(_name)
#endif
#define LROCRF_DEFINE_CONSTANT(type, name, swift_name, string) \
static type const type##_##name NS_SWIFT_NAME(swift_name) = LROCRF_CONVERT_STRING(string);
#ifdef __cplusplus
extern "C" {
#endif
#pragma mark - Report Types -
typedef LROCrashReportField LROCrashReportType NS_TYPED_ENUM NS_SWIFT_NAME(ReportType);
LROCRF_DEFINE_CONSTANT(LROCrashReportType, Crash, crash, "crash")
typedef LROCrashReportField LROCrashField NS_TYPED_ENUM NS_SWIFT_NAME(CrashField);
LROCRF_DEFINE_CONSTANT(LROCrashField, Type, type, "type")
LROCRF_DEFINE_CONSTANT(LROCrashField, Reason, reason, "reason")
LROCRF_DEFINE_CONSTANT(LROCrashField, StackFrames, stackFrames, "stackFrames")
LROCRF_DEFINE_CONSTANT(LROCrashField, Body, body, "body")
LROCRF_DEFINE_CONSTANT(LROCrashField, DebugModules, debugModules, "debugModules")
LROCRF_DEFINE_CONSTANT(LROCrashField, Url, url, "url")
LROCRF_DEFINE_CONSTANT(LROCrashField, Age, age, "age")
LROCRF_DEFINE_CONSTANT(LROCrashField, RecordingId, recordingId, "recordingID")
LROCRF_DEFINE_CONSTANT(LROCrashField, AppId, appId, "appID")
LROCRF_DEFINE_CONSTANT(LROCrashField, TabId, tabId, "tabID")
LROCRF_DEFINE_CONSTANT(LROCrashField, TimeOffset, timeOffset, "timeOffset")
LROCRF_DEFINE_CONSTANT(LROCrashField, Release, release, "release")
LROCRF_DEFINE_CONSTANT(LROCrashField, UserId, userId, "userID")
LROCRF_DEFINE_CONSTANT(LROCrashField, ServerUrl, serverUrl, "serverURL")
#ifdef __cplusplus
}
#endif
#endif // HDR_LROCrashReportFields_h

View File

@@ -1,236 +0,0 @@
// Adapted from: https://github.com/kstenerud/KSCrash
//
// LROCrashReportWriter.h
//
// Created by Karl Stenerud on 2012-01-28.
//
// Copyright (c) 2012 Karl Stenerud. All rights reserved.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall remain in place
// in this source code.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
//
/* Pointers to functions for writing to a crash report. All JSON types are
* supported.
*/
#ifndef HDR_LROCrashReportWriter_h
#define HDR_LROCrashReportWriter_h
#include <stdbool.h>
#include <stdint.h>
#ifdef __OBJC__
#include <Foundation/Foundation.h>
#endif
#ifndef NS_SWIFT_NAME
#define NS_SWIFT_NAME(_name)
#endif
#ifndef NS_SWIFT_UNAVAILABLE
#define NS_SWIFT_UNAVAILABLE(_msg)
#endif
#ifdef __cplusplus
extern "C" {
#endif
/**
* Encapsulates report writing functionality.
*/
typedef struct LROCrashReportWriter {
/** Add a boolean element to the report.
*
* @param writer This writer.
*
* @param name The name to give this element.
*
* @param value The value to add.
*/
void (*addBooleanElement)(const struct LROCrashReportWriter *writer, const char *name, bool value);
/** Add a floating point element to the report.
*
* @param writer This writer.
*
* @param name The name to give this element.
*
* @param value The value to add.
*/
void (*addFloatingPointElement)(const struct LROCrashReportWriter *writer, const char *name, double value);
/** Add an integer element to the report.
*
* @param writer This writer.
*
* @param name The name to give this element.
*
* @param value The value to add.
*/
void (*addIntegerElement)(const struct LROCrashReportWriter *writer, const char *name, int64_t value);
/** Add an unsigned integer element to the report.
*
* @param writer This writer.
*
* @param name The name to give this element.
*
* @param value The value to add.
*/
void (*addUIntegerElement)(const struct LROCrashReportWriter *writer, const char *name, uint64_t value);
/** Add a string element to the report.
*
* @param writer This writer.
*
* @param name The name to give this element.
*
* @param value The value to add.
*/
void (*addStringElement)(const struct LROCrashReportWriter *writer, const char *name, const char *value);
/** Add a string element from a text file to the report.
*
* @param writer This writer.
*
* @param name The name to give this element.
*
* @param filePath The path to the file containing the value to add.
*/
void (*addTextFileElement)(const struct LROCrashReportWriter *writer, const char *name, const char *filePath);
/** Add an array of string elements representing lines from a text file to the report.
*
* @param writer This writer.
*
* @param name The name to give this element.
*
* @param filePath The path to the file containing the value to add.
*/
void (*addTextFileLinesElement)(const struct LROCrashReportWriter *writer, const char *name, const char *filePath);
/** Add a JSON element from a text file to the report.
*
* @param writer This writer.
*
* @param name The name to give this element.
*
* @param filePath The path to the file containing the value to add.
*
* @param closeLastContainer If false, do not close the last container.
*/
void (*addJSONFileElement)(const struct LROCrashReportWriter *writer, const char *name, const char *filePath,
const bool closeLastContainer);
/** Add a hex encoded data element to the report.
*
* @param writer This writer.
*
* @param name The name to give this element.
*
* @param value A pointer to the binary data.
*
* @paramn length The length of the data.
*/
void (*addDataElement)(const struct LROCrashReportWriter *writer, const char *name, const char *value,
const int length);
/** Begin writing a hex encoded data element to the report.
*
* @param writer This writer.
*
* @param name The name to give this element.
*/
void (*beginDataElement)(const struct LROCrashReportWriter *writer, const char *name);
/** Append hex encoded data to the current data element in the report.
*
* @param writer This writer.
*
* @param value A pointer to the binary data.
*
* @paramn length The length of the data.
*/
void (*appendDataElement)(const struct LROCrashReportWriter *writer, const char *value, const int length);
/** Complete writing a hex encoded data element to the report.
*
* @param writer This writer.
*/
void (*endDataElement)(const struct LROCrashReportWriter *writer);
/** Add a UUID element to the report.
*
* @param writer This writer.
*
* @param name The name to give this element.
*
* @param value A pointer to the binary UUID data.
*/
void (*addUUIDElement)(const struct LROCrashReportWriter *writer, const char *name, const unsigned char *value);
/** Add a preformatted JSON element to the report.
*
* @param writer This writer.
*
* @param name The name to give this element.
*
* @param jsonElement A pointer to the JSON data.
*
* @param closeLastContainer If false, do not close the last container.
*/
void (*addJSONElement)(const struct LROCrashReportWriter *writer, const char *name, const char *jsonElement,
bool closeLastContainer);
/** Begin a new object container.
*
* @param writer This writer.
*
* @param name The name to give this element.
*/
void (*beginObject)(const struct LROCrashReportWriter *writer, const char *name);
/** Begin a new array container.
*
* @param writer This writer.
*
* @param name The name to give this element.
*/
void (*beginArray)(const struct LROCrashReportWriter *writer, const char *name);
/** Leave the current container, returning to the next higher level
* container.
*
* @param writer This writer.
*/
void (*endContainer)(const struct LROCrashReportWriter *writer);
/** Internal contextual data for the writer */
void *context;
} NS_SWIFT_NAME(ReportWriter) LROCrashReportWriter;
typedef void (*LROReportWriteCallback)(const LROCrashReportWriter *writer)
NS_SWIFT_UNAVAILABLE("Use Swift closures instead!");
#ifdef __cplusplus
}
#endif
#endif // HDR_LROCrashReportWriter_h

View File

@@ -1,54 +0,0 @@
// Adapted from: https://github.com/kstenerud/KSCrash
//
// LRODebug.h
//
// Created by Karl Stenerud on 2012-01-29.
//
// Copyright (c) 2012 Karl Stenerud. All rights reserved.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall remain in place
// in this source code.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
//
/* Utility functions for querying the mach kernel
*/
#ifndef HDR_LRODebug_h
#define HDR_LRODebug_h
#ifdef __cplusplus
extern "C" {
#endif
#include <stdbool.h>
/** Check if the current process is being traced or not.
*
* @return true if we're being traced
*/
bool lrodebug_isBeingTraced(void);
#ifdef __cplusplus
}
#endif
#endif // HDR_LRODebug_h

View File

@@ -1,17 +0,0 @@
#ifndef LROException_h
#define LROException_h
@interface LROException : NSObject
/** It is not possible to catch NSExceptions from Swift code directly.
* This function handles execution of a block of Swift code that may throw an
* NSException, surfacing it to the Swift code environment in a form that it
* _can_ catch and handle, an NSError.
*
* @param tryBlock The Swift code to execute
*/
+ (BOOL)catchException:(void(^)(void))tryBlock error:(__autoreleasing NSError **)error;
@end
#endif /* LROException_h */

View File

@@ -1,284 +0,0 @@
// Adapted from: https://github.com/kstenerud/KSCrash
//
// LROFileUtils.h
//
// Created by Karl Stenerud on 2012-01-28.
//
// Copyright (c) 2012 Karl Stenerud. All rights reserved.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall remain in place
// in this source code.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
//
/* Basic file reading/writing functions.
*/
#ifndef HDR_LROFileUtils_h
#define HDR_LROFileUtils_h
#include <stdarg.h>
#include <stdbool.h>
#ifdef __cplusplus
extern "C" {
#endif
#define LROFU_MAX_PATH_LENGTH 500
/** Get the last entry in a file path. Assumes UNIX style separators.
*
* @param path The file path.
*
* @return the last entry in the path.
*/
const char *lrofu_lastPathEntry(const char *path);
/** Write bytes to a file descriptor.
*
* @param fd The file descriptor.
*
* @param bytes Buffer containing the bytes.
*
* @param length The number of bytes to write.
*
* @return true if the operation was successful.
*/
bool lrofu_writeBytesToFD(const int fd, const char *bytes, int length);
/** Read bytes from a file descriptor.
*
* @param fd The file descriptor.
*
* @param bytes Buffer to store the bytes in.
*
* @param length The number of bytes to read.
*
* @return true if the operation was successful.
*/
bool lrofu_readBytesFromFD(const int fd, char *bytes, int length);
/** Read an entire file. Returns a buffer of file size + 1, null terminated.
*
* @param path The path to the file.
*
* @param data Place to store a pointer to the loaded data (must be freed).
*
* @param length Place to store the length of the loaded data (can be NULL).
*
* @param maxLength the maximum amount of bytes to read. It will skip beginning
* bytes if necessary, and always get the latter part of the file.
* 0 = no maximum.
*
* @return true if the operation was successful.
*/
bool lrofu_readEntireFile(const char *path, char **data, int *length, int maxLength);
/** Write a string to a file.
*
* @param fd The file descriptor.
*
* @param string The string to write.
*
* @return true if successful.
*/
bool lrofu_writeStringToFD(const int fd, const char *string);
/** Write a formatted string to a file.
*
* @param fd The file descriptor.
*
* @param fmt The format specifier, followed by its arguments.
*
* @return true if successful.
*/
bool lrofu_writeFmtToFD(const int fd, const char *fmt, ...);
/** Write a formatted string to a file.
*
* @param fd The file descriptor.
*
* @param fmt The format specifier.
*
* @param args The arguments list.
*
* @return true if successful.
*/
bool lrofu_writeFmtArgsToFD(const int fd, const char *fmt, va_list args);
/** Read a single line from a file.
*
* @param fd The file descriptor.
*
* @param buffer The buffer to read into.
*
* @param maxLength The maximum length to read.
*
* @return The number of bytes read.
*/
int lrofu_readLineFromFD(const int fd, char *buffer, int maxLength);
/** Make all directories in a path.
*
* @param absolutePath The full, absolute path to create.
*
* @return true if successful.
*/
bool lrofu_makePath(const char *absolutePath);
/** Remove a file or directory.
*
* @param path Path to the file to remove.
*
* @param mustExist If true, and the path doesn't exist, log an error.
*
* @return true if successful.
*/
bool lrofu_removeFile(const char *path, bool mustExist);
/** Delete the contents of a directory.
*
* @param path The path of the directory whose contents to delete.
*
* @return true if successful.
*/
bool lrofu_deleteContentsOfPath(const char *path);
/** Buffered writer structure. Everything inside should be considered internal use only. */
typedef struct {
char *buffer;
int bufferLength;
int position;
int fd;
} LROBufferedWriter;
/** Open a file for buffered writing.
*
* @param writer The writer to initialize.
*
* @param path The path of the file to open.
*
* @param writeBuffer Memory to use as the write buffer.
*
* @param writeBufferLength Length of the memory to use as the write buffer.
*
* @return True if the file was successfully opened.
*/
bool lrofu_openBufferedWriter(LROBufferedWriter *writer, const char *const path, char *writeBuffer,
int writeBufferLength);
/** Close a buffered writer.
*
* @param writer The writer to close.
*/
void lrofu_closeBufferedWriter(LROBufferedWriter *writer);
/** Write to a buffered writer.
*
* @param writer The writer to write to.
*
* @param data The data to write.
*
* @param length The length of the data to write.
*
* @return True if the data was successfully written.
*/
bool lrofu_writeBufferedWriter(LROBufferedWriter *writer, const char *restrict const data, const int length);
/** Flush a buffered writer, writing all uncommitted data to disk.
*
* @param writer The writer to flush.
*
* @return True if the buffer was successfully flushed.
*/
bool lrofu_flushBufferedWriter(LROBufferedWriter *writer);
/** Buffered reader structure. Everything inside should be considered internal use only. */
typedef struct {
char *buffer;
int bufferLength;
int dataStartPos;
int dataEndPos;
int fd;
} LROBufferedReader;
/** Open a file for buffered reading.
*
* @param reader The reader to initialize.
*
* @param path The path to the file to open.
*
* @param readBuffer The memory to use for buffered reading.
*
* @param readBufferLength The length of the memory to use for buffered reading.
*
* @return True if the file was successfully opened.
*/
bool lrofu_openBufferedReader(LROBufferedReader *reader, const char *const path, char *readBuffer, int readBufferLength);
/** Close a buffered reader.
*
* @param reader The reader to close.
*/
void lrofu_closeBufferedReader(LROBufferedReader *reader);
/** Read from a buffered reader.
*
* @param reader The reader to read from.
*
* @param dstBuffer The buffer to read into.
*
* @param byteCount The number of bytes to read.
*
* @return The number of bytes actually read.
*/
int lrofu_readBufferedReader(LROBufferedReader *reader, char *dstBuffer, int byteCount);
/** Read from a buffered reader until the specified character is encountered.
* All bytes up to and including the character will be read.
*
* @param reader The reader to read from.
*
* @param ch The character to look for.
*
* @param dstBuffer The buffer to read into.
*
* @param length in: The maximum number of bytes to read before giving up the search.
* out: The actual number of bytes read.
*
* @return True if the character was found before giving up.
*/
bool lrofu_readBufferedReaderUntilChar(LROBufferedReader *reader, int ch, char *dstBuffer, int *length);
/** Memory maps an entire file of size and returns the mapped pointer.
*
* @param path The path to the file.
*
* @param size The size of the map.
*
* @return the mapped pointer if successful, NULL otherwise.
* The return value must be unmapped using `munmap` when done
* with the returned pointer. It is ok to let the pointer live up to termination,
* the system will unmap on termination if required.
*/
void *lrofu_mmap(const char *path, int size);
#ifdef __cplusplus
}
#endif
#endif // HDR_LROFileUtils_h

View File

@@ -1,513 +0,0 @@
// Adapted from: https://github.com/kstenerud/KSCrash
//
// LROJSONCodec.h
//
// Created by Karl Stenerud on 2012-01-07.
//
// Copyright (c) 2012 Karl Stenerud. All rights reserved.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall remain in place
// in this source code.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
//
/* Reads and writes JSON encoded data.
*/
#ifndef HDR_LROJSONCodec_h
#define HDR_LROJSONCodec_h
#include <stdbool.h>
#include <stdint.h>
#ifdef __cplusplus
extern "C" {
#endif
/* Tells the encoder to automatically determine the length of a field value.
* Currently, this is done using strlen().
*/
#define LROJSON_SIZE_AUTOMATIC -1
enum {
/** Encoding or decoding: Everything completed without error */
LROJSON_OK = 0,
/** Encoding or decoding: Encountered an unexpected or invalid character */
LROJSON_ERROR_INVALID_CHARACTER = 1,
/** Decoding: Source data was too long. */
LROJSON_ERROR_DATA_TOO_LONG = 2,
/** Encoding: addJSONData could not handle the data.
* This code is not used by the decoder, but is meant to be returned by
* the addJSONData callback method if it couldn't handle the data.
*/
LROJSON_ERROR_CANNOT_ADD_DATA = 3,
/** Decoding: Source data appears to be truncated. */
LROJSON_ERROR_INCOMPLETE = 4,
/** Decoding: Parsing failed due to bad data structure/type/contents.
* This code is not used by the decoder, but is meant to be returned
* by the user callback methods if the decoded data is incorrect for
* semantic or structural reasons.
*/
LROJSON_ERROR_INVALID_DATA = 5,
};
/** Get a description for an error code.
*
* @param error The error code.
*
* @return A string describing the error.
*/
const char *lrojson_stringForError(const int error);
// ============================================================================
// Encode
// ============================================================================
/** Function pointer for adding more UTF-8 encoded JSON data.
*
* @param data The UTF-8 data to add.
*
* @param length The length of the data.
*
* @param userData user-specified contextual data.
*
* @return LROJSON_OK if the data was handled.
* otherwise LROJSON_ERROR_CANNOT_ADD_DATA.
*/
typedef int (*LROJSONAddDataFunc)(const char *data, int length, void *userData);
typedef struct {
/** Function to call to add more encoded JSON data. */
LROJSONAddDataFunc addJSONData;
/** User-specified data */
void *userData;
/** How many containers deep we are. */
int containerLevel;
/** Whether or not the current container is an object. */
bool isObject[200];
/** true if this is the first entry at the current container level. */
bool containerFirstEntry;
bool prettyPrint;
} LROJSONEncodeContext;
/** Begin a new encoding process.
*
* @param context The encoding context.
*
* @param prettyPrint If true, insert whitespace to make the output pretty.
*
* @param addJSONData Function to handle adding data.
*
* @param userData User-specified data which gets passed to addJSONData.
*/
void lrojson_beginEncode(LROJSONEncodeContext *context, bool prettyPrint, LROJSONAddDataFunc addJSONData, void *userData);
/** End the encoding process, ending any remaining open containers.
*
* @return LROJSON_OK if the process was successful.
*/
int lrojson_endEncode(LROJSONEncodeContext *context);
/** Add a boolean element.
*
* @param context The encoding context.
*
* @param name The element's name.
*
* @param value The element's value.
*
* @return LROJSON_OK if the process was successful.
*/
int lrojson_addBooleanElement(LROJSONEncodeContext *context, const char *name, bool value);
/** Add an integer element.
*
* @param context The encoding context.
*
* @param name The element's name.
*
* @param value The element's value.
*
* @return LROJSON_OK if the process was successful.
*/
int lrojson_addIntegerElement(LROJSONEncodeContext *context, const char *name, int64_t value);
/** Add an unsigned integer element.
*
* @param context The encoding context.
*
* @param name The element's name.
*
* @param value The element's value.
*
* @return LROJSON_OK if the process was successful.
*/
int lrojson_addUIntegerElement(LROJSONEncodeContext *const context, const char *const name, uint64_t value);
/** Add a floating point element.
*
* @param context The encoding context.
*
* @param name The element's name.
*
* @param value The element's value.
*
* @return LROJSON_OK if the process was successful.
*/
int lrojson_addFloatingPointElement(LROJSONEncodeContext *context, const char *name, double value);
/** Add a null element.
*
* @param context The encoding context.
*
* @param name The element's name.
*
* @return LROJSON_OK if the process was successful.
*/
int lrojson_addNullElement(LROJSONEncodeContext *context, const char *name);
/** Add a string element.
*
* @param context The encoding context.
*
* @param name The element's name.
*
* @param value The element's value.
*
* @param length the length of the string, or LROJSON_SIZE_AUTOMATIC.
*
* @return LROJSON_OK if the process was successful.
*/
int lrojson_addStringElement(LROJSONEncodeContext *context, const char *name, const char *value, int length);
/** Start an incrementally-built string element.
*
* Use this for constructing very large strings.
*
* @param context The encoding context.
*
* @param name The element's name.
*
* @return LROJSON_OK if the process was successful.
*/
int lrojson_beginStringElement(LROJSONEncodeContext *context, const char *name);
/** Add a string fragment to an incrementally-built string element.
*
* @param context The encoding context.
*
* @param value The string fragment.
*
* @param length the length of the string fragment.
*
* @return LROJSON_OK if the process was successful.
*/
int lrojson_appendStringElement(LROJSONEncodeContext *context, const char *value, int length);
/** End an incrementally-built string element.
*
* @param context The encoding context.
*
* @return LROJSON_OK if the process was successful.
*/
int lrojson_endStringElement(LROJSONEncodeContext *context);
/** Add a string element. The element will be converted to string-coded hex.
*
* @param context The encoding context.
*
* @param name The element's name.
*
* @param value The element's value.
*
* @param length The length of the data.
*
* @return LROJSON_OK if the process was successful.
*/
int lrojson_addDataElement(LROJSONEncodeContext *const context, const char *name, const char *value, int length);
/** Start an incrementally-built data element. The element will be converted
* to string-coded hex.
*
* Use this for constructing very large data elements.
*
* @param context The encoding context.
*
* @param name The element's name.
*
* @return LROJSON_OK if the process was successful.
*/
int lrojson_beginDataElement(LROJSONEncodeContext *const context, const char *const name);
/** Add a data fragment to an incrementally-built data element.
*
* @param context The encoding context.
*
* @param value The data fragment.
*
* @param length the length of the data fragment.
*
* @return LROJSON_OK if the process was successful.
*/
int lrojson_appendDataElement(LROJSONEncodeContext *const context, const char *const value, int length);
/** End an incrementally-built data element.
*
* @param context The encoding context.
*
* @return LROJSON_OK if the process was successful.
*/
int lrojson_endDataElement(LROJSONEncodeContext *const context);
/** Add a pre-formatted JSON element.
*
* @param encodeContext The encoding context.
*
* @param name The element's name.
*
* @param jsonData The element's value. MUST BE VALID JSON!
*
* @param jsonDataLength The length of the element.
*
* @param closeLastContainer If false, do not close the last container.
*
* @return LROJSON_OK if the process was successful.
*/
int lrojson_addJSONElement(LROJSONEncodeContext *const encodeContext, const char *restrict const name,
const char *restrict const jsonData, const int jsonDataLength, const bool closeLastContainer);
/** Begin a new object container.
*
* @param context The encoding context.
*
* @param name The object's name.
*
* @return LROJSON_OK if the process was successful.
*/
int lrojson_beginObject(LROJSONEncodeContext *context, const char *name);
/** Begin a new array container.
*
* @param context The encoding context.
*
* @param name The array's name.
*
* @return LROJSON_OK if the process was successful.
*/
int lrojson_beginArray(LROJSONEncodeContext *context, const char *name);
/** Begin a generic JSON element, adding any necessary JSON preamble text,
* including commas and names.
* Note: This does not add any object or array specifiers ('{', '[').
*
* @param context The JSON context.
*
* @param name The name of the next element (only needed if parent is a dictionary).
*/
int lrojson_beginElement(LROJSONEncodeContext *const context, const char *const name);
/** Add JSON data manually.
* This function just passes your data directly through, even if it's malforned.
*
* @param context The encoding context.
*
* @param data The data to write.
*
* @param length The length of the data.
*
* @return LROJSON_OK if the process was successful.
*/
int lrojson_addRawJSONData(LROJSONEncodeContext *const context, const char *const data, const int length);
/** End the current container and return to the next higher level.
*
* @param context The encoding context.
*
* @return LROJSON_OK if the process was successful.
*/
int lrojson_endContainer(LROJSONEncodeContext *context);
/** Decode and add JSON data from a file.
*
* @param context The encoding context.
*
* @param name The name to give the top element from the file.
*
* @param filename The file to read from.
*
* @param closeLastContainer If false, do not close the last container.
*/
int lrojson_addJSONFromFile(LROJSONEncodeContext *const context, const char *restrict const name,
const char *restrict const filename, const bool closeLastContainer);
// ============================================================================
// Decode
// ============================================================================
/**
* Callbacks called during a JSON decode process.
* All function pointers must point to valid functions.
*/
typedef struct LROJSONDecodeCallbacks {
/** Called when a boolean element is decoded.
*
* @param name The element's name.
*
* @param value The element's value.
*
* @param userData Data that was specified when calling lrojson_decode().
*
* @return LROJSON_OK if decoding should continue.
*/
int (*onBooleanElement)(const char *name, bool value, void *userData);
/** Called when a floating point element is decoded.
*
* @param name The element's name.
*
* @param value The element's value.
*
* @param userData Data that was specified when calling lrojson_decode().
*
* @return LROJSON_OK if decoding should continue.
*/
int (*onFloatingPointElement)(const char *name, double value, void *userData);
/** Called when an integer element is decoded.
*
* @param name The element's name.
*
* @param value The element's value.
*
* @param userData Data that was specified when calling lrojson_decode().
*
* @return LROJSON_OK if decoding should continue.
*/
int (*onIntegerElement)(const char *name, int64_t value, void *userData);
/** Called when an unsigned integer element is decoded.
*
* @param name The element's name.
*
* @param value The element's value.
*
* @param userData Data that was specified when calling lrojson_decode().
*
* @return LROJSON_OK if decoding should continue.
*/
int (*onUnsignedIntegerElement)(const char *name, uint64_t value, void *userData);
/** Called when a null element is decoded.
*
* @param name The element's name.
*
* @param userData Data that was specified when calling lrojson_decode().
*
* @return LROJSON_OK if decoding should continue.
*/
int (*onNullElement)(const char *name, void *userData);
/** Called when a string element is decoded.
*
* @param name The element's name.
*
* @param value The element's value.
*
* @param userData Data that was specified when calling lrojson_decode().
*
* @return LROJSON_OK if decoding should continue.
*/
int (*onStringElement)(const char *name, const char *value, void *userData);
/** Called when a new object is encountered.
*
* @param name The object's name.
*
* @param userData Data that was specified when calling lrojson_decode().
*
* @return LROJSON_OK if decoding should continue.
*/
int (*onBeginObject)(const char *name, void *userData);
/** Called when a new array is encountered.
*
* @param name The array's name.
*
* @param userData Data that was specified when calling lrojson_decode().
*
* @return LROJSON_OK if decoding should continue.
*/
int (*onBeginArray)(const char *name, void *userData);
/** Called when leaving the current container and returning to the next
* higher level container.
*
* @param userData Data that was specified when calling lrojson_decode().
*
* @return LROJSON_OK if decoding should continue.
*/
int (*onEndContainer)(void *userData);
/** Called when the end of the input data is reached.
*
* @param userData Data that was specified when calling lrojson_decode().
*
* @return LROJSON_OK if decoding should continue.
*/
int (*onEndData)(void *userData);
} LROJSONDecodeCallbacks;
/** Read a JSON encoded file from the specified FD.
*
* @param data UTF-8 encoded JSON data.
*
* @param length Length of the data.
*
* @param stringBuffer A buffer to use for decoding strings.
* Note: 1/4 of this buffer will be used for dictionary name decoding.
*
* @param stringBufferLength The length of the string buffer.
*
* @param callbacks The callbacks to call while decoding.
*
* @param userData Any data you would like passed to the callbacks.
*
* @oaram errorOffset If not null, will contain the offset into the data
* where the error (if any) occurred.
*
* @return LROJSON_OK if succesful. An error code otherwise.
*/
int lrojson_decode(const char *data, int length, char *stringBuffer, int stringBufferLength,
LROJSONDecodeCallbacks *callbacks, void *userData, int *errorOffset);
#ifdef __cplusplus
}
#endif
#endif // HDR_LROJSONCodec_h

View File

@@ -1,59 +0,0 @@
// Adapted from: https://github.com/kstenerud/KSCrash
//
// LROMach.h
//
// Copyright 2016 Karl Stenerud.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall remain in place
// in this source code.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
//
/*
* Utility functions for parsing different mach-specific values
*/
#ifndef HDR_LROMach_h
#define HDR_LROMach_h
#ifdef __cplusplus
extern "C" {
#endif
#include <stdint.h>
/** Get the name of a mach exception.
*
* @param exceptionType The exception type
*
* @return The exception's name or NULL if not found
*/
const char* lromach_exceptionName(int64_t exceptionType);
/** Get the name of a mach kernel return code.
*
* @param returnCode The return code
*
* @return The code's name or NULL if not found
*/
const char* lromach_kernelReturnCodeName(int64_t returnCode);
#ifdef __cplusplus
}
#endif
#endif // HDR_LROMach_h

View File

@@ -1,114 +0,0 @@
// Adapted from: https://github.com/kstenerud/KSCrash
//
// LROMachineContext.h
//
// Created by Karl Stenerud on 2016-12-02.
//
// Copyright (c) 2012 Karl Stenerud. All rights reserved.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall remain in place
// in this source code.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
//
/*
* Handles thread management for the task in which a detected exception occurred
* - util for suspending current task's threads and recording which threads were suspended
* - util for resuming a given array of threads
*
* Also collects CPU state information for callstack traversal
*/
#ifndef HDR_LROMachineContext_h
#define HDR_LROMachineContext_h
#ifdef __cplusplus
extern "C" {
#endif
#include "LROThread.h"
#include <mach/mach.h>
#include <stdbool.h>
/** Suspend the runtime environment
*/
void lromc_suspendEnvironment(
thread_act_array_t *suspendedThreads, mach_msg_type_number_t *numSuspendedThreads);
/** Resume the runtime environment
*/
void lromc_resumeEnvironment(thread_act_array_t threads, mach_msg_type_number_t numThreads);
/** Create a new machine context on the stack.
* This macro creates a storage object on the stack, as well as a pointer of type
* struct LROMachineContext* in the current scope, which points to the storage object.
*
* Example usage: LROMC_NEW_CONTEXT(a_context);
* This creates a new pointer at the current scope that behaves as if:
* struct LROMachineContext* a_context = some_storage_location;
*
* @param NAME The C identifier to give the pointer
*/
#define LROMC_NEW_CONTEXT(NAME) \
char lromc_##NAME##_storage[lromc_contextSize()]; \
struct LROMachineContext* NAME = (struct LROMachineContext*)lromc_##NAME##_storage
struct LROMachineContext;
/** Get the internal size of a machine context.
*/
int lromc_contextSize(void);
/** Fill in a machine context from a thread.
*
* @param thread The thread from which to get information
* @param destinationContext The context to fill
* @param isCrashedContext Used to indicate that this is the thread that crashed,
*
* @return true if successful
*/
bool lromc_getContextForThread(LROThread thread, struct LROMachineContext* destinationContext, bool isCrashedContext);
/** Get the thread associated with a machine context.
*
* @param context The machine context
*
* @return The associated thread
*/
LROThread lromc_getThreadFromContext(const struct LROMachineContext* const context);
/** Check if this is a crashed context.
*/
bool lromc_isCrashedContext(const struct LROMachineContext* const context);
/** Check if this context can have stored CPU state.
*/
bool lromc_canHaveCPUState(const struct LROMachineContext* const context);
/** Add a thread to the reserved threads list.
*
* @param thread The thread to add to the list
*/
void lromc_addReservedThread(LROThread thread);
#ifdef __cplusplus
}
#endif
#endif // HDR_LROMachineContext_h

View File

@@ -1,10 +0,0 @@
#ifndef LRORNSVGSwizzle_h
#define LRORNSVGSwizzle_h
@interface LRORNSVGSwizzle : NSObject
+ (void)swizzle;
@end
#endif /* LRORNSVGSwizzle_h */

View File

@@ -1,10 +0,0 @@
#ifndef LROReactNativeSwizzler_h
#define LROReactNativeSwizzler_h
@interface LROReactNativeSwizzler : NSObject
+ (void)swizzle;
@end
#endif /* LROReactNativeSwizzler_h */

View File

@@ -1,13 +0,0 @@
#ifndef LRORenderingTracker_h
#define LRORenderingTracker_h
@protocol LRORenderableCache
- (void)markAsDirty:(id <NSObject>)obj;
@end
@interface LRORenderingTracker : NSObject
+(void)start:(id <LRORenderableCache>)renderableCache;
+(void)stop;
@end
#endif /* Header_h */

View File

@@ -1,11 +0,0 @@
#ifndef LROScrollSwizzle_h
#define LROScrollSwizzle_h
#import <UIKit/UIKit.h>
@interface LROScrollSwizzle : NSObject
+ (void)swizzle;
@end
#endif /* Header_h */

View File

@@ -1,20 +0,0 @@
#ifndef LROSessionDetails_h
#define LROSessionDetails_h
typedef struct LROSessionDetails {
char *recordingID;
char *sessionID;
char *appID;
char *currentURL;
/// The session start time measured as milliseconds from the Unix epoch.
double startTime;
/// The session start time measured in ticks since system boot.
double startTimeTicks;
char *release;
char *debugModules;
char *tabID;
char *userID;
char *serverURL;
} LROSessionDetails;
#endif /* LROSessionDetails_h */

View File

@@ -1,59 +0,0 @@
// Adapted from: https://github.com/kstenerud/KSCrash
//
// LROSystemCapabilities.h
//
// Copyright (c) 2012 Karl Stenerud. All rights reserved.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall remain in place
// in this source code.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
//
#ifndef HDR_CrashSystemCapabilities_h
#define HDR_CrashSystemCapabilities_h
#ifdef __APPLE__
#include <TargetConditionals.h>
#define LROCRASH_HOST_APPLE 1
#endif
#define LROCRASH_HOST_IOS (LROCRASH_HOST_APPLE && TARGET_OS_IOS)
#define LROCRASH_HOST_TV (LROCRASH_HOST_APPLE && TARGET_OS_TV)
#define LROCRASH_HOST_WATCH (LROCRASH_HOST_APPLE && TARGET_OS_WATCH)
#define LROCRASH_HOST_MAC (LROCRASH_HOST_APPLE && TARGET_OS_MAC && !(TARGET_OS_IOS || TARGET_OS_TV || TARGET_OS_WATCH))
#if LROCRASH_HOST_APPLE
#define LROCRASH_HAS_OBJC 1
#define LROCRASH_HAS_SWIFT 1
#else
#define LROCRASH_HAS_OBJC 0
#define LROCRASH_HAS_SWIFT 0
#endif
#if LROCRASH_HOST_IOS || LROCRASH_HOST_MAC
#define LROCRASH_HAS_MACH 1
#else
#define LROCRASH_HAS_MACH 0
#endif
#if LROCRASH_HOST_MAC || LROCRASH_HOST_IOS || LROCRASH_HOST_TV
#define LROCRASH_HAS_THREADS_API 1
#else
#define LROCRASH_HAS_THREADS_API 0
#endif
#endif // HDR_CrashSystemCapabilities_h

View File

@@ -1,60 +0,0 @@
// Adapted from: https://github.com/kstenerud/KSCrash
//
// LROThread.h
//
// Created by Karl Stenerud on 2012-01-29.
//
// Copyright (c) 2012 Karl Stenerud. All rights reserved.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall remain in place
// in this source code.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
//
/*
* TODO:
* In [SSDK-1198] explain usage of LROThread in collecting stack trace
*/
#ifndef HDR_LROThread_h
#define HDR_LROThread_h
#ifdef __cplusplus
extern "C" {
#endif
#include <stdbool.h>
#include <sys/types.h>
typedef uintptr_t LROThread;
/* Get the current mach thread ID.
* mach_thread_self() receives a send right for the thread port which needs to
* be deallocated to balance the reference count. This function takes care of
* all of that for you.
*
* @return The current thread ID
*/
LROThread lrothread_self(void);
#ifdef __cplusplus
}
#endif
#endif // HDR_LROThread_h

View File

@@ -1,19 +0,0 @@
#import <Foundation/Foundation.h>
#ifndef LROUncaughtExceptionHandler_h
#define LROUncaughtExceptionHandler_h
@interface LROUncaughtExceptionHandler : NSObject
+ (void)initializeSessionDetailsWithRecordingID:(NSString *)recordingID sessionID:(NSString *)sessionID appID:(NSString *)appID tabID:(NSString *)tabID startTime:(double)startTime startTimeTicks:(UInt64)startTimeTicks release:(NSString *)release debugModules:(NSData *)debugModules userID:(NSString *)userID serverURL:(NSString *)serverURL;
+ (void)setEnabled:(bool)isEnabled;
+ (void)updateCurrentURL:(NSString *)currentURL;
+ (void)updateUserID:(NSString *)userID;
+ (void)updateSessionDetailsWithRecordingID:(NSString *)recordingID sessionID:(NSString *)sessionID tabID:(NSString *)tabID startTime:(double)startTime userID:(NSString *)userID;
@end
#endif /* LROUncaughtExceptionHandler_h */

View File

@@ -1,10 +0,0 @@
#ifndef LROViewTracker_h
#define LROViewTracker_h
@interface LROViewTracker : NSObject
+ (void)swizzle;
@end
#endif /* LROViewTracker_h */

View File

@@ -1,3 +0,0 @@
#import <CoreGraphics/CoreGraphics.h>
CFDataRef __nullable LROWebPEncode(CGImageRef _Nonnull image);

View File

@@ -1,46 +0,0 @@
#ifndef LogRocket_h
#define LogRocket_h
#import <Foundation/Foundation.h>
@protocol LROLifecycleDelegate;
//! Project version number for LogRocket.
FOUNDATION_EXPORT double LogRocketVersionNumber;
//! Project version string for LogRocket.
FOUNDATION_EXPORT const unsigned char LogRocketVersionString[];
// In this header, you should import all the public headers of your framework using statements like #import <LogRocket/PublicHeader.h>
// Note that any new header files also need to be added in project editor -> Build Phases -> Headers
#import <LogRocket/LROAppStartTracker.h>
#import <LogRocket/LROBinaryObjects.h>
#import <LogRocket/LROCLogger.h>
#import <LogRocket/LROCPU.h>
#import <LogRocket/LROCPU_Apple.h>
#import <LogRocket/LROCrashC.h>
#import <LogRocket/LROCrashMonitor.h>
#import <LogRocket/LROCrashMonitorContext.h>
#import <LogRocket/LROCrashMonitorEventCallback.h>
#import <LogRocket/LROCrashMonitor_CPPException.h>
#import <LogRocket/LROCrashMonitor_MachException.h>
#import <LogRocket/LROCrashReportC.h>
#import <LogRocket/LROCrashReportFields.h>
#import <LogRocket/LROCrashReportWriter.h>
#import <LogRocket/LRODebug.h>
#import <LogRocket/LROException.h>
#import <LogRocket/LROFileUtils.h>
#import <LogRocket/LROJSONCodec.h>
#import <LogRocket/LROMach.h>
#import <LogRocket/LROMachineContext.h>
#import <LogRocket/LRORNSVGSwizzle.h>
#import <LogRocket/LROReactNativeSwizzler.h>
#import <LogRocket/LROScrollSwizzle.h>
#import <LogRocket/LROSessionDetails.h>
#import <LogRocket/LROSystemCapabilities.h>
#import <LogRocket/LROUncaughtExceptionHandler.h>
#import <LogRocket/LROViewTracker.h>
#import <LogRocket/LROWebPEncode.h>
#import <LogRocket/LRORenderingTracker.h>
#endif

View File

@@ -1,418 +0,0 @@
// swift-interface-format-version: 1.0
// swift-compiler-version: Apple Swift version 6.2 effective-5.10 (swiftlang-6.2.0.19.9 clang-1700.3.19.1)
// swift-module-flags: -target arm64-apple-ios12.0-simulator -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -O -enable-experimental-feature DebugDescriptionMacro -enable-bare-slash-regex -module-name LogRocket
// swift-module-flags-ignorable: -no-verify-emitted-module-interface -formal-cxx-interoperability-mode=off -interface-compiler-version 6.2
import CommonCrypto
import Dispatch
import Foundation
@_exported import LogRocket
import NaturalLanguage
import ObjectiveC
import QuartzCore
import Swift
import SwiftUI
import UIKit
import WebKit
import _Concurrency
import _StringProcessing
import _SwiftConcurrencyShims
import os
@available(iOS 13.0, *)
extension SwiftUICore.View {
@_Concurrency.MainActor @preconcurrency public func lrAddClass(_ viewSelector: Swift.String) -> some SwiftUICore.View
@_Concurrency.MainActor @preconcurrency public func lrHide() -> some SwiftUICore.View
@_Concurrency.MainActor @preconcurrency public func lrShow() -> some SwiftUICore.View
@_Concurrency.MainActor @preconcurrency public func lrAddClassWithContainer(_ viewSelector: Swift.String) -> some SwiftUICore.View
@_Concurrency.MainActor @preconcurrency public func lrHideWithContainer() -> some SwiftUICore.View
@_Concurrency.MainActor @preconcurrency public func lrShowWithContainer() -> some SwiftUICore.View
}
@objc @_hasMissingDesignatedInitializers @_Concurrency.MainActor @preconcurrency public class LROverlayMarkerUIView : UIKit.UIView {
@_Concurrency.MainActor @preconcurrency @objc override dynamic public func didMoveToWindow()
@objc deinit
}
@objc @_hasMissingDesignatedInitializers @_Concurrency.MainActor @preconcurrency public class LRBackgroundMarkerUIView : UIKit.UIView {
@_Concurrency.MainActor @preconcurrency @objc override dynamic public func didMoveToWindow()
@objc deinit
}
@objc(LRORequestSanitizer) public protocol RequestSanitizer {
#if compiler(>=5.3) && $NonescapableTypes
@objc func sanitize(request: LogRocket.Request) -> LogRocket.Request?
#endif
}
@_hasMissingDesignatedInitializers public class CanvasReplayConfiguration {
public static let minDebounceDelay: Swift.Int
public static let idleMinDebounceDelay: Swift.Int
public static let idleThresholdMs: Swift.Int
public static let maxDebounceDelay: Swift.Int
public static let maxCaptureDuration: Swift.Int
public static let maxTimeoutRetries: Swift.Int
public static let singleBitmapCaptureLimit: Swift.Int
public static let totalBitmapCaptureLimit: Swift.Int
public static let maxUnencodedImageBytes: Swift.Int
@objc deinit
}
@objc @_hasMissingDesignatedInitializers public class RenderableCache : ObjectiveC.NSObject, LogRocket.LRORenderableCache {
@objc public func mark(asDirty obj: any ObjectiveC.NSObjectProtocol)
@objc deinit
}
@_hasMissingDesignatedInitializers @objc(LROResponseBuilder) public class ResponseBuilder : ObjectiveC.NSObject {
@objc public var arsonBody: Swift.String?
@objc public var body: Foundation.Data?
@objc public var headers: [Swift.String : Swift.String]
@objc public var method: Swift.String
@objc final public let reqID: Swift.Int
@objc public var status: Swift.Int
@objc public var url: Swift.String
@objc public var duration: Swift.Double
@objc public func capture(timeOverride: Swift.Double = 0) -> Swift.Bool
@objc public func capture() -> Swift.Bool
@objc deinit
}
@objc(LROTaggedLogger) public class TaggedLogger : ObjectiveC.NSObject {
@objc public init(category: Swift.String)
@objc public func debug(message: Swift.String)
@objc public func info(message: Swift.String)
@objc public func notice(message: Swift.String)
@objc public func error(message: Swift.String)
@objc public func fault(message: Swift.String)
@objc deinit
}
@objc(LROCaptureMessageBuilder) public class CaptureMessageBuilder : ObjectiveC.NSObject {
@objc public init(_ message: Swift.String)
@objc(putTagString:value:) public func putTag(_ key: Swift.String, _ value: Swift.String) -> LogRocket.CaptureMessageBuilder
@objc(putTagBoolean:value:) public func putTag(_ key: Swift.String, _ value: Swift.Bool) -> LogRocket.CaptureMessageBuilder
@objc(putTagDouble:value:) public func putTag(_ key: Swift.String, _ value: Swift.Double) -> LogRocket.CaptureMessageBuilder
@objc(putTagInt:value:) public func putTag(_ key: Swift.String, _ value: Swift.Int) -> LogRocket.CaptureMessageBuilder
@objc(putExtraString:value:) public func putExtra(_ key: Swift.String, _ value: Swift.String) -> LogRocket.CaptureMessageBuilder
@objc(putExtraBoolean:value:) public func putExtra(_ key: Swift.String, _ value: Swift.Bool) -> LogRocket.CaptureMessageBuilder
@objc(putExtraDouble:value:) public func putExtra(_ key: Swift.String, _ value: Swift.Double) -> LogRocket.CaptureMessageBuilder
@objc(putExtraInt:value:) public func putExtra(_ key: Swift.String, _ value: Swift.Int) -> LogRocket.CaptureMessageBuilder
@objc deinit
}
@_inheritsConvenienceInitializers @objc(LROProxyConfigurationBuilder) public class ProxyConfigurationBuilder : ObjectiveC.NSObject {
@objc public func proxyUsername(_ username: Swift.String)
@objc public func proxyPassword(_ password: Swift.String)
@objc public func httpEnable(_ enable: Swift.Bool)
@objc public func httpProxy(_ proxy: Swift.String)
@objc public func httpPort(_ port: Swift.Int)
@objc override dynamic public init()
@objc deinit
}
@_hasMissingDesignatedInitializers public class FlutterTouchEncoder {
public static func encode(x: Swift.Double, y: Swift.Double, text: Swift.String, nodeNames: [Swift.String], motionType: Swift.Int, timestamp: Swift.Double, moves: [Swift.Dictionary<Swift.String, Swift.Double>], url: Swift.String)
@objc deinit
}
@_inheritsConvenienceInitializers @_hasMissingDesignatedInitializers @objc(LROLogHandler) public class LogHandler : ObjectiveC.NSObject {
@objc public class func swift_load()
@objc deinit
}
public let systemViews: [Swift.String]
@_hasMissingDesignatedInitializers @objc(LROApplicationLifecycleObserver) public class ApplicationLifecycleObserver : ObjectiveC.NSObject, LogRocket.LifecycleDelegate {
@objc public func viewControllerDidAppear(_ viewController: UIKit.UIViewController)
public func restoreViewFromLastSession()
@objc public func viewControllerDidDisappear(_ viewController: UIKit.UIViewController)
@objc deinit
}
@_inheritsConvenienceInitializers @_hasMissingDesignatedInitializers @objc(LROSDK) public class LogRocketSDK : ObjectiveC.NSObject {
@objc public static func initializeInternal(configuration: LogRocket.Configuration) -> Swift.Bool
@objc public static func initialize(configuration: LogRocket.Configuration)
@objc public static func addLog(level: Swift.String, args: [Swift.String])
@available(*, deprecated, message: "Helper for capturing properly encoded exception data. This method is deprecated, exceptions should be captured with Logger.captureException instead.")
@objc public static func captureException(errorMessage: Swift.String, errorType: Swift.String, exceptionType: Swift.String, stackTrace: Swift.String)
@objc public static func captureException(error: Foundation.NSError)
@objc public static func captureException(exception: Foundation.NSException)
@objc public static func captureMessage(_ builder: LogRocket.CaptureMessageBuilder)
@objc public static func captureReduxAction(action: Swift.String, storeId: Foundation.NSNumber, duration: Foundation.NSNumber, stateDelta: Swift.String, count: Foundation.NSNumber)
@objc public static func captureReduxInitialState(state: Swift.String, storeId: Foundation.NSNumber)
@objc public static func rebuildMessage(_ messageArray: Foundation.NSMutableArray)
@objc public static func getSessionURL(_ completion: @escaping (Swift.String) -> Swift.Void)
@objc public static func getSessionURLStatus(_ completion: @escaping (Swift.String) -> Swift.Void)
#if compiler(>=5.3) && $NonescapableTypes
@objc public static func identify(userID: Swift.String, userInfo: [Swift.String : Swift.String]? = nil)
#endif
#if compiler(>=5.3) && $NonescapableTypes
@objc public static func identifyAsAnonymous(userID: Swift.String, userInfo: [Swift.String : Swift.String]? = nil)
#endif
#if compiler(>=5.3) && $NonescapableTypes
@objc public static func newRequestBuilder() -> LogRocket.RequestBuilder?
#endif
@objc public static func pauseViewCapture()
@objc public static func isViewCapturePaused() -> Swift.Bool
#if compiler(>=5.3) && $NonescapableTypes
@objc public static func shutDownCurrentSession(hardShutdown: Swift.Bool = false, purgeSession: Swift.Bool = false, shutdownReason: Swift.String? = nil)
#endif
#if compiler(>=5.3) && $NonescapableTypes
@objc(startNewSessionNoConfig:) public static func startNewSession(handler: ((Swift.Bool) -> Swift.Void)? = nil)
#endif
#if compiler(>=5.3) && $NonescapableTypes
@objc(startNewSessionWithConfiguration:handler:) public static func startNewSession(configuration: LogRocket.Configuration, handler: ((Swift.Bool) -> Swift.Void)? = nil)
#endif
@objc public static func endSession()
@objc public static func shutdown()
@objc public static func hardShutdown()
@objc public static func track(_ builder: LogRocket.CustomEventBuilder)
@objc public static func tagPage(_ relativePage: Swift.String)
@objc public static func unpauseViewCapture()
@objc public static func captureSingleView()
@objc public static func viewControllerDidAppear(_ controller: UIKit.UIViewController)
@objc public static func viewControllerDidDisappear(_ controller: UIKit.UIViewController)
@objc public static func registerWebView(_ webView: WebKit.WKWebView)
@objc public static func isInitialized() -> Swift.Bool
@objc public static func redactView(_ view: UIKit.UIView)
@objc public static func allowView(_ view: UIKit.UIView)
#if compiler(>=5.3) && $NonescapableTypes
@objc public static func setReactNativeNetworkSanitizers(requestSanitizer: (any LogRocket.RequestSanitizer)? = nil, responseSanitizer: (any LogRocket.ResponseSanitizer)? = nil)
#endif
@objc public enum LogLevel : Swift.Int {
case FAULT = 5
case ERROR = 4
case NOTICE = 3
case INFO = 2
case DEBUG = 1
case VERBOSE = 0
#if compiler(>=5.3) && $NonescapableTypes
public init?(rawValue: Swift.Int)
#endif
public typealias RawValue = Swift.Int
public var rawValue: Swift.Int {
get
}
}
@objc public static func logLevelFromString(_ logLevel: Swift.String) -> LogRocket.LogRocketSDK.LogLevel
@objc deinit
}
@available(*, deprecated, message: "Use LogRocketSDK instead.")
public typealias SDK = LogRocket.LogRocketSDK
@objc(LROLifecycleDelegate) public protocol LifecycleDelegate {
@objc func viewControllerDidAppear(_: UIKit.UIViewController)
@objc func viewControllerDidDisappear(_: UIKit.UIViewController)
}
@objc(LROCustomEventBuilder) public class CustomEventBuilder : ObjectiveC.NSObject {
@objc public init(_ name: Swift.String)
@objc public func putRevenue(_ value: Swift.Double)
@objc(putString:value:) public func put(_ key: Swift.String, _ value: Swift.String)
@objc(putStringArray:value:) public func put(_ key: Swift.String, _ value: [Swift.String])
@objc(putDouble:value:) public func put(_ key: Swift.String, _ value: Swift.Double)
@objc(putDoubleArray:value:) public func put(_ key: Swift.String, _ value: [Swift.Double])
@objc(putBool:value:) public func put(_ key: Swift.String, _ value: Swift.Bool)
@objc(putBoolArray:value:) public func put(_ key: Swift.String, _ value: [Swift.Bool])
@objc deinit
}
@_hasMissingDesignatedInitializers public class FrameProcessTimer {
public func elapsed() -> Swift.Int64
public func hasTakenTooLong(caller: Swift.String = #function) -> Swift.Bool
public func end()
public func getWireFrameMode() -> Swift.Bool
@objc deinit
}
@_hasMissingDesignatedInitializers public class ScreenshotViewEncoder {
#if compiler(>=5.3) && $NonescapableTypes
public static func captureScreenshot(bitmapId: Swift.Int, imageBytes: Foundation.Data?, x: Swift.Int, y: Swift.Int, width: Swift.Int, height: Swift.Int)
#endif
@objc deinit
}
@objc(LROResponseSanitizer) public protocol ResponseSanitizer {
#if compiler(>=5.3) && $NonescapableTypes
@objc func sanitize(response: LogRocket.Response) -> LogRocket.Response?
#endif
}
public enum LookbackType : Swift.String {
case NONE
case LIMITED
case FULL
#if compiler(>=5.3) && $NonescapableTypes
public init?(rawValue: Swift.String)
#endif
public typealias RawValue = Swift.String
public var rawValue: Swift.String {
get
}
}
@_inheritsConvenienceInitializers @objc(LROCrashReportUploader) public class CrashReportUploader : ObjectiveC.NSObject {
@objc public func upload(crashReportDirectory: Foundation.URL)
@objc override dynamic public init()
@objc deinit
}
@_inheritsConvenienceInitializers @objc(LROLogger) public class Logger : ObjectiveC.NSObject {
@objc public static func debug(message: Swift.String)
@objc public static func info(message: Swift.String)
@objc public static func error(message: Swift.String)
@objc public static func warning(message: Swift.String)
#if compiler(>=5.3) && $NonescapableTypes
@objc public static func captureCrash(reason: Swift.String, errorType: Swift.String, callStackSymbols: [Swift.String]?)
#endif
@objc public static func captureException(exception: Foundation.NSException)
@objc public static func captureException(error: Foundation.NSError)
public static func captureException(error: any Swift.Error)
@objc override dynamic public init()
@objc deinit
}
@objc public enum LifecycleEventType : Swift.Int {
case viewAppeared
case viewDisappeared
case pageTag
case unrecognized
#if compiler(>=5.3) && $NonescapableTypes
public init?(rawValue: Swift.Int)
#endif
public typealias RawValue = Swift.Int
public var rawValue: Swift.Int {
get
}
}
@_inheritsConvenienceInitializers @objc(LROLifecycleManager) public class LifecycleManager : ObjectiveC.NSObject {
@objc public static func captureEvent(base: Swift.String, path: Swift.String, lifecycleType: LogRocket.LifecycleEventType) throws
@objc override dynamic public init()
@objc deinit
}
@objc(LROConfiguration) public class Configuration : ObjectiveC.NSObject {
final public let appID: Swift.String
@objc public var serverURL: Swift.String
@objc public var allowTags: Foundation.NSMutableSet
@objc public var redactionTags: Foundation.NSMutableSet
@objc public var inputRedactionTags: Foundation.NSMutableSet
@objc public var textSanitizer: LogRocket.SanitizerType
@objc public var redactMenus: Swift.Bool
@objc public var captureRedactedViewTouches: Swift.Bool
@objc public var viewScanningEnabled: Swift.Bool
@objc public var networkCaptureEnabled: Swift.Bool
@objc public var logCaptureEnabled: Swift.Bool
@objc public var requestSanitizer: (any LogRocket.RequestSanitizer)?
@objc public var responseSanitizer: (any LogRocket.ResponseSanitizer)?
@objc public var registerTouchHandlers: Swift.Bool
@objc public var scaleFactor: CoreFoundation.CGFloat {
@objc get
@objc set
}
@objc public var ipCaptureEnabled: Swift.Bool
@objc public var persistenceEnabled: Swift.Bool
@objc public var bufferTimeoutSeconds: Swift.UInt32
@objc public var uploadIntervalMs: Swift.Int
@objc public var proxyConfiguration: LogRocket.ProxyConfigurationBuilder
@objc public var experimentalBidiCapture: Swift.Bool
@objc public var disableScrollDelegate: Swift.Bool
@objc public var forceCleanStart: Swift.Bool
@objc public var throughputTrackingEnabled: Swift.Bool
@objc public var extendedViewTextCaptureEnabled: Swift.Bool
@objc public var updateId: Swift.String
@objc public var expoChannel: Swift.String
@objc public var logLevel: LogRocket.LogRocketSDK.LogLevel
@objc public var requestHttpBodyStreamCaptureEnabled: Swift.Bool
@objc public var isReactNative: Swift.Bool
@objc public var isRNNewArchEnabled: Swift.Bool
@objc public var requireRNNetworkSanitizer: Swift.Bool
@objc public var isFlutter: Swift.Bool
@available(*, deprecated, message: "**WARNING**\nChanging this setting may result in highly limited capture or causing the app to hang for extreme lengths of time. Proceed at your own risk!\n\nSpecifies, in milliseconds, how long the LogRocket SDK should attempt to capture a view before timing out to prevent the app from hanging.")
@objc public var viewCaptureTimeoutThreshold: Swift.Int
@objc public var viewCaptureAdditionalWireframeDuration: Swift.Int
@objc public var enableAutomaticLifecycleCapture: Swift.Bool
@objc public var unexpectedExceptionCaptureEnabled: Swift.Bool
@objc public var networkCaptureRedactedOrigins: Foundation.NSMutableSet
@objc public var lottieCaptureEnabled: Swift.Bool
@objc public var maxCapturedIosVersion: Swift.Int
@objc public var requestDebugLoggingEnabled: Swift.Bool
@objc public var enableViewCaptureV2: Swift.Bool
@objc public var reduceViewCaptureBandwidthWhenIdle: Swift.Bool
@objc public init(appID: Swift.String)
#if compiler(>=5.3) && $NonescapableTypes
convenience public init(appID: Swift.String, serverURL: Swift.String = "https://r.lr-intake.com/i", allowTags: [Swift.String] = [], redactionTags: [Swift.String] = [], inputRedactionTags: [Swift.String] = [], textSanitizer: LogRocket.SanitizerType = .none, redactMenus: Swift.Bool = false, viewScanningEnabled: Swift.Bool = true, networkCaptureEnabled: Swift.Bool = true, logCaptureEnabled: Swift.Bool = true, requestSanitizer: (any LogRocket.RequestSanitizer)? = nil, responseSanitizer: (any LogRocket.ResponseSanitizer)? = nil, registerTouchHandlers: Swift.Bool = true, ipCaptureEnabled: Swift.Bool = true, scaleFactor: CoreFoundation.CGFloat? = nil, persistenceEnabled: Swift.Bool = true, bufferTimeoutSeconds: Swift.UInt32 = 60, uploadIntervalMs: Swift.Int = 30000, proxyConfigurationBuilder: LogRocket.ProxyConfigurationBuilder? = nil, experimentalBidiCapture: Swift.Bool = false, disableScrollDelegate: Swift.Bool = false, forceCleanStart: Swift.Bool = false, throughputTrackingEnabled: Swift.Bool = true, extendedViewTextCaptureEnabled: Swift.Bool = true, captureRedactedViewTouches: Swift.Bool = true, updateId: Swift.String = "", expoChannel: Swift.String = "", logLevel: LogRocket.LogRocketSDK.LogLevel = LogRocketSDK.LogLevel.INFO, requestHttpBodyStreamCaptureEnabled: Swift.Bool = true, viewCaptureTimeoutThreshold: Swift.Int = CanvasReplayConfiguration.maxCaptureDuration, viewCaptureAdditionalWireframeDuration: Swift.Int = 20, enableAutomaticLifecycleCapture: Swift.Bool = true, unexpectedExceptionCaptureEnabled: Swift.Bool = true, networkCaptureRedactedOrigins: [Swift.String] = [], lottieCaptureEnabled: Swift.Bool = false, maxCapturedIosVersion: Swift.Int = -1, requestDebugLoggingEnabled: Swift.Bool = false, enableViewCaptureV2: Swift.Bool = true, reduceViewCaptureBandwidthWhenIdle: Swift.Bool = true)
#endif
@objc deinit
}
@objc(LRORequest) public class Request : ObjectiveC.NSObject {
@objc public var arsonBody: Swift.String?
@objc public var body: Foundation.Data?
@objc public var headers: [Swift.String : Swift.String]?
@objc final public let method: Swift.String
@objc final public let reqID: Swift.Int
@objc public var url: Swift.String?
public init(method: Swift.String, reqID: Swift.Int)
#if compiler(>=5.3) && $NonescapableTypes
convenience public init(arsonBody: Swift.String? = nil, body: Foundation.Data? = nil, headers: [Swift.String : Swift.String], method: Swift.String, reqID: Swift.Int, url: Swift.String)
#endif
@objc deinit
}
extension UIKit.UIDevice {
@_Concurrency.MainActor @preconcurrency public static let modelName: Swift.String
}
@_inheritsConvenienceInitializers @objc(LROScrollTracker) @_Concurrency.MainActor @preconcurrency public class LogRocketScrollTracker : ObjectiveC.NSObject, UIKit.UIScrollViewDelegate {
@_Concurrency.MainActor @preconcurrency @objc public func scrollViewWillBeginDragging(_ view: UIKit.UIScrollView)
@_Concurrency.MainActor @preconcurrency @objc public func scrollViewDidEndDecelerating(_ view: UIKit.UIScrollView)
@_Concurrency.MainActor @preconcurrency @objc public func scrollViewDidEndDragging(_ view: UIKit.UIScrollView, willDecelerate decelerate: Swift.Bool)
@_Concurrency.MainActor @preconcurrency @objc override dynamic public init()
@objc deinit
}
@objc(LROSanitizerType) public enum SanitizerType : Swift.Int {
case excluded
case none
#if compiler(>=5.3) && $NonescapableTypes
public init?(rawValue: Swift.Int)
#endif
public typealias RawValue = Swift.Int
public var rawValue: Swift.Int {
get
}
}
@_hasMissingDesignatedInitializers @objc(LROCustomEvent) public class CustomEvent : ObjectiveC.NSObject {
@objc deinit
}
@objc(LROResponse) public class Response : ObjectiveC.NSObject {
@objc public var arsonBody: Swift.String?
@objc public var body: Foundation.Data?
@objc public var headers: [Swift.String : Swift.String]?
@objc final public let method: Swift.String
@objc final public let reqID: Swift.Int
@objc final public let status: Swift.UInt32
@objc public var url: Swift.String?
public init(method: Swift.String, reqID: Swift.Int, status: Swift.UInt32)
#if compiler(>=5.3) && $NonescapableTypes
convenience public init(arsonBody: Swift.String? = nil, body: Foundation.Data? = nil, headers: [Swift.String : Swift.String], method: Swift.String, reqID: Swift.Int, status: Swift.UInt32, url: Swift.String)
#endif
@objc deinit
}
@_hasMissingDesignatedInitializers @objc(LRORequestBuilder) public class RequestBuilder : ObjectiveC.NSObject {
@objc public var arsonBody: Swift.String?
@objc public var body: Foundation.Data?
@objc public var headers: [Swift.String : Swift.String]
@objc public var method: Swift.String?
@objc final public let reqID: Swift.Int
@objc public var url: Swift.String?
#if compiler(>=5.3) && $NonescapableTypes
@objc public func capture(timeOverride: Swift.Double = 0) -> LogRocket.ResponseBuilder?
#endif
@objc deinit
}
@_hasMissingDesignatedInitializers @objc(LROTouchShim) @_Concurrency.MainActor @preconcurrency public class TouchShim : UIKit.UIGestureRecognizer, UIKit.UIGestureRecognizerDelegate {
@_Concurrency.MainActor @preconcurrency @objc override dynamic public func canBePrevented(by _: UIKit.UIGestureRecognizer) -> Swift.Bool
@_Concurrency.MainActor @preconcurrency @objc override dynamic public func canPrevent(_: UIKit.UIGestureRecognizer) -> Swift.Bool
@_Concurrency.MainActor @preconcurrency @objc override dynamic public func ignore(_: UIKit.UITouch, for _: UIKit.UIEvent)
@_Concurrency.MainActor @preconcurrency @objc override dynamic public func ignore(_: UIKit.UIPress, for _: UIKit.UIPressesEvent)
@_Concurrency.MainActor @preconcurrency @objc override dynamic public func shouldRequireFailure(of _: UIKit.UIGestureRecognizer) -> Swift.Bool
@_Concurrency.MainActor @preconcurrency @objc override dynamic public func shouldBeRequiredToFail(by _: UIKit.UIGestureRecognizer) -> Swift.Bool
@_Concurrency.MainActor @preconcurrency @objc override dynamic public func reset()
@_Concurrency.MainActor @preconcurrency @objc override dynamic public func touchesBegan(_ touches: Swift.Set<UIKit.UITouch>, with _: UIKit.UIEvent)
@_Concurrency.MainActor @preconcurrency @objc override dynamic public func touchesCancelled(_ touches: Swift.Set<UIKit.UITouch>, with event: UIKit.UIEvent)
@_Concurrency.MainActor @preconcurrency @objc override dynamic public func touchesEnded(_ touches: Swift.Set<UIKit.UITouch>, with _: UIKit.UIEvent)
@_Concurrency.MainActor @preconcurrency @objc override dynamic public func touchesMoved(_ touches: Swift.Set<UIKit.UITouch>, with _: UIKit.UIEvent)
@_Concurrency.MainActor @preconcurrency @objc public func gestureRecognizer(_: UIKit.UIGestureRecognizer, shouldRecognizeSimultaneouslyWith _: UIKit.UIGestureRecognizer) -> Swift.Bool
@objc deinit
}
extension LogRocket.LogRocketSDK.LogLevel : Swift.Equatable {}
extension LogRocket.LogRocketSDK.LogLevel : Swift.Hashable {}
extension LogRocket.LogRocketSDK.LogLevel : Swift.RawRepresentable {}
extension LogRocket.LookbackType : Swift.Equatable {}
extension LogRocket.LookbackType : Swift.Hashable {}
extension LogRocket.LookbackType : Swift.RawRepresentable {}
extension LogRocket.LifecycleEventType : Swift.Equatable {}
extension LogRocket.LifecycleEventType : Swift.Hashable {}
extension LogRocket.LifecycleEventType : Swift.RawRepresentable {}
extension LogRocket.LogRocketScrollTracker : Swift.Sendable {}
extension LogRocket.SanitizerType : Swift.Equatable {}
extension LogRocket.SanitizerType : Swift.Hashable {}
extension LogRocket.SanitizerType : Swift.RawRepresentable {}

View File

@@ -1,418 +0,0 @@
// swift-interface-format-version: 1.0
// swift-compiler-version: Apple Swift version 6.2 effective-5.10 (swiftlang-6.2.0.19.9 clang-1700.3.19.1)
// swift-module-flags: -target arm64-apple-ios12.0-simulator -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -O -enable-experimental-feature DebugDescriptionMacro -enable-bare-slash-regex -module-name LogRocket
// swift-module-flags-ignorable: -no-verify-emitted-module-interface -formal-cxx-interoperability-mode=off -interface-compiler-version 6.2
import CommonCrypto
import Dispatch
import Foundation
@_exported import LogRocket
import NaturalLanguage
import ObjectiveC
import QuartzCore
import Swift
import SwiftUI
import UIKit
import WebKit
import _Concurrency
import _StringProcessing
import _SwiftConcurrencyShims
import os
@available(iOS 13.0, *)
extension SwiftUICore.View {
@_Concurrency.MainActor @preconcurrency public func lrAddClass(_ viewSelector: Swift.String) -> some SwiftUICore.View
@_Concurrency.MainActor @preconcurrency public func lrHide() -> some SwiftUICore.View
@_Concurrency.MainActor @preconcurrency public func lrShow() -> some SwiftUICore.View
@_Concurrency.MainActor @preconcurrency public func lrAddClassWithContainer(_ viewSelector: Swift.String) -> some SwiftUICore.View
@_Concurrency.MainActor @preconcurrency public func lrHideWithContainer() -> some SwiftUICore.View
@_Concurrency.MainActor @preconcurrency public func lrShowWithContainer() -> some SwiftUICore.View
}
@objc @_hasMissingDesignatedInitializers @_Concurrency.MainActor @preconcurrency public class LROverlayMarkerUIView : UIKit.UIView {
@_Concurrency.MainActor @preconcurrency @objc override dynamic public func didMoveToWindow()
@objc deinit
}
@objc @_hasMissingDesignatedInitializers @_Concurrency.MainActor @preconcurrency public class LRBackgroundMarkerUIView : UIKit.UIView {
@_Concurrency.MainActor @preconcurrency @objc override dynamic public func didMoveToWindow()
@objc deinit
}
@objc(LRORequestSanitizer) public protocol RequestSanitizer {
#if compiler(>=5.3) && $NonescapableTypes
@objc func sanitize(request: LogRocket.Request) -> LogRocket.Request?
#endif
}
@_hasMissingDesignatedInitializers public class CanvasReplayConfiguration {
public static let minDebounceDelay: Swift.Int
public static let idleMinDebounceDelay: Swift.Int
public static let idleThresholdMs: Swift.Int
public static let maxDebounceDelay: Swift.Int
public static let maxCaptureDuration: Swift.Int
public static let maxTimeoutRetries: Swift.Int
public static let singleBitmapCaptureLimit: Swift.Int
public static let totalBitmapCaptureLimit: Swift.Int
public static let maxUnencodedImageBytes: Swift.Int
@objc deinit
}
@objc @_hasMissingDesignatedInitializers public class RenderableCache : ObjectiveC.NSObject, LogRocket.LRORenderableCache {
@objc public func mark(asDirty obj: any ObjectiveC.NSObjectProtocol)
@objc deinit
}
@_hasMissingDesignatedInitializers @objc(LROResponseBuilder) public class ResponseBuilder : ObjectiveC.NSObject {
@objc public var arsonBody: Swift.String?
@objc public var body: Foundation.Data?
@objc public var headers: [Swift.String : Swift.String]
@objc public var method: Swift.String
@objc final public let reqID: Swift.Int
@objc public var status: Swift.Int
@objc public var url: Swift.String
@objc public var duration: Swift.Double
@objc public func capture(timeOverride: Swift.Double = 0) -> Swift.Bool
@objc public func capture() -> Swift.Bool
@objc deinit
}
@objc(LROTaggedLogger) public class TaggedLogger : ObjectiveC.NSObject {
@objc public init(category: Swift.String)
@objc public func debug(message: Swift.String)
@objc public func info(message: Swift.String)
@objc public func notice(message: Swift.String)
@objc public func error(message: Swift.String)
@objc public func fault(message: Swift.String)
@objc deinit
}
@objc(LROCaptureMessageBuilder) public class CaptureMessageBuilder : ObjectiveC.NSObject {
@objc public init(_ message: Swift.String)
@objc(putTagString:value:) public func putTag(_ key: Swift.String, _ value: Swift.String) -> LogRocket.CaptureMessageBuilder
@objc(putTagBoolean:value:) public func putTag(_ key: Swift.String, _ value: Swift.Bool) -> LogRocket.CaptureMessageBuilder
@objc(putTagDouble:value:) public func putTag(_ key: Swift.String, _ value: Swift.Double) -> LogRocket.CaptureMessageBuilder
@objc(putTagInt:value:) public func putTag(_ key: Swift.String, _ value: Swift.Int) -> LogRocket.CaptureMessageBuilder
@objc(putExtraString:value:) public func putExtra(_ key: Swift.String, _ value: Swift.String) -> LogRocket.CaptureMessageBuilder
@objc(putExtraBoolean:value:) public func putExtra(_ key: Swift.String, _ value: Swift.Bool) -> LogRocket.CaptureMessageBuilder
@objc(putExtraDouble:value:) public func putExtra(_ key: Swift.String, _ value: Swift.Double) -> LogRocket.CaptureMessageBuilder
@objc(putExtraInt:value:) public func putExtra(_ key: Swift.String, _ value: Swift.Int) -> LogRocket.CaptureMessageBuilder
@objc deinit
}
@_inheritsConvenienceInitializers @objc(LROProxyConfigurationBuilder) public class ProxyConfigurationBuilder : ObjectiveC.NSObject {
@objc public func proxyUsername(_ username: Swift.String)
@objc public func proxyPassword(_ password: Swift.String)
@objc public func httpEnable(_ enable: Swift.Bool)
@objc public func httpProxy(_ proxy: Swift.String)
@objc public func httpPort(_ port: Swift.Int)
@objc override dynamic public init()
@objc deinit
}
@_hasMissingDesignatedInitializers public class FlutterTouchEncoder {
public static func encode(x: Swift.Double, y: Swift.Double, text: Swift.String, nodeNames: [Swift.String], motionType: Swift.Int, timestamp: Swift.Double, moves: [Swift.Dictionary<Swift.String, Swift.Double>], url: Swift.String)
@objc deinit
}
@_inheritsConvenienceInitializers @_hasMissingDesignatedInitializers @objc(LROLogHandler) public class LogHandler : ObjectiveC.NSObject {
@objc public class func swift_load()
@objc deinit
}
public let systemViews: [Swift.String]
@_hasMissingDesignatedInitializers @objc(LROApplicationLifecycleObserver) public class ApplicationLifecycleObserver : ObjectiveC.NSObject, LogRocket.LifecycleDelegate {
@objc public func viewControllerDidAppear(_ viewController: UIKit.UIViewController)
public func restoreViewFromLastSession()
@objc public func viewControllerDidDisappear(_ viewController: UIKit.UIViewController)
@objc deinit
}
@_inheritsConvenienceInitializers @_hasMissingDesignatedInitializers @objc(LROSDK) public class LogRocketSDK : ObjectiveC.NSObject {
@objc public static func initializeInternal(configuration: LogRocket.Configuration) -> Swift.Bool
@objc public static func initialize(configuration: LogRocket.Configuration)
@objc public static func addLog(level: Swift.String, args: [Swift.String])
@available(*, deprecated, message: "Helper for capturing properly encoded exception data. This method is deprecated, exceptions should be captured with Logger.captureException instead.")
@objc public static func captureException(errorMessage: Swift.String, errorType: Swift.String, exceptionType: Swift.String, stackTrace: Swift.String)
@objc public static func captureException(error: Foundation.NSError)
@objc public static func captureException(exception: Foundation.NSException)
@objc public static func captureMessage(_ builder: LogRocket.CaptureMessageBuilder)
@objc public static func captureReduxAction(action: Swift.String, storeId: Foundation.NSNumber, duration: Foundation.NSNumber, stateDelta: Swift.String, count: Foundation.NSNumber)
@objc public static func captureReduxInitialState(state: Swift.String, storeId: Foundation.NSNumber)
@objc public static func rebuildMessage(_ messageArray: Foundation.NSMutableArray)
@objc public static func getSessionURL(_ completion: @escaping (Swift.String) -> Swift.Void)
@objc public static func getSessionURLStatus(_ completion: @escaping (Swift.String) -> Swift.Void)
#if compiler(>=5.3) && $NonescapableTypes
@objc public static func identify(userID: Swift.String, userInfo: [Swift.String : Swift.String]? = nil)
#endif
#if compiler(>=5.3) && $NonescapableTypes
@objc public static func identifyAsAnonymous(userID: Swift.String, userInfo: [Swift.String : Swift.String]? = nil)
#endif
#if compiler(>=5.3) && $NonescapableTypes
@objc public static func newRequestBuilder() -> LogRocket.RequestBuilder?
#endif
@objc public static func pauseViewCapture()
@objc public static func isViewCapturePaused() -> Swift.Bool
#if compiler(>=5.3) && $NonescapableTypes
@objc public static func shutDownCurrentSession(hardShutdown: Swift.Bool = false, purgeSession: Swift.Bool = false, shutdownReason: Swift.String? = nil)
#endif
#if compiler(>=5.3) && $NonescapableTypes
@objc(startNewSessionNoConfig:) public static func startNewSession(handler: ((Swift.Bool) -> Swift.Void)? = nil)
#endif
#if compiler(>=5.3) && $NonescapableTypes
@objc(startNewSessionWithConfiguration:handler:) public static func startNewSession(configuration: LogRocket.Configuration, handler: ((Swift.Bool) -> Swift.Void)? = nil)
#endif
@objc public static func endSession()
@objc public static func shutdown()
@objc public static func hardShutdown()
@objc public static func track(_ builder: LogRocket.CustomEventBuilder)
@objc public static func tagPage(_ relativePage: Swift.String)
@objc public static func unpauseViewCapture()
@objc public static func captureSingleView()
@objc public static func viewControllerDidAppear(_ controller: UIKit.UIViewController)
@objc public static func viewControllerDidDisappear(_ controller: UIKit.UIViewController)
@objc public static func registerWebView(_ webView: WebKit.WKWebView)
@objc public static func isInitialized() -> Swift.Bool
@objc public static func redactView(_ view: UIKit.UIView)
@objc public static func allowView(_ view: UIKit.UIView)
#if compiler(>=5.3) && $NonescapableTypes
@objc public static func setReactNativeNetworkSanitizers(requestSanitizer: (any LogRocket.RequestSanitizer)? = nil, responseSanitizer: (any LogRocket.ResponseSanitizer)? = nil)
#endif
@objc public enum LogLevel : Swift.Int {
case FAULT = 5
case ERROR = 4
case NOTICE = 3
case INFO = 2
case DEBUG = 1
case VERBOSE = 0
#if compiler(>=5.3) && $NonescapableTypes
public init?(rawValue: Swift.Int)
#endif
public typealias RawValue = Swift.Int
public var rawValue: Swift.Int {
get
}
}
@objc public static func logLevelFromString(_ logLevel: Swift.String) -> LogRocket.LogRocketSDK.LogLevel
@objc deinit
}
@available(*, deprecated, message: "Use LogRocketSDK instead.")
public typealias SDK = LogRocket.LogRocketSDK
@objc(LROLifecycleDelegate) public protocol LifecycleDelegate {
@objc func viewControllerDidAppear(_: UIKit.UIViewController)
@objc func viewControllerDidDisappear(_: UIKit.UIViewController)
}
@objc(LROCustomEventBuilder) public class CustomEventBuilder : ObjectiveC.NSObject {
@objc public init(_ name: Swift.String)
@objc public func putRevenue(_ value: Swift.Double)
@objc(putString:value:) public func put(_ key: Swift.String, _ value: Swift.String)
@objc(putStringArray:value:) public func put(_ key: Swift.String, _ value: [Swift.String])
@objc(putDouble:value:) public func put(_ key: Swift.String, _ value: Swift.Double)
@objc(putDoubleArray:value:) public func put(_ key: Swift.String, _ value: [Swift.Double])
@objc(putBool:value:) public func put(_ key: Swift.String, _ value: Swift.Bool)
@objc(putBoolArray:value:) public func put(_ key: Swift.String, _ value: [Swift.Bool])
@objc deinit
}
@_hasMissingDesignatedInitializers public class FrameProcessTimer {
public func elapsed() -> Swift.Int64
public func hasTakenTooLong(caller: Swift.String = #function) -> Swift.Bool
public func end()
public func getWireFrameMode() -> Swift.Bool
@objc deinit
}
@_hasMissingDesignatedInitializers public class ScreenshotViewEncoder {
#if compiler(>=5.3) && $NonescapableTypes
public static func captureScreenshot(bitmapId: Swift.Int, imageBytes: Foundation.Data?, x: Swift.Int, y: Swift.Int, width: Swift.Int, height: Swift.Int)
#endif
@objc deinit
}
@objc(LROResponseSanitizer) public protocol ResponseSanitizer {
#if compiler(>=5.3) && $NonescapableTypes
@objc func sanitize(response: LogRocket.Response) -> LogRocket.Response?
#endif
}
public enum LookbackType : Swift.String {
case NONE
case LIMITED
case FULL
#if compiler(>=5.3) && $NonescapableTypes
public init?(rawValue: Swift.String)
#endif
public typealias RawValue = Swift.String
public var rawValue: Swift.String {
get
}
}
@_inheritsConvenienceInitializers @objc(LROCrashReportUploader) public class CrashReportUploader : ObjectiveC.NSObject {
@objc public func upload(crashReportDirectory: Foundation.URL)
@objc override dynamic public init()
@objc deinit
}
@_inheritsConvenienceInitializers @objc(LROLogger) public class Logger : ObjectiveC.NSObject {
@objc public static func debug(message: Swift.String)
@objc public static func info(message: Swift.String)
@objc public static func error(message: Swift.String)
@objc public static func warning(message: Swift.String)
#if compiler(>=5.3) && $NonescapableTypes
@objc public static func captureCrash(reason: Swift.String, errorType: Swift.String, callStackSymbols: [Swift.String]?)
#endif
@objc public static func captureException(exception: Foundation.NSException)
@objc public static func captureException(error: Foundation.NSError)
public static func captureException(error: any Swift.Error)
@objc override dynamic public init()
@objc deinit
}
@objc public enum LifecycleEventType : Swift.Int {
case viewAppeared
case viewDisappeared
case pageTag
case unrecognized
#if compiler(>=5.3) && $NonescapableTypes
public init?(rawValue: Swift.Int)
#endif
public typealias RawValue = Swift.Int
public var rawValue: Swift.Int {
get
}
}
@_inheritsConvenienceInitializers @objc(LROLifecycleManager) public class LifecycleManager : ObjectiveC.NSObject {
@objc public static func captureEvent(base: Swift.String, path: Swift.String, lifecycleType: LogRocket.LifecycleEventType) throws
@objc override dynamic public init()
@objc deinit
}
@objc(LROConfiguration) public class Configuration : ObjectiveC.NSObject {
final public let appID: Swift.String
@objc public var serverURL: Swift.String
@objc public var allowTags: Foundation.NSMutableSet
@objc public var redactionTags: Foundation.NSMutableSet
@objc public var inputRedactionTags: Foundation.NSMutableSet
@objc public var textSanitizer: LogRocket.SanitizerType
@objc public var redactMenus: Swift.Bool
@objc public var captureRedactedViewTouches: Swift.Bool
@objc public var viewScanningEnabled: Swift.Bool
@objc public var networkCaptureEnabled: Swift.Bool
@objc public var logCaptureEnabled: Swift.Bool
@objc public var requestSanitizer: (any LogRocket.RequestSanitizer)?
@objc public var responseSanitizer: (any LogRocket.ResponseSanitizer)?
@objc public var registerTouchHandlers: Swift.Bool
@objc public var scaleFactor: CoreFoundation.CGFloat {
@objc get
@objc set
}
@objc public var ipCaptureEnabled: Swift.Bool
@objc public var persistenceEnabled: Swift.Bool
@objc public var bufferTimeoutSeconds: Swift.UInt32
@objc public var uploadIntervalMs: Swift.Int
@objc public var proxyConfiguration: LogRocket.ProxyConfigurationBuilder
@objc public var experimentalBidiCapture: Swift.Bool
@objc public var disableScrollDelegate: Swift.Bool
@objc public var forceCleanStart: Swift.Bool
@objc public var throughputTrackingEnabled: Swift.Bool
@objc public var extendedViewTextCaptureEnabled: Swift.Bool
@objc public var updateId: Swift.String
@objc public var expoChannel: Swift.String
@objc public var logLevel: LogRocket.LogRocketSDK.LogLevel
@objc public var requestHttpBodyStreamCaptureEnabled: Swift.Bool
@objc public var isReactNative: Swift.Bool
@objc public var isRNNewArchEnabled: Swift.Bool
@objc public var requireRNNetworkSanitizer: Swift.Bool
@objc public var isFlutter: Swift.Bool
@available(*, deprecated, message: "**WARNING**\nChanging this setting may result in highly limited capture or causing the app to hang for extreme lengths of time. Proceed at your own risk!\n\nSpecifies, in milliseconds, how long the LogRocket SDK should attempt to capture a view before timing out to prevent the app from hanging.")
@objc public var viewCaptureTimeoutThreshold: Swift.Int
@objc public var viewCaptureAdditionalWireframeDuration: Swift.Int
@objc public var enableAutomaticLifecycleCapture: Swift.Bool
@objc public var unexpectedExceptionCaptureEnabled: Swift.Bool
@objc public var networkCaptureRedactedOrigins: Foundation.NSMutableSet
@objc public var lottieCaptureEnabled: Swift.Bool
@objc public var maxCapturedIosVersion: Swift.Int
@objc public var requestDebugLoggingEnabled: Swift.Bool
@objc public var enableViewCaptureV2: Swift.Bool
@objc public var reduceViewCaptureBandwidthWhenIdle: Swift.Bool
@objc public init(appID: Swift.String)
#if compiler(>=5.3) && $NonescapableTypes
convenience public init(appID: Swift.String, serverURL: Swift.String = "https://r.lr-intake.com/i", allowTags: [Swift.String] = [], redactionTags: [Swift.String] = [], inputRedactionTags: [Swift.String] = [], textSanitizer: LogRocket.SanitizerType = .none, redactMenus: Swift.Bool = false, viewScanningEnabled: Swift.Bool = true, networkCaptureEnabled: Swift.Bool = true, logCaptureEnabled: Swift.Bool = true, requestSanitizer: (any LogRocket.RequestSanitizer)? = nil, responseSanitizer: (any LogRocket.ResponseSanitizer)? = nil, registerTouchHandlers: Swift.Bool = true, ipCaptureEnabled: Swift.Bool = true, scaleFactor: CoreFoundation.CGFloat? = nil, persistenceEnabled: Swift.Bool = true, bufferTimeoutSeconds: Swift.UInt32 = 60, uploadIntervalMs: Swift.Int = 30000, proxyConfigurationBuilder: LogRocket.ProxyConfigurationBuilder? = nil, experimentalBidiCapture: Swift.Bool = false, disableScrollDelegate: Swift.Bool = false, forceCleanStart: Swift.Bool = false, throughputTrackingEnabled: Swift.Bool = true, extendedViewTextCaptureEnabled: Swift.Bool = true, captureRedactedViewTouches: Swift.Bool = true, updateId: Swift.String = "", expoChannel: Swift.String = "", logLevel: LogRocket.LogRocketSDK.LogLevel = LogRocketSDK.LogLevel.INFO, requestHttpBodyStreamCaptureEnabled: Swift.Bool = true, viewCaptureTimeoutThreshold: Swift.Int = CanvasReplayConfiguration.maxCaptureDuration, viewCaptureAdditionalWireframeDuration: Swift.Int = 20, enableAutomaticLifecycleCapture: Swift.Bool = true, unexpectedExceptionCaptureEnabled: Swift.Bool = true, networkCaptureRedactedOrigins: [Swift.String] = [], lottieCaptureEnabled: Swift.Bool = false, maxCapturedIosVersion: Swift.Int = -1, requestDebugLoggingEnabled: Swift.Bool = false, enableViewCaptureV2: Swift.Bool = true, reduceViewCaptureBandwidthWhenIdle: Swift.Bool = true)
#endif
@objc deinit
}
@objc(LRORequest) public class Request : ObjectiveC.NSObject {
@objc public var arsonBody: Swift.String?
@objc public var body: Foundation.Data?
@objc public var headers: [Swift.String : Swift.String]?
@objc final public let method: Swift.String
@objc final public let reqID: Swift.Int
@objc public var url: Swift.String?
public init(method: Swift.String, reqID: Swift.Int)
#if compiler(>=5.3) && $NonescapableTypes
convenience public init(arsonBody: Swift.String? = nil, body: Foundation.Data? = nil, headers: [Swift.String : Swift.String], method: Swift.String, reqID: Swift.Int, url: Swift.String)
#endif
@objc deinit
}
extension UIKit.UIDevice {
@_Concurrency.MainActor @preconcurrency public static let modelName: Swift.String
}
@_inheritsConvenienceInitializers @objc(LROScrollTracker) @_Concurrency.MainActor @preconcurrency public class LogRocketScrollTracker : ObjectiveC.NSObject, UIKit.UIScrollViewDelegate {
@_Concurrency.MainActor @preconcurrency @objc public func scrollViewWillBeginDragging(_ view: UIKit.UIScrollView)
@_Concurrency.MainActor @preconcurrency @objc public func scrollViewDidEndDecelerating(_ view: UIKit.UIScrollView)
@_Concurrency.MainActor @preconcurrency @objc public func scrollViewDidEndDragging(_ view: UIKit.UIScrollView, willDecelerate decelerate: Swift.Bool)
@_Concurrency.MainActor @preconcurrency @objc override dynamic public init()
@objc deinit
}
@objc(LROSanitizerType) public enum SanitizerType : Swift.Int {
case excluded
case none
#if compiler(>=5.3) && $NonescapableTypes
public init?(rawValue: Swift.Int)
#endif
public typealias RawValue = Swift.Int
public var rawValue: Swift.Int {
get
}
}
@_hasMissingDesignatedInitializers @objc(LROCustomEvent) public class CustomEvent : ObjectiveC.NSObject {
@objc deinit
}
@objc(LROResponse) public class Response : ObjectiveC.NSObject {
@objc public var arsonBody: Swift.String?
@objc public var body: Foundation.Data?
@objc public var headers: [Swift.String : Swift.String]?
@objc final public let method: Swift.String
@objc final public let reqID: Swift.Int
@objc final public let status: Swift.UInt32
@objc public var url: Swift.String?
public init(method: Swift.String, reqID: Swift.Int, status: Swift.UInt32)
#if compiler(>=5.3) && $NonescapableTypes
convenience public init(arsonBody: Swift.String? = nil, body: Foundation.Data? = nil, headers: [Swift.String : Swift.String], method: Swift.String, reqID: Swift.Int, status: Swift.UInt32, url: Swift.String)
#endif
@objc deinit
}
@_hasMissingDesignatedInitializers @objc(LRORequestBuilder) public class RequestBuilder : ObjectiveC.NSObject {
@objc public var arsonBody: Swift.String?
@objc public var body: Foundation.Data?
@objc public var headers: [Swift.String : Swift.String]
@objc public var method: Swift.String?
@objc final public let reqID: Swift.Int
@objc public var url: Swift.String?
#if compiler(>=5.3) && $NonescapableTypes
@objc public func capture(timeOverride: Swift.Double = 0) -> LogRocket.ResponseBuilder?
#endif
@objc deinit
}
@_hasMissingDesignatedInitializers @objc(LROTouchShim) @_Concurrency.MainActor @preconcurrency public class TouchShim : UIKit.UIGestureRecognizer, UIKit.UIGestureRecognizerDelegate {
@_Concurrency.MainActor @preconcurrency @objc override dynamic public func canBePrevented(by _: UIKit.UIGestureRecognizer) -> Swift.Bool
@_Concurrency.MainActor @preconcurrency @objc override dynamic public func canPrevent(_: UIKit.UIGestureRecognizer) -> Swift.Bool
@_Concurrency.MainActor @preconcurrency @objc override dynamic public func ignore(_: UIKit.UITouch, for _: UIKit.UIEvent)
@_Concurrency.MainActor @preconcurrency @objc override dynamic public func ignore(_: UIKit.UIPress, for _: UIKit.UIPressesEvent)
@_Concurrency.MainActor @preconcurrency @objc override dynamic public func shouldRequireFailure(of _: UIKit.UIGestureRecognizer) -> Swift.Bool
@_Concurrency.MainActor @preconcurrency @objc override dynamic public func shouldBeRequiredToFail(by _: UIKit.UIGestureRecognizer) -> Swift.Bool
@_Concurrency.MainActor @preconcurrency @objc override dynamic public func reset()
@_Concurrency.MainActor @preconcurrency @objc override dynamic public func touchesBegan(_ touches: Swift.Set<UIKit.UITouch>, with _: UIKit.UIEvent)
@_Concurrency.MainActor @preconcurrency @objc override dynamic public func touchesCancelled(_ touches: Swift.Set<UIKit.UITouch>, with event: UIKit.UIEvent)
@_Concurrency.MainActor @preconcurrency @objc override dynamic public func touchesEnded(_ touches: Swift.Set<UIKit.UITouch>, with _: UIKit.UIEvent)
@_Concurrency.MainActor @preconcurrency @objc override dynamic public func touchesMoved(_ touches: Swift.Set<UIKit.UITouch>, with _: UIKit.UIEvent)
@_Concurrency.MainActor @preconcurrency @objc public func gestureRecognizer(_: UIKit.UIGestureRecognizer, shouldRecognizeSimultaneouslyWith _: UIKit.UIGestureRecognizer) -> Swift.Bool
@objc deinit
}
extension LogRocket.LogRocketSDK.LogLevel : Swift.Equatable {}
extension LogRocket.LogRocketSDK.LogLevel : Swift.Hashable {}
extension LogRocket.LogRocketSDK.LogLevel : Swift.RawRepresentable {}
extension LogRocket.LookbackType : Swift.Equatable {}
extension LogRocket.LookbackType : Swift.Hashable {}
extension LogRocket.LookbackType : Swift.RawRepresentable {}
extension LogRocket.LifecycleEventType : Swift.Equatable {}
extension LogRocket.LifecycleEventType : Swift.Hashable {}
extension LogRocket.LifecycleEventType : Swift.RawRepresentable {}
extension LogRocket.LogRocketScrollTracker : Swift.Sendable {}
extension LogRocket.SanitizerType : Swift.Equatable {}
extension LogRocket.SanitizerType : Swift.Hashable {}
extension LogRocket.SanitizerType : Swift.RawRepresentable {}

View File

@@ -1,418 +0,0 @@
// swift-interface-format-version: 1.0
// swift-compiler-version: Apple Swift version 6.2 effective-5.10 (swiftlang-6.2.0.19.9 clang-1700.3.19.1)
// swift-module-flags: -target x86_64-apple-ios12.0-simulator -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -O -enable-experimental-feature DebugDescriptionMacro -enable-bare-slash-regex -module-name LogRocket
// swift-module-flags-ignorable: -no-verify-emitted-module-interface -formal-cxx-interoperability-mode=off -interface-compiler-version 6.2
import CommonCrypto
import Dispatch
import Foundation
@_exported import LogRocket
import NaturalLanguage
import ObjectiveC
import QuartzCore
import Swift
import SwiftUI
import UIKit
import WebKit
import _Concurrency
import _StringProcessing
import _SwiftConcurrencyShims
import os
@available(iOS 13.0, *)
extension SwiftUICore.View {
@_Concurrency.MainActor @preconcurrency public func lrAddClass(_ viewSelector: Swift.String) -> some SwiftUICore.View
@_Concurrency.MainActor @preconcurrency public func lrHide() -> some SwiftUICore.View
@_Concurrency.MainActor @preconcurrency public func lrShow() -> some SwiftUICore.View
@_Concurrency.MainActor @preconcurrency public func lrAddClassWithContainer(_ viewSelector: Swift.String) -> some SwiftUICore.View
@_Concurrency.MainActor @preconcurrency public func lrHideWithContainer() -> some SwiftUICore.View
@_Concurrency.MainActor @preconcurrency public func lrShowWithContainer() -> some SwiftUICore.View
}
@objc @_hasMissingDesignatedInitializers @_Concurrency.MainActor @preconcurrency public class LROverlayMarkerUIView : UIKit.UIView {
@_Concurrency.MainActor @preconcurrency @objc override dynamic public func didMoveToWindow()
@objc deinit
}
@objc @_hasMissingDesignatedInitializers @_Concurrency.MainActor @preconcurrency public class LRBackgroundMarkerUIView : UIKit.UIView {
@_Concurrency.MainActor @preconcurrency @objc override dynamic public func didMoveToWindow()
@objc deinit
}
@objc(LRORequestSanitizer) public protocol RequestSanitizer {
#if compiler(>=5.3) && $NonescapableTypes
@objc func sanitize(request: LogRocket.Request) -> LogRocket.Request?
#endif
}
@_hasMissingDesignatedInitializers public class CanvasReplayConfiguration {
public static let minDebounceDelay: Swift.Int
public static let idleMinDebounceDelay: Swift.Int
public static let idleThresholdMs: Swift.Int
public static let maxDebounceDelay: Swift.Int
public static let maxCaptureDuration: Swift.Int
public static let maxTimeoutRetries: Swift.Int
public static let singleBitmapCaptureLimit: Swift.Int
public static let totalBitmapCaptureLimit: Swift.Int
public static let maxUnencodedImageBytes: Swift.Int
@objc deinit
}
@objc @_hasMissingDesignatedInitializers public class RenderableCache : ObjectiveC.NSObject, LogRocket.LRORenderableCache {
@objc public func mark(asDirty obj: any ObjectiveC.NSObjectProtocol)
@objc deinit
}
@_hasMissingDesignatedInitializers @objc(LROResponseBuilder) public class ResponseBuilder : ObjectiveC.NSObject {
@objc public var arsonBody: Swift.String?
@objc public var body: Foundation.Data?
@objc public var headers: [Swift.String : Swift.String]
@objc public var method: Swift.String
@objc final public let reqID: Swift.Int
@objc public var status: Swift.Int
@objc public var url: Swift.String
@objc public var duration: Swift.Double
@objc public func capture(timeOverride: Swift.Double = 0) -> Swift.Bool
@objc public func capture() -> Swift.Bool
@objc deinit
}
@objc(LROTaggedLogger) public class TaggedLogger : ObjectiveC.NSObject {
@objc public init(category: Swift.String)
@objc public func debug(message: Swift.String)
@objc public func info(message: Swift.String)
@objc public func notice(message: Swift.String)
@objc public func error(message: Swift.String)
@objc public func fault(message: Swift.String)
@objc deinit
}
@objc(LROCaptureMessageBuilder) public class CaptureMessageBuilder : ObjectiveC.NSObject {
@objc public init(_ message: Swift.String)
@objc(putTagString:value:) public func putTag(_ key: Swift.String, _ value: Swift.String) -> LogRocket.CaptureMessageBuilder
@objc(putTagBoolean:value:) public func putTag(_ key: Swift.String, _ value: Swift.Bool) -> LogRocket.CaptureMessageBuilder
@objc(putTagDouble:value:) public func putTag(_ key: Swift.String, _ value: Swift.Double) -> LogRocket.CaptureMessageBuilder
@objc(putTagInt:value:) public func putTag(_ key: Swift.String, _ value: Swift.Int) -> LogRocket.CaptureMessageBuilder
@objc(putExtraString:value:) public func putExtra(_ key: Swift.String, _ value: Swift.String) -> LogRocket.CaptureMessageBuilder
@objc(putExtraBoolean:value:) public func putExtra(_ key: Swift.String, _ value: Swift.Bool) -> LogRocket.CaptureMessageBuilder
@objc(putExtraDouble:value:) public func putExtra(_ key: Swift.String, _ value: Swift.Double) -> LogRocket.CaptureMessageBuilder
@objc(putExtraInt:value:) public func putExtra(_ key: Swift.String, _ value: Swift.Int) -> LogRocket.CaptureMessageBuilder
@objc deinit
}
@_inheritsConvenienceInitializers @objc(LROProxyConfigurationBuilder) public class ProxyConfigurationBuilder : ObjectiveC.NSObject {
@objc public func proxyUsername(_ username: Swift.String)
@objc public func proxyPassword(_ password: Swift.String)
@objc public func httpEnable(_ enable: Swift.Bool)
@objc public func httpProxy(_ proxy: Swift.String)
@objc public func httpPort(_ port: Swift.Int)
@objc override dynamic public init()
@objc deinit
}
@_hasMissingDesignatedInitializers public class FlutterTouchEncoder {
public static func encode(x: Swift.Double, y: Swift.Double, text: Swift.String, nodeNames: [Swift.String], motionType: Swift.Int, timestamp: Swift.Double, moves: [Swift.Dictionary<Swift.String, Swift.Double>], url: Swift.String)
@objc deinit
}
@_inheritsConvenienceInitializers @_hasMissingDesignatedInitializers @objc(LROLogHandler) public class LogHandler : ObjectiveC.NSObject {
@objc public class func swift_load()
@objc deinit
}
public let systemViews: [Swift.String]
@_hasMissingDesignatedInitializers @objc(LROApplicationLifecycleObserver) public class ApplicationLifecycleObserver : ObjectiveC.NSObject, LogRocket.LifecycleDelegate {
@objc public func viewControllerDidAppear(_ viewController: UIKit.UIViewController)
public func restoreViewFromLastSession()
@objc public func viewControllerDidDisappear(_ viewController: UIKit.UIViewController)
@objc deinit
}
@_inheritsConvenienceInitializers @_hasMissingDesignatedInitializers @objc(LROSDK) public class LogRocketSDK : ObjectiveC.NSObject {
@objc public static func initializeInternal(configuration: LogRocket.Configuration) -> Swift.Bool
@objc public static func initialize(configuration: LogRocket.Configuration)
@objc public static func addLog(level: Swift.String, args: [Swift.String])
@available(*, deprecated, message: "Helper for capturing properly encoded exception data. This method is deprecated, exceptions should be captured with Logger.captureException instead.")
@objc public static func captureException(errorMessage: Swift.String, errorType: Swift.String, exceptionType: Swift.String, stackTrace: Swift.String)
@objc public static func captureException(error: Foundation.NSError)
@objc public static func captureException(exception: Foundation.NSException)
@objc public static func captureMessage(_ builder: LogRocket.CaptureMessageBuilder)
@objc public static func captureReduxAction(action: Swift.String, storeId: Foundation.NSNumber, duration: Foundation.NSNumber, stateDelta: Swift.String, count: Foundation.NSNumber)
@objc public static func captureReduxInitialState(state: Swift.String, storeId: Foundation.NSNumber)
@objc public static func rebuildMessage(_ messageArray: Foundation.NSMutableArray)
@objc public static func getSessionURL(_ completion: @escaping (Swift.String) -> Swift.Void)
@objc public static func getSessionURLStatus(_ completion: @escaping (Swift.String) -> Swift.Void)
#if compiler(>=5.3) && $NonescapableTypes
@objc public static func identify(userID: Swift.String, userInfo: [Swift.String : Swift.String]? = nil)
#endif
#if compiler(>=5.3) && $NonescapableTypes
@objc public static func identifyAsAnonymous(userID: Swift.String, userInfo: [Swift.String : Swift.String]? = nil)
#endif
#if compiler(>=5.3) && $NonescapableTypes
@objc public static func newRequestBuilder() -> LogRocket.RequestBuilder?
#endif
@objc public static func pauseViewCapture()
@objc public static func isViewCapturePaused() -> Swift.Bool
#if compiler(>=5.3) && $NonescapableTypes
@objc public static func shutDownCurrentSession(hardShutdown: Swift.Bool = false, purgeSession: Swift.Bool = false, shutdownReason: Swift.String? = nil)
#endif
#if compiler(>=5.3) && $NonescapableTypes
@objc(startNewSessionNoConfig:) public static func startNewSession(handler: ((Swift.Bool) -> Swift.Void)? = nil)
#endif
#if compiler(>=5.3) && $NonescapableTypes
@objc(startNewSessionWithConfiguration:handler:) public static func startNewSession(configuration: LogRocket.Configuration, handler: ((Swift.Bool) -> Swift.Void)? = nil)
#endif
@objc public static func endSession()
@objc public static func shutdown()
@objc public static func hardShutdown()
@objc public static func track(_ builder: LogRocket.CustomEventBuilder)
@objc public static func tagPage(_ relativePage: Swift.String)
@objc public static func unpauseViewCapture()
@objc public static func captureSingleView()
@objc public static func viewControllerDidAppear(_ controller: UIKit.UIViewController)
@objc public static func viewControllerDidDisappear(_ controller: UIKit.UIViewController)
@objc public static func registerWebView(_ webView: WebKit.WKWebView)
@objc public static func isInitialized() -> Swift.Bool
@objc public static func redactView(_ view: UIKit.UIView)
@objc public static func allowView(_ view: UIKit.UIView)
#if compiler(>=5.3) && $NonescapableTypes
@objc public static func setReactNativeNetworkSanitizers(requestSanitizer: (any LogRocket.RequestSanitizer)? = nil, responseSanitizer: (any LogRocket.ResponseSanitizer)? = nil)
#endif
@objc public enum LogLevel : Swift.Int {
case FAULT = 5
case ERROR = 4
case NOTICE = 3
case INFO = 2
case DEBUG = 1
case VERBOSE = 0
#if compiler(>=5.3) && $NonescapableTypes
public init?(rawValue: Swift.Int)
#endif
public typealias RawValue = Swift.Int
public var rawValue: Swift.Int {
get
}
}
@objc public static func logLevelFromString(_ logLevel: Swift.String) -> LogRocket.LogRocketSDK.LogLevel
@objc deinit
}
@available(*, deprecated, message: "Use LogRocketSDK instead.")
public typealias SDK = LogRocket.LogRocketSDK
@objc(LROLifecycleDelegate) public protocol LifecycleDelegate {
@objc func viewControllerDidAppear(_: UIKit.UIViewController)
@objc func viewControllerDidDisappear(_: UIKit.UIViewController)
}
@objc(LROCustomEventBuilder) public class CustomEventBuilder : ObjectiveC.NSObject {
@objc public init(_ name: Swift.String)
@objc public func putRevenue(_ value: Swift.Double)
@objc(putString:value:) public func put(_ key: Swift.String, _ value: Swift.String)
@objc(putStringArray:value:) public func put(_ key: Swift.String, _ value: [Swift.String])
@objc(putDouble:value:) public func put(_ key: Swift.String, _ value: Swift.Double)
@objc(putDoubleArray:value:) public func put(_ key: Swift.String, _ value: [Swift.Double])
@objc(putBool:value:) public func put(_ key: Swift.String, _ value: Swift.Bool)
@objc(putBoolArray:value:) public func put(_ key: Swift.String, _ value: [Swift.Bool])
@objc deinit
}
@_hasMissingDesignatedInitializers public class FrameProcessTimer {
public func elapsed() -> Swift.Int64
public func hasTakenTooLong(caller: Swift.String = #function) -> Swift.Bool
public func end()
public func getWireFrameMode() -> Swift.Bool
@objc deinit
}
@_hasMissingDesignatedInitializers public class ScreenshotViewEncoder {
#if compiler(>=5.3) && $NonescapableTypes
public static func captureScreenshot(bitmapId: Swift.Int, imageBytes: Foundation.Data?, x: Swift.Int, y: Swift.Int, width: Swift.Int, height: Swift.Int)
#endif
@objc deinit
}
@objc(LROResponseSanitizer) public protocol ResponseSanitizer {
#if compiler(>=5.3) && $NonescapableTypes
@objc func sanitize(response: LogRocket.Response) -> LogRocket.Response?
#endif
}
public enum LookbackType : Swift.String {
case NONE
case LIMITED
case FULL
#if compiler(>=5.3) && $NonescapableTypes
public init?(rawValue: Swift.String)
#endif
public typealias RawValue = Swift.String
public var rawValue: Swift.String {
get
}
}
@_inheritsConvenienceInitializers @objc(LROCrashReportUploader) public class CrashReportUploader : ObjectiveC.NSObject {
@objc public func upload(crashReportDirectory: Foundation.URL)
@objc override dynamic public init()
@objc deinit
}
@_inheritsConvenienceInitializers @objc(LROLogger) public class Logger : ObjectiveC.NSObject {
@objc public static func debug(message: Swift.String)
@objc public static func info(message: Swift.String)
@objc public static func error(message: Swift.String)
@objc public static func warning(message: Swift.String)
#if compiler(>=5.3) && $NonescapableTypes
@objc public static func captureCrash(reason: Swift.String, errorType: Swift.String, callStackSymbols: [Swift.String]?)
#endif
@objc public static func captureException(exception: Foundation.NSException)
@objc public static func captureException(error: Foundation.NSError)
public static func captureException(error: any Swift.Error)
@objc override dynamic public init()
@objc deinit
}
@objc public enum LifecycleEventType : Swift.Int {
case viewAppeared
case viewDisappeared
case pageTag
case unrecognized
#if compiler(>=5.3) && $NonescapableTypes
public init?(rawValue: Swift.Int)
#endif
public typealias RawValue = Swift.Int
public var rawValue: Swift.Int {
get
}
}
@_inheritsConvenienceInitializers @objc(LROLifecycleManager) public class LifecycleManager : ObjectiveC.NSObject {
@objc public static func captureEvent(base: Swift.String, path: Swift.String, lifecycleType: LogRocket.LifecycleEventType) throws
@objc override dynamic public init()
@objc deinit
}
@objc(LROConfiguration) public class Configuration : ObjectiveC.NSObject {
final public let appID: Swift.String
@objc public var serverURL: Swift.String
@objc public var allowTags: Foundation.NSMutableSet
@objc public var redactionTags: Foundation.NSMutableSet
@objc public var inputRedactionTags: Foundation.NSMutableSet
@objc public var textSanitizer: LogRocket.SanitizerType
@objc public var redactMenus: Swift.Bool
@objc public var captureRedactedViewTouches: Swift.Bool
@objc public var viewScanningEnabled: Swift.Bool
@objc public var networkCaptureEnabled: Swift.Bool
@objc public var logCaptureEnabled: Swift.Bool
@objc public var requestSanitizer: (any LogRocket.RequestSanitizer)?
@objc public var responseSanitizer: (any LogRocket.ResponseSanitizer)?
@objc public var registerTouchHandlers: Swift.Bool
@objc public var scaleFactor: CoreFoundation.CGFloat {
@objc get
@objc set
}
@objc public var ipCaptureEnabled: Swift.Bool
@objc public var persistenceEnabled: Swift.Bool
@objc public var bufferTimeoutSeconds: Swift.UInt32
@objc public var uploadIntervalMs: Swift.Int
@objc public var proxyConfiguration: LogRocket.ProxyConfigurationBuilder
@objc public var experimentalBidiCapture: Swift.Bool
@objc public var disableScrollDelegate: Swift.Bool
@objc public var forceCleanStart: Swift.Bool
@objc public var throughputTrackingEnabled: Swift.Bool
@objc public var extendedViewTextCaptureEnabled: Swift.Bool
@objc public var updateId: Swift.String
@objc public var expoChannel: Swift.String
@objc public var logLevel: LogRocket.LogRocketSDK.LogLevel
@objc public var requestHttpBodyStreamCaptureEnabled: Swift.Bool
@objc public var isReactNative: Swift.Bool
@objc public var isRNNewArchEnabled: Swift.Bool
@objc public var requireRNNetworkSanitizer: Swift.Bool
@objc public var isFlutter: Swift.Bool
@available(*, deprecated, message: "**WARNING**\nChanging this setting may result in highly limited capture or causing the app to hang for extreme lengths of time. Proceed at your own risk!\n\nSpecifies, in milliseconds, how long the LogRocket SDK should attempt to capture a view before timing out to prevent the app from hanging.")
@objc public var viewCaptureTimeoutThreshold: Swift.Int
@objc public var viewCaptureAdditionalWireframeDuration: Swift.Int
@objc public var enableAutomaticLifecycleCapture: Swift.Bool
@objc public var unexpectedExceptionCaptureEnabled: Swift.Bool
@objc public var networkCaptureRedactedOrigins: Foundation.NSMutableSet
@objc public var lottieCaptureEnabled: Swift.Bool
@objc public var maxCapturedIosVersion: Swift.Int
@objc public var requestDebugLoggingEnabled: Swift.Bool
@objc public var enableViewCaptureV2: Swift.Bool
@objc public var reduceViewCaptureBandwidthWhenIdle: Swift.Bool
@objc public init(appID: Swift.String)
#if compiler(>=5.3) && $NonescapableTypes
convenience public init(appID: Swift.String, serverURL: Swift.String = "https://r.lr-intake.com/i", allowTags: [Swift.String] = [], redactionTags: [Swift.String] = [], inputRedactionTags: [Swift.String] = [], textSanitizer: LogRocket.SanitizerType = .none, redactMenus: Swift.Bool = false, viewScanningEnabled: Swift.Bool = true, networkCaptureEnabled: Swift.Bool = true, logCaptureEnabled: Swift.Bool = true, requestSanitizer: (any LogRocket.RequestSanitizer)? = nil, responseSanitizer: (any LogRocket.ResponseSanitizer)? = nil, registerTouchHandlers: Swift.Bool = true, ipCaptureEnabled: Swift.Bool = true, scaleFactor: CoreFoundation.CGFloat? = nil, persistenceEnabled: Swift.Bool = true, bufferTimeoutSeconds: Swift.UInt32 = 60, uploadIntervalMs: Swift.Int = 30000, proxyConfigurationBuilder: LogRocket.ProxyConfigurationBuilder? = nil, experimentalBidiCapture: Swift.Bool = false, disableScrollDelegate: Swift.Bool = false, forceCleanStart: Swift.Bool = false, throughputTrackingEnabled: Swift.Bool = true, extendedViewTextCaptureEnabled: Swift.Bool = true, captureRedactedViewTouches: Swift.Bool = true, updateId: Swift.String = "", expoChannel: Swift.String = "", logLevel: LogRocket.LogRocketSDK.LogLevel = LogRocketSDK.LogLevel.INFO, requestHttpBodyStreamCaptureEnabled: Swift.Bool = true, viewCaptureTimeoutThreshold: Swift.Int = CanvasReplayConfiguration.maxCaptureDuration, viewCaptureAdditionalWireframeDuration: Swift.Int = 20, enableAutomaticLifecycleCapture: Swift.Bool = true, unexpectedExceptionCaptureEnabled: Swift.Bool = true, networkCaptureRedactedOrigins: [Swift.String] = [], lottieCaptureEnabled: Swift.Bool = false, maxCapturedIosVersion: Swift.Int = -1, requestDebugLoggingEnabled: Swift.Bool = false, enableViewCaptureV2: Swift.Bool = true, reduceViewCaptureBandwidthWhenIdle: Swift.Bool = true)
#endif
@objc deinit
}
@objc(LRORequest) public class Request : ObjectiveC.NSObject {
@objc public var arsonBody: Swift.String?
@objc public var body: Foundation.Data?
@objc public var headers: [Swift.String : Swift.String]?
@objc final public let method: Swift.String
@objc final public let reqID: Swift.Int
@objc public var url: Swift.String?
public init(method: Swift.String, reqID: Swift.Int)
#if compiler(>=5.3) && $NonescapableTypes
convenience public init(arsonBody: Swift.String? = nil, body: Foundation.Data? = nil, headers: [Swift.String : Swift.String], method: Swift.String, reqID: Swift.Int, url: Swift.String)
#endif
@objc deinit
}
extension UIKit.UIDevice {
@_Concurrency.MainActor @preconcurrency public static let modelName: Swift.String
}
@_inheritsConvenienceInitializers @objc(LROScrollTracker) @_Concurrency.MainActor @preconcurrency public class LogRocketScrollTracker : ObjectiveC.NSObject, UIKit.UIScrollViewDelegate {
@_Concurrency.MainActor @preconcurrency @objc public func scrollViewWillBeginDragging(_ view: UIKit.UIScrollView)
@_Concurrency.MainActor @preconcurrency @objc public func scrollViewDidEndDecelerating(_ view: UIKit.UIScrollView)
@_Concurrency.MainActor @preconcurrency @objc public func scrollViewDidEndDragging(_ view: UIKit.UIScrollView, willDecelerate decelerate: Swift.Bool)
@_Concurrency.MainActor @preconcurrency @objc override dynamic public init()
@objc deinit
}
@objc(LROSanitizerType) public enum SanitizerType : Swift.Int {
case excluded
case none
#if compiler(>=5.3) && $NonescapableTypes
public init?(rawValue: Swift.Int)
#endif
public typealias RawValue = Swift.Int
public var rawValue: Swift.Int {
get
}
}
@_hasMissingDesignatedInitializers @objc(LROCustomEvent) public class CustomEvent : ObjectiveC.NSObject {
@objc deinit
}
@objc(LROResponse) public class Response : ObjectiveC.NSObject {
@objc public var arsonBody: Swift.String?
@objc public var body: Foundation.Data?
@objc public var headers: [Swift.String : Swift.String]?
@objc final public let method: Swift.String
@objc final public let reqID: Swift.Int
@objc final public let status: Swift.UInt32
@objc public var url: Swift.String?
public init(method: Swift.String, reqID: Swift.Int, status: Swift.UInt32)
#if compiler(>=5.3) && $NonescapableTypes
convenience public init(arsonBody: Swift.String? = nil, body: Foundation.Data? = nil, headers: [Swift.String : Swift.String], method: Swift.String, reqID: Swift.Int, status: Swift.UInt32, url: Swift.String)
#endif
@objc deinit
}
@_hasMissingDesignatedInitializers @objc(LRORequestBuilder) public class RequestBuilder : ObjectiveC.NSObject {
@objc public var arsonBody: Swift.String?
@objc public var body: Foundation.Data?
@objc public var headers: [Swift.String : Swift.String]
@objc public var method: Swift.String?
@objc final public let reqID: Swift.Int
@objc public var url: Swift.String?
#if compiler(>=5.3) && $NonescapableTypes
@objc public func capture(timeOverride: Swift.Double = 0) -> LogRocket.ResponseBuilder?
#endif
@objc deinit
}
@_hasMissingDesignatedInitializers @objc(LROTouchShim) @_Concurrency.MainActor @preconcurrency public class TouchShim : UIKit.UIGestureRecognizer, UIKit.UIGestureRecognizerDelegate {
@_Concurrency.MainActor @preconcurrency @objc override dynamic public func canBePrevented(by _: UIKit.UIGestureRecognizer) -> Swift.Bool
@_Concurrency.MainActor @preconcurrency @objc override dynamic public func canPrevent(_: UIKit.UIGestureRecognizer) -> Swift.Bool
@_Concurrency.MainActor @preconcurrency @objc override dynamic public func ignore(_: UIKit.UITouch, for _: UIKit.UIEvent)
@_Concurrency.MainActor @preconcurrency @objc override dynamic public func ignore(_: UIKit.UIPress, for _: UIKit.UIPressesEvent)
@_Concurrency.MainActor @preconcurrency @objc override dynamic public func shouldRequireFailure(of _: UIKit.UIGestureRecognizer) -> Swift.Bool
@_Concurrency.MainActor @preconcurrency @objc override dynamic public func shouldBeRequiredToFail(by _: UIKit.UIGestureRecognizer) -> Swift.Bool
@_Concurrency.MainActor @preconcurrency @objc override dynamic public func reset()
@_Concurrency.MainActor @preconcurrency @objc override dynamic public func touchesBegan(_ touches: Swift.Set<UIKit.UITouch>, with _: UIKit.UIEvent)
@_Concurrency.MainActor @preconcurrency @objc override dynamic public func touchesCancelled(_ touches: Swift.Set<UIKit.UITouch>, with event: UIKit.UIEvent)
@_Concurrency.MainActor @preconcurrency @objc override dynamic public func touchesEnded(_ touches: Swift.Set<UIKit.UITouch>, with _: UIKit.UIEvent)
@_Concurrency.MainActor @preconcurrency @objc override dynamic public func touchesMoved(_ touches: Swift.Set<UIKit.UITouch>, with _: UIKit.UIEvent)
@_Concurrency.MainActor @preconcurrency @objc public func gestureRecognizer(_: UIKit.UIGestureRecognizer, shouldRecognizeSimultaneouslyWith _: UIKit.UIGestureRecognizer) -> Swift.Bool
@objc deinit
}
extension LogRocket.LogRocketSDK.LogLevel : Swift.Equatable {}
extension LogRocket.LogRocketSDK.LogLevel : Swift.Hashable {}
extension LogRocket.LogRocketSDK.LogLevel : Swift.RawRepresentable {}
extension LogRocket.LookbackType : Swift.Equatable {}
extension LogRocket.LookbackType : Swift.Hashable {}
extension LogRocket.LookbackType : Swift.RawRepresentable {}
extension LogRocket.LifecycleEventType : Swift.Equatable {}
extension LogRocket.LifecycleEventType : Swift.Hashable {}
extension LogRocket.LifecycleEventType : Swift.RawRepresentable {}
extension LogRocket.LogRocketScrollTracker : Swift.Sendable {}
extension LogRocket.SanitizerType : Swift.Equatable {}
extension LogRocket.SanitizerType : Swift.Hashable {}
extension LogRocket.SanitizerType : Swift.RawRepresentable {}

View File

@@ -1,418 +0,0 @@
// swift-interface-format-version: 1.0
// swift-compiler-version: Apple Swift version 6.2 effective-5.10 (swiftlang-6.2.0.19.9 clang-1700.3.19.1)
// swift-module-flags: -target x86_64-apple-ios12.0-simulator -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -O -enable-experimental-feature DebugDescriptionMacro -enable-bare-slash-regex -module-name LogRocket
// swift-module-flags-ignorable: -no-verify-emitted-module-interface -formal-cxx-interoperability-mode=off -interface-compiler-version 6.2
import CommonCrypto
import Dispatch
import Foundation
@_exported import LogRocket
import NaturalLanguage
import ObjectiveC
import QuartzCore
import Swift
import SwiftUI
import UIKit
import WebKit
import _Concurrency
import _StringProcessing
import _SwiftConcurrencyShims
import os
@available(iOS 13.0, *)
extension SwiftUICore.View {
@_Concurrency.MainActor @preconcurrency public func lrAddClass(_ viewSelector: Swift.String) -> some SwiftUICore.View
@_Concurrency.MainActor @preconcurrency public func lrHide() -> some SwiftUICore.View
@_Concurrency.MainActor @preconcurrency public func lrShow() -> some SwiftUICore.View
@_Concurrency.MainActor @preconcurrency public func lrAddClassWithContainer(_ viewSelector: Swift.String) -> some SwiftUICore.View
@_Concurrency.MainActor @preconcurrency public func lrHideWithContainer() -> some SwiftUICore.View
@_Concurrency.MainActor @preconcurrency public func lrShowWithContainer() -> some SwiftUICore.View
}
@objc @_hasMissingDesignatedInitializers @_Concurrency.MainActor @preconcurrency public class LROverlayMarkerUIView : UIKit.UIView {
@_Concurrency.MainActor @preconcurrency @objc override dynamic public func didMoveToWindow()
@objc deinit
}
@objc @_hasMissingDesignatedInitializers @_Concurrency.MainActor @preconcurrency public class LRBackgroundMarkerUIView : UIKit.UIView {
@_Concurrency.MainActor @preconcurrency @objc override dynamic public func didMoveToWindow()
@objc deinit
}
@objc(LRORequestSanitizer) public protocol RequestSanitizer {
#if compiler(>=5.3) && $NonescapableTypes
@objc func sanitize(request: LogRocket.Request) -> LogRocket.Request?
#endif
}
@_hasMissingDesignatedInitializers public class CanvasReplayConfiguration {
public static let minDebounceDelay: Swift.Int
public static let idleMinDebounceDelay: Swift.Int
public static let idleThresholdMs: Swift.Int
public static let maxDebounceDelay: Swift.Int
public static let maxCaptureDuration: Swift.Int
public static let maxTimeoutRetries: Swift.Int
public static let singleBitmapCaptureLimit: Swift.Int
public static let totalBitmapCaptureLimit: Swift.Int
public static let maxUnencodedImageBytes: Swift.Int
@objc deinit
}
@objc @_hasMissingDesignatedInitializers public class RenderableCache : ObjectiveC.NSObject, LogRocket.LRORenderableCache {
@objc public func mark(asDirty obj: any ObjectiveC.NSObjectProtocol)
@objc deinit
}
@_hasMissingDesignatedInitializers @objc(LROResponseBuilder) public class ResponseBuilder : ObjectiveC.NSObject {
@objc public var arsonBody: Swift.String?
@objc public var body: Foundation.Data?
@objc public var headers: [Swift.String : Swift.String]
@objc public var method: Swift.String
@objc final public let reqID: Swift.Int
@objc public var status: Swift.Int
@objc public var url: Swift.String
@objc public var duration: Swift.Double
@objc public func capture(timeOverride: Swift.Double = 0) -> Swift.Bool
@objc public func capture() -> Swift.Bool
@objc deinit
}
@objc(LROTaggedLogger) public class TaggedLogger : ObjectiveC.NSObject {
@objc public init(category: Swift.String)
@objc public func debug(message: Swift.String)
@objc public func info(message: Swift.String)
@objc public func notice(message: Swift.String)
@objc public func error(message: Swift.String)
@objc public func fault(message: Swift.String)
@objc deinit
}
@objc(LROCaptureMessageBuilder) public class CaptureMessageBuilder : ObjectiveC.NSObject {
@objc public init(_ message: Swift.String)
@objc(putTagString:value:) public func putTag(_ key: Swift.String, _ value: Swift.String) -> LogRocket.CaptureMessageBuilder
@objc(putTagBoolean:value:) public func putTag(_ key: Swift.String, _ value: Swift.Bool) -> LogRocket.CaptureMessageBuilder
@objc(putTagDouble:value:) public func putTag(_ key: Swift.String, _ value: Swift.Double) -> LogRocket.CaptureMessageBuilder
@objc(putTagInt:value:) public func putTag(_ key: Swift.String, _ value: Swift.Int) -> LogRocket.CaptureMessageBuilder
@objc(putExtraString:value:) public func putExtra(_ key: Swift.String, _ value: Swift.String) -> LogRocket.CaptureMessageBuilder
@objc(putExtraBoolean:value:) public func putExtra(_ key: Swift.String, _ value: Swift.Bool) -> LogRocket.CaptureMessageBuilder
@objc(putExtraDouble:value:) public func putExtra(_ key: Swift.String, _ value: Swift.Double) -> LogRocket.CaptureMessageBuilder
@objc(putExtraInt:value:) public func putExtra(_ key: Swift.String, _ value: Swift.Int) -> LogRocket.CaptureMessageBuilder
@objc deinit
}
@_inheritsConvenienceInitializers @objc(LROProxyConfigurationBuilder) public class ProxyConfigurationBuilder : ObjectiveC.NSObject {
@objc public func proxyUsername(_ username: Swift.String)
@objc public func proxyPassword(_ password: Swift.String)
@objc public func httpEnable(_ enable: Swift.Bool)
@objc public func httpProxy(_ proxy: Swift.String)
@objc public func httpPort(_ port: Swift.Int)
@objc override dynamic public init()
@objc deinit
}
@_hasMissingDesignatedInitializers public class FlutterTouchEncoder {
public static func encode(x: Swift.Double, y: Swift.Double, text: Swift.String, nodeNames: [Swift.String], motionType: Swift.Int, timestamp: Swift.Double, moves: [Swift.Dictionary<Swift.String, Swift.Double>], url: Swift.String)
@objc deinit
}
@_inheritsConvenienceInitializers @_hasMissingDesignatedInitializers @objc(LROLogHandler) public class LogHandler : ObjectiveC.NSObject {
@objc public class func swift_load()
@objc deinit
}
public let systemViews: [Swift.String]
@_hasMissingDesignatedInitializers @objc(LROApplicationLifecycleObserver) public class ApplicationLifecycleObserver : ObjectiveC.NSObject, LogRocket.LifecycleDelegate {
@objc public func viewControllerDidAppear(_ viewController: UIKit.UIViewController)
public func restoreViewFromLastSession()
@objc public func viewControllerDidDisappear(_ viewController: UIKit.UIViewController)
@objc deinit
}
@_inheritsConvenienceInitializers @_hasMissingDesignatedInitializers @objc(LROSDK) public class LogRocketSDK : ObjectiveC.NSObject {
@objc public static func initializeInternal(configuration: LogRocket.Configuration) -> Swift.Bool
@objc public static func initialize(configuration: LogRocket.Configuration)
@objc public static func addLog(level: Swift.String, args: [Swift.String])
@available(*, deprecated, message: "Helper for capturing properly encoded exception data. This method is deprecated, exceptions should be captured with Logger.captureException instead.")
@objc public static func captureException(errorMessage: Swift.String, errorType: Swift.String, exceptionType: Swift.String, stackTrace: Swift.String)
@objc public static func captureException(error: Foundation.NSError)
@objc public static func captureException(exception: Foundation.NSException)
@objc public static func captureMessage(_ builder: LogRocket.CaptureMessageBuilder)
@objc public static func captureReduxAction(action: Swift.String, storeId: Foundation.NSNumber, duration: Foundation.NSNumber, stateDelta: Swift.String, count: Foundation.NSNumber)
@objc public static func captureReduxInitialState(state: Swift.String, storeId: Foundation.NSNumber)
@objc public static func rebuildMessage(_ messageArray: Foundation.NSMutableArray)
@objc public static func getSessionURL(_ completion: @escaping (Swift.String) -> Swift.Void)
@objc public static func getSessionURLStatus(_ completion: @escaping (Swift.String) -> Swift.Void)
#if compiler(>=5.3) && $NonescapableTypes
@objc public static func identify(userID: Swift.String, userInfo: [Swift.String : Swift.String]? = nil)
#endif
#if compiler(>=5.3) && $NonescapableTypes
@objc public static func identifyAsAnonymous(userID: Swift.String, userInfo: [Swift.String : Swift.String]? = nil)
#endif
#if compiler(>=5.3) && $NonescapableTypes
@objc public static func newRequestBuilder() -> LogRocket.RequestBuilder?
#endif
@objc public static func pauseViewCapture()
@objc public static func isViewCapturePaused() -> Swift.Bool
#if compiler(>=5.3) && $NonescapableTypes
@objc public static func shutDownCurrentSession(hardShutdown: Swift.Bool = false, purgeSession: Swift.Bool = false, shutdownReason: Swift.String? = nil)
#endif
#if compiler(>=5.3) && $NonescapableTypes
@objc(startNewSessionNoConfig:) public static func startNewSession(handler: ((Swift.Bool) -> Swift.Void)? = nil)
#endif
#if compiler(>=5.3) && $NonescapableTypes
@objc(startNewSessionWithConfiguration:handler:) public static func startNewSession(configuration: LogRocket.Configuration, handler: ((Swift.Bool) -> Swift.Void)? = nil)
#endif
@objc public static func endSession()
@objc public static func shutdown()
@objc public static func hardShutdown()
@objc public static func track(_ builder: LogRocket.CustomEventBuilder)
@objc public static func tagPage(_ relativePage: Swift.String)
@objc public static func unpauseViewCapture()
@objc public static func captureSingleView()
@objc public static func viewControllerDidAppear(_ controller: UIKit.UIViewController)
@objc public static func viewControllerDidDisappear(_ controller: UIKit.UIViewController)
@objc public static func registerWebView(_ webView: WebKit.WKWebView)
@objc public static func isInitialized() -> Swift.Bool
@objc public static func redactView(_ view: UIKit.UIView)
@objc public static func allowView(_ view: UIKit.UIView)
#if compiler(>=5.3) && $NonescapableTypes
@objc public static func setReactNativeNetworkSanitizers(requestSanitizer: (any LogRocket.RequestSanitizer)? = nil, responseSanitizer: (any LogRocket.ResponseSanitizer)? = nil)
#endif
@objc public enum LogLevel : Swift.Int {
case FAULT = 5
case ERROR = 4
case NOTICE = 3
case INFO = 2
case DEBUG = 1
case VERBOSE = 0
#if compiler(>=5.3) && $NonescapableTypes
public init?(rawValue: Swift.Int)
#endif
public typealias RawValue = Swift.Int
public var rawValue: Swift.Int {
get
}
}
@objc public static func logLevelFromString(_ logLevel: Swift.String) -> LogRocket.LogRocketSDK.LogLevel
@objc deinit
}
@available(*, deprecated, message: "Use LogRocketSDK instead.")
public typealias SDK = LogRocket.LogRocketSDK
@objc(LROLifecycleDelegate) public protocol LifecycleDelegate {
@objc func viewControllerDidAppear(_: UIKit.UIViewController)
@objc func viewControllerDidDisappear(_: UIKit.UIViewController)
}
@objc(LROCustomEventBuilder) public class CustomEventBuilder : ObjectiveC.NSObject {
@objc public init(_ name: Swift.String)
@objc public func putRevenue(_ value: Swift.Double)
@objc(putString:value:) public func put(_ key: Swift.String, _ value: Swift.String)
@objc(putStringArray:value:) public func put(_ key: Swift.String, _ value: [Swift.String])
@objc(putDouble:value:) public func put(_ key: Swift.String, _ value: Swift.Double)
@objc(putDoubleArray:value:) public func put(_ key: Swift.String, _ value: [Swift.Double])
@objc(putBool:value:) public func put(_ key: Swift.String, _ value: Swift.Bool)
@objc(putBoolArray:value:) public func put(_ key: Swift.String, _ value: [Swift.Bool])
@objc deinit
}
@_hasMissingDesignatedInitializers public class FrameProcessTimer {
public func elapsed() -> Swift.Int64
public func hasTakenTooLong(caller: Swift.String = #function) -> Swift.Bool
public func end()
public func getWireFrameMode() -> Swift.Bool
@objc deinit
}
@_hasMissingDesignatedInitializers public class ScreenshotViewEncoder {
#if compiler(>=5.3) && $NonescapableTypes
public static func captureScreenshot(bitmapId: Swift.Int, imageBytes: Foundation.Data?, x: Swift.Int, y: Swift.Int, width: Swift.Int, height: Swift.Int)
#endif
@objc deinit
}
@objc(LROResponseSanitizer) public protocol ResponseSanitizer {
#if compiler(>=5.3) && $NonescapableTypes
@objc func sanitize(response: LogRocket.Response) -> LogRocket.Response?
#endif
}
public enum LookbackType : Swift.String {
case NONE
case LIMITED
case FULL
#if compiler(>=5.3) && $NonescapableTypes
public init?(rawValue: Swift.String)
#endif
public typealias RawValue = Swift.String
public var rawValue: Swift.String {
get
}
}
@_inheritsConvenienceInitializers @objc(LROCrashReportUploader) public class CrashReportUploader : ObjectiveC.NSObject {
@objc public func upload(crashReportDirectory: Foundation.URL)
@objc override dynamic public init()
@objc deinit
}
@_inheritsConvenienceInitializers @objc(LROLogger) public class Logger : ObjectiveC.NSObject {
@objc public static func debug(message: Swift.String)
@objc public static func info(message: Swift.String)
@objc public static func error(message: Swift.String)
@objc public static func warning(message: Swift.String)
#if compiler(>=5.3) && $NonescapableTypes
@objc public static func captureCrash(reason: Swift.String, errorType: Swift.String, callStackSymbols: [Swift.String]?)
#endif
@objc public static func captureException(exception: Foundation.NSException)
@objc public static func captureException(error: Foundation.NSError)
public static func captureException(error: any Swift.Error)
@objc override dynamic public init()
@objc deinit
}
@objc public enum LifecycleEventType : Swift.Int {
case viewAppeared
case viewDisappeared
case pageTag
case unrecognized
#if compiler(>=5.3) && $NonescapableTypes
public init?(rawValue: Swift.Int)
#endif
public typealias RawValue = Swift.Int
public var rawValue: Swift.Int {
get
}
}
@_inheritsConvenienceInitializers @objc(LROLifecycleManager) public class LifecycleManager : ObjectiveC.NSObject {
@objc public static func captureEvent(base: Swift.String, path: Swift.String, lifecycleType: LogRocket.LifecycleEventType) throws
@objc override dynamic public init()
@objc deinit
}
@objc(LROConfiguration) public class Configuration : ObjectiveC.NSObject {
final public let appID: Swift.String
@objc public var serverURL: Swift.String
@objc public var allowTags: Foundation.NSMutableSet
@objc public var redactionTags: Foundation.NSMutableSet
@objc public var inputRedactionTags: Foundation.NSMutableSet
@objc public var textSanitizer: LogRocket.SanitizerType
@objc public var redactMenus: Swift.Bool
@objc public var captureRedactedViewTouches: Swift.Bool
@objc public var viewScanningEnabled: Swift.Bool
@objc public var networkCaptureEnabled: Swift.Bool
@objc public var logCaptureEnabled: Swift.Bool
@objc public var requestSanitizer: (any LogRocket.RequestSanitizer)?
@objc public var responseSanitizer: (any LogRocket.ResponseSanitizer)?
@objc public var registerTouchHandlers: Swift.Bool
@objc public var scaleFactor: CoreFoundation.CGFloat {
@objc get
@objc set
}
@objc public var ipCaptureEnabled: Swift.Bool
@objc public var persistenceEnabled: Swift.Bool
@objc public var bufferTimeoutSeconds: Swift.UInt32
@objc public var uploadIntervalMs: Swift.Int
@objc public var proxyConfiguration: LogRocket.ProxyConfigurationBuilder
@objc public var experimentalBidiCapture: Swift.Bool
@objc public var disableScrollDelegate: Swift.Bool
@objc public var forceCleanStart: Swift.Bool
@objc public var throughputTrackingEnabled: Swift.Bool
@objc public var extendedViewTextCaptureEnabled: Swift.Bool
@objc public var updateId: Swift.String
@objc public var expoChannel: Swift.String
@objc public var logLevel: LogRocket.LogRocketSDK.LogLevel
@objc public var requestHttpBodyStreamCaptureEnabled: Swift.Bool
@objc public var isReactNative: Swift.Bool
@objc public var isRNNewArchEnabled: Swift.Bool
@objc public var requireRNNetworkSanitizer: Swift.Bool
@objc public var isFlutter: Swift.Bool
@available(*, deprecated, message: "**WARNING**\nChanging this setting may result in highly limited capture or causing the app to hang for extreme lengths of time. Proceed at your own risk!\n\nSpecifies, in milliseconds, how long the LogRocket SDK should attempt to capture a view before timing out to prevent the app from hanging.")
@objc public var viewCaptureTimeoutThreshold: Swift.Int
@objc public var viewCaptureAdditionalWireframeDuration: Swift.Int
@objc public var enableAutomaticLifecycleCapture: Swift.Bool
@objc public var unexpectedExceptionCaptureEnabled: Swift.Bool
@objc public var networkCaptureRedactedOrigins: Foundation.NSMutableSet
@objc public var lottieCaptureEnabled: Swift.Bool
@objc public var maxCapturedIosVersion: Swift.Int
@objc public var requestDebugLoggingEnabled: Swift.Bool
@objc public var enableViewCaptureV2: Swift.Bool
@objc public var reduceViewCaptureBandwidthWhenIdle: Swift.Bool
@objc public init(appID: Swift.String)
#if compiler(>=5.3) && $NonescapableTypes
convenience public init(appID: Swift.String, serverURL: Swift.String = "https://r.lr-intake.com/i", allowTags: [Swift.String] = [], redactionTags: [Swift.String] = [], inputRedactionTags: [Swift.String] = [], textSanitizer: LogRocket.SanitizerType = .none, redactMenus: Swift.Bool = false, viewScanningEnabled: Swift.Bool = true, networkCaptureEnabled: Swift.Bool = true, logCaptureEnabled: Swift.Bool = true, requestSanitizer: (any LogRocket.RequestSanitizer)? = nil, responseSanitizer: (any LogRocket.ResponseSanitizer)? = nil, registerTouchHandlers: Swift.Bool = true, ipCaptureEnabled: Swift.Bool = true, scaleFactor: CoreFoundation.CGFloat? = nil, persistenceEnabled: Swift.Bool = true, bufferTimeoutSeconds: Swift.UInt32 = 60, uploadIntervalMs: Swift.Int = 30000, proxyConfigurationBuilder: LogRocket.ProxyConfigurationBuilder? = nil, experimentalBidiCapture: Swift.Bool = false, disableScrollDelegate: Swift.Bool = false, forceCleanStart: Swift.Bool = false, throughputTrackingEnabled: Swift.Bool = true, extendedViewTextCaptureEnabled: Swift.Bool = true, captureRedactedViewTouches: Swift.Bool = true, updateId: Swift.String = "", expoChannel: Swift.String = "", logLevel: LogRocket.LogRocketSDK.LogLevel = LogRocketSDK.LogLevel.INFO, requestHttpBodyStreamCaptureEnabled: Swift.Bool = true, viewCaptureTimeoutThreshold: Swift.Int = CanvasReplayConfiguration.maxCaptureDuration, viewCaptureAdditionalWireframeDuration: Swift.Int = 20, enableAutomaticLifecycleCapture: Swift.Bool = true, unexpectedExceptionCaptureEnabled: Swift.Bool = true, networkCaptureRedactedOrigins: [Swift.String] = [], lottieCaptureEnabled: Swift.Bool = false, maxCapturedIosVersion: Swift.Int = -1, requestDebugLoggingEnabled: Swift.Bool = false, enableViewCaptureV2: Swift.Bool = true, reduceViewCaptureBandwidthWhenIdle: Swift.Bool = true)
#endif
@objc deinit
}
@objc(LRORequest) public class Request : ObjectiveC.NSObject {
@objc public var arsonBody: Swift.String?
@objc public var body: Foundation.Data?
@objc public var headers: [Swift.String : Swift.String]?
@objc final public let method: Swift.String
@objc final public let reqID: Swift.Int
@objc public var url: Swift.String?
public init(method: Swift.String, reqID: Swift.Int)
#if compiler(>=5.3) && $NonescapableTypes
convenience public init(arsonBody: Swift.String? = nil, body: Foundation.Data? = nil, headers: [Swift.String : Swift.String], method: Swift.String, reqID: Swift.Int, url: Swift.String)
#endif
@objc deinit
}
extension UIKit.UIDevice {
@_Concurrency.MainActor @preconcurrency public static let modelName: Swift.String
}
@_inheritsConvenienceInitializers @objc(LROScrollTracker) @_Concurrency.MainActor @preconcurrency public class LogRocketScrollTracker : ObjectiveC.NSObject, UIKit.UIScrollViewDelegate {
@_Concurrency.MainActor @preconcurrency @objc public func scrollViewWillBeginDragging(_ view: UIKit.UIScrollView)
@_Concurrency.MainActor @preconcurrency @objc public func scrollViewDidEndDecelerating(_ view: UIKit.UIScrollView)
@_Concurrency.MainActor @preconcurrency @objc public func scrollViewDidEndDragging(_ view: UIKit.UIScrollView, willDecelerate decelerate: Swift.Bool)
@_Concurrency.MainActor @preconcurrency @objc override dynamic public init()
@objc deinit
}
@objc(LROSanitizerType) public enum SanitizerType : Swift.Int {
case excluded
case none
#if compiler(>=5.3) && $NonescapableTypes
public init?(rawValue: Swift.Int)
#endif
public typealias RawValue = Swift.Int
public var rawValue: Swift.Int {
get
}
}
@_hasMissingDesignatedInitializers @objc(LROCustomEvent) public class CustomEvent : ObjectiveC.NSObject {
@objc deinit
}
@objc(LROResponse) public class Response : ObjectiveC.NSObject {
@objc public var arsonBody: Swift.String?
@objc public var body: Foundation.Data?
@objc public var headers: [Swift.String : Swift.String]?
@objc final public let method: Swift.String
@objc final public let reqID: Swift.Int
@objc final public let status: Swift.UInt32
@objc public var url: Swift.String?
public init(method: Swift.String, reqID: Swift.Int, status: Swift.UInt32)
#if compiler(>=5.3) && $NonescapableTypes
convenience public init(arsonBody: Swift.String? = nil, body: Foundation.Data? = nil, headers: [Swift.String : Swift.String], method: Swift.String, reqID: Swift.Int, status: Swift.UInt32, url: Swift.String)
#endif
@objc deinit
}
@_hasMissingDesignatedInitializers @objc(LRORequestBuilder) public class RequestBuilder : ObjectiveC.NSObject {
@objc public var arsonBody: Swift.String?
@objc public var body: Foundation.Data?
@objc public var headers: [Swift.String : Swift.String]
@objc public var method: Swift.String?
@objc final public let reqID: Swift.Int
@objc public var url: Swift.String?
#if compiler(>=5.3) && $NonescapableTypes
@objc public func capture(timeOverride: Swift.Double = 0) -> LogRocket.ResponseBuilder?
#endif
@objc deinit
}
@_hasMissingDesignatedInitializers @objc(LROTouchShim) @_Concurrency.MainActor @preconcurrency public class TouchShim : UIKit.UIGestureRecognizer, UIKit.UIGestureRecognizerDelegate {
@_Concurrency.MainActor @preconcurrency @objc override dynamic public func canBePrevented(by _: UIKit.UIGestureRecognizer) -> Swift.Bool
@_Concurrency.MainActor @preconcurrency @objc override dynamic public func canPrevent(_: UIKit.UIGestureRecognizer) -> Swift.Bool
@_Concurrency.MainActor @preconcurrency @objc override dynamic public func ignore(_: UIKit.UITouch, for _: UIKit.UIEvent)
@_Concurrency.MainActor @preconcurrency @objc override dynamic public func ignore(_: UIKit.UIPress, for _: UIKit.UIPressesEvent)
@_Concurrency.MainActor @preconcurrency @objc override dynamic public func shouldRequireFailure(of _: UIKit.UIGestureRecognizer) -> Swift.Bool
@_Concurrency.MainActor @preconcurrency @objc override dynamic public func shouldBeRequiredToFail(by _: UIKit.UIGestureRecognizer) -> Swift.Bool
@_Concurrency.MainActor @preconcurrency @objc override dynamic public func reset()
@_Concurrency.MainActor @preconcurrency @objc override dynamic public func touchesBegan(_ touches: Swift.Set<UIKit.UITouch>, with _: UIKit.UIEvent)
@_Concurrency.MainActor @preconcurrency @objc override dynamic public func touchesCancelled(_ touches: Swift.Set<UIKit.UITouch>, with event: UIKit.UIEvent)
@_Concurrency.MainActor @preconcurrency @objc override dynamic public func touchesEnded(_ touches: Swift.Set<UIKit.UITouch>, with _: UIKit.UIEvent)
@_Concurrency.MainActor @preconcurrency @objc override dynamic public func touchesMoved(_ touches: Swift.Set<UIKit.UITouch>, with _: UIKit.UIEvent)
@_Concurrency.MainActor @preconcurrency @objc public func gestureRecognizer(_: UIKit.UIGestureRecognizer, shouldRecognizeSimultaneouslyWith _: UIKit.UIGestureRecognizer) -> Swift.Bool
@objc deinit
}
extension LogRocket.LogRocketSDK.LogLevel : Swift.Equatable {}
extension LogRocket.LogRocketSDK.LogLevel : Swift.Hashable {}
extension LogRocket.LogRocketSDK.LogLevel : Swift.RawRepresentable {}
extension LogRocket.LookbackType : Swift.Equatable {}
extension LogRocket.LookbackType : Swift.Hashable {}
extension LogRocket.LookbackType : Swift.RawRepresentable {}
extension LogRocket.LifecycleEventType : Swift.Equatable {}
extension LogRocket.LifecycleEventType : Swift.Hashable {}
extension LogRocket.LifecycleEventType : Swift.RawRepresentable {}
extension LogRocket.LogRocketScrollTracker : Swift.Sendable {}
extension LogRocket.SanitizerType : Swift.Equatable {}
extension LogRocket.SanitizerType : Swift.Hashable {}
extension LogRocket.SanitizerType : Swift.RawRepresentable {}

View File

@@ -1,11 +0,0 @@
framework module LogRocket {
umbrella header "LogRocket.h"
export *
module * { export * }
}
module LogRocket.Swift {
header "LogRocket-Swift.h"
requires objc
}

View File

@@ -1,14 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>NSPrivacyTracking</key>
<false/>
<key>NSPrivacyAccessedAPITypes</key>
<array/>
<key>NSPrivacyCollectedDataTypes</key>
<array/>
<key>NSPrivacyTrackingDomains</key>
<array/>
</dict>
</plist>

View File

@@ -1,411 +0,0 @@
/**
The MIT License (MIT)
Copyright (c) 2015 Sentry
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#import <Foundation/Foundation.h>
#pragma mark - Macros Based API
/// A macro for wrapping the return type of the swizzled method.
#define LogRocketSWReturnType(type) type
/// A macro for wrapping arguments of the swizzled method.
#define LogRocketSWArguments(arguments...) _LogRocketSWArguments(arguments)
/// A macro for wrapping the replacement code for the swizzled method.
#define LogRocketSWReplacement(code...) code
/// A macro for casting and calling original implementation.
/// May be used only in LogRocketSwizzleInstanceMethod or LogRocketSwizzleClassMethod
/// macros.
#define LogRocketSWCallOriginal(arguments...) _LogRocketSWCallOriginal(arguments)
#pragma mark └ Swizzle Instance Method
/**
Swizzles the instance method of the class with the new implementation.
Example for swizzling `-(int)calculate:(int)number;` method:
@code
LogRocketSwizzleInstanceMethod(classToSwizzle,
@selector(calculate:),
LogRocketSWReturnType(int),
LogRocketSWArguments(int number),
LogRocketSWReplacement(
{
// Calling original implementation.
int res = LogRocketSWCallOriginal(number);
// Returning modified return value.
return res + 1;
}), 0, NULL);
@endcode
Swizzling frequently goes along with checking whether this particular class (or
one of its superclasses) has been already swizzled. Here the
`LogRocketSwizzleMode` and `key` parameters can help. See +[LogRocketSwizzle
swizzleInstanceMethod:inClass:newImpFactory:mode:key:] for details.
Swizzling is fully thread-safe.
@param classToSwizzle The class with the method that should be swizzled.
@param selector Selector of the method that should be swizzled.
@param LogRocketSWReturnType The return type of the swizzled method wrapped in the
LogRocketSWReturnType macro.
@param LogRocketSWArguments The arguments of the swizzled method wrapped in the
LogRocketSWArguments macro.
@param LogRocketSWReplacement The code of the new implementation of the swizzled
method wrapped in the LogRocketSWReplacement macro.
@param LogRocketSwizzleMode The mode is used in combination with the key to
indicate whether the swizzling should be done for the given class. You can pass
0 for LogRocketSwizzleModeAlways.
@param key The key is used in combination with the mode to indicate whether the
swizzling should be done for the given class. May be NULL if the mode is
LogRocketSwizzleModeAlways.
@return YES if successfully swizzled and NO if swizzling has been already done
for given key and class (or one of superclasses, depends on the mode).
*/
#define LogRocketSwizzleInstanceMethod(classToSwizzle, selector, LogRocketSWReturnType, \
LogRocketSWArguments, LogRocketSWReplacement, LogRocketSwizzleMode, key) \
_LogRocketSwizzleInstanceMethod(classToSwizzle, selector, LogRocketSWReturnType, \
_LogRocketSWWrapArg(LogRocketSWArguments), _LogRocketSWWrapArg(LogRocketSWReplacement), \
LogRocketSwizzleMode, key)
#pragma mark └ Swizzle Class Method
/**
Swizzles the class method of the class with the new implementation.
Example for swizzling `+(int)calculate:(int)number;` method:
@code
LogRocketSwizzleClassMethod(classToSwizzle,
@selector(calculate:),
LogRocketSWReturnType(int),
LogRocketSWArguments(int number),
LogRocketSWReplacement(
{
// Calling original implementation.
int res = LogRocketSWCallOriginal(number);
// Returning modified return value.
return res + 1;
}));
@endcode
Swizzling is fully thread-safe.
@param classToSwizzle The class with the method that should be swizzled.
@param selector Selector of the method that should be swizzled.
@param LogRocketSWReturnType The return type of the swizzled method wrapped in the
LogRocketSWReturnType macro.
@param LogRocketSWArguments The arguments of the swizzled method wrapped in the
LogRocketSWArguments macro.
@param LogRocketSWReplacement The code of the new implementation of the swizzled
method wrapped in the LogRocketSWReplacement macro.
*/
#define LogRocketSwizzleClassMethod( \
classToSwizzle, selector, LogRocketSWReturnType, LogRocketSWArguments, LogRocketSWReplacement) \
_LogRocketSwizzleClassMethod(classToSwizzle, selector, LogRocketSWReturnType, \
_LogRocketSWWrapArg(LogRocketSWArguments), _LogRocketSWWrapArg(LogRocketSWReplacement))
#pragma mark - Main API
/**
A function pointer to the original implementation of the swizzled method.
*/
typedef void (*LogRocketSwizzleOriginalIMP)(void /* id, SEL, ... */);
/**
LogRocketSwizzleInfo is used in the new implementation block to get and call
original implementation of the swizzled method.
*/
@interface LogRocketSwizzleInfo : NSObject
/**
Returns the original implementation of the swizzled method.
It is actually either an original implementation if the swizzled class
implements the method itself; or a super implementation fetched from one of the
superclasses.
@note You must always cast returned implementation to the appropriate function
pointer when calling.
@return A function pointer to the original implementation of the swizzled
method.
*/
- (LogRocketSwizzleOriginalIMP)getOriginalImplementation;
/// The selector of the swizzled method.
@property (nonatomic, readonly) SEL selector;
#if TEST
// A flag to check whether the original implementation was called.
@property (nonatomic) BOOL originalCalled;
#endif
@end
/**
A factory block returning the block for the new implementation of the swizzled
method.
You must always obtain original implementation with swizzleInfo and call it
from the new implementation.
@param swizzleInfo An info used to get and call the original implementation of
the swizzled method.
@return A block that implements a method.
Its signature should be: `method_return_type ^(id self, method_args...)`.
The selector is not available as a parameter to this block.
*/
typedef id (^LogRocketSwizzleImpFactoryBlock)(LogRocketSwizzleInfo *swizzleInfo);
typedef NS_ENUM(NSUInteger, LogRocketSwizzleMode) {
/// LogRocketSwizzle always does swizzling.
LogRocketSwizzleModeAlways = 0,
/// LogRocketSwizzle does not do swizzling if the same class has been swizzled
/// earlier with the same key.
LogRocketSwizzleModeOncePerClass = 1,
/// LogRocketSwizzle does not do swizzling if the same class or one of its
/// superclasses have been swizzled earlier with the same key.
/// @note There is no guarantee that your implementation will be called only
/// once per method call. If the order of swizzling is: first inherited
/// class, second superclass, then both swizzlings will be done and the new
/// implementation will be called twice.
LogRocketSwizzleModeOncePerClassAndSuperclasses = 2
};
@interface LogRocketSwizzle : NSObject
#pragma mark └ Swizzle Instance Method
/**
Swizzles the instance method of the class with the new implementation.
Original implementation must always be called from the new implementation. And
because of the the fact that for safe and robust swizzling original
implementation must be dynamically fetched at the time of calling and not at
the time of swizzling, swizzling API is a little bit complicated.
You should pass a factory block that returns the block for the new
implementation of the swizzled method. And use swizzleInfo argument to retrieve
and call original implementation.
Example for swizzling `-(int)calculate:(int)number;` method:
@code
SEL selector = @selector(calculate:);
[LogRocketSwizzle
swizzleInstanceMethod:selector
inClass:classToSwizzle
newImpFactory:^id(LogRocketSwizzleInfo *swizzleInfo) {
// This block will be used as the new implementation.
return ^int(__unsafe_unretained id self, int num){
// You MUST always cast implementation to the correct function
pointer. int (*originalIMP)(__unsafe_unretained id, SEL, int); originalIMP =
(__typeof(originalIMP))[swizzleInfo getOriginalImplementation];
// Calling original implementation.
int res = originalIMP(self,selector,num);
// Returning modified return value.
return res + 1;
};
}
mode:LogRocketSwizzleModeAlways
key:NULL];
@endcode
Swizzling frequently goes along with checking whether this particular class (or
one of its superclasses) has been already swizzled. Here the `mode` and `key`
parameters can help.
Here is an example of swizzling `-(void)dealloc;` only in case when neither
class and no one of its superclasses has been already swizzled with our key.
However "Deallocating ..." message still may be logged multiple times per
method call if swizzling was called primarily for an inherited class and later
for one of its superclasses.
@code
static const void *key = &key;
SEL selector = NSSelectorFromString(@"dealloc");
[LogRocketSwizzle
swizzleInstanceMethod:selector
inClass:classToSwizzle
newImpFactory:^id(LogRocketSwizzleInfo *swizzleInfo) {
return ^void(__unsafe_unretained id self){
NSLog(@"Deallocating %@.",self);
void (*originalIMP)(__unsafe_unretained id, SEL);
originalIMP = (__typeof(originalIMP))[swizzleInfo
getOriginalImplementation]; originalIMP(self,selector);
};
}
mode:LogRocketSwizzleModeOncePerClassAndSuperclasses
key:key];
@endcode
Swizzling is fully thread-safe.
@param selector Selector of the method that should be swizzled.
@param classToSwizzle The class with the method that should be swizzled.
@param factoryBlock The factory block returning the block for the new
implementation of the swizzled method.
@param mode The mode is used in combination with the key to indicate whether
the swizzling should be done for the given class.
@param key The key is used in combination with the mode to indicate whether the
swizzling should be done for the given class. May be NULL if the mode is
LogRocketSwizzleModeAlways.
@return YES if successfully swizzled and NO if swizzling has been already done
for given key and class (or one of superclasses, depends on the mode).
*/
+ (BOOL)swizzleInstanceMethod:(SEL)selector
inClass:(Class)classToSwizzle
newImpFactory:(LogRocketSwizzleImpFactoryBlock)factoryBlock
mode:(LogRocketSwizzleMode)mode
key:(const void *)key;
#pragma mark └ Swizzle Class method
/**
Swizzles the class method of the class with the new implementation.
Original implementation must always be called from the new implementation. And
because of the the fact that for safe and robust swizzling original
implementation must be dynamically fetched at the time of calling and not at
the time of swizzling, swizzling API is a little bit complicated.
You should pass a factory block that returns the block for the new
implementation of the swizzled method. And use swizzleInfo argument to retrieve
and call original implementation.
Example for swizzling `+(int)calculate:(int)number;` method:
@code
SEL selector = @selector(calculate:);
[LogRocketSwizzle
swizzleClassMethod:selector
inClass:classToSwizzle
newImpFactory:^id(LogRocketSwizzleInfo *swizzleInfo) {
// This block will be used as the new implementation.
return ^int(__unsafe_unretained id self, int num){
// You MUST always cast implementation to the correct function
pointer. int (*originalIMP)(__unsafe_unretained id, SEL, int); originalIMP =
(__typeof(originalIMP))[swizzleInfo getOriginalImplementation];
// Calling original implementation.
int res = originalIMP(self,selector,num);
// Returning modified return value.
return res + 1;
};
}];
@endcode
Swizzling is fully thread-safe.
@param selector Selector of the method that should be swizzled.
@param classToSwizzle The class with the method that should be swizzled.
@param factoryBlock The factory block returning the block for the new
implementation of the swizzled method.
*/
+ (void)swizzleClassMethod:(SEL)selector
inClass:(Class)classToSwizzle
newImpFactory:(LogRocketSwizzleImpFactoryBlock)factoryBlock;
@end
#pragma mark - Implementation details
// Do not write code that depends on anything below this line.
// Wrapping arguments to pass them as a single argument to another macro.
#define _LogRocketSWWrapArg(args...) args
#define _LogRocketSWDel2Arg(a1, a2, args...) a1, ##args
#define _LogRocketSWDel3Arg(a1, a2, a3, args...) a1, a2, ##args
// To prevent comma issues if there are no arguments we add one dummy argument
// and remove it later.
#define _LogRocketSWArguments(arguments...) DEL, ##arguments
#if TEST
# define _LogRocketSWReplacement(code...) \
@try { \
code \
} @finally { \
if (!swizzleInfo.originalCalled) \
@throw([NSException exceptionWithName:@"SwizzlingError" \
reason:@"Original method not called" \
userInfo:nil]); \
}
#else
# define _LogRocketSWReplacement(code...) code
#endif
#define _LogRocketSwizzleInstanceMethod(classToSwizzle, selector, LogRocketSWReturnType, \
LogRocketSWArguments, LogRocketSWReplacement, LogRocketSwizzleMode, KEY) \
[LogRocketSwizzle \
swizzleInstanceMethod:selector \
inClass:[classToSwizzle class] \
newImpFactory:^id(LogRocketSwizzleInfo *swizzleInfo) { \
LogRocketSWReturnType (*originalImplementation_)( \
_LogRocketSWDel3Arg(__unsafe_unretained id, SEL, LogRocketSWArguments)); \
SEL selector_ = selector; \
return ^LogRocketSWReturnType(_LogRocketSWDel2Arg(__unsafe_unretained id self, \
LogRocketSWArguments)) { _LogRocketSWReplacement(LogRocketSWReplacement) }; \
} \
mode:LogRocketSwizzleMode \
key:KEY];
#define _LogRocketSwizzleClassMethod( \
classToSwizzle, selector, LogRocketSWReturnType, LogRocketSWArguments, LogRocketSWReplacement) \
[LogRocketSwizzle \
swizzleClassMethod:selector \
inClass:[classToSwizzle class] \
newImpFactory:^id(LogRocketSwizzleInfo *swizzleInfo) { \
LogRocketSWReturnType (*originalImplementation_)( \
_LogRocketSWDel3Arg(__unsafe_unretained id, SEL, LogRocketSWArguments)); \
SEL selector_ = selector; \
return ^LogRocketSWReturnType(_LogRocketSWDel2Arg(__unsafe_unretained id self, \
LogRocketSWArguments)) { _LogRocketSWReplacement(LogRocketSWReplacement) }; \
}];
#define _LogRocketSWCallOriginal(arguments...) \
((__typeof(originalImplementation_))[swizzleInfo getOriginalImplementation])( \
self, selector_, ##arguments)

View File

@@ -1,608 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>files</key>
<dict>
<key>Headers/LROAppStartTracker.h</key>
<data>
uZ0hOc2037Vz3saFIzOu76+8Rtg=
</data>
<key>Headers/LROBinaryObjects.h</key>
<data>
NH8mAzvFdPRNCJClg5RZBQLWYv0=
</data>
<key>Headers/LROCLogger.h</key>
<data>
OUd92PqqsmcRHCz8+EN8xkgQzfI=
</data>
<key>Headers/LROCPU.h</key>
<data>
nGp9iRiuB16GAmwfXsN8G9BBn0U=
</data>
<key>Headers/LROCPU_Apple.h</key>
<data>
calNpk+1QMuFiohz7H3ZuOjeevc=
</data>
<key>Headers/LROCrashC.h</key>
<data>
XIAkNeZpOmG28xuX35rSxKSaeuc=
</data>
<key>Headers/LROCrashMonitor.h</key>
<data>
ryDbxAb4P+UinOAdCP9rTG9gNfA=
</data>
<key>Headers/LROCrashMonitorContext.h</key>
<data>
CeyU+Nq39hynYkRcQ+zPrw669F0=
</data>
<key>Headers/LROCrashMonitorEventCallback.h</key>
<data>
mRtO6yiH3u7NLvXZMaDU9wzcpxU=
</data>
<key>Headers/LROCrashMonitorType.h</key>
<data>
unxh+uI5MYlMg1sG5u0bVPP2IWI=
</data>
<key>Headers/LROCrashMonitor_CPPException.h</key>
<data>
1y28mwAb44nUYM2xI+ohf0dmIj0=
</data>
<key>Headers/LROCrashMonitor_MachException.h</key>
<data>
s3/4EficZM+jHCc774rI1J65e9U=
</data>
<key>Headers/LROCrashReportC.h</key>
<data>
qXpL0wx3s0E1uH90zFYLlLmt2Hw=
</data>
<key>Headers/LROCrashReportFields.h</key>
<data>
3N8TZvKtEgjSZ1J88K6PdHWbTOw=
</data>
<key>Headers/LROCrashReportWriter.h</key>
<data>
iD8HKZBv+0MckuD0JXH/Ltxo0RM=
</data>
<key>Headers/LRODebug.h</key>
<data>
K3+UeXooHMooHuucyER1+MyabeE=
</data>
<key>Headers/LROException.h</key>
<data>
XDuHhBKoKlTyRc+fFJGN1A7DZ8E=
</data>
<key>Headers/LROFileUtils.h</key>
<data>
fYwfcntqQb6f43m5qhodD7/fvno=
</data>
<key>Headers/LROJSONCodec.h</key>
<data>
eeLrby6AITLiYjTDao2Ahig3e28=
</data>
<key>Headers/LROMach.h</key>
<data>
Xw2vxwS8/QeP4I6l4nsLrinsneM=
</data>
<key>Headers/LROMachineContext.h</key>
<data>
XTBs887vhAof+af7Ou88U7/HEKo=
</data>
<key>Headers/LRORNSVGSwizzle.h</key>
<data>
oAqMHk9n9vMGjrbRPL/o/duOS9Q=
</data>
<key>Headers/LROReactNativeSwizzler.h</key>
<data>
dQrUihBdUi82nEqQqUfqG88gxAs=
</data>
<key>Headers/LRORenderingTracker.h</key>
<data>
/nbj0FXgePMJNxbiwyhi1OEpahg=
</data>
<key>Headers/LROScrollSwizzle.h</key>
<data>
AwrUT6SxBOklM953IdMKcG+40z0=
</data>
<key>Headers/LROSessionDetails.h</key>
<data>
dGGji1p5hwa37eMgTJj7j3r8rsk=
</data>
<key>Headers/LROSystemCapabilities.h</key>
<data>
aMcPd3QvCdflRB7S3i1YOJOrkcg=
</data>
<key>Headers/LROThread.h</key>
<data>
3vIT4t7kQiRqf7xbsqqE/UaS81Y=
</data>
<key>Headers/LROUncaughtExceptionHandler.h</key>
<data>
eeeAvHUFDUhQqTkP9LPngWYMDt0=
</data>
<key>Headers/LROViewTracker.h</key>
<data>
r6mq9WqVoeU4pd8PrUUHSD2fYoA=
</data>
<key>Headers/LROWebPEncode.h</key>
<data>
Hn0SJQOoC0dCYWK3UyLJDRtfG3Y=
</data>
<key>Headers/LogRocket-Swift.h</key>
<data>
j1Ge2mwKWicL6WMGoICAzGih7a4=
</data>
<key>Headers/LogRocket.h</key>
<data>
AL4lmAEPnCUufN4rw65FHMx7zG8=
</data>
<key>Info.plist</key>
<data>
ugbOtsec5nj78wBqvPcEEi4C/pk=
</data>
<key>Modules/LogRocket.swiftmodule/arm64-apple-ios-simulator.abi.json</key>
<data>
HmnEu7DBK1Y11WVj6X7rvtNdV/A=
</data>
<key>Modules/LogRocket.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface</key>
<data>
Povb6MQMlGsPA9XUi0jguC7L5M4=
</data>
<key>Modules/LogRocket.swiftmodule/arm64-apple-ios-simulator.swiftdoc</key>
<data>
T7IYsfpgnbpg2C+llnz5Ad5zx+c=
</data>
<key>Modules/LogRocket.swiftmodule/arm64-apple-ios-simulator.swiftinterface</key>
<data>
Povb6MQMlGsPA9XUi0jguC7L5M4=
</data>
<key>Modules/LogRocket.swiftmodule/arm64-apple-ios-simulator.swiftmodule</key>
<data>
wsEa6t8JIvrOPMi3Gg768FWazRU=
</data>
<key>Modules/LogRocket.swiftmodule/x86_64-apple-ios-simulator.abi.json</key>
<data>
HmnEu7DBK1Y11WVj6X7rvtNdV/A=
</data>
<key>Modules/LogRocket.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface</key>
<data>
UlGRrbavuxgMJC9i3kGEAP/g4dE=
</data>
<key>Modules/LogRocket.swiftmodule/x86_64-apple-ios-simulator.swiftdoc</key>
<data>
XRfBzz5kK+2lMsC0WdmZ/exd430=
</data>
<key>Modules/LogRocket.swiftmodule/x86_64-apple-ios-simulator.swiftinterface</key>
<data>
UlGRrbavuxgMJC9i3kGEAP/g4dE=
</data>
<key>Modules/LogRocket.swiftmodule/x86_64-apple-ios-simulator.swiftmodule</key>
<data>
1CC+gHuZ6+2kr1Ic0xTEaJLM1zo=
</data>
<key>Modules/module.modulemap</key>
<data>
avH64tCRETJeRgm5GVGZ82Ez240=
</data>
<key>PrivacyInfo.xcprivacy</key>
<data>
F6mYXr6EQZyLKcQNM0vmTGcGMns=
</data>
<key>PrivateHeaders/LogRocketSwizzle.h</key>
<data>
pcabFVM0wRjuGTHHXEflFl0QY8g=
</data>
</dict>
<key>files2</key>
<dict>
<key>Headers/LROAppStartTracker.h</key>
<dict>
<key>hash2</key>
<data>
fAdeyJIIVWSAmfNjA4MwX8gQhtcCvE4P/LwgjBfh1lM=
</data>
</dict>
<key>Headers/LROBinaryObjects.h</key>
<dict>
<key>hash2</key>
<data>
YufG8JB8Ku4sRs4ctkgC88FkMgFxqqMKUTH+ZcISgdE=
</data>
</dict>
<key>Headers/LROCLogger.h</key>
<dict>
<key>hash2</key>
<data>
MrtI09LU6WQ82HduCSvwTzYyZcwp04LHVuu6lLr6/xk=
</data>
</dict>
<key>Headers/LROCPU.h</key>
<dict>
<key>hash2</key>
<data>
5vFzPCnfKZ3dMzIVSL+na66lbtzc0ObGNW7N1cpB4kU=
</data>
</dict>
<key>Headers/LROCPU_Apple.h</key>
<dict>
<key>hash2</key>
<data>
iCLBdroI2IRPQq30VOnHd9+HVcYCSaVGBMYDJfFgxME=
</data>
</dict>
<key>Headers/LROCrashC.h</key>
<dict>
<key>hash2</key>
<data>
1z56VwOoL0/InJEnpG0JA/WjMSeSkHmCRfjYEsR/+m8=
</data>
</dict>
<key>Headers/LROCrashMonitor.h</key>
<dict>
<key>hash2</key>
<data>
ZGPvZeojDhhuHRg/N7rPI/Mu9qWSiSPJgHPDekz8dPQ=
</data>
</dict>
<key>Headers/LROCrashMonitorContext.h</key>
<dict>
<key>hash2</key>
<data>
Iv7Hudqqth74Q7W4i40+o7Lylr0HZocKwmNjx5cHulk=
</data>
</dict>
<key>Headers/LROCrashMonitorEventCallback.h</key>
<dict>
<key>hash2</key>
<data>
RcMQ0xTvb5puDVpm04OPP3WfFzhzBiryt+QYaWlxhg4=
</data>
</dict>
<key>Headers/LROCrashMonitorType.h</key>
<dict>
<key>hash2</key>
<data>
9OTbOTApbdChQYBMnapcbP8fPHQo/h3Mz1kbu6RLYhM=
</data>
</dict>
<key>Headers/LROCrashMonitor_CPPException.h</key>
<dict>
<key>hash2</key>
<data>
/RNmJ5YZktVJrNb47+k5gxOgyf6k42TH7PsUBa8650c=
</data>
</dict>
<key>Headers/LROCrashMonitor_MachException.h</key>
<dict>
<key>hash2</key>
<data>
hiCsYwB+bbIGlF0eYbn6DpGdZFIXBDkJqKi698yfmN0=
</data>
</dict>
<key>Headers/LROCrashReportC.h</key>
<dict>
<key>hash2</key>
<data>
HZ4z8drlQXZk17/PCu6XvruBTh4Tl7SKIVIEkipi4xU=
</data>
</dict>
<key>Headers/LROCrashReportFields.h</key>
<dict>
<key>hash2</key>
<data>
yPmDkgpuiZDrWLnSCn3TSrde10tmvTk5QXXjWMciNko=
</data>
</dict>
<key>Headers/LROCrashReportWriter.h</key>
<dict>
<key>hash2</key>
<data>
MTj2kwOfpd0k7ql7NGjgD1j9MafzF6nvbC0Pg/K+xew=
</data>
</dict>
<key>Headers/LRODebug.h</key>
<dict>
<key>hash2</key>
<data>
pYhVwciZVeygG4pZAxGyECnmTFc6wd02DH57dulUegM=
</data>
</dict>
<key>Headers/LROException.h</key>
<dict>
<key>hash2</key>
<data>
PTH/G7jTZrC+DxEQYt/EkjEI83m6g8AiX6WfLnoVKs8=
</data>
</dict>
<key>Headers/LROFileUtils.h</key>
<dict>
<key>hash2</key>
<data>
HW8tFz7S0HVjXkQegwn63n+1El44mDNiRAjAUGnVdhs=
</data>
</dict>
<key>Headers/LROJSONCodec.h</key>
<dict>
<key>hash2</key>
<data>
/ZtUEvNtEYuZGeiJeSeQi1WwTIPGUIe+4tiXzD4gudk=
</data>
</dict>
<key>Headers/LROMach.h</key>
<dict>
<key>hash2</key>
<data>
pLgx2HrPDcl1x/xfzE0O7JXb2GDTxvD9DGyQXjMvYrE=
</data>
</dict>
<key>Headers/LROMachineContext.h</key>
<dict>
<key>hash2</key>
<data>
Nd8arH6q7nQ2fz/MQQ+S7WU+aZdzvzrdmsRjPEQkEq8=
</data>
</dict>
<key>Headers/LRORNSVGSwizzle.h</key>
<dict>
<key>hash2</key>
<data>
TBVKSonncL9+P9hTmvqz3lGrgybdKV0J351X+0Verxs=
</data>
</dict>
<key>Headers/LROReactNativeSwizzler.h</key>
<dict>
<key>hash2</key>
<data>
eo2GjcVzz/Hj70f9dAktom7LZwRGTX2up7V47F6wRrg=
</data>
</dict>
<key>Headers/LRORenderingTracker.h</key>
<dict>
<key>hash2</key>
<data>
dyJfvv08ZpkuU4yQLcQQhp89Ou6+s82x7x/Bpb2zNwU=
</data>
</dict>
<key>Headers/LROScrollSwizzle.h</key>
<dict>
<key>hash2</key>
<data>
mfp3fcsn2M6UK2KDuSZO3xVOmsjvwvpceqodDXp3LBA=
</data>
</dict>
<key>Headers/LROSessionDetails.h</key>
<dict>
<key>hash2</key>
<data>
bGbMeCgb61mw8MG73Z17Yh5wajyVC98ntH4747OiHxg=
</data>
</dict>
<key>Headers/LROSystemCapabilities.h</key>
<dict>
<key>hash2</key>
<data>
l05BNx2y1odzwbstPTZ0jkB/KgYXnp+/ldizrrdDLKw=
</data>
</dict>
<key>Headers/LROThread.h</key>
<dict>
<key>hash2</key>
<data>
eKr8DI4EHhFqIkqGfsg1sWa5wQs83oC5rEBvzyyPNj4=
</data>
</dict>
<key>Headers/LROUncaughtExceptionHandler.h</key>
<dict>
<key>hash2</key>
<data>
ePPeGpHNBxm7kle6975x75nNguKIrsGpuPSJWdXrLMo=
</data>
</dict>
<key>Headers/LROViewTracker.h</key>
<dict>
<key>hash2</key>
<data>
uP/C6PH7XBKuelCPH1pcJbcYFSCKVj58PCX9spQQdWE=
</data>
</dict>
<key>Headers/LROWebPEncode.h</key>
<dict>
<key>hash2</key>
<data>
LVs4vl0oNHQe35ZAYVyAeaQrysDijB7GaI1RjAra14Q=
</data>
</dict>
<key>Headers/LogRocket-Swift.h</key>
<dict>
<key>hash2</key>
<data>
vQvfPZ7SL5gyqTH6/f294MUcDZiAHWtotAKDEVuHB0M=
</data>
</dict>
<key>Headers/LogRocket.h</key>
<dict>
<key>hash2</key>
<data>
5Afo6M0QPahNVBc0W/o3mJA7TuFCT5lUfu/N2xABJp0=
</data>
</dict>
<key>Modules/LogRocket.swiftmodule/arm64-apple-ios-simulator.abi.json</key>
<dict>
<key>hash2</key>
<data>
9G5n7TiGh18to30slENdJbKjfEiGAMPCtOTQR5lJGLw=
</data>
</dict>
<key>Modules/LogRocket.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface</key>
<dict>
<key>hash2</key>
<data>
iZ2rtz/E22fUuvsRhgTMlvJgVg72NbfUiwlaaG9OXlQ=
</data>
</dict>
<key>Modules/LogRocket.swiftmodule/arm64-apple-ios-simulator.swiftdoc</key>
<dict>
<key>hash2</key>
<data>
SXi1tkyAYGJ3UrxEJSoAwihC1sQMXBk1pPN3dMlt82w=
</data>
</dict>
<key>Modules/LogRocket.swiftmodule/arm64-apple-ios-simulator.swiftinterface</key>
<dict>
<key>hash2</key>
<data>
iZ2rtz/E22fUuvsRhgTMlvJgVg72NbfUiwlaaG9OXlQ=
</data>
</dict>
<key>Modules/LogRocket.swiftmodule/arm64-apple-ios-simulator.swiftmodule</key>
<dict>
<key>hash2</key>
<data>
XUzwiJbGVb40B4lS5UYVfKHvk4tHcBbjuliU8NblCrw=
</data>
</dict>
<key>Modules/LogRocket.swiftmodule/x86_64-apple-ios-simulator.abi.json</key>
<dict>
<key>hash2</key>
<data>
9G5n7TiGh18to30slENdJbKjfEiGAMPCtOTQR5lJGLw=
</data>
</dict>
<key>Modules/LogRocket.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface</key>
<dict>
<key>hash2</key>
<data>
lxo2fzKHVBqNEpcr7QU3tXBSI0N70IAA056MgtJxrOY=
</data>
</dict>
<key>Modules/LogRocket.swiftmodule/x86_64-apple-ios-simulator.swiftdoc</key>
<dict>
<key>hash2</key>
<data>
Vc7CcvXJqgZTf84qxPbXeZfDz+8OqmZgTUYwYvsJ6zI=
</data>
</dict>
<key>Modules/LogRocket.swiftmodule/x86_64-apple-ios-simulator.swiftinterface</key>
<dict>
<key>hash2</key>
<data>
lxo2fzKHVBqNEpcr7QU3tXBSI0N70IAA056MgtJxrOY=
</data>
</dict>
<key>Modules/LogRocket.swiftmodule/x86_64-apple-ios-simulator.swiftmodule</key>
<dict>
<key>hash2</key>
<data>
RMayP4t2OI2sVp9Gohs1zNqW1u/GHu6kj6lczpXZPJg=
</data>
</dict>
<key>Modules/module.modulemap</key>
<dict>
<key>hash2</key>
<data>
Gc3I//oV059MYZ6QzQD0r35FVgMNM86RXLzVZrwHitQ=
</data>
</dict>
<key>PrivacyInfo.xcprivacy</key>
<dict>
<key>hash2</key>
<data>
oHQY5f4SjiJM03lkvCHFA7eqL1dee0knRoR4rYcyFP4=
</data>
</dict>
<key>PrivateHeaders/LogRocketSwizzle.h</key>
<dict>
<key>hash2</key>
<data>
Q5Nmg3bA9uCNR0Git4tEcYMiGJPu4LYKWOvym7NJWXI=
</data>
</dict>
</dict>
<key>rules</key>
<dict>
<key>^.*</key>
<true/>
<key>^.*\.lproj/</key>
<dict>
<key>optional</key>
<true/>
<key>weight</key>
<real>1000</real>
</dict>
<key>^.*\.lproj/locversion.plist$</key>
<dict>
<key>omit</key>
<true/>
<key>weight</key>
<real>1100</real>
</dict>
<key>^Base\.lproj/</key>
<dict>
<key>weight</key>
<real>1010</real>
</dict>
<key>^version.plist$</key>
<true/>
</dict>
<key>rules2</key>
<dict>
<key>.*\.dSYM($|/)</key>
<dict>
<key>weight</key>
<real>11</real>
</dict>
<key>^(.*/)?\.DS_Store$</key>
<dict>
<key>omit</key>
<true/>
<key>weight</key>
<real>2000</real>
</dict>
<key>^.*</key>
<true/>
<key>^.*\.lproj/</key>
<dict>
<key>optional</key>
<true/>
<key>weight</key>
<real>1000</real>
</dict>
<key>^.*\.lproj/locversion.plist$</key>
<dict>
<key>omit</key>
<true/>
<key>weight</key>
<real>1100</real>
</dict>
<key>^Base\.lproj/</key>
<dict>
<key>weight</key>
<real>1010</real>
</dict>
<key>^Info\.plist$</key>
<dict>
<key>omit</key>
<true/>
<key>weight</key>
<real>20</real>
</dict>
<key>^PkgInfo$</key>
<dict>
<key>omit</key>
<true/>
<key>weight</key>
<real>20</real>
</dict>
<key>^embedded\.provisionprofile$</key>
<dict>
<key>weight</key>
<real>20</real>
</dict>
<key>^version\.plist$</key>
<dict>
<key>weight</key>
<real>20</real>
</dict>
</dict>
</dict>
</plist>

View File

@@ -1,74 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>NSPrivacyAccessedAPITypes</key>
<array>
<dict>
<key>NSPrivacyAccessedAPITypeReasons</key>
<array>
<string>E174.1</string>
</array>
<key>NSPrivacyAccessedAPIType</key>
<string>NSPrivacyAccessedAPICategoryDiskSpace</string>
</dict>
<dict>
<key>NSPrivacyAccessedAPITypeReasons</key>
<array>
<string>C617.1</string>
</array>
<key>NSPrivacyAccessedAPIType</key>
<string>NSPrivacyAccessedAPICategoryFileTimestamp</string>
</dict>
<dict>
<key>NSPrivacyAccessedAPITypeReasons</key>
<array>
<string>35F9.1</string>
</array>
<key>NSPrivacyAccessedAPIType</key>
<string>NSPrivacyAccessedAPICategorySystemBootTime</string>
</dict>
</array>
<key>NSPrivacyCollectedDataTypes</key>
<array>
<dict>
<key>NSPrivacyCollectedDataType</key>
<string>NSPrivacyCollectedDataTypeCrashData</string>
<key>NSPrivacyCollectedDataTypeLinked</key>
<false/>
<key>NSPrivacyCollectedDataTypeTracking</key>
<false/>
<key>NSPrivacyCollectedDataTypePurposes</key>
<array>
<string>NSPrivacyCollectedDataTypePurposeAppFunctionality</string>
</array>
</dict>
<dict>
<key>NSPrivacyCollectedDataType</key>
<string>NSPrivacyCollectedDataTypePerformanceData</string>
<key>NSPrivacyCollectedDataTypeLinked</key>
<false/>
<key>NSPrivacyCollectedDataTypeTracking</key>
<false/>
<key>NSPrivacyCollectedDataTypePurposes</key>
<array>
<string>NSPrivacyCollectedDataTypePurposeAppFunctionality</string>
</array>
</dict>
<dict>
<key>NSPrivacyCollectedDataType</key>
<string>NSPrivacyCollectedDataTypeOtherUsageData</string>
<key>NSPrivacyCollectedDataTypeLinked</key>
<false/>
<key>NSPrivacyCollectedDataTypeTracking</key>
<false/>
<key>NSPrivacyCollectedDataTypePurposes</key>
<array>
<string>NSPrivacyCollectedDataTypePurposeAppFunctionality</string>
</array>
</dict>
</array>
<key>NSPrivacyTracking</key>
<false/>
</dict>
</plist>

Some files were not shown because too many files have changed in this diff Show More