de-intergrate cocoapods

Signed-off-by: Joseph Mattello <mail@joemattiello.com>
This commit is contained in:
Joseph Mattello
2022-06-04 03:43:16 -04:00
parent 918c44bc89
commit 986c0d7edc
659 changed files with 5 additions and 37636 deletions

View File

@@ -7,10 +7,7 @@
objects = {
/* Begin PBXBuildFile section */
0E33F94B8D78AB969FD309A3 /* Pods_AltStoreCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A08F67C18350C7990753F03F /* Pods_AltStoreCore.framework */; };
19B9B7452845E6DF0076EF69 /* SelectTeamViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 19B9B7442845E6DF0076EF69 /* SelectTeamViewController.swift */; };
2A77E3D272F3D92436FAC272 /* Pods_AltStore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C9EEAA842DA87A88A870053B /* Pods_AltStore.framework */; };
A8BCEBEAC0620CF80A2FD26D /* Pods_AltServer.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FC3822AB1C4CF1D4CDF7445D /* Pods_AltServer.framework */; };
BF02419622F2199300129732 /* RefreshAttemptsViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = BF02419522F2199300129732 /* RefreshAttemptsViewController.swift */; };
BF0241AA22F29CCD00129732 /* UserDefaults+AltServer.swift in Sources */ = {isa = PBXBuildFile; fileRef = BF0241A922F29CCD00129732 /* UserDefaults+AltServer.swift */; };
BF08858322DE795100DE9F1E /* MyAppsViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = BF08858222DE795100DE9F1E /* MyAppsViewController.swift */; };
@@ -464,13 +461,7 @@
/* End PBXCopyFilesBuildPhase section */
/* Begin PBXFileReference section */
11611D46F8A7C8B928E8156B /* Pods-AltServer.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-AltServer.debug.xcconfig"; path = "Target Support Files/Pods-AltServer/Pods-AltServer.debug.xcconfig"; sourceTree = "<group>"; };
19B9B7442845E6DF0076EF69 /* SelectTeamViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SelectTeamViewController.swift; sourceTree = "<group>"; };
589BA531D903B28F292063E5 /* Pods-AltServer.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-AltServer.release.xcconfig"; path = "Target Support Files/Pods-AltServer/Pods-AltServer.release.xcconfig"; sourceTree = "<group>"; };
A08F67C18350C7990753F03F /* Pods_AltStoreCore.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_AltStoreCore.framework; sourceTree = BUILT_PRODUCTS_DIR; };
A136EE677716B80768E9F0A2 /* Pods-AltStore.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-AltStore.release.xcconfig"; path = "Target Support Files/Pods-AltStore/Pods-AltStore.release.xcconfig"; sourceTree = "<group>"; };
B39BC452F0753C2C33A2D43B /* Pods-AltStoreCore.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-AltStoreCore.debug.xcconfig"; path = "Target Support Files/Pods-AltStoreCore/Pods-AltStoreCore.debug.xcconfig"; sourceTree = "<group>"; };
BC373DB2C2B6CB739CCBFB5F /* Pods-AltStoreCore.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-AltStoreCore.release.xcconfig"; path = "Target Support Files/Pods-AltStoreCore/Pods-AltStoreCore.release.xcconfig"; sourceTree = "<group>"; };
BF02419522F2199300129732 /* RefreshAttemptsViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RefreshAttemptsViewController.swift; sourceTree = "<group>"; };
BF0241A922F29CCD00129732 /* UserDefaults+AltServer.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UserDefaults+AltServer.swift"; sourceTree = "<group>"; };
BF08858222DE795100DE9F1E /* MyAppsViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MyAppsViewController.swift; sourceTree = "<group>"; };
@@ -812,7 +803,6 @@
BFF7C93B257849C600E55F36 /* AltXPC.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = AltXPC.entitlements; sourceTree = "<group>"; };
BFF7EC4C25081E9300BDE521 /* AltStore 8.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = "AltStore 8.xcdatamodel"; sourceTree = "<group>"; };
BFFCFA45248835530077BFCE /* AltDaemon.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = AltDaemon.entitlements; sourceTree = "<group>"; };
C9EEAA842DA87A88A870053B /* Pods_AltStore.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_AltStore.framework; sourceTree = BUILT_PRODUCTS_DIR; };
D533E8B62727841800A9B5DD /* libAppleArchive.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libAppleArchive.tbd; path = usr/lib/libAppleArchive.tbd; sourceTree = SDKROOT; };
D533E8B82727B61400A9B5DD /* fragmentzip.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = fragmentzip.h; sourceTree = "<group>"; };
D533E8BB2727BBEE00A9B5DD /* libfragmentzip.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libfragmentzip.a; path = Dependencies/fragmentzip/libfragmentzip.a; sourceTree = SOURCE_ROOT; };
@@ -830,8 +820,6 @@
D5DAE0952804DF430034D8D4 /* UpdatePatronsOperation.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UpdatePatronsOperation.swift; sourceTree = "<group>"; };
D5E1E7C028077DE90016FC96 /* FetchTrustedSourcesOperation.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FetchTrustedSourcesOperation.swift; sourceTree = "<group>"; };
D5F2F6A82720B7C20081CCF5 /* PatchViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PatchViewController.swift; sourceTree = "<group>"; };
EA79A60285C6AF5848AA16E9 /* Pods-AltStore.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-AltStore.debug.xcconfig"; path = "Target Support Files/Pods-AltStore/Pods-AltStore.debug.xcconfig"; sourceTree = "<group>"; };
FC3822AB1C4CF1D4CDF7445D /* Pods_AltServer.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_AltServer.framework; sourceTree = BUILT_PRODUCTS_DIR; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
@@ -859,7 +847,6 @@
BF4588882298DD3F00BD7491 /* libxml2.tbd in Frameworks */,
BF4588472298D4B000BD7491 /* libimobiledevice.a in Frameworks */,
BF088D362501A821008082D9 /* AltSign-Dynamic in Frameworks */,
A8BCEBEAC0620CF80A2FD26D /* Pods_AltServer.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -884,7 +871,6 @@
files = (
BF42345D25102688006D1EB2 /* OpenSSL.xcframework in Frameworks */,
BF42345C251024B0006D1EB2 /* AltSign-Static in Frameworks */,
0E33F94B8D78AB969FD309A3 /* Pods_AltStoreCore.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -906,7 +892,6 @@
BF088D332501A4FF008082D9 /* OpenSSL.xcframework in Frameworks */,
D533E8BC2727BBEE00A9B5DD /* libfragmentzip.a in Frameworks */,
BF66EE852501AE50007EE018 /* AltStoreCore.framework in Frameworks */,
2A77E3D272F3D92436FAC272 /* Pods_AltStore.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -923,12 +908,6 @@
4460E048E3AC1C9708C4FA33 /* Pods */ = {
isa = PBXGroup;
children = (
EA79A60285C6AF5848AA16E9 /* Pods-AltStore.debug.xcconfig */,
A136EE677716B80768E9F0A2 /* Pods-AltStore.release.xcconfig */,
11611D46F8A7C8B928E8156B /* Pods-AltServer.debug.xcconfig */,
589BA531D903B28F292063E5 /* Pods-AltServer.release.xcconfig */,
B39BC452F0753C2C33A2D43B /* Pods-AltStoreCore.debug.xcconfig */,
BC373DB2C2B6CB739CCBFB5F /* Pods-AltStoreCore.release.xcconfig */,
);
path = Pods;
sourceTree = "<group>";
@@ -1559,9 +1538,6 @@
BF580497246A3D19008AE704 /* UIKit.framework */,
BF4588872298DD3F00BD7491 /* libxml2.tbd */,
BFD247862284BB3B00981D42 /* Roxas.framework */,
FC3822AB1C4CF1D4CDF7445D /* Pods_AltServer.framework */,
C9EEAA842DA87A88A870053B /* Pods_AltStore.framework */,
A08F67C18350C7990753F03F /* Pods_AltStoreCore.framework */,
);
name = Frameworks;
sourceTree = "<group>";
@@ -1870,13 +1846,11 @@
isa = PBXNativeTarget;
buildConfigurationList = BF45869A229872EA00BD7491 /* Build configuration list for PBXNativeTarget "AltServer" */;
buildPhases = (
FACBF95CCAAAB7121E1D92C8 /* [CP] Check Pods Manifest.lock */,
BF458689229872EA00BD7491 /* Sources */,
BF45868B229872EA00BD7491 /* Resources */,
BF4588462298D4AA00BD7491 /* Frameworks */,
BF0201BC22C2EFA3000B93E4 /* Embed Frameworks */,
BF7FDA2C23203B6B00B5D3A4 /* Copy Launcher App */,
98BF22D155DBAEA97544E3E6 /* [CP] Embed Pods Frameworks */,
BF914C242383659400E713BA /* Sign Frameworks */,
BFF7C910257844C900E55F36 /* Embed XPC Services */,
);
@@ -1951,7 +1925,6 @@
isa = PBXNativeTarget;
buildConfigurationList = BF66EE892501AE50007EE018 /* Build configuration list for PBXNativeTarget "AltStoreCore" */;
buildPhases = (
702C290C354EA165FF645858 /* [CP] Check Pods Manifest.lock */,
BF66EE792501AE50007EE018 /* Headers */,
BF66EE7A2501AE50007EE018 /* Sources */,
BF66EE7B2501AE50007EE018 /* Frameworks */,
@@ -1991,12 +1964,10 @@
isa = PBXNativeTarget;
buildConfigurationList = BFD2477E2284B9A700981D42 /* Build configuration list for PBXNativeTarget "AltStore" */;
buildPhases = (
FFB93342C7EB2021A1FFFB6A /* [CP] Check Pods Manifest.lock */,
BFD247662284B9A500981D42 /* Sources */,
BFD247672284B9A500981D42 /* Frameworks */,
BFD247682284B9A500981D42 /* Resources */,
BF088D2B2501A087008082D9 /* Embed Frameworks */,
744AE3B03F6BF664FC5705C5 /* [CP] Embed Pods Frameworks */,
BF98917B250AABF4002ACF50 /* Embed App Extensions */,
);
buildRules = (
@@ -2098,7 +2069,7 @@
);
mainGroup = BFD247612284B9A500981D42;
packageReferences = (
D58D5F2C26DFE68E00E55E38 /* XCRemoteSwiftPackageReference "LaunchAtLogin" */,
D58D5F2C26DFE68E00E55E38 /* XCRemoteSwiftPackageReference "LaunchAtLogin.git" */,
);
productRefGroup = BFD2476B2284B9A500981D42 /* Products */;
projectDirPath = "";
@@ -2192,62 +2163,6 @@
/* End PBXResourcesBuildPhase section */
/* Begin PBXShellScriptBuildPhase section */
702C290C354EA165FF645858 /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
);
inputPaths = (
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
"${PODS_ROOT}/Manifest.lock",
);
name = "[CP] Check Pods Manifest.lock";
outputFileListPaths = (
);
outputPaths = (
"$(DERIVED_FILE_DIR)/Pods-AltStoreCore-checkManifestLockResult.txt",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
showEnvVarsInLog = 0;
};
744AE3B03F6BF664FC5705C5 /* [CP] Embed Pods Frameworks */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-AltStore/Pods-AltStore-frameworks-${CONFIGURATION}-input-files.xcfilelist",
);
name = "[CP] Embed Pods Frameworks";
outputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-AltStore/Pods-AltStore-frameworks-${CONFIGURATION}-output-files.xcfilelist",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-AltStore/Pods-AltStore-frameworks.sh\"\n";
showEnvVarsInLog = 0;
};
98BF22D155DBAEA97544E3E6 /* [CP] Embed Pods Frameworks */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-AltServer/Pods-AltServer-frameworks-${CONFIGURATION}-input-files.xcfilelist",
);
name = "[CP] Embed Pods Frameworks";
outputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-AltServer/Pods-AltServer-frameworks-${CONFIGURATION}-output-files.xcfilelist",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-AltServer/Pods-AltServer-frameworks.sh\"\n";
showEnvVarsInLog = 0;
};
BF7FDA2C23203B6B00B5D3A4 /* Copy Launcher App */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
@@ -2284,50 +2199,6 @@
shellPath = /bin/sh;
shellScript = "LOCATION=\"${BUILT_PRODUCTS_DIR}\"/\"${FRAMEWORKS_FOLDER_PATH}\"\nIDENTITY=${EXPANDED_CODE_SIGN_IDENTITY_NAME}\n\ncodesign --verbose --force --deep -o runtime --sign \"$IDENTITY\" \"$LOCATION/Sparkle.framework/Versions/A/Resources/AutoUpdate.app\"\ncodesign --verbose --force -o runtime --sign \"$IDENTITY\" \"$LOCATION/Sparkle.framework/Versions/A\"\n";
};
FACBF95CCAAAB7121E1D92C8 /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
);
inputPaths = (
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
"${PODS_ROOT}/Manifest.lock",
);
name = "[CP] Check Pods Manifest.lock";
outputFileListPaths = (
);
outputPaths = (
"$(DERIVED_FILE_DIR)/Pods-AltServer-checkManifestLockResult.txt",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
showEnvVarsInLog = 0;
};
FFB93342C7EB2021A1FFFB6A /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
);
inputPaths = (
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
"${PODS_ROOT}/Manifest.lock",
);
name = "[CP] Check Pods Manifest.lock";
outputFileListPaths = (
);
outputPaths = (
"$(DERIVED_FILE_DIR)/Pods-AltStore-checkManifestLockResult.txt",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
showEnvVarsInLog = 0;
};
/* End PBXShellScriptBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
@@ -2810,7 +2681,6 @@
};
BF45869B229872EA00BD7491 /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 11611D46F8A7C8B928E8156B /* Pods-AltServer.debug.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
@@ -2864,7 +2734,6 @@
};
BF45869C229872EA00BD7491 /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 589BA531D903B28F292063E5 /* Pods-AltServer.release.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
@@ -3095,7 +2964,6 @@
};
BF66EE872501AE50007EE018 /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = B39BC452F0753C2C33A2D43B /* Pods-AltStoreCore.debug.xcconfig */;
buildSettings = {
APPLICATION_EXTENSION_API_ONLY = YES;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
@@ -3129,7 +2997,6 @@
};
BF66EE882501AE50007EE018 /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = BC373DB2C2B6CB739CCBFB5F /* Pods-AltStoreCore.release.xcconfig */;
buildSettings = {
APPLICATION_EXTENSION_API_ONLY = YES;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
@@ -3356,7 +3223,6 @@
};
BFD2477F2284B9A700981D42 /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = EA79A60285C6AF5848AA16E9 /* Pods-AltStore.debug.xcconfig */;
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
@@ -3390,7 +3256,6 @@
};
BFD247802284B9A700981D42 /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = A136EE677716B80768E9F0A2 /* Pods-AltStore.release.xcconfig */;
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
@@ -3575,7 +3440,7 @@
/* End XCConfigurationList section */
/* Begin XCRemoteSwiftPackageReference section */
D58D5F2C26DFE68E00E55E38 /* XCRemoteSwiftPackageReference "LaunchAtLogin" */ = {
D58D5F2C26DFE68E00E55E38 /* XCRemoteSwiftPackageReference "LaunchAtLogin.git" */ = {
isa = XCRemoteSwiftPackageReference;
repositoryURL = "https://github.com/sindresorhus/LaunchAtLogin.git";
requirement = {
@@ -3600,7 +3465,7 @@
};
D58D5F2D26DFE68E00E55E38 /* LaunchAtLogin */ = {
isa = XCSwiftPackageProductDependency;
package = D58D5F2C26DFE68E00E55E38 /* XCRemoteSwiftPackageReference "LaunchAtLogin" */;
package = D58D5F2C26DFE68E00E55E38 /* XCRemoteSwiftPackageReference "LaunchAtLogin.git" */;
productName = LaunchAtLogin;
};
/* End XCSwiftPackageProductDependency section */

View File

@@ -10,7 +10,4 @@
<FileRef
location = "group:Dependencies/Roxas/Roxas.xcodeproj">
</FileRef>
<FileRef
location = "group:Pods/Pods.xcodeproj">
</FileRef>
</Workspace>

View File

@@ -6,8 +6,8 @@
"repositoryURL": "https://github.com/sindresorhus/LaunchAtLogin.git",
"state": {
"branch": null,
"revision": "6b16bcdf7d45a9d76a768a5c4912dde925cf0e95",
"version": "4.1.0"
"revision": "e8171b3e38a2816f579f58f3dac1522aa39efe41",
"version": "4.2.0"
}
}
]

View File

@@ -1,99 +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>LibraryIdentifier</key>
<string>tvos-arm64_x86_64-simulator</string>
<key>LibraryPath</key>
<string>AppCenter.framework</string>
<key>SupportedArchitectures</key>
<array>
<string>arm64</string>
<string>x86_64</string>
</array>
<key>SupportedPlatform</key>
<string>tvos</string>
<key>SupportedPlatformVariant</key>
<string>simulator</string>
</dict>
<dict>
<key>LibraryIdentifier</key>
<string>ios-arm64_i386_x86_64-simulator</string>
<key>LibraryPath</key>
<string>AppCenter.framework</string>
<key>SupportedArchitectures</key>
<array>
<string>arm64</string>
<string>i386</string>
<string>x86_64</string>
</array>
<key>SupportedPlatform</key>
<string>ios</string>
<key>SupportedPlatformVariant</key>
<string>simulator</string>
</dict>
<dict>
<key>LibraryIdentifier</key>
<string>ios-arm64_x86_64-maccatalyst</string>
<key>LibraryPath</key>
<string>AppCenter.framework</string>
<key>SupportedArchitectures</key>
<array>
<string>arm64</string>
<string>x86_64</string>
</array>
<key>SupportedPlatform</key>
<string>ios</string>
<key>SupportedPlatformVariant</key>
<string>maccatalyst</string>
</dict>
<dict>
<key>LibraryIdentifier</key>
<string>ios-arm64_arm64e_armv7_armv7s</string>
<key>LibraryPath</key>
<string>AppCenter.framework</string>
<key>SupportedArchitectures</key>
<array>
<string>arm64</string>
<string>arm64e</string>
<string>armv7</string>
<string>armv7s</string>
</array>
<key>SupportedPlatform</key>
<string>ios</string>
</dict>
<dict>
<key>LibraryIdentifier</key>
<string>macos-arm64_x86_64</string>
<key>LibraryPath</key>
<string>AppCenter.framework</string>
<key>SupportedArchitectures</key>
<array>
<string>arm64</string>
<string>x86_64</string>
</array>
<key>SupportedPlatform</key>
<string>macos</string>
</dict>
<dict>
<key>LibraryIdentifier</key>
<string>tvos-arm64</string>
<key>LibraryPath</key>
<string>AppCenter.framework</string>
<key>SupportedArchitectures</key>
<array>
<string>arm64</string>
</array>
<key>SupportedPlatform</key>
<string>tvos</string>
</dict>
</array>
<key>CFBundlePackageType</key>
<string>XFWK</string>
<key>XCFrameworkFormatVersion</key>
<string>1.0</string>
</dict>
</plist>

View File

@@ -1,42 +0,0 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#import <Foundation/Foundation.h>
#if __has_include(<AppCenter/MSACAppCenter.h>)
#import <AppCenter/MSACAbstractLog.h>
#import <AppCenter/MSACAppCenter.h>
#import <AppCenter/MSACAppCenterErrors.h>
#import <AppCenter/MSACChannelGroupProtocol.h>
#import <AppCenter/MSACChannelProtocol.h>
#import <AppCenter/MSACConstants+Flags.h>
#import <AppCenter/MSACConstants.h>
#import <AppCenter/MSACCustomProperties.h>
#import <AppCenter/MSACDevice.h>
#import <AppCenter/MSACEnable.h>
#import <AppCenter/MSACLog.h>
#import <AppCenter/MSACLogWithProperties.h>
#import <AppCenter/MSACLogger.h>
#import <AppCenter/MSACService.h>
#import <AppCenter/MSACServiceAbstract.h>
#import <AppCenter/MSACWrapperLogger.h>
#import <AppCenter/MSACWrapperSdk.h>
#else
#import "MSACAbstractLog.h"
#import "MSACAppCenter.h"
#import "MSACAppCenterErrors.h"
#import "MSACChannelGroupProtocol.h"
#import "MSACChannelProtocol.h"
#import "MSACConstants+Flags.h"
#import "MSACConstants.h"
#import "MSACCustomProperties.h"
#import "MSACDevice.h"
#import "MSACEnable.h"
#import "MSACLog.h"
#import "MSACLogWithProperties.h"
#import "MSACLogger.h"
#import "MSACService.h"
#import "MSACServiceAbstract.h"
#import "MSACWrapperLogger.h"
#import "MSACWrapperSdk.h"
#endif

View File

@@ -1,14 +0,0 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#ifndef MSAC_ABSTRACT_LOG_H
#define MSAC_ABSTRACT_LOG_H
#import <Foundation/Foundation.h>
NS_SWIFT_NAME(AbstractLog)
@interface MSACAbstractLog : NSObject
@end
#endif

View File

@@ -1,203 +0,0 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#import <Foundation/Foundation.h>
#ifndef MSAC_APP_CENTER
#define MSAC_APP_CENTER
#if __has_include(<AppCenter/MSACConstants.h>)
#import <AppCenter/MSACConstants.h>
#else
#import "MSACConstants.h"
#endif
@class MSACWrapperSdk;
#if !TARGET_OS_TV
@class MSACCustomProperties;
#endif
NS_SWIFT_NAME(AppCenter)
@interface MSACAppCenter : NSObject
/**
* Returns the singleton instance of MSACAppCenter.
*/
+ (instancetype)sharedInstance;
/**
* Configure the SDK with an application secret.
*
* @param appSecret A unique and secret key used to identify the application.
*
* @discussion This may be called only once per application process lifetime.
*/
+ (void)configureWithAppSecret:(NSString *)appSecret NS_SWIFT_NAME(configure(withAppSecret:));
/**
* Configure the SDK.
*
* @discussion This may be called only once per application process lifetime.
*/
+ (void)configure;
/**
* Configure the SDK with an application secret and an array of services to start.
*
* @param appSecret A unique and secret key used to identify the application.
* @param services Array of services to start.
*
* @discussion This may be called only once per application process lifetime.
*/
+ (void)start:(NSString *)appSecret withServices:(NSArray<Class> *)services NS_SWIFT_NAME(start(withAppSecret:services:));
/**
* Start the SDK with an array of services.
*
* @param services Array of services to start.
*
* @discussion This may be called only once per application process lifetime.
*/
+ (void)startWithServices:(NSArray<Class> *)services NS_SWIFT_NAME(start(services:));
/**
* Start a service.
*
* @param service A service to start.
*
* @discussion This may be called only once per service per application process lifetime.
*/
+ (void)startService:(Class)service;
/**
* Configure the SDK with an array of services to start from a library. This will not start the service at application level, it will enable
* the service only for the library.
*
* @param services Array of services to start.
*/
+ (void)startFromLibraryWithServices:(NSArray<Class> *)services NS_SWIFT_NAME(startFromLibrary(services:));
/**
* The flag indicates whether the SDK has already been configured or not.
*/
@property(class, atomic, readonly, getter=isConfigured) BOOL configured;
/**
* The flag indicates whether app is running in App Center Test Cloud.
*/
@property(class, atomic, readonly, getter=isRunningInAppCenterTestCloud) BOOL runningInAppCenterTestCloud;
/**
* The flag indicates whether or not the SDK was enabled as a whole
*
* The state is persisted in the device's storage across application launches.
*/
@property(class, nonatomic, getter=isEnabled, setter=setEnabled:) BOOL enabled NS_SWIFT_NAME(enabled);
/**
* Flag indicating whether SDK can send network requests.
*
* The state is persisted in the device's storage across application launches.
*/
@property(class, nonatomic, getter=isNetworkRequestsAllowed, setter=setNetworkRequestsAllowed:)
BOOL networkRequestsAllowed NS_SWIFT_NAME(networkRequestsAllowed);
/**
* The SDK's log level.
*/
@property(class, nonatomic) MSACLogLevel logLevel;
/**
* Base URL to use for backend communication.
*/
@property(class, nonatomic, strong) NSString *logUrl;
/**
* Set log handler.
*/
@property(class, nonatomic) MSACLogHandler logHandler;
/**
* Set wrapper SDK information to use when building device properties. This is intended in case you are building a SDK that uses the App
* Center SDK under the hood, e.g. our Xamarin SDK or ReactNative SDk.
*/
@property(class, nonatomic, strong) MSACWrapperSdk *wrapperSdk;
#if !TARGET_OS_TV
/**
* Set the custom properties.
*
* @param customProperties Custom properties object.
*/
+ (void)setCustomProperties:(MSACCustomProperties *)customProperties;
#endif
/**
* Check whether the application delegate forwarder is enabled or not.
*
* @discussion The application delegate forwarder forwards messages that target your application delegate methods via swizzling to the SDK.
* It simplifies the SDK integration but may not be suitable to any situations. For
* instance it should be disabled if you or one of your third party SDK is doing message forwarding on the application delegate. Message
* forwarding usually implies the implementation of @see NSObject#forwardingTargetForSelector: or @see NSObject#forwardInvocation: methods.
* To disable the application delegate forwarder just add the `AppCenterAppDelegateForwarderEnabled` tag to your Info .plist file and set it
* to `0`. Then you will have to forward any application delegate needed by the SDK manually.
*/
@property(class, readonly, nonatomic, getter=isAppDelegateForwarderEnabled) BOOL appDelegateForwarderEnabled;
/**
* Unique installation identifier.
*
*/
@property(class, readonly, nonatomic) NSUUID *installId;
/**
* Detect if a debugger is attached to the app process. This is only invoked once on app startup and can not detect
* if the debugger is being attached during runtime!
*
*/
@property(class, readonly, nonatomic, getter=isDebuggerAttached) BOOL debuggerAttached;
/**
* Current version of AppCenter SDK.
*
*/
@property(class, readonly, nonatomic) NSString *sdkVersion;
/**
* Set the maximum size of the internal storage. This method must be called before App Center is started. This method is only intended for
* applications.
*
* @param sizeInBytes Maximum size of the internal storage in bytes. This will be rounded up to the nearest multiple of a SQLite page size
* (default is 4096 bytes). Values below 20,480 bytes (20 KiB) will be ignored.
*
* @param completionHandler Callback that is invoked when the database size has been set. The `BOOL` parameter is `YES` if changing the size
* is successful, and `NO` otherwise. This parameter can be null.
*
* @discussion This only sets the maximum size of the database, but App Center modules might store additional data.
* The value passed to this method is not persisted on disk. The default maximum database size is 10485760 bytes (10 MiB).
*/
+ (void)setMaxStorageSize:(long)sizeInBytes completionHandler:(void (^)(BOOL))completionHandler;
/**
* Set the user identifier.
*
* @discussion Set the user identifier for logs sent for the default target token when the secret passed in @c
* MSACAppCenter:start:withServices: contains "target={targetToken}".
*
* For App Center backend the user identifier maximum length is 256 characters.
*
* AppCenter must be configured or started before this API can be used.
*/
@property(class, nonatomic, strong) NSString *userId;
/**
* Set country code to use when building device properties.
*
* @see https://www.iso.org/obp/ui/#search for more information.
*/
@property(class, nonatomic, strong) NSString *countryCode;
@end
#endif

View File

@@ -1,41 +0,0 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#ifndef MSAC_APP_CENTER_ERRORS_H
#define MSAC_APP_CENTER_ERRORS_H
#import <Foundation/Foundation.h>
#define MSAC_APP_CENTER_BASE_DOMAIN @"com.Microsoft.AppCenter."
NS_ASSUME_NONNULL_BEGIN
#pragma mark - Domain
static NSString *const kMSACACErrorDomain = MSAC_APP_CENTER_BASE_DOMAIN @"ErrorDomain";
#pragma mark - General
// Error codes.
NS_ENUM(NSInteger){MSACACLogInvalidContainerErrorCode = 1, MSACACCanceledErrorCode = 2, MSACACDisabledErrorCode = 3};
// Error descriptions.
static NSString const *kMSACACLogInvalidContainerErrorDesc = @"Invalid log container.";
static NSString const *kMSACACCanceledErrorDesc = @"The operation was canceled.";
static NSString const *kMSACACDisabledErrorDesc = @"The service is disabled.";
#pragma mark - Connection
// Error codes.
NS_ENUM(NSInteger){MSACACConnectionPausedErrorCode = 100, MSACACConnectionHttpErrorCode = 101};
// Error descriptions.
static NSString const *kMSACACConnectionHttpErrorDesc = @"An HTTP error occured.";
static NSString const *kMSACACConnectionPausedErrorDesc = @"Canceled, connection paused with log deletion.";
// Error user info keys.
static NSString const *kMSACACConnectionHttpCodeErrorKey = @"MSConnectionHttpCode";
NS_ASSUME_NONNULL_END
#endif

View File

@@ -1,87 +0,0 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#ifndef MSAC_CHANNEL_GROUP_PROTOCOL_H
#define MSAC_CHANNEL_GROUP_PROTOCOL_H
#import <Foundation/Foundation.h>
#if __has_include(<AppCenter/MSACChannelProtocol.h>)
#import <AppCenter/MSACChannelProtocol.h>
#else
#import "MSACChannelProtocol.h"
#endif
NS_ASSUME_NONNULL_BEGIN
@class MSACChannelUnitConfiguration;
@protocol MSACIngestionProtocol;
@protocol MSACChannelUnitProtocol;
/**
* `MSACChannelGroupProtocol` represents a kind of channel that contains constituent MSACChannelUnit objects. When an operation from the
* `MSACChannelProtocol` is performed on the group, that operation should be propagated to its constituent MSACChannelUnit objects.
*/
NS_SWIFT_NAME(ChannelGroupProtocol)
@protocol MSACChannelGroupProtocol <MSACChannelProtocol>
/**
* Initialize a channel unit with the given configuration.
*
* @param configuration channel configuration.
*
* @return The added `MSACChannelUnitProtocol`. Use this object to enqueue logs.
*/
- (id<MSACChannelUnitProtocol>)addChannelUnitWithConfiguration:(MSACChannelUnitConfiguration *)configuration
NS_SWIFT_NAME(addChannelUnit(withConfiguration:));
/**
* Initialize a channel unit with the given configuration.
*
* @param configuration channel configuration.
* @param ingestion The alternative ingestion object
*
* @return The added `MSACChannelUnitProtocol`. Use this object to enqueue logs.
*/
- (id<MSACChannelUnitProtocol>)addChannelUnitWithConfiguration:(MSACChannelUnitConfiguration *)configuration
withIngestion:(nullable id<MSACIngestionProtocol>)ingestion
NS_SWIFT_NAME(addChannelUnit(_:ingestion:));
/**
* Change the base URL (schema + authority + port only) used to communicate with the backend.
*/
@property(nonatomic, strong) NSString *_Nullable logUrl;
/**
* Set the app secret.
*/
@property(nonatomic, strong) NSString *_Nullable appSecret;
/**
* Set the maximum size of the internal storage. This method must be called before App Center is started.
*
* @discussion The default maximum database size is 10485760 bytes (10 MiB).
*
* @param sizeInBytes Maximum size of the internal storage in bytes. This will be rounded up to the nearest multiple of a SQLite page size
* (default is 4096 bytes). Values below 24576 bytes (24 KiB) will be ignored.
* @param completionHandler Callback that is invoked when the database size has been set. The `BOOL` parameter is `YES` if changing the size
* is successful, and `NO` otherwise.
*/
- (void)setMaxStorageSize:(long)sizeInBytes
completionHandler:(nullable void (^)(BOOL))completionHandler NS_SWIFT_NAME(setMaxStorageSize(_:completionHandler:));
/**
* Return a channel unit instance for the given groupId.
*
* @param groupId The group ID for a channel unit.
*
* @return A channel unit instance or `nil`.
*/
- (nullable id<MSACChannelUnitProtocol>)channelUnitForGroupId:(NSString *)groupId;
@end
NS_ASSUME_NONNULL_END
#endif

View File

@@ -1,68 +0,0 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#ifndef MSAC_CHANNEL_PROTOCOL_H
#define MSAC_CHANNEL_PROTOCOL_H
#import <Foundation/Foundation.h>
#if __has_include(<AppCenter/MSACEnable.h>)
#import <AppCenter/MSACEnable.h>
#else
#import "MSACEnable.h"
#endif
NS_ASSUME_NONNULL_BEGIN
@protocol MSACChannelDelegate;
/**
* `MSACChannelProtocol` contains the essential operations of a channel. Channels are broadly responsible for enqueuing logs to be sent to
* the backend and/or stored on disk.
*/
NS_SWIFT_NAME(ChannelProtocol)
@protocol MSACChannelProtocol <NSObject, MSACEnable>
/**
* Add delegate.
*
* @param delegate delegate.
*/
- (void)addDelegate:(id<MSACChannelDelegate>)delegate;
/**
* Remove delegate.
*
* @param delegate delegate.
*/
- (void)removeDelegate:(id<MSACChannelDelegate>)delegate;
/**
* Pause operations, logs will be stored but not sent.
*
* @param identifyingObject Object used to identify the pause request.
*
* @discussion A paused channel doesn't forward logs to the ingestion. The identifying object used to pause the channel can be any unique
* object. The same identifying object must be used to call resume. For simplicity if the caller is the one owning the channel then @c self
* can be used as identifying object.
*
* @see resumeWithIdentifyingObject:
*/
- (void)pauseWithIdentifyingObject:(id<NSObject>)identifyingObject;
/**
* Resume operations, logs can be sent again.
*
* @param identifyingObject Object used to passed to the pause method.
*
* @discussion The channel only resume when all the outstanding identifying objects have been resumed.
*
* @see pauseWithIdentifyingObject:
*/
- (void)resumeWithIdentifyingObject:(id<NSObject>)identifyingObject;
@end
NS_ASSUME_NONNULL_END
#endif

View File

@@ -1,18 +0,0 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#ifndef MSAC_CONSTANTS_FLAGS_H
#define MSAC_CONSTANTS_FLAGS_H
#import <Foundation/Foundation.h>
typedef NS_OPTIONS(NSUInteger, MSACFlags) {
MSACFlagsNone = (0 << 0), // => 00000000
MSACFlagsNormal = (1 << 0), // => 00000001
MSACFlagsCritical = (1 << 1), // => 00000010
MSACFlagsPersistenceNormal DEPRECATED_MSG_ATTRIBUTE("please use MSACFlagsNormal") = MSACFlagsNormal,
MSACFlagsPersistenceCritical DEPRECATED_MSG_ATTRIBUTE("please use MSACFlagsCritical") = MSACFlagsCritical,
MSACFlagsDefault = MSACFlagsNormal
} NS_SWIFT_NAME(Flags);
#endif

View File

@@ -1,170 +0,0 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#import <Foundation/Foundation.h>
/**
* Log Levels
*/
typedef NS_ENUM(NSUInteger, MSACLogLevel) {
/**
* Logging will be very chatty
*/
MSACLogLevelVerbose = 2,
/**
* Debug information will be logged
*/
MSACLogLevelDebug = 3,
/**
* Information will be logged
*/
MSACLogLevelInfo = 4,
/**
* Errors and warnings will be logged
*/
MSACLogLevelWarning = 5,
/**
* Errors will be logged
*/
MSACLogLevelError = 6,
/**
* Only critical errors will be logged
*/
MSACLogLevelAssert = 7,
/**
* Logging is disabled
*/
MSACLogLevelNone = 99
} NS_SWIFT_NAME(LogLevel);
typedef NSString * (^MSACLogMessageProvider)(void)NS_SWIFT_NAME(LogMessageProvider);
typedef void (^MSACLogHandler)(MSACLogMessageProvider messageProvider, MSACLogLevel logLevel, NSString *tag, const char *file,
const char *function, uint line) NS_SWIFT_NAME(LogHandler);
/**
* Channel priorities, check the kMSACPriorityCount if you add a new value.
* The order matters here! Values NEED to range from low priority to high priority.
*/
typedef NS_ENUM(NSInteger, MSACPriority) { MSACPriorityBackground, MSACPriorityDefault, MSACPriorityHigh } NS_SWIFT_NAME(Priority);
static short const kMSACPriorityCount = MSACPriorityHigh + 1;
/**
* The priority by which the modules are initialized.
* MSACPriorityMax is reserved for only 1 module and this needs to be Crashes.
* Crashes needs to be initialized first to catch crashes in our other SDK Modules (which will hopefully never happen) and to avoid losing
* any log at crash time.
*/
typedef NS_ENUM(NSInteger, MSACInitializationPriority) {
MSACInitializationPriorityDefault = 500,
MSACInitializationPriorityHigh = 750,
MSACInitializationPriorityMax = 999
} NS_SWIFT_NAME(InitializationPriority);
/**
* Enum with the different HTTP status codes.
*/
typedef NS_ENUM(NSInteger, MSACHTTPCodesNo) {
// Invalid
MSACHTTPCodesNo0XXInvalidUnknown = 0,
// Informational
MSACHTTPCodesNo1XXInformationalUnknown = 1,
MSACHTTPCodesNo100Continue = 100,
MSACHTTPCodesNo101SwitchingProtocols = 101,
MSACHTTPCodesNo102Processing = 102,
// Success
MSACHTTPCodesNo2XXSuccessUnknown = 2,
MSACHTTPCodesNo200OK = 200,
MSACHTTPCodesNo201Created = 201,
MSACHTTPCodesNo202Accepted = 202,
MSACHTTPCodesNo203NonAuthoritativeInformation = 203,
MSACHTTPCodesNo204NoContent = 204,
MSACHTTPCodesNo205ResetContent = 205,
MSACHTTPCodesNo206PartialContent = 206,
MSACHTTPCodesNo207MultiStatus = 207,
MSACHTTPCodesNo208AlreadyReported = 208,
MSACHTTPCodesNo209IMUsed = 209,
// Redirection
MSACHTTPCodesNo3XXSuccessUnknown = 3,
MSACHTTPCodesNo300MultipleChoices = 300,
MSACHTTPCodesNo301MovedPermanently = 301,
MSACHTTPCodesNo302Found = 302,
MSACHTTPCodesNo303SeeOther = 303,
MSACHTTPCodesNo304NotModified = 304,
MSACHTTPCodesNo305UseProxy = 305,
MSACHTTPCodesNo306SwitchProxy = 306,
MSACHTTPCodesNo307TemporaryRedirect = 307,
MSACHTTPCodesNo308PermanentRedirect = 308,
// Client error
MSACHTTPCodesNo4XXSuccessUnknown = 4,
MSACHTTPCodesNo400BadRequest = 400,
MSACHTTPCodesNo401Unauthorised = 401,
MSACHTTPCodesNo402PaymentRequired = 402,
MSACHTTPCodesNo403Forbidden = 403,
MSACHTTPCodesNo404NotFound = 404,
MSACHTTPCodesNo405MethodNotAllowed = 405,
MSACHTTPCodesNo406NotAcceptable = 406,
MSACHTTPCodesNo407ProxyAuthenticationRequired = 407,
MSACHTTPCodesNo408RequestTimeout = 408,
MSACHTTPCodesNo409Conflict = 409,
MSACHTTPCodesNo410Gone = 410,
MSACHTTPCodesNo411LengthRequired = 411,
MSACHTTPCodesNo412PreconditionFailed = 412,
MSACHTTPCodesNo413RequestEntityTooLarge = 413,
MSACHTTPCodesNo414RequestURITooLong = 414,
MSACHTTPCodesNo415UnsupportedMediaType = 415,
MSACHTTPCodesNo416RequestedRangeNotSatisfiable = 416,
MSACHTTPCodesNo417ExpectationFailed = 417,
MSACHTTPCodesNo418IamATeapot = 418,
MSACHTTPCodesNo419AuthenticationTimeout = 419,
MSACHTTPCodesNo420MethodFailureSpringFramework = 420,
MSACHTTPCodesNo420EnhanceYourCalmTwitter = 4200,
MSACHTTPCodesNo422UnprocessableEntity = 422,
MSACHTTPCodesNo423Locked = 423,
MSACHTTPCodesNo424FailedDependency = 424,
MSACHTTPCodesNo424MethodFailureWebDaw = 4240,
MSACHTTPCodesNo425UnorderedCollection = 425,
MSACHTTPCodesNo426UpgradeRequired = 426,
MSACHTTPCodesNo428PreconditionRequired = 428,
MSACHTTPCodesNo429TooManyRequests = 429,
MSACHTTPCodesNo431RequestHeaderFieldsTooLarge = 431,
MSACHTTPCodesNo444NoResponseNginx = 444,
MSACHTTPCodesNo449RetryWithMicrosoft = 449,
MSACHTTPCodesNo450BlockedByWindowsParentalControls = 450,
MSACHTTPCodesNo451RedirectMicrosoft = 451,
MSACHTTPCodesNo451UnavailableForLegalReasons = 4510,
MSACHTTPCodesNo494RequestHeaderTooLargeNginx = 494,
MSACHTTPCodesNo495CertErrorNginx = 495,
MSACHTTPCodesNo496NoCertNginx = 496,
MSACHTTPCodesNo497HTTPToHTTPSNginx = 497,
MSACHTTPCodesNo499ClientClosedRequestNginx = 499,
// Server error
MSACHTTPCodesNo5XXSuccessUnknown = 5,
MSACHTTPCodesNo500InternalServerError = 500,
MSACHTTPCodesNo501NotImplemented = 501,
MSACHTTPCodesNo502BadGateway = 502,
MSACHTTPCodesNo503ServiceUnavailable = 503,
MSACHTTPCodesNo504GatewayTimeout = 504,
MSACHTTPCodesNo505HTTPVersionNotSupported = 505,
MSACHTTPCodesNo506VariantAlsoNegotiates = 506,
MSACHTTPCodesNo507InsufficientStorage = 507,
MSACHTTPCodesNo508LoopDetected = 508,
MSACHTTPCodesNo509BandwidthLimitExceeded = 509,
MSACHTTPCodesNo510NotExtended = 510,
MSACHTTPCodesNo511NetworkAuthenticationRequired = 511,
MSACHTTPCodesNo522ConnectionTimedOut = 522,
MSACHTTPCodesNo598NetworkReadTimeoutErrorUnknown = 598,
MSACHTTPCodesNo599NetworkConnectTimeoutErrorUnknown = 599
} NS_SWIFT_NAME(HTTPCodesNo);

View File

@@ -1,71 +0,0 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#ifndef MSAC_CUSTOM_PROPERTIES_H
#define MSAC_CUSTOM_PROPERTIES_H
#import <Foundation/Foundation.h>
/**
* Custom properties builder.
* Collects multiple properties to send in one log.
*/
NS_SWIFT_NAME(CustomProperties)
@interface MSACCustomProperties : NSObject
/**
* Set the specified property value with the specified key.
* If the properties previously contained a property for the key, the old value is replaced.
*
* @param key Key with which the specified value is to be set.
* @param value Value to be set with the specified key.
*
* @return This instance.
*/
- (instancetype)setString:(NSString *)value forKey:(NSString *)key NS_SWIFT_NAME(set(_:forKey:));
/**
* Set the specified property value with the specified key.
* If the properties previously contained a property for the key, the old value is replaced.
*
* @param key Key with which the specified value is to be set.
* @param value Value to be set with the specified key.
*
* @return This instance.
*/
- (instancetype)setNumber:(NSNumber *)value forKey:(NSString *)key NS_SWIFT_NAME(set(_:forKey:));
/**
* Set the specified property value with the specified key.
* If the properties previously contained a property for the key, the old value is replaced.
*
* @param key Key with which the specified value is to be set.
* @param value Value to be set with the specified key.
*
* @return This instance.
*/
- (instancetype)setBool:(BOOL)value forKey:(NSString *)key NS_SWIFT_NAME(set(_:forKey:));
/**
* Set the specified property value with the specified key.
* If the properties previously contained a property for the key, the old value is replaced.
*
* @param key Key with which the specified value is to be set.
* @param value Value to be set with the specified key.
*
* @return This instance.
*/
- (instancetype)setDate:(NSDate *)value forKey:(NSString *)key NS_SWIFT_NAME(set(_:forKey:));
/**
* Clear the property for the specified key.
*
* @param key Key whose mapping is to be cleared.
*
* @return This instance.
*/
- (instancetype)clearPropertyForKey:(NSString *)key NS_SWIFT_NAME(clearProperty(forKey:));
@end
#endif

View File

@@ -1,101 +0,0 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#ifndef MSAC_DEVICE_H
#define MSAC_DEVICE_H
#import <Foundation/Foundation.h>
#if __has_include(<AppCenter/MSACWrapperSdk.h>)
#import <AppCenter/MSACWrapperSdk.h>
#else
#import "MSACWrapperSdk.h"
#endif
NS_SWIFT_NAME(Device)
@interface MSACDevice : MSACWrapperSdk
/*
* Name of the SDK. Consists of the name of the SDK and the platform, e.g. "appcenter.ios", "appcenter.android"
*/
@property(nonatomic, copy, readonly) NSString *sdkName;
/*
* Version of the SDK in semver format, e.g. "1.2.0" or "0.12.3-alpha.1".
*/
@property(nonatomic, copy, readonly) NSString *sdkVersion;
/*
* Device model (example: iPad2,3).
*/
@property(nonatomic, copy, readonly) NSString *model;
/*
* Device manufacturer (example: HTC).
*/
@property(nonatomic, copy, readonly) NSString *oemName;
/*
* OS name (example: iOS).
*/
@property(nonatomic, copy, readonly) NSString *osName;
/*
* OS version (example: 9.3.0).
*/
@property(nonatomic, copy, readonly) NSString *osVersion;
/*
* OS build code (example: LMY47X). [optional]
*/
@property(nonatomic, copy, readonly) NSString *osBuild;
/*
* API level when applicable like in Android (example: 15). [optional]
*/
@property(nonatomic, copy, readonly) NSNumber *osApiLevel;
/*
* Language code (example: en_US).
*/
@property(nonatomic, copy, readonly) NSString *locale;
/*
* The offset in minutes from UTC for the device time zone, including daylight savings time.
*/
@property(nonatomic, readonly, strong) NSNumber *timeZoneOffset;
/*
* Screen size of the device in pixels (example: 640x480).
*/
@property(nonatomic, copy, readonly) NSString *screenSize;
/*
* Application version name, e.g. 1.1.0
*/
@property(nonatomic, copy, readonly) NSString *appVersion;
/*
* Carrier name (for mobile devices). [optional]
*/
@property(nonatomic, copy, readonly) NSString *carrierName;
/*
* Carrier country code (for mobile devices). [optional]
*/
@property(nonatomic, copy, readonly) NSString *carrierCountry;
/*
* The app's build number, e.g. 42.
*/
@property(nonatomic, copy, readonly) NSString *appBuild;
/*
* The bundle identifier, package identifier, or namespace, depending on what the individual plattforms use, .e.g com.microsoft.example.
* [optional]
*/
@property(nonatomic, copy, readonly) NSString *appNamespace;
@end
#endif

View File

@@ -1,27 +0,0 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#ifndef MSAC_ENABLE_H
#define MSAC_ENABLE_H
#import <Foundation/Foundation.h>
/**
* Protocol to define an instance that can be enabled/disabled.
*/
NS_SWIFT_NAME(Enable)
@protocol MSACEnable <NSObject>
@required
/**
* Enable/disable this instance and delete data on disabled state.
*
* @param isEnabled A boolean value set to YES to enable the instance or NO to disable it.
* @param deleteData A boolean value set to YES to delete data or NO to keep it.
*/
- (void)setEnabled:(BOOL)isEnabled andDeleteDataOnDisabled:(BOOL)deleteData NS_SWIFT_NAME(setEnabled(_:deleteDataOnDisabled:));
@end
#endif

View File

@@ -1,74 +0,0 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#ifndef MSAC_LOG_H
#define MSAC_LOG_H
#import <Foundation/Foundation.h>
@class MSACDevice;
NS_SWIFT_NAME(Log)
@protocol MSACLog <NSObject>
/**
* Log type.
*/
@property(nonatomic, copy) NSString *type;
/**
* Log timestamp.
*/
@property(nonatomic, strong) NSDate *timestamp;
/**
* A session identifier is used to correlate logs together. A session is an abstract concept in the API and is not necessarily an analytics
* session, it can be used to only track crashes.
*/
@property(nonatomic, copy) NSString *sid;
/**
* Optional distribution group ID value.
*/
@property(nonatomic, copy) NSString *distributionGroupId;
/**
* Optional user identifier.
*/
@property(nonatomic, copy) NSString *userId;
/**
* Device properties associated to this log.
*/
@property(nonatomic, strong) MSACDevice *device;
/**
* Transient object tag. For example, a log can be tagged with a transmission target. We do this currently to prevent properties being
* applied retroactively to previous logs by comparing their tags.
*/
@property(nonatomic, strong) NSObject *tag;
/**
* Checks if the object's values are valid.
*
* @return YES, if the object is valid.
*/
- (BOOL)isValid;
/**
* Adds a transmission target token that this log should be sent to.
*
* @param token The transmission target token.
*/
- (void)addTransmissionTargetToken:(NSString *)token;
/**
* Gets all transmission target tokens that this log should be sent to.
*
* @returns Collection of transmission target tokens that this log should be sent to.
*/
- (NSSet *)transmissionTargetTokens;
@end
#endif

View File

@@ -1,25 +0,0 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#ifndef MSAC_LOG_WITH_PROPERTIES_H
#define MSAC_LOG_WITH_PROPERTIES_H
#import <Foundation/Foundation.h>
#if __has_include(<AppCenter/MSACAbstractLog.h>)
#import <AppCenter/MSACAbstractLog.h>
#else
#import "MSACAbstractLog.h"
#endif
NS_SWIFT_NAME(LogWithProperties)
@interface MSACLogWithProperties : MSACAbstractLog
/**
* Additional key/value pair parameters. [optional]
*/
@property(nonatomic, strong) NSDictionary<NSString *, NSString *> *properties;
@end
#endif

View File

@@ -1,54 +0,0 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#import <Foundation/Foundation.h>
#ifndef MSAC_LOGGER
#define MSAC_LOGGER
#if __has_include(<AppCenter/MSACConstants.h>)
#import <AppCenter/MSACConstants.h>
#else
#import "MSACConstants.h"
#endif
#define MSACLog(_level, _tag, _message) \
[MSACLogger logMessage:_message level:_level tag:_tag file:__FILE__ function:__PRETTY_FUNCTION__ line:__LINE__]
#define MSACLogAssert(tag, format, ...) \
MSACLog(MSACLogLevelAssert, tag, (^{ \
return [NSString stringWithFormat:(format), ##__VA_ARGS__]; \
}))
#define MSACLogError(tag, format, ...) \
MSACLog(MSACLogLevelError, tag, (^{ \
return [NSString stringWithFormat:(format), ##__VA_ARGS__]; \
}))
#define MSACLogWarning(tag, format, ...) \
MSACLog(MSACLogLevelWarning, tag, (^{ \
return [NSString stringWithFormat:(format), ##__VA_ARGS__]; \
}))
#define MSACLogInfo(tag, format, ...) \
MSACLog(MSACLogLevelInfo, tag, (^{ \
return [NSString stringWithFormat:(format), ##__VA_ARGS__]; \
}))
#define MSACLogDebug(tag, format, ...) \
MSACLog(MSACLogLevelDebug, tag, (^{ \
return [NSString stringWithFormat:(format), ##__VA_ARGS__]; \
}))
#define MSACLogVerbose(tag, format, ...) \
MSACLog(MSACLogLevelVerbose, tag, (^{ \
return [NSString stringWithFormat:(format), ##__VA_ARGS__]; \
}))
NS_SWIFT_NAME(Logger)
@interface MSACLogger : NSObject
+ (void)logMessage:(MSACLogMessageProvider)messageProvider
level:(MSACLogLevel)loglevel
tag:(NSString *)tag
file:(const char *)file
function:(const char *)function
line:(uint)line;
@end
#endif

View File

@@ -1,23 +0,0 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#ifndef MSAC_SERVICE_H
#define MSAC_SERVICE_H
#import <Foundation/Foundation.h>
/**
* Protocol declaring service logic.
*/
NS_SWIFT_NAME(Service)
@protocol MSACService <NSObject>
/**
* Indicates whether this service is enabled.
* The state is persisted in the device's storage across application launches.
*/
@property(class, nonatomic, getter=isEnabled, setter=setEnabled:) BOOL enabled NS_SWIFT_NAME(enabled);
@end
#endif

View File

@@ -1,58 +0,0 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#ifndef MSAC_SERVICE_ABSTRACT_H
#define MSAC_SERVICE_ABSTRACT_H
#import <Foundation/Foundation.h>
#if __has_include(<AppCenter/MSACService.h>)
#import <AppCenter/MSACService.h>
#else
#import "MSACService.h"
#endif
@protocol MSACChannelGroupProtocol;
/**
* Abstraction of services common logic.
* This class is intended to be subclassed only not instantiated directly.
*/
NS_SWIFT_NAME(ServiceAbstract)
@interface MSACServiceAbstract : NSObject <MSACService>
/**
* The flag indicates whether the service is started from application or not.
*/
@property(nonatomic, assign) BOOL startedFromApplication;
/**
* Start this service with a channel group. Also sets the flag that indicates that a service has been started.
*
* @param channelGroup channel group used to persist and send logs.
* @param appSecret app secret for the SDK.
* @param token default transmission target token for this service.
* @param fromApplication indicates whether the service started from an application or not.
*/
- (void)startWithChannelGroup:(id<MSACChannelGroupProtocol>)channelGroup
appSecret:(NSString *)appSecret
transmissionTargetToken:(NSString *)token
fromApplication:(BOOL)fromApplication;
/**
* Update configuration when the service requires to start again. This method should only be called if the service is started from libraries
* and then is being started from an application.
*
* @param appSecret app secret for the SDK.
* @param token default transmission target token for this service.
*/
- (void)updateConfigurationWithAppSecret:(NSString *)appSecret transmissionTargetToken:(NSString *)token;
/**
* The flag indicate whether the service needs the application secret or not.
*/
@property(atomic, readonly) BOOL isAppSecretRequired;
@end
#endif

View File

@@ -1,21 +0,0 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#import <Foundation/Foundation.h>
#if __has_include(<AppCenter/MSACConstants.h>)
#import <AppCenter/MSACConstants.h>
#else
#import "MSACConstants.h"
#endif
/**
* This is a utility for producing App Center style log messages. It is only intended for use by App Center services and wrapper SDKs of App
* Center.
*/
NS_SWIFT_NAME(WrapperLogger)
@interface MSACWrapperLogger : NSObject
+ (void)MSACWrapperLog:(MSACLogMessageProvider)message tag:(NSString *)tag level:(MSACLogLevel)level;
@end

View File

@@ -1,60 +0,0 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#ifndef MSAC_WRAPPER_SDK_H
#define MSAC_WRAPPER_SDK_H
#import <Foundation/Foundation.h>
NS_SWIFT_NAME(WrapperSdk)
@interface MSACWrapperSdk : NSObject
/*
* Version of the wrapper SDK. When the SDK is embedding another base SDK (for example Xamarin.Android wraps Android), the Xamarin specific
* version is populated into this field while sdkVersion refers to the original Android SDK. [optional]
*/
@property(nonatomic, copy, readonly) NSString *wrapperSdkVersion;
/*
* Name of the wrapper SDK (examples: Xamarin, Cordova). [optional]
*/
@property(nonatomic, copy, readonly) NSString *wrapperSdkName;
/*
* Version of the wrapper technology framework (Xamarin runtime version or ReactNative or Cordova etc...). [optional]
*/
@property(nonatomic, copy, readonly) NSString *wrapperRuntimeVersion;
/*
* Label that is used to identify application code 'version' released via Live Update beacon running on device.
*/
@property(nonatomic, copy, readonly) NSString *liveUpdateReleaseLabel;
/*
* Identifier of environment that current application release belongs to, deployment key then maps to environment like Production, Staging.
*/
@property(nonatomic, copy, readonly) NSString *liveUpdateDeploymentKey;
/*
* Hash of all files (ReactNative or Cordova) deployed to device via LiveUpdate beacon. Helps identify the Release version on device or need
* to download updates in future
*/
@property(nonatomic, copy, readonly) NSString *liveUpdatePackageHash;
- (instancetype)initWithWrapperSdkVersion:(NSString *)wrapperSdkVersion
wrapperSdkName:(NSString *)wrapperSdkName
wrapperRuntimeVersion:(NSString *)wrapperRuntimeVersion
liveUpdateReleaseLabel:(NSString *)liveUpdateReleaseLabel
liveUpdateDeploymentKey:(NSString *)liveUpdateDeploymentKey
liveUpdatePackageHash:(NSString *)liveUpdatePackageHash;
/**
* Checks if the object's values are valid.
*
* @return YES, if the object is valid.
*/
- (BOOL)isValid;
@end
#endif

View File

@@ -1,13 +0,0 @@
framework module AppCenter {
umbrella header "AppCenter.h"
export *
module * { export * }
link framework "Foundation"
link framework "CoreTelephony"
link framework "SystemConfiguration"
link framework "UIKit"
link "sqlite3"
link "z"
}

View File

@@ -1,114 +0,0 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#import <Foundation/Foundation.h>
#import "MSACConstants+Flags.h"
@protocol MSACChannelUnitProtocol;
@protocol MSACChannelGroupProtocol;
@protocol MSACChannelProtocol;
@protocol MSACLog;
NS_ASSUME_NONNULL_BEGIN
@protocol MSACChannelDelegate <NSObject>
@optional
/**
* A callback that is called when a channel unit is added to the channel group.
*
* @param channelGroup The channel group.
* @param channel The newly added channel.
*/
- (void)channelGroup:(id<MSACChannelGroupProtocol>)channelGroup didAddChannelUnit:(id<MSACChannelUnitProtocol>)channel;
/**
* A callback that is called when a log is just enqueued. Delegates may want to prepare the log a little more before further processing.
*
* @param log The log to prepare.
*/
- (void)channel:(id<MSACChannelProtocol>)channel prepareLog:(id<MSACLog>)log;
/**
* A callback that is called after a log is definitely prepared.
*
* @param log The log.
* @param internalId An internal Id to keep track of logs.
* @param flags Options for the log.
*/
- (void)channel:(id<MSACChannelProtocol>)channel didPrepareLog:(id<MSACLog>)log internalId:(NSString *)internalId flags:(MSACFlags)flags;
/**
* A callback that is called after a log completed the enqueueing process whether it was successful or not.
*
* @param log The log.
* @param internalId An internal Id to keep track of logs.
*/
- (void)channel:(id<MSACChannelProtocol>)channel didCompleteEnqueueingLog:(id<MSACLog>)log internalId:(NSString *)internalId;
/**
* Callback method that will be called before each log will be send to the server.
*
* @param channel The channel object.
* @param log The log to be sent.
*/
- (void)channel:(id<MSACChannelProtocol>)channel willSendLog:(id<MSACLog>)log;
/**
* Callback method that will be called in case the SDK was able to send a log.
*
* @param channel The channel object.
* @param log The log to be sent.
*/
- (void)channel:(id<MSACChannelProtocol>)channel didSucceedSendingLog:(id<MSACLog>)log;
/**
* Callback method that will be called in case the SDK was unable to send a log.
*
* @param channel The channel object.
* @param log The log to be sent.
* @param error The error that occured.
*/
- (void)channel:(id<MSACChannelProtocol>)channel didFailSendingLog:(id<MSACLog>)log withError:(nullable NSError *)error;
/**
* A callback that is called when setEnabled has been invoked.
*
* @param channel The channel.
* @param isEnabled The boolean that indicates enabled.
* @param deletedData The boolean that indicates deleting data on disabled.
*/
- (void)channel:(id<MSACChannelProtocol>)channel didSetEnabled:(BOOL)isEnabled andDeleteDataOnDisabled:(BOOL)deletedData;
/**
* A callback that is called when pause has been invoked.
*
* @param channel The channel.
* @param identifyingObject The identifying object used to pause the channel.
*/
- (void)channel:(id<MSACChannelProtocol>)channel didPauseWithIdentifyingObject:(id<NSObject>)identifyingObject;
/**
* A callback that is called when resume has been invoked.
*
* @param channel The channel.
* @param identifyingObject The identifying object used to resume the channel.
*/
- (void)channel:(id<MSACChannelProtocol>)channel didResumeWithIdentifyingObject:(id<NSObject>)identifyingObject;
/**
* Callback method that will determine if a log should be filtered out from the usual processing pipeline. If any delegate returns true, the
* log is filtered.
*
* @param channelUnit The channel unit that is going to send the log.
* @param log The log to be filtered or not.
*
* @return `true` if the log should be filtered out.
*/
- (BOOL)channelUnit:(id<MSACChannelUnitProtocol>)channelUnit shouldFilterLog:(id<MSACLog>)log;
@end
NS_ASSUME_NONNULL_END

View File

@@ -1,42 +0,0 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#import <Foundation/Foundation.h>
#if __has_include(<AppCenter/MSACAppCenter.h>)
#import <AppCenter/MSACAbstractLog.h>
#import <AppCenter/MSACAppCenter.h>
#import <AppCenter/MSACAppCenterErrors.h>
#import <AppCenter/MSACChannelGroupProtocol.h>
#import <AppCenter/MSACChannelProtocol.h>
#import <AppCenter/MSACConstants+Flags.h>
#import <AppCenter/MSACConstants.h>
#import <AppCenter/MSACCustomProperties.h>
#import <AppCenter/MSACDevice.h>
#import <AppCenter/MSACEnable.h>
#import <AppCenter/MSACLog.h>
#import <AppCenter/MSACLogWithProperties.h>
#import <AppCenter/MSACLogger.h>
#import <AppCenter/MSACService.h>
#import <AppCenter/MSACServiceAbstract.h>
#import <AppCenter/MSACWrapperLogger.h>
#import <AppCenter/MSACWrapperSdk.h>
#else
#import "MSACAbstractLog.h"
#import "MSACAppCenter.h"
#import "MSACAppCenterErrors.h"
#import "MSACChannelGroupProtocol.h"
#import "MSACChannelProtocol.h"
#import "MSACConstants+Flags.h"
#import "MSACConstants.h"
#import "MSACCustomProperties.h"
#import "MSACDevice.h"
#import "MSACEnable.h"
#import "MSACLog.h"
#import "MSACLogWithProperties.h"
#import "MSACLogger.h"
#import "MSACService.h"
#import "MSACServiceAbstract.h"
#import "MSACWrapperLogger.h"
#import "MSACWrapperSdk.h"
#endif

View File

@@ -1,14 +0,0 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#ifndef MSAC_ABSTRACT_LOG_H
#define MSAC_ABSTRACT_LOG_H
#import <Foundation/Foundation.h>
NS_SWIFT_NAME(AbstractLog)
@interface MSACAbstractLog : NSObject
@end
#endif

View File

@@ -1,203 +0,0 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#import <Foundation/Foundation.h>
#ifndef MSAC_APP_CENTER
#define MSAC_APP_CENTER
#if __has_include(<AppCenter/MSACConstants.h>)
#import <AppCenter/MSACConstants.h>
#else
#import "MSACConstants.h"
#endif
@class MSACWrapperSdk;
#if !TARGET_OS_TV
@class MSACCustomProperties;
#endif
NS_SWIFT_NAME(AppCenter)
@interface MSACAppCenter : NSObject
/**
* Returns the singleton instance of MSACAppCenter.
*/
+ (instancetype)sharedInstance;
/**
* Configure the SDK with an application secret.
*
* @param appSecret A unique and secret key used to identify the application.
*
* @discussion This may be called only once per application process lifetime.
*/
+ (void)configureWithAppSecret:(NSString *)appSecret NS_SWIFT_NAME(configure(withAppSecret:));
/**
* Configure the SDK.
*
* @discussion This may be called only once per application process lifetime.
*/
+ (void)configure;
/**
* Configure the SDK with an application secret and an array of services to start.
*
* @param appSecret A unique and secret key used to identify the application.
* @param services Array of services to start.
*
* @discussion This may be called only once per application process lifetime.
*/
+ (void)start:(NSString *)appSecret withServices:(NSArray<Class> *)services NS_SWIFT_NAME(start(withAppSecret:services:));
/**
* Start the SDK with an array of services.
*
* @param services Array of services to start.
*
* @discussion This may be called only once per application process lifetime.
*/
+ (void)startWithServices:(NSArray<Class> *)services NS_SWIFT_NAME(start(services:));
/**
* Start a service.
*
* @param service A service to start.
*
* @discussion This may be called only once per service per application process lifetime.
*/
+ (void)startService:(Class)service;
/**
* Configure the SDK with an array of services to start from a library. This will not start the service at application level, it will enable
* the service only for the library.
*
* @param services Array of services to start.
*/
+ (void)startFromLibraryWithServices:(NSArray<Class> *)services NS_SWIFT_NAME(startFromLibrary(services:));
/**
* The flag indicates whether the SDK has already been configured or not.
*/
@property(class, atomic, readonly, getter=isConfigured) BOOL configured;
/**
* The flag indicates whether app is running in App Center Test Cloud.
*/
@property(class, atomic, readonly, getter=isRunningInAppCenterTestCloud) BOOL runningInAppCenterTestCloud;
/**
* The flag indicates whether or not the SDK was enabled as a whole
*
* The state is persisted in the device's storage across application launches.
*/
@property(class, nonatomic, getter=isEnabled, setter=setEnabled:) BOOL enabled NS_SWIFT_NAME(enabled);
/**
* Flag indicating whether SDK can send network requests.
*
* The state is persisted in the device's storage across application launches.
*/
@property(class, nonatomic, getter=isNetworkRequestsAllowed, setter=setNetworkRequestsAllowed:)
BOOL networkRequestsAllowed NS_SWIFT_NAME(networkRequestsAllowed);
/**
* The SDK's log level.
*/
@property(class, nonatomic) MSACLogLevel logLevel;
/**
* Base URL to use for backend communication.
*/
@property(class, nonatomic, strong) NSString *logUrl;
/**
* Set log handler.
*/
@property(class, nonatomic) MSACLogHandler logHandler;
/**
* Set wrapper SDK information to use when building device properties. This is intended in case you are building a SDK that uses the App
* Center SDK under the hood, e.g. our Xamarin SDK or ReactNative SDk.
*/
@property(class, nonatomic, strong) MSACWrapperSdk *wrapperSdk;
#if !TARGET_OS_TV
/**
* Set the custom properties.
*
* @param customProperties Custom properties object.
*/
+ (void)setCustomProperties:(MSACCustomProperties *)customProperties;
#endif
/**
* Check whether the application delegate forwarder is enabled or not.
*
* @discussion The application delegate forwarder forwards messages that target your application delegate methods via swizzling to the SDK.
* It simplifies the SDK integration but may not be suitable to any situations. For
* instance it should be disabled if you or one of your third party SDK is doing message forwarding on the application delegate. Message
* forwarding usually implies the implementation of @see NSObject#forwardingTargetForSelector: or @see NSObject#forwardInvocation: methods.
* To disable the application delegate forwarder just add the `AppCenterAppDelegateForwarderEnabled` tag to your Info .plist file and set it
* to `0`. Then you will have to forward any application delegate needed by the SDK manually.
*/
@property(class, readonly, nonatomic, getter=isAppDelegateForwarderEnabled) BOOL appDelegateForwarderEnabled;
/**
* Unique installation identifier.
*
*/
@property(class, readonly, nonatomic) NSUUID *installId;
/**
* Detect if a debugger is attached to the app process. This is only invoked once on app startup and can not detect
* if the debugger is being attached during runtime!
*
*/
@property(class, readonly, nonatomic, getter=isDebuggerAttached) BOOL debuggerAttached;
/**
* Current version of AppCenter SDK.
*
*/
@property(class, readonly, nonatomic) NSString *sdkVersion;
/**
* Set the maximum size of the internal storage. This method must be called before App Center is started. This method is only intended for
* applications.
*
* @param sizeInBytes Maximum size of the internal storage in bytes. This will be rounded up to the nearest multiple of a SQLite page size
* (default is 4096 bytes). Values below 20,480 bytes (20 KiB) will be ignored.
*
* @param completionHandler Callback that is invoked when the database size has been set. The `BOOL` parameter is `YES` if changing the size
* is successful, and `NO` otherwise. This parameter can be null.
*
* @discussion This only sets the maximum size of the database, but App Center modules might store additional data.
* The value passed to this method is not persisted on disk. The default maximum database size is 10485760 bytes (10 MiB).
*/
+ (void)setMaxStorageSize:(long)sizeInBytes completionHandler:(void (^)(BOOL))completionHandler;
/**
* Set the user identifier.
*
* @discussion Set the user identifier for logs sent for the default target token when the secret passed in @c
* MSACAppCenter:start:withServices: contains "target={targetToken}".
*
* For App Center backend the user identifier maximum length is 256 characters.
*
* AppCenter must be configured or started before this API can be used.
*/
@property(class, nonatomic, strong) NSString *userId;
/**
* Set country code to use when building device properties.
*
* @see https://www.iso.org/obp/ui/#search for more information.
*/
@property(class, nonatomic, strong) NSString *countryCode;
@end
#endif

View File

@@ -1,41 +0,0 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#ifndef MSAC_APP_CENTER_ERRORS_H
#define MSAC_APP_CENTER_ERRORS_H
#import <Foundation/Foundation.h>
#define MSAC_APP_CENTER_BASE_DOMAIN @"com.Microsoft.AppCenter."
NS_ASSUME_NONNULL_BEGIN
#pragma mark - Domain
static NSString *const kMSACACErrorDomain = MSAC_APP_CENTER_BASE_DOMAIN @"ErrorDomain";
#pragma mark - General
// Error codes.
NS_ENUM(NSInteger){MSACACLogInvalidContainerErrorCode = 1, MSACACCanceledErrorCode = 2, MSACACDisabledErrorCode = 3};
// Error descriptions.
static NSString const *kMSACACLogInvalidContainerErrorDesc = @"Invalid log container.";
static NSString const *kMSACACCanceledErrorDesc = @"The operation was canceled.";
static NSString const *kMSACACDisabledErrorDesc = @"The service is disabled.";
#pragma mark - Connection
// Error codes.
NS_ENUM(NSInteger){MSACACConnectionPausedErrorCode = 100, MSACACConnectionHttpErrorCode = 101};
// Error descriptions.
static NSString const *kMSACACConnectionHttpErrorDesc = @"An HTTP error occured.";
static NSString const *kMSACACConnectionPausedErrorDesc = @"Canceled, connection paused with log deletion.";
// Error user info keys.
static NSString const *kMSACACConnectionHttpCodeErrorKey = @"MSConnectionHttpCode";
NS_ASSUME_NONNULL_END
#endif

View File

@@ -1,87 +0,0 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#ifndef MSAC_CHANNEL_GROUP_PROTOCOL_H
#define MSAC_CHANNEL_GROUP_PROTOCOL_H
#import <Foundation/Foundation.h>
#if __has_include(<AppCenter/MSACChannelProtocol.h>)
#import <AppCenter/MSACChannelProtocol.h>
#else
#import "MSACChannelProtocol.h"
#endif
NS_ASSUME_NONNULL_BEGIN
@class MSACChannelUnitConfiguration;
@protocol MSACIngestionProtocol;
@protocol MSACChannelUnitProtocol;
/**
* `MSACChannelGroupProtocol` represents a kind of channel that contains constituent MSACChannelUnit objects. When an operation from the
* `MSACChannelProtocol` is performed on the group, that operation should be propagated to its constituent MSACChannelUnit objects.
*/
NS_SWIFT_NAME(ChannelGroupProtocol)
@protocol MSACChannelGroupProtocol <MSACChannelProtocol>
/**
* Initialize a channel unit with the given configuration.
*
* @param configuration channel configuration.
*
* @return The added `MSACChannelUnitProtocol`. Use this object to enqueue logs.
*/
- (id<MSACChannelUnitProtocol>)addChannelUnitWithConfiguration:(MSACChannelUnitConfiguration *)configuration
NS_SWIFT_NAME(addChannelUnit(withConfiguration:));
/**
* Initialize a channel unit with the given configuration.
*
* @param configuration channel configuration.
* @param ingestion The alternative ingestion object
*
* @return The added `MSACChannelUnitProtocol`. Use this object to enqueue logs.
*/
- (id<MSACChannelUnitProtocol>)addChannelUnitWithConfiguration:(MSACChannelUnitConfiguration *)configuration
withIngestion:(nullable id<MSACIngestionProtocol>)ingestion
NS_SWIFT_NAME(addChannelUnit(_:ingestion:));
/**
* Change the base URL (schema + authority + port only) used to communicate with the backend.
*/
@property(nonatomic, strong) NSString *_Nullable logUrl;
/**
* Set the app secret.
*/
@property(nonatomic, strong) NSString *_Nullable appSecret;
/**
* Set the maximum size of the internal storage. This method must be called before App Center is started.
*
* @discussion The default maximum database size is 10485760 bytes (10 MiB).
*
* @param sizeInBytes Maximum size of the internal storage in bytes. This will be rounded up to the nearest multiple of a SQLite page size
* (default is 4096 bytes). Values below 24576 bytes (24 KiB) will be ignored.
* @param completionHandler Callback that is invoked when the database size has been set. The `BOOL` parameter is `YES` if changing the size
* is successful, and `NO` otherwise.
*/
- (void)setMaxStorageSize:(long)sizeInBytes
completionHandler:(nullable void (^)(BOOL))completionHandler NS_SWIFT_NAME(setMaxStorageSize(_:completionHandler:));
/**
* Return a channel unit instance for the given groupId.
*
* @param groupId The group ID for a channel unit.
*
* @return A channel unit instance or `nil`.
*/
- (nullable id<MSACChannelUnitProtocol>)channelUnitForGroupId:(NSString *)groupId;
@end
NS_ASSUME_NONNULL_END
#endif

View File

@@ -1,68 +0,0 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#ifndef MSAC_CHANNEL_PROTOCOL_H
#define MSAC_CHANNEL_PROTOCOL_H
#import <Foundation/Foundation.h>
#if __has_include(<AppCenter/MSACEnable.h>)
#import <AppCenter/MSACEnable.h>
#else
#import "MSACEnable.h"
#endif
NS_ASSUME_NONNULL_BEGIN
@protocol MSACChannelDelegate;
/**
* `MSACChannelProtocol` contains the essential operations of a channel. Channels are broadly responsible for enqueuing logs to be sent to
* the backend and/or stored on disk.
*/
NS_SWIFT_NAME(ChannelProtocol)
@protocol MSACChannelProtocol <NSObject, MSACEnable>
/**
* Add delegate.
*
* @param delegate delegate.
*/
- (void)addDelegate:(id<MSACChannelDelegate>)delegate;
/**
* Remove delegate.
*
* @param delegate delegate.
*/
- (void)removeDelegate:(id<MSACChannelDelegate>)delegate;
/**
* Pause operations, logs will be stored but not sent.
*
* @param identifyingObject Object used to identify the pause request.
*
* @discussion A paused channel doesn't forward logs to the ingestion. The identifying object used to pause the channel can be any unique
* object. The same identifying object must be used to call resume. For simplicity if the caller is the one owning the channel then @c self
* can be used as identifying object.
*
* @see resumeWithIdentifyingObject:
*/
- (void)pauseWithIdentifyingObject:(id<NSObject>)identifyingObject;
/**
* Resume operations, logs can be sent again.
*
* @param identifyingObject Object used to passed to the pause method.
*
* @discussion The channel only resume when all the outstanding identifying objects have been resumed.
*
* @see pauseWithIdentifyingObject:
*/
- (void)resumeWithIdentifyingObject:(id<NSObject>)identifyingObject;
@end
NS_ASSUME_NONNULL_END
#endif

View File

@@ -1,18 +0,0 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#ifndef MSAC_CONSTANTS_FLAGS_H
#define MSAC_CONSTANTS_FLAGS_H
#import <Foundation/Foundation.h>
typedef NS_OPTIONS(NSUInteger, MSACFlags) {
MSACFlagsNone = (0 << 0), // => 00000000
MSACFlagsNormal = (1 << 0), // => 00000001
MSACFlagsCritical = (1 << 1), // => 00000010
MSACFlagsPersistenceNormal DEPRECATED_MSG_ATTRIBUTE("please use MSACFlagsNormal") = MSACFlagsNormal,
MSACFlagsPersistenceCritical DEPRECATED_MSG_ATTRIBUTE("please use MSACFlagsCritical") = MSACFlagsCritical,
MSACFlagsDefault = MSACFlagsNormal
} NS_SWIFT_NAME(Flags);
#endif

View File

@@ -1,170 +0,0 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#import <Foundation/Foundation.h>
/**
* Log Levels
*/
typedef NS_ENUM(NSUInteger, MSACLogLevel) {
/**
* Logging will be very chatty
*/
MSACLogLevelVerbose = 2,
/**
* Debug information will be logged
*/
MSACLogLevelDebug = 3,
/**
* Information will be logged
*/
MSACLogLevelInfo = 4,
/**
* Errors and warnings will be logged
*/
MSACLogLevelWarning = 5,
/**
* Errors will be logged
*/
MSACLogLevelError = 6,
/**
* Only critical errors will be logged
*/
MSACLogLevelAssert = 7,
/**
* Logging is disabled
*/
MSACLogLevelNone = 99
} NS_SWIFT_NAME(LogLevel);
typedef NSString * (^MSACLogMessageProvider)(void)NS_SWIFT_NAME(LogMessageProvider);
typedef void (^MSACLogHandler)(MSACLogMessageProvider messageProvider, MSACLogLevel logLevel, NSString *tag, const char *file,
const char *function, uint line) NS_SWIFT_NAME(LogHandler);
/**
* Channel priorities, check the kMSACPriorityCount if you add a new value.
* The order matters here! Values NEED to range from low priority to high priority.
*/
typedef NS_ENUM(NSInteger, MSACPriority) { MSACPriorityBackground, MSACPriorityDefault, MSACPriorityHigh } NS_SWIFT_NAME(Priority);
static short const kMSACPriorityCount = MSACPriorityHigh + 1;
/**
* The priority by which the modules are initialized.
* MSACPriorityMax is reserved for only 1 module and this needs to be Crashes.
* Crashes needs to be initialized first to catch crashes in our other SDK Modules (which will hopefully never happen) and to avoid losing
* any log at crash time.
*/
typedef NS_ENUM(NSInteger, MSACInitializationPriority) {
MSACInitializationPriorityDefault = 500,
MSACInitializationPriorityHigh = 750,
MSACInitializationPriorityMax = 999
} NS_SWIFT_NAME(InitializationPriority);
/**
* Enum with the different HTTP status codes.
*/
typedef NS_ENUM(NSInteger, MSACHTTPCodesNo) {
// Invalid
MSACHTTPCodesNo0XXInvalidUnknown = 0,
// Informational
MSACHTTPCodesNo1XXInformationalUnknown = 1,
MSACHTTPCodesNo100Continue = 100,
MSACHTTPCodesNo101SwitchingProtocols = 101,
MSACHTTPCodesNo102Processing = 102,
// Success
MSACHTTPCodesNo2XXSuccessUnknown = 2,
MSACHTTPCodesNo200OK = 200,
MSACHTTPCodesNo201Created = 201,
MSACHTTPCodesNo202Accepted = 202,
MSACHTTPCodesNo203NonAuthoritativeInformation = 203,
MSACHTTPCodesNo204NoContent = 204,
MSACHTTPCodesNo205ResetContent = 205,
MSACHTTPCodesNo206PartialContent = 206,
MSACHTTPCodesNo207MultiStatus = 207,
MSACHTTPCodesNo208AlreadyReported = 208,
MSACHTTPCodesNo209IMUsed = 209,
// Redirection
MSACHTTPCodesNo3XXSuccessUnknown = 3,
MSACHTTPCodesNo300MultipleChoices = 300,
MSACHTTPCodesNo301MovedPermanently = 301,
MSACHTTPCodesNo302Found = 302,
MSACHTTPCodesNo303SeeOther = 303,
MSACHTTPCodesNo304NotModified = 304,
MSACHTTPCodesNo305UseProxy = 305,
MSACHTTPCodesNo306SwitchProxy = 306,
MSACHTTPCodesNo307TemporaryRedirect = 307,
MSACHTTPCodesNo308PermanentRedirect = 308,
// Client error
MSACHTTPCodesNo4XXSuccessUnknown = 4,
MSACHTTPCodesNo400BadRequest = 400,
MSACHTTPCodesNo401Unauthorised = 401,
MSACHTTPCodesNo402PaymentRequired = 402,
MSACHTTPCodesNo403Forbidden = 403,
MSACHTTPCodesNo404NotFound = 404,
MSACHTTPCodesNo405MethodNotAllowed = 405,
MSACHTTPCodesNo406NotAcceptable = 406,
MSACHTTPCodesNo407ProxyAuthenticationRequired = 407,
MSACHTTPCodesNo408RequestTimeout = 408,
MSACHTTPCodesNo409Conflict = 409,
MSACHTTPCodesNo410Gone = 410,
MSACHTTPCodesNo411LengthRequired = 411,
MSACHTTPCodesNo412PreconditionFailed = 412,
MSACHTTPCodesNo413RequestEntityTooLarge = 413,
MSACHTTPCodesNo414RequestURITooLong = 414,
MSACHTTPCodesNo415UnsupportedMediaType = 415,
MSACHTTPCodesNo416RequestedRangeNotSatisfiable = 416,
MSACHTTPCodesNo417ExpectationFailed = 417,
MSACHTTPCodesNo418IamATeapot = 418,
MSACHTTPCodesNo419AuthenticationTimeout = 419,
MSACHTTPCodesNo420MethodFailureSpringFramework = 420,
MSACHTTPCodesNo420EnhanceYourCalmTwitter = 4200,
MSACHTTPCodesNo422UnprocessableEntity = 422,
MSACHTTPCodesNo423Locked = 423,
MSACHTTPCodesNo424FailedDependency = 424,
MSACHTTPCodesNo424MethodFailureWebDaw = 4240,
MSACHTTPCodesNo425UnorderedCollection = 425,
MSACHTTPCodesNo426UpgradeRequired = 426,
MSACHTTPCodesNo428PreconditionRequired = 428,
MSACHTTPCodesNo429TooManyRequests = 429,
MSACHTTPCodesNo431RequestHeaderFieldsTooLarge = 431,
MSACHTTPCodesNo444NoResponseNginx = 444,
MSACHTTPCodesNo449RetryWithMicrosoft = 449,
MSACHTTPCodesNo450BlockedByWindowsParentalControls = 450,
MSACHTTPCodesNo451RedirectMicrosoft = 451,
MSACHTTPCodesNo451UnavailableForLegalReasons = 4510,
MSACHTTPCodesNo494RequestHeaderTooLargeNginx = 494,
MSACHTTPCodesNo495CertErrorNginx = 495,
MSACHTTPCodesNo496NoCertNginx = 496,
MSACHTTPCodesNo497HTTPToHTTPSNginx = 497,
MSACHTTPCodesNo499ClientClosedRequestNginx = 499,
// Server error
MSACHTTPCodesNo5XXSuccessUnknown = 5,
MSACHTTPCodesNo500InternalServerError = 500,
MSACHTTPCodesNo501NotImplemented = 501,
MSACHTTPCodesNo502BadGateway = 502,
MSACHTTPCodesNo503ServiceUnavailable = 503,
MSACHTTPCodesNo504GatewayTimeout = 504,
MSACHTTPCodesNo505HTTPVersionNotSupported = 505,
MSACHTTPCodesNo506VariantAlsoNegotiates = 506,
MSACHTTPCodesNo507InsufficientStorage = 507,
MSACHTTPCodesNo508LoopDetected = 508,
MSACHTTPCodesNo509BandwidthLimitExceeded = 509,
MSACHTTPCodesNo510NotExtended = 510,
MSACHTTPCodesNo511NetworkAuthenticationRequired = 511,
MSACHTTPCodesNo522ConnectionTimedOut = 522,
MSACHTTPCodesNo598NetworkReadTimeoutErrorUnknown = 598,
MSACHTTPCodesNo599NetworkConnectTimeoutErrorUnknown = 599
} NS_SWIFT_NAME(HTTPCodesNo);

View File

@@ -1,71 +0,0 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#ifndef MSAC_CUSTOM_PROPERTIES_H
#define MSAC_CUSTOM_PROPERTIES_H
#import <Foundation/Foundation.h>
/**
* Custom properties builder.
* Collects multiple properties to send in one log.
*/
NS_SWIFT_NAME(CustomProperties)
@interface MSACCustomProperties : NSObject
/**
* Set the specified property value with the specified key.
* If the properties previously contained a property for the key, the old value is replaced.
*
* @param key Key with which the specified value is to be set.
* @param value Value to be set with the specified key.
*
* @return This instance.
*/
- (instancetype)setString:(NSString *)value forKey:(NSString *)key NS_SWIFT_NAME(set(_:forKey:));
/**
* Set the specified property value with the specified key.
* If the properties previously contained a property for the key, the old value is replaced.
*
* @param key Key with which the specified value is to be set.
* @param value Value to be set with the specified key.
*
* @return This instance.
*/
- (instancetype)setNumber:(NSNumber *)value forKey:(NSString *)key NS_SWIFT_NAME(set(_:forKey:));
/**
* Set the specified property value with the specified key.
* If the properties previously contained a property for the key, the old value is replaced.
*
* @param key Key with which the specified value is to be set.
* @param value Value to be set with the specified key.
*
* @return This instance.
*/
- (instancetype)setBool:(BOOL)value forKey:(NSString *)key NS_SWIFT_NAME(set(_:forKey:));
/**
* Set the specified property value with the specified key.
* If the properties previously contained a property for the key, the old value is replaced.
*
* @param key Key with which the specified value is to be set.
* @param value Value to be set with the specified key.
*
* @return This instance.
*/
- (instancetype)setDate:(NSDate *)value forKey:(NSString *)key NS_SWIFT_NAME(set(_:forKey:));
/**
* Clear the property for the specified key.
*
* @param key Key whose mapping is to be cleared.
*
* @return This instance.
*/
- (instancetype)clearPropertyForKey:(NSString *)key NS_SWIFT_NAME(clearProperty(forKey:));
@end
#endif

View File

@@ -1,101 +0,0 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#ifndef MSAC_DEVICE_H
#define MSAC_DEVICE_H
#import <Foundation/Foundation.h>
#if __has_include(<AppCenter/MSACWrapperSdk.h>)
#import <AppCenter/MSACWrapperSdk.h>
#else
#import "MSACWrapperSdk.h"
#endif
NS_SWIFT_NAME(Device)
@interface MSACDevice : MSACWrapperSdk
/*
* Name of the SDK. Consists of the name of the SDK and the platform, e.g. "appcenter.ios", "appcenter.android"
*/
@property(nonatomic, copy, readonly) NSString *sdkName;
/*
* Version of the SDK in semver format, e.g. "1.2.0" or "0.12.3-alpha.1".
*/
@property(nonatomic, copy, readonly) NSString *sdkVersion;
/*
* Device model (example: iPad2,3).
*/
@property(nonatomic, copy, readonly) NSString *model;
/*
* Device manufacturer (example: HTC).
*/
@property(nonatomic, copy, readonly) NSString *oemName;
/*
* OS name (example: iOS).
*/
@property(nonatomic, copy, readonly) NSString *osName;
/*
* OS version (example: 9.3.0).
*/
@property(nonatomic, copy, readonly) NSString *osVersion;
/*
* OS build code (example: LMY47X). [optional]
*/
@property(nonatomic, copy, readonly) NSString *osBuild;
/*
* API level when applicable like in Android (example: 15). [optional]
*/
@property(nonatomic, copy, readonly) NSNumber *osApiLevel;
/*
* Language code (example: en_US).
*/
@property(nonatomic, copy, readonly) NSString *locale;
/*
* The offset in minutes from UTC for the device time zone, including daylight savings time.
*/
@property(nonatomic, readonly, strong) NSNumber *timeZoneOffset;
/*
* Screen size of the device in pixels (example: 640x480).
*/
@property(nonatomic, copy, readonly) NSString *screenSize;
/*
* Application version name, e.g. 1.1.0
*/
@property(nonatomic, copy, readonly) NSString *appVersion;
/*
* Carrier name (for mobile devices). [optional]
*/
@property(nonatomic, copy, readonly) NSString *carrierName;
/*
* Carrier country code (for mobile devices). [optional]
*/
@property(nonatomic, copy, readonly) NSString *carrierCountry;
/*
* The app's build number, e.g. 42.
*/
@property(nonatomic, copy, readonly) NSString *appBuild;
/*
* The bundle identifier, package identifier, or namespace, depending on what the individual plattforms use, .e.g com.microsoft.example.
* [optional]
*/
@property(nonatomic, copy, readonly) NSString *appNamespace;
@end
#endif

View File

@@ -1,27 +0,0 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#ifndef MSAC_ENABLE_H
#define MSAC_ENABLE_H
#import <Foundation/Foundation.h>
/**
* Protocol to define an instance that can be enabled/disabled.
*/
NS_SWIFT_NAME(Enable)
@protocol MSACEnable <NSObject>
@required
/**
* Enable/disable this instance and delete data on disabled state.
*
* @param isEnabled A boolean value set to YES to enable the instance or NO to disable it.
* @param deleteData A boolean value set to YES to delete data or NO to keep it.
*/
- (void)setEnabled:(BOOL)isEnabled andDeleteDataOnDisabled:(BOOL)deleteData NS_SWIFT_NAME(setEnabled(_:deleteDataOnDisabled:));
@end
#endif

View File

@@ -1,74 +0,0 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#ifndef MSAC_LOG_H
#define MSAC_LOG_H
#import <Foundation/Foundation.h>
@class MSACDevice;
NS_SWIFT_NAME(Log)
@protocol MSACLog <NSObject>
/**
* Log type.
*/
@property(nonatomic, copy) NSString *type;
/**
* Log timestamp.
*/
@property(nonatomic, strong) NSDate *timestamp;
/**
* A session identifier is used to correlate logs together. A session is an abstract concept in the API and is not necessarily an analytics
* session, it can be used to only track crashes.
*/
@property(nonatomic, copy) NSString *sid;
/**
* Optional distribution group ID value.
*/
@property(nonatomic, copy) NSString *distributionGroupId;
/**
* Optional user identifier.
*/
@property(nonatomic, copy) NSString *userId;
/**
* Device properties associated to this log.
*/
@property(nonatomic, strong) MSACDevice *device;
/**
* Transient object tag. For example, a log can be tagged with a transmission target. We do this currently to prevent properties being
* applied retroactively to previous logs by comparing their tags.
*/
@property(nonatomic, strong) NSObject *tag;
/**
* Checks if the object's values are valid.
*
* @return YES, if the object is valid.
*/
- (BOOL)isValid;
/**
* Adds a transmission target token that this log should be sent to.
*
* @param token The transmission target token.
*/
- (void)addTransmissionTargetToken:(NSString *)token;
/**
* Gets all transmission target tokens that this log should be sent to.
*
* @returns Collection of transmission target tokens that this log should be sent to.
*/
- (NSSet *)transmissionTargetTokens;
@end
#endif

View File

@@ -1,25 +0,0 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#ifndef MSAC_LOG_WITH_PROPERTIES_H
#define MSAC_LOG_WITH_PROPERTIES_H
#import <Foundation/Foundation.h>
#if __has_include(<AppCenter/MSACAbstractLog.h>)
#import <AppCenter/MSACAbstractLog.h>
#else
#import "MSACAbstractLog.h"
#endif
NS_SWIFT_NAME(LogWithProperties)
@interface MSACLogWithProperties : MSACAbstractLog
/**
* Additional key/value pair parameters. [optional]
*/
@property(nonatomic, strong) NSDictionary<NSString *, NSString *> *properties;
@end
#endif

View File

@@ -1,54 +0,0 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#import <Foundation/Foundation.h>
#ifndef MSAC_LOGGER
#define MSAC_LOGGER
#if __has_include(<AppCenter/MSACConstants.h>)
#import <AppCenter/MSACConstants.h>
#else
#import "MSACConstants.h"
#endif
#define MSACLog(_level, _tag, _message) \
[MSACLogger logMessage:_message level:_level tag:_tag file:__FILE__ function:__PRETTY_FUNCTION__ line:__LINE__]
#define MSACLogAssert(tag, format, ...) \
MSACLog(MSACLogLevelAssert, tag, (^{ \
return [NSString stringWithFormat:(format), ##__VA_ARGS__]; \
}))
#define MSACLogError(tag, format, ...) \
MSACLog(MSACLogLevelError, tag, (^{ \
return [NSString stringWithFormat:(format), ##__VA_ARGS__]; \
}))
#define MSACLogWarning(tag, format, ...) \
MSACLog(MSACLogLevelWarning, tag, (^{ \
return [NSString stringWithFormat:(format), ##__VA_ARGS__]; \
}))
#define MSACLogInfo(tag, format, ...) \
MSACLog(MSACLogLevelInfo, tag, (^{ \
return [NSString stringWithFormat:(format), ##__VA_ARGS__]; \
}))
#define MSACLogDebug(tag, format, ...) \
MSACLog(MSACLogLevelDebug, tag, (^{ \
return [NSString stringWithFormat:(format), ##__VA_ARGS__]; \
}))
#define MSACLogVerbose(tag, format, ...) \
MSACLog(MSACLogLevelVerbose, tag, (^{ \
return [NSString stringWithFormat:(format), ##__VA_ARGS__]; \
}))
NS_SWIFT_NAME(Logger)
@interface MSACLogger : NSObject
+ (void)logMessage:(MSACLogMessageProvider)messageProvider
level:(MSACLogLevel)loglevel
tag:(NSString *)tag
file:(const char *)file
function:(const char *)function
line:(uint)line;
@end
#endif

View File

@@ -1,23 +0,0 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#ifndef MSAC_SERVICE_H
#define MSAC_SERVICE_H
#import <Foundation/Foundation.h>
/**
* Protocol declaring service logic.
*/
NS_SWIFT_NAME(Service)
@protocol MSACService <NSObject>
/**
* Indicates whether this service is enabled.
* The state is persisted in the device's storage across application launches.
*/
@property(class, nonatomic, getter=isEnabled, setter=setEnabled:) BOOL enabled NS_SWIFT_NAME(enabled);
@end
#endif

View File

@@ -1,58 +0,0 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#ifndef MSAC_SERVICE_ABSTRACT_H
#define MSAC_SERVICE_ABSTRACT_H
#import <Foundation/Foundation.h>
#if __has_include(<AppCenter/MSACService.h>)
#import <AppCenter/MSACService.h>
#else
#import "MSACService.h"
#endif
@protocol MSACChannelGroupProtocol;
/**
* Abstraction of services common logic.
* This class is intended to be subclassed only not instantiated directly.
*/
NS_SWIFT_NAME(ServiceAbstract)
@interface MSACServiceAbstract : NSObject <MSACService>
/**
* The flag indicates whether the service is started from application or not.
*/
@property(nonatomic, assign) BOOL startedFromApplication;
/**
* Start this service with a channel group. Also sets the flag that indicates that a service has been started.
*
* @param channelGroup channel group used to persist and send logs.
* @param appSecret app secret for the SDK.
* @param token default transmission target token for this service.
* @param fromApplication indicates whether the service started from an application or not.
*/
- (void)startWithChannelGroup:(id<MSACChannelGroupProtocol>)channelGroup
appSecret:(NSString *)appSecret
transmissionTargetToken:(NSString *)token
fromApplication:(BOOL)fromApplication;
/**
* Update configuration when the service requires to start again. This method should only be called if the service is started from libraries
* and then is being started from an application.
*
* @param appSecret app secret for the SDK.
* @param token default transmission target token for this service.
*/
- (void)updateConfigurationWithAppSecret:(NSString *)appSecret transmissionTargetToken:(NSString *)token;
/**
* The flag indicate whether the service needs the application secret or not.
*/
@property(atomic, readonly) BOOL isAppSecretRequired;
@end
#endif

View File

@@ -1,21 +0,0 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#import <Foundation/Foundation.h>
#if __has_include(<AppCenter/MSACConstants.h>)
#import <AppCenter/MSACConstants.h>
#else
#import "MSACConstants.h"
#endif
/**
* This is a utility for producing App Center style log messages. It is only intended for use by App Center services and wrapper SDKs of App
* Center.
*/
NS_SWIFT_NAME(WrapperLogger)
@interface MSACWrapperLogger : NSObject
+ (void)MSACWrapperLog:(MSACLogMessageProvider)message tag:(NSString *)tag level:(MSACLogLevel)level;
@end

View File

@@ -1,60 +0,0 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#ifndef MSAC_WRAPPER_SDK_H
#define MSAC_WRAPPER_SDK_H
#import <Foundation/Foundation.h>
NS_SWIFT_NAME(WrapperSdk)
@interface MSACWrapperSdk : NSObject
/*
* Version of the wrapper SDK. When the SDK is embedding another base SDK (for example Xamarin.Android wraps Android), the Xamarin specific
* version is populated into this field while sdkVersion refers to the original Android SDK. [optional]
*/
@property(nonatomic, copy, readonly) NSString *wrapperSdkVersion;
/*
* Name of the wrapper SDK (examples: Xamarin, Cordova). [optional]
*/
@property(nonatomic, copy, readonly) NSString *wrapperSdkName;
/*
* Version of the wrapper technology framework (Xamarin runtime version or ReactNative or Cordova etc...). [optional]
*/
@property(nonatomic, copy, readonly) NSString *wrapperRuntimeVersion;
/*
* Label that is used to identify application code 'version' released via Live Update beacon running on device.
*/
@property(nonatomic, copy, readonly) NSString *liveUpdateReleaseLabel;
/*
* Identifier of environment that current application release belongs to, deployment key then maps to environment like Production, Staging.
*/
@property(nonatomic, copy, readonly) NSString *liveUpdateDeploymentKey;
/*
* Hash of all files (ReactNative or Cordova) deployed to device via LiveUpdate beacon. Helps identify the Release version on device or need
* to download updates in future
*/
@property(nonatomic, copy, readonly) NSString *liveUpdatePackageHash;
- (instancetype)initWithWrapperSdkVersion:(NSString *)wrapperSdkVersion
wrapperSdkName:(NSString *)wrapperSdkName
wrapperRuntimeVersion:(NSString *)wrapperRuntimeVersion
liveUpdateReleaseLabel:(NSString *)liveUpdateReleaseLabel
liveUpdateDeploymentKey:(NSString *)liveUpdateDeploymentKey
liveUpdatePackageHash:(NSString *)liveUpdatePackageHash;
/**
* Checks if the object's values are valid.
*
* @return YES, if the object is valid.
*/
- (BOOL)isValid;
@end
#endif

View File

@@ -1,13 +0,0 @@
framework module AppCenter {
umbrella header "AppCenter.h"
export *
module * { export * }
link framework "Foundation"
link framework "CoreTelephony"
link framework "SystemConfiguration"
link framework "UIKit"
link "sqlite3"
link "z"
}

View File

@@ -1,114 +0,0 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#import <Foundation/Foundation.h>
#import "MSACConstants+Flags.h"
@protocol MSACChannelUnitProtocol;
@protocol MSACChannelGroupProtocol;
@protocol MSACChannelProtocol;
@protocol MSACLog;
NS_ASSUME_NONNULL_BEGIN
@protocol MSACChannelDelegate <NSObject>
@optional
/**
* A callback that is called when a channel unit is added to the channel group.
*
* @param channelGroup The channel group.
* @param channel The newly added channel.
*/
- (void)channelGroup:(id<MSACChannelGroupProtocol>)channelGroup didAddChannelUnit:(id<MSACChannelUnitProtocol>)channel;
/**
* A callback that is called when a log is just enqueued. Delegates may want to prepare the log a little more before further processing.
*
* @param log The log to prepare.
*/
- (void)channel:(id<MSACChannelProtocol>)channel prepareLog:(id<MSACLog>)log;
/**
* A callback that is called after a log is definitely prepared.
*
* @param log The log.
* @param internalId An internal Id to keep track of logs.
* @param flags Options for the log.
*/
- (void)channel:(id<MSACChannelProtocol>)channel didPrepareLog:(id<MSACLog>)log internalId:(NSString *)internalId flags:(MSACFlags)flags;
/**
* A callback that is called after a log completed the enqueueing process whether it was successful or not.
*
* @param log The log.
* @param internalId An internal Id to keep track of logs.
*/
- (void)channel:(id<MSACChannelProtocol>)channel didCompleteEnqueueingLog:(id<MSACLog>)log internalId:(NSString *)internalId;
/**
* Callback method that will be called before each log will be send to the server.
*
* @param channel The channel object.
* @param log The log to be sent.
*/
- (void)channel:(id<MSACChannelProtocol>)channel willSendLog:(id<MSACLog>)log;
/**
* Callback method that will be called in case the SDK was able to send a log.
*
* @param channel The channel object.
* @param log The log to be sent.
*/
- (void)channel:(id<MSACChannelProtocol>)channel didSucceedSendingLog:(id<MSACLog>)log;
/**
* Callback method that will be called in case the SDK was unable to send a log.
*
* @param channel The channel object.
* @param log The log to be sent.
* @param error The error that occured.
*/
- (void)channel:(id<MSACChannelProtocol>)channel didFailSendingLog:(id<MSACLog>)log withError:(nullable NSError *)error;
/**
* A callback that is called when setEnabled has been invoked.
*
* @param channel The channel.
* @param isEnabled The boolean that indicates enabled.
* @param deletedData The boolean that indicates deleting data on disabled.
*/
- (void)channel:(id<MSACChannelProtocol>)channel didSetEnabled:(BOOL)isEnabled andDeleteDataOnDisabled:(BOOL)deletedData;
/**
* A callback that is called when pause has been invoked.
*
* @param channel The channel.
* @param identifyingObject The identifying object used to pause the channel.
*/
- (void)channel:(id<MSACChannelProtocol>)channel didPauseWithIdentifyingObject:(id<NSObject>)identifyingObject;
/**
* A callback that is called when resume has been invoked.
*
* @param channel The channel.
* @param identifyingObject The identifying object used to resume the channel.
*/
- (void)channel:(id<MSACChannelProtocol>)channel didResumeWithIdentifyingObject:(id<NSObject>)identifyingObject;
/**
* Callback method that will determine if a log should be filtered out from the usual processing pipeline. If any delegate returns true, the
* log is filtered.
*
* @param channelUnit The channel unit that is going to send the log.
* @param log The log to be filtered or not.
*
* @return `true` if the log should be filtered out.
*/
- (BOOL)channelUnit:(id<MSACChannelUnitProtocol>)channelUnit shouldFilterLog:(id<MSACLog>)log;
@end
NS_ASSUME_NONNULL_END

View File

@@ -1,402 +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/AppCenter.h</key>
<data>
qaTNZSZUTXwLe2rrosDNCarRqAM=
</data>
<key>Headers/MSACAbstractLog.h</key>
<data>
+Ikfy/fTOpqwPZM3Fpii3cpsx8Y=
</data>
<key>Headers/MSACAppCenter.h</key>
<data>
2cUgfgx3odOGivdk+n6FXq94KgU=
</data>
<key>Headers/MSACAppCenterErrors.h</key>
<data>
x7h4qpHD4GI3jrJ3F7n4UXAANsk=
</data>
<key>Headers/MSACChannelGroupProtocol.h</key>
<data>
jyWCHN4PSygLVy0IM5565DvDQAc=
</data>
<key>Headers/MSACChannelProtocol.h</key>
<data>
Y1rKi/TsirTR0MGBf1rIO/TTG0A=
</data>
<key>Headers/MSACConstants+Flags.h</key>
<data>
GK1gUSyIjWdv7KBP68wNxjxaH+E=
</data>
<key>Headers/MSACConstants.h</key>
<data>
d9HwKA0/VH3+pLRj1Pd49mqn2gI=
</data>
<key>Headers/MSACCustomProperties.h</key>
<data>
m7A9hEgL3d0gV4SyKmXJYRtwqoQ=
</data>
<key>Headers/MSACDevice.h</key>
<data>
suv4Wkt36Nkscy7jX2SSYzrkLRs=
</data>
<key>Headers/MSACEnable.h</key>
<data>
3DnplEFkD1LImYNk+84TqcQvBho=
</data>
<key>Headers/MSACLog.h</key>
<data>
1/7NIwYuYLGHIVMZps8b6/zOpJg=
</data>
<key>Headers/MSACLogWithProperties.h</key>
<data>
I4y13KVE36pyXv85mc5OWlCjplE=
</data>
<key>Headers/MSACLogger.h</key>
<data>
CaYHmB3+psy5/txfMvd2+bWGJkc=
</data>
<key>Headers/MSACService.h</key>
<data>
lz5atiMe+oTdu9e6g74KPC0CjOs=
</data>
<key>Headers/MSACServiceAbstract.h</key>
<data>
rBHatSAJK78PLgsMIpFqkby4tgA=
</data>
<key>Headers/MSACWrapperLogger.h</key>
<data>
qBVuNkF12BZYytRhCKwZ7zkiKhc=
</data>
<key>Headers/MSACWrapperSdk.h</key>
<data>
W9sdhEGnIGk/aFHS3gWwQ6FxUfI=
</data>
<key>Info.plist</key>
<data>
eLocy8MzO4Q0e5Dw+QDZTDOmWCI=
</data>
<key>Modules/module.modulemap</key>
<data>
go9b9XYQJIVcGlS/K5PS+8A+0dI=
</data>
<key>PrivateHeaders/MSACChannelDelegate.h</key>
<data>
Msff4BZ/b1IjaYeKTDBHtNtT7wI=
</data>
</dict>
<key>files2</key>
<dict>
<key>Headers/AppCenter.h</key>
<dict>
<key>hash</key>
<data>
qaTNZSZUTXwLe2rrosDNCarRqAM=
</data>
<key>hash2</key>
<data>
2Wv2BhvzEcs7qHle8K3IXhWh7EVoAIrE2gOs4b0p39c=
</data>
</dict>
<key>Headers/MSACAbstractLog.h</key>
<dict>
<key>hash</key>
<data>
+Ikfy/fTOpqwPZM3Fpii3cpsx8Y=
</data>
<key>hash2</key>
<data>
7hsXFv3UkGsJLcc3eh2pMUrGbGYP2hCUC854z05SzNQ=
</data>
</dict>
<key>Headers/MSACAppCenter.h</key>
<dict>
<key>hash</key>
<data>
2cUgfgx3odOGivdk+n6FXq94KgU=
</data>
<key>hash2</key>
<data>
C10z0NrhN4J4qdWbypOdjlQ8QLlq4tvPMP21geOS4vI=
</data>
</dict>
<key>Headers/MSACAppCenterErrors.h</key>
<dict>
<key>hash</key>
<data>
x7h4qpHD4GI3jrJ3F7n4UXAANsk=
</data>
<key>hash2</key>
<data>
OcNwIIu4yFxG62mZtiABP3/9DoN9tj1fL/7nSvF8u8s=
</data>
</dict>
<key>Headers/MSACChannelGroupProtocol.h</key>
<dict>
<key>hash</key>
<data>
jyWCHN4PSygLVy0IM5565DvDQAc=
</data>
<key>hash2</key>
<data>
d36rCjxsURqDkFv+g5BwWNybz5Zksc9B91gqArFcJbk=
</data>
</dict>
<key>Headers/MSACChannelProtocol.h</key>
<dict>
<key>hash</key>
<data>
Y1rKi/TsirTR0MGBf1rIO/TTG0A=
</data>
<key>hash2</key>
<data>
fI1fLkJvo9SXh2bAUWKIYlretRCOoGWJwlyvqMfQZNc=
</data>
</dict>
<key>Headers/MSACConstants+Flags.h</key>
<dict>
<key>hash</key>
<data>
GK1gUSyIjWdv7KBP68wNxjxaH+E=
</data>
<key>hash2</key>
<data>
UDnw7GyNXzip13MvAvNKQQsWIUgU296uJHjPEkReCY8=
</data>
</dict>
<key>Headers/MSACConstants.h</key>
<dict>
<key>hash</key>
<data>
d9HwKA0/VH3+pLRj1Pd49mqn2gI=
</data>
<key>hash2</key>
<data>
xx69UfYa0qw6aSDuVsUAqd/1+t90QCPkQUae+elZwZ0=
</data>
</dict>
<key>Headers/MSACCustomProperties.h</key>
<dict>
<key>hash</key>
<data>
m7A9hEgL3d0gV4SyKmXJYRtwqoQ=
</data>
<key>hash2</key>
<data>
FveTXq+kqUdHHlSdLAoQisgT+95bzAuXTrTOQG/b/P8=
</data>
</dict>
<key>Headers/MSACDevice.h</key>
<dict>
<key>hash</key>
<data>
suv4Wkt36Nkscy7jX2SSYzrkLRs=
</data>
<key>hash2</key>
<data>
i3TVX2C+DfcRKn2HTBaydWBYHjryX2Cy/eJJxjTFiT8=
</data>
</dict>
<key>Headers/MSACEnable.h</key>
<dict>
<key>hash</key>
<data>
3DnplEFkD1LImYNk+84TqcQvBho=
</data>
<key>hash2</key>
<data>
XrDKc7bXZaW8JW4NMItSBrHLR6a+LRG1JSLXZ0U0NsI=
</data>
</dict>
<key>Headers/MSACLog.h</key>
<dict>
<key>hash</key>
<data>
1/7NIwYuYLGHIVMZps8b6/zOpJg=
</data>
<key>hash2</key>
<data>
3GF6xCTfpLDmOqKnacEOEDr5mkM/llKm0IoIEyISZKA=
</data>
</dict>
<key>Headers/MSACLogWithProperties.h</key>
<dict>
<key>hash</key>
<data>
I4y13KVE36pyXv85mc5OWlCjplE=
</data>
<key>hash2</key>
<data>
WIrz7Xsi04AboAmZ5dA3d3t8D/8PomKLwsp7oorznVM=
</data>
</dict>
<key>Headers/MSACLogger.h</key>
<dict>
<key>hash</key>
<data>
CaYHmB3+psy5/txfMvd2+bWGJkc=
</data>
<key>hash2</key>
<data>
GipSaz+D+Z5eWauQP+10U8xvbAnxPeIRD4HTvn0F5DQ=
</data>
</dict>
<key>Headers/MSACService.h</key>
<dict>
<key>hash</key>
<data>
lz5atiMe+oTdu9e6g74KPC0CjOs=
</data>
<key>hash2</key>
<data>
aiO/PWAQDwhbPW1HDGqNM0kn4xYSwqPmdpmcTgpW/CE=
</data>
</dict>
<key>Headers/MSACServiceAbstract.h</key>
<dict>
<key>hash</key>
<data>
rBHatSAJK78PLgsMIpFqkby4tgA=
</data>
<key>hash2</key>
<data>
vi9/mVDQylipTtHNfUe9r4GXjlc2bEnKFV8wmN/IXaE=
</data>
</dict>
<key>Headers/MSACWrapperLogger.h</key>
<dict>
<key>hash</key>
<data>
qBVuNkF12BZYytRhCKwZ7zkiKhc=
</data>
<key>hash2</key>
<data>
h2VHxvALAogCMocFQMUjmOkhCm+qkJwpGTzxwdxTdwo=
</data>
</dict>
<key>Headers/MSACWrapperSdk.h</key>
<dict>
<key>hash</key>
<data>
W9sdhEGnIGk/aFHS3gWwQ6FxUfI=
</data>
<key>hash2</key>
<data>
5x+0epJnQN2wZKY2xjvsjAYrr6H1QGYIGz0ptux72dU=
</data>
</dict>
<key>Modules/module.modulemap</key>
<dict>
<key>hash</key>
<data>
go9b9XYQJIVcGlS/K5PS+8A+0dI=
</data>
<key>hash2</key>
<data>
o0lkqm4+xeVosltUC3U+jCZnS35Tg8gUiUaKXbo0ZbQ=
</data>
</dict>
<key>PrivateHeaders/MSACChannelDelegate.h</key>
<dict>
<key>hash</key>
<data>
Msff4BZ/b1IjaYeKTDBHtNtT7wI=
</data>
<key>hash2</key>
<data>
d1uS+ptvOX/o3CCB23FEJAtvcf7KIf/8ozlruAf1f0g=
</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,42 +0,0 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#import <Foundation/Foundation.h>
#if __has_include(<AppCenter/MSACAppCenter.h>)
#import <AppCenter/MSACAbstractLog.h>
#import <AppCenter/MSACAppCenter.h>
#import <AppCenter/MSACAppCenterErrors.h>
#import <AppCenter/MSACChannelGroupProtocol.h>
#import <AppCenter/MSACChannelProtocol.h>
#import <AppCenter/MSACConstants+Flags.h>
#import <AppCenter/MSACConstants.h>
#import <AppCenter/MSACCustomProperties.h>
#import <AppCenter/MSACDevice.h>
#import <AppCenter/MSACEnable.h>
#import <AppCenter/MSACLog.h>
#import <AppCenter/MSACLogWithProperties.h>
#import <AppCenter/MSACLogger.h>
#import <AppCenter/MSACService.h>
#import <AppCenter/MSACServiceAbstract.h>
#import <AppCenter/MSACWrapperLogger.h>
#import <AppCenter/MSACWrapperSdk.h>
#else
#import "MSACAbstractLog.h"
#import "MSACAppCenter.h"
#import "MSACAppCenterErrors.h"
#import "MSACChannelGroupProtocol.h"
#import "MSACChannelProtocol.h"
#import "MSACConstants+Flags.h"
#import "MSACConstants.h"
#import "MSACCustomProperties.h"
#import "MSACDevice.h"
#import "MSACEnable.h"
#import "MSACLog.h"
#import "MSACLogWithProperties.h"
#import "MSACLogger.h"
#import "MSACService.h"
#import "MSACServiceAbstract.h"
#import "MSACWrapperLogger.h"
#import "MSACWrapperSdk.h"
#endif

View File

@@ -1,14 +0,0 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#ifndef MSAC_ABSTRACT_LOG_H
#define MSAC_ABSTRACT_LOG_H
#import <Foundation/Foundation.h>
NS_SWIFT_NAME(AbstractLog)
@interface MSACAbstractLog : NSObject
@end
#endif

View File

@@ -1,203 +0,0 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#import <Foundation/Foundation.h>
#ifndef MSAC_APP_CENTER
#define MSAC_APP_CENTER
#if __has_include(<AppCenter/MSACConstants.h>)
#import <AppCenter/MSACConstants.h>
#else
#import "MSACConstants.h"
#endif
@class MSACWrapperSdk;
#if !TARGET_OS_TV
@class MSACCustomProperties;
#endif
NS_SWIFT_NAME(AppCenter)
@interface MSACAppCenter : NSObject
/**
* Returns the singleton instance of MSACAppCenter.
*/
+ (instancetype)sharedInstance;
/**
* Configure the SDK with an application secret.
*
* @param appSecret A unique and secret key used to identify the application.
*
* @discussion This may be called only once per application process lifetime.
*/
+ (void)configureWithAppSecret:(NSString *)appSecret NS_SWIFT_NAME(configure(withAppSecret:));
/**
* Configure the SDK.
*
* @discussion This may be called only once per application process lifetime.
*/
+ (void)configure;
/**
* Configure the SDK with an application secret and an array of services to start.
*
* @param appSecret A unique and secret key used to identify the application.
* @param services Array of services to start.
*
* @discussion This may be called only once per application process lifetime.
*/
+ (void)start:(NSString *)appSecret withServices:(NSArray<Class> *)services NS_SWIFT_NAME(start(withAppSecret:services:));
/**
* Start the SDK with an array of services.
*
* @param services Array of services to start.
*
* @discussion This may be called only once per application process lifetime.
*/
+ (void)startWithServices:(NSArray<Class> *)services NS_SWIFT_NAME(start(services:));
/**
* Start a service.
*
* @param service A service to start.
*
* @discussion This may be called only once per service per application process lifetime.
*/
+ (void)startService:(Class)service;
/**
* Configure the SDK with an array of services to start from a library. This will not start the service at application level, it will enable
* the service only for the library.
*
* @param services Array of services to start.
*/
+ (void)startFromLibraryWithServices:(NSArray<Class> *)services NS_SWIFT_NAME(startFromLibrary(services:));
/**
* The flag indicates whether the SDK has already been configured or not.
*/
@property(class, atomic, readonly, getter=isConfigured) BOOL configured;
/**
* The flag indicates whether app is running in App Center Test Cloud.
*/
@property(class, atomic, readonly, getter=isRunningInAppCenterTestCloud) BOOL runningInAppCenterTestCloud;
/**
* The flag indicates whether or not the SDK was enabled as a whole
*
* The state is persisted in the device's storage across application launches.
*/
@property(class, nonatomic, getter=isEnabled, setter=setEnabled:) BOOL enabled NS_SWIFT_NAME(enabled);
/**
* Flag indicating whether SDK can send network requests.
*
* The state is persisted in the device's storage across application launches.
*/
@property(class, nonatomic, getter=isNetworkRequestsAllowed, setter=setNetworkRequestsAllowed:)
BOOL networkRequestsAllowed NS_SWIFT_NAME(networkRequestsAllowed);
/**
* The SDK's log level.
*/
@property(class, nonatomic) MSACLogLevel logLevel;
/**
* Base URL to use for backend communication.
*/
@property(class, nonatomic, strong) NSString *logUrl;
/**
* Set log handler.
*/
@property(class, nonatomic) MSACLogHandler logHandler;
/**
* Set wrapper SDK information to use when building device properties. This is intended in case you are building a SDK that uses the App
* Center SDK under the hood, e.g. our Xamarin SDK or ReactNative SDk.
*/
@property(class, nonatomic, strong) MSACWrapperSdk *wrapperSdk;
#if !TARGET_OS_TV
/**
* Set the custom properties.
*
* @param customProperties Custom properties object.
*/
+ (void)setCustomProperties:(MSACCustomProperties *)customProperties;
#endif
/**
* Check whether the application delegate forwarder is enabled or not.
*
* @discussion The application delegate forwarder forwards messages that target your application delegate methods via swizzling to the SDK.
* It simplifies the SDK integration but may not be suitable to any situations. For
* instance it should be disabled if you or one of your third party SDK is doing message forwarding on the application delegate. Message
* forwarding usually implies the implementation of @see NSObject#forwardingTargetForSelector: or @see NSObject#forwardInvocation: methods.
* To disable the application delegate forwarder just add the `AppCenterAppDelegateForwarderEnabled` tag to your Info .plist file and set it
* to `0`. Then you will have to forward any application delegate needed by the SDK manually.
*/
@property(class, readonly, nonatomic, getter=isAppDelegateForwarderEnabled) BOOL appDelegateForwarderEnabled;
/**
* Unique installation identifier.
*
*/
@property(class, readonly, nonatomic) NSUUID *installId;
/**
* Detect if a debugger is attached to the app process. This is only invoked once on app startup and can not detect
* if the debugger is being attached during runtime!
*
*/
@property(class, readonly, nonatomic, getter=isDebuggerAttached) BOOL debuggerAttached;
/**
* Current version of AppCenter SDK.
*
*/
@property(class, readonly, nonatomic) NSString *sdkVersion;
/**
* Set the maximum size of the internal storage. This method must be called before App Center is started. This method is only intended for
* applications.
*
* @param sizeInBytes Maximum size of the internal storage in bytes. This will be rounded up to the nearest multiple of a SQLite page size
* (default is 4096 bytes). Values below 20,480 bytes (20 KiB) will be ignored.
*
* @param completionHandler Callback that is invoked when the database size has been set. The `BOOL` parameter is `YES` if changing the size
* is successful, and `NO` otherwise. This parameter can be null.
*
* @discussion This only sets the maximum size of the database, but App Center modules might store additional data.
* The value passed to this method is not persisted on disk. The default maximum database size is 10485760 bytes (10 MiB).
*/
+ (void)setMaxStorageSize:(long)sizeInBytes completionHandler:(void (^)(BOOL))completionHandler;
/**
* Set the user identifier.
*
* @discussion Set the user identifier for logs sent for the default target token when the secret passed in @c
* MSACAppCenter:start:withServices: contains "target={targetToken}".
*
* For App Center backend the user identifier maximum length is 256 characters.
*
* AppCenter must be configured or started before this API can be used.
*/
@property(class, nonatomic, strong) NSString *userId;
/**
* Set country code to use when building device properties.
*
* @see https://www.iso.org/obp/ui/#search for more information.
*/
@property(class, nonatomic, strong) NSString *countryCode;
@end
#endif

View File

@@ -1,41 +0,0 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#ifndef MSAC_APP_CENTER_ERRORS_H
#define MSAC_APP_CENTER_ERRORS_H
#import <Foundation/Foundation.h>
#define MSAC_APP_CENTER_BASE_DOMAIN @"com.Microsoft.AppCenter."
NS_ASSUME_NONNULL_BEGIN
#pragma mark - Domain
static NSString *const kMSACACErrorDomain = MSAC_APP_CENTER_BASE_DOMAIN @"ErrorDomain";
#pragma mark - General
// Error codes.
NS_ENUM(NSInteger){MSACACLogInvalidContainerErrorCode = 1, MSACACCanceledErrorCode = 2, MSACACDisabledErrorCode = 3};
// Error descriptions.
static NSString const *kMSACACLogInvalidContainerErrorDesc = @"Invalid log container.";
static NSString const *kMSACACCanceledErrorDesc = @"The operation was canceled.";
static NSString const *kMSACACDisabledErrorDesc = @"The service is disabled.";
#pragma mark - Connection
// Error codes.
NS_ENUM(NSInteger){MSACACConnectionPausedErrorCode = 100, MSACACConnectionHttpErrorCode = 101};
// Error descriptions.
static NSString const *kMSACACConnectionHttpErrorDesc = @"An HTTP error occured.";
static NSString const *kMSACACConnectionPausedErrorDesc = @"Canceled, connection paused with log deletion.";
// Error user info keys.
static NSString const *kMSACACConnectionHttpCodeErrorKey = @"MSConnectionHttpCode";
NS_ASSUME_NONNULL_END
#endif

View File

@@ -1,87 +0,0 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#ifndef MSAC_CHANNEL_GROUP_PROTOCOL_H
#define MSAC_CHANNEL_GROUP_PROTOCOL_H
#import <Foundation/Foundation.h>
#if __has_include(<AppCenter/MSACChannelProtocol.h>)
#import <AppCenter/MSACChannelProtocol.h>
#else
#import "MSACChannelProtocol.h"
#endif
NS_ASSUME_NONNULL_BEGIN
@class MSACChannelUnitConfiguration;
@protocol MSACIngestionProtocol;
@protocol MSACChannelUnitProtocol;
/**
* `MSACChannelGroupProtocol` represents a kind of channel that contains constituent MSACChannelUnit objects. When an operation from the
* `MSACChannelProtocol` is performed on the group, that operation should be propagated to its constituent MSACChannelUnit objects.
*/
NS_SWIFT_NAME(ChannelGroupProtocol)
@protocol MSACChannelGroupProtocol <MSACChannelProtocol>
/**
* Initialize a channel unit with the given configuration.
*
* @param configuration channel configuration.
*
* @return The added `MSACChannelUnitProtocol`. Use this object to enqueue logs.
*/
- (id<MSACChannelUnitProtocol>)addChannelUnitWithConfiguration:(MSACChannelUnitConfiguration *)configuration
NS_SWIFT_NAME(addChannelUnit(withConfiguration:));
/**
* Initialize a channel unit with the given configuration.
*
* @param configuration channel configuration.
* @param ingestion The alternative ingestion object
*
* @return The added `MSACChannelUnitProtocol`. Use this object to enqueue logs.
*/
- (id<MSACChannelUnitProtocol>)addChannelUnitWithConfiguration:(MSACChannelUnitConfiguration *)configuration
withIngestion:(nullable id<MSACIngestionProtocol>)ingestion
NS_SWIFT_NAME(addChannelUnit(_:ingestion:));
/**
* Change the base URL (schema + authority + port only) used to communicate with the backend.
*/
@property(nonatomic, strong) NSString *_Nullable logUrl;
/**
* Set the app secret.
*/
@property(nonatomic, strong) NSString *_Nullable appSecret;
/**
* Set the maximum size of the internal storage. This method must be called before App Center is started.
*
* @discussion The default maximum database size is 10485760 bytes (10 MiB).
*
* @param sizeInBytes Maximum size of the internal storage in bytes. This will be rounded up to the nearest multiple of a SQLite page size
* (default is 4096 bytes). Values below 24576 bytes (24 KiB) will be ignored.
* @param completionHandler Callback that is invoked when the database size has been set. The `BOOL` parameter is `YES` if changing the size
* is successful, and `NO` otherwise.
*/
- (void)setMaxStorageSize:(long)sizeInBytes
completionHandler:(nullable void (^)(BOOL))completionHandler NS_SWIFT_NAME(setMaxStorageSize(_:completionHandler:));
/**
* Return a channel unit instance for the given groupId.
*
* @param groupId The group ID for a channel unit.
*
* @return A channel unit instance or `nil`.
*/
- (nullable id<MSACChannelUnitProtocol>)channelUnitForGroupId:(NSString *)groupId;
@end
NS_ASSUME_NONNULL_END
#endif

View File

@@ -1,68 +0,0 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#ifndef MSAC_CHANNEL_PROTOCOL_H
#define MSAC_CHANNEL_PROTOCOL_H
#import <Foundation/Foundation.h>
#if __has_include(<AppCenter/MSACEnable.h>)
#import <AppCenter/MSACEnable.h>
#else
#import "MSACEnable.h"
#endif
NS_ASSUME_NONNULL_BEGIN
@protocol MSACChannelDelegate;
/**
* `MSACChannelProtocol` contains the essential operations of a channel. Channels are broadly responsible for enqueuing logs to be sent to
* the backend and/or stored on disk.
*/
NS_SWIFT_NAME(ChannelProtocol)
@protocol MSACChannelProtocol <NSObject, MSACEnable>
/**
* Add delegate.
*
* @param delegate delegate.
*/
- (void)addDelegate:(id<MSACChannelDelegate>)delegate;
/**
* Remove delegate.
*
* @param delegate delegate.
*/
- (void)removeDelegate:(id<MSACChannelDelegate>)delegate;
/**
* Pause operations, logs will be stored but not sent.
*
* @param identifyingObject Object used to identify the pause request.
*
* @discussion A paused channel doesn't forward logs to the ingestion. The identifying object used to pause the channel can be any unique
* object. The same identifying object must be used to call resume. For simplicity if the caller is the one owning the channel then @c self
* can be used as identifying object.
*
* @see resumeWithIdentifyingObject:
*/
- (void)pauseWithIdentifyingObject:(id<NSObject>)identifyingObject;
/**
* Resume operations, logs can be sent again.
*
* @param identifyingObject Object used to passed to the pause method.
*
* @discussion The channel only resume when all the outstanding identifying objects have been resumed.
*
* @see pauseWithIdentifyingObject:
*/
- (void)resumeWithIdentifyingObject:(id<NSObject>)identifyingObject;
@end
NS_ASSUME_NONNULL_END
#endif

View File

@@ -1,18 +0,0 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#ifndef MSAC_CONSTANTS_FLAGS_H
#define MSAC_CONSTANTS_FLAGS_H
#import <Foundation/Foundation.h>
typedef NS_OPTIONS(NSUInteger, MSACFlags) {
MSACFlagsNone = (0 << 0), // => 00000000
MSACFlagsNormal = (1 << 0), // => 00000001
MSACFlagsCritical = (1 << 1), // => 00000010
MSACFlagsPersistenceNormal DEPRECATED_MSG_ATTRIBUTE("please use MSACFlagsNormal") = MSACFlagsNormal,
MSACFlagsPersistenceCritical DEPRECATED_MSG_ATTRIBUTE("please use MSACFlagsCritical") = MSACFlagsCritical,
MSACFlagsDefault = MSACFlagsNormal
} NS_SWIFT_NAME(Flags);
#endif

View File

@@ -1,170 +0,0 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#import <Foundation/Foundation.h>
/**
* Log Levels
*/
typedef NS_ENUM(NSUInteger, MSACLogLevel) {
/**
* Logging will be very chatty
*/
MSACLogLevelVerbose = 2,
/**
* Debug information will be logged
*/
MSACLogLevelDebug = 3,
/**
* Information will be logged
*/
MSACLogLevelInfo = 4,
/**
* Errors and warnings will be logged
*/
MSACLogLevelWarning = 5,
/**
* Errors will be logged
*/
MSACLogLevelError = 6,
/**
* Only critical errors will be logged
*/
MSACLogLevelAssert = 7,
/**
* Logging is disabled
*/
MSACLogLevelNone = 99
} NS_SWIFT_NAME(LogLevel);
typedef NSString * (^MSACLogMessageProvider)(void)NS_SWIFT_NAME(LogMessageProvider);
typedef void (^MSACLogHandler)(MSACLogMessageProvider messageProvider, MSACLogLevel logLevel, NSString *tag, const char *file,
const char *function, uint line) NS_SWIFT_NAME(LogHandler);
/**
* Channel priorities, check the kMSACPriorityCount if you add a new value.
* The order matters here! Values NEED to range from low priority to high priority.
*/
typedef NS_ENUM(NSInteger, MSACPriority) { MSACPriorityBackground, MSACPriorityDefault, MSACPriorityHigh } NS_SWIFT_NAME(Priority);
static short const kMSACPriorityCount = MSACPriorityHigh + 1;
/**
* The priority by which the modules are initialized.
* MSACPriorityMax is reserved for only 1 module and this needs to be Crashes.
* Crashes needs to be initialized first to catch crashes in our other SDK Modules (which will hopefully never happen) and to avoid losing
* any log at crash time.
*/
typedef NS_ENUM(NSInteger, MSACInitializationPriority) {
MSACInitializationPriorityDefault = 500,
MSACInitializationPriorityHigh = 750,
MSACInitializationPriorityMax = 999
} NS_SWIFT_NAME(InitializationPriority);
/**
* Enum with the different HTTP status codes.
*/
typedef NS_ENUM(NSInteger, MSACHTTPCodesNo) {
// Invalid
MSACHTTPCodesNo0XXInvalidUnknown = 0,
// Informational
MSACHTTPCodesNo1XXInformationalUnknown = 1,
MSACHTTPCodesNo100Continue = 100,
MSACHTTPCodesNo101SwitchingProtocols = 101,
MSACHTTPCodesNo102Processing = 102,
// Success
MSACHTTPCodesNo2XXSuccessUnknown = 2,
MSACHTTPCodesNo200OK = 200,
MSACHTTPCodesNo201Created = 201,
MSACHTTPCodesNo202Accepted = 202,
MSACHTTPCodesNo203NonAuthoritativeInformation = 203,
MSACHTTPCodesNo204NoContent = 204,
MSACHTTPCodesNo205ResetContent = 205,
MSACHTTPCodesNo206PartialContent = 206,
MSACHTTPCodesNo207MultiStatus = 207,
MSACHTTPCodesNo208AlreadyReported = 208,
MSACHTTPCodesNo209IMUsed = 209,
// Redirection
MSACHTTPCodesNo3XXSuccessUnknown = 3,
MSACHTTPCodesNo300MultipleChoices = 300,
MSACHTTPCodesNo301MovedPermanently = 301,
MSACHTTPCodesNo302Found = 302,
MSACHTTPCodesNo303SeeOther = 303,
MSACHTTPCodesNo304NotModified = 304,
MSACHTTPCodesNo305UseProxy = 305,
MSACHTTPCodesNo306SwitchProxy = 306,
MSACHTTPCodesNo307TemporaryRedirect = 307,
MSACHTTPCodesNo308PermanentRedirect = 308,
// Client error
MSACHTTPCodesNo4XXSuccessUnknown = 4,
MSACHTTPCodesNo400BadRequest = 400,
MSACHTTPCodesNo401Unauthorised = 401,
MSACHTTPCodesNo402PaymentRequired = 402,
MSACHTTPCodesNo403Forbidden = 403,
MSACHTTPCodesNo404NotFound = 404,
MSACHTTPCodesNo405MethodNotAllowed = 405,
MSACHTTPCodesNo406NotAcceptable = 406,
MSACHTTPCodesNo407ProxyAuthenticationRequired = 407,
MSACHTTPCodesNo408RequestTimeout = 408,
MSACHTTPCodesNo409Conflict = 409,
MSACHTTPCodesNo410Gone = 410,
MSACHTTPCodesNo411LengthRequired = 411,
MSACHTTPCodesNo412PreconditionFailed = 412,
MSACHTTPCodesNo413RequestEntityTooLarge = 413,
MSACHTTPCodesNo414RequestURITooLong = 414,
MSACHTTPCodesNo415UnsupportedMediaType = 415,
MSACHTTPCodesNo416RequestedRangeNotSatisfiable = 416,
MSACHTTPCodesNo417ExpectationFailed = 417,
MSACHTTPCodesNo418IamATeapot = 418,
MSACHTTPCodesNo419AuthenticationTimeout = 419,
MSACHTTPCodesNo420MethodFailureSpringFramework = 420,
MSACHTTPCodesNo420EnhanceYourCalmTwitter = 4200,
MSACHTTPCodesNo422UnprocessableEntity = 422,
MSACHTTPCodesNo423Locked = 423,
MSACHTTPCodesNo424FailedDependency = 424,
MSACHTTPCodesNo424MethodFailureWebDaw = 4240,
MSACHTTPCodesNo425UnorderedCollection = 425,
MSACHTTPCodesNo426UpgradeRequired = 426,
MSACHTTPCodesNo428PreconditionRequired = 428,
MSACHTTPCodesNo429TooManyRequests = 429,
MSACHTTPCodesNo431RequestHeaderFieldsTooLarge = 431,
MSACHTTPCodesNo444NoResponseNginx = 444,
MSACHTTPCodesNo449RetryWithMicrosoft = 449,
MSACHTTPCodesNo450BlockedByWindowsParentalControls = 450,
MSACHTTPCodesNo451RedirectMicrosoft = 451,
MSACHTTPCodesNo451UnavailableForLegalReasons = 4510,
MSACHTTPCodesNo494RequestHeaderTooLargeNginx = 494,
MSACHTTPCodesNo495CertErrorNginx = 495,
MSACHTTPCodesNo496NoCertNginx = 496,
MSACHTTPCodesNo497HTTPToHTTPSNginx = 497,
MSACHTTPCodesNo499ClientClosedRequestNginx = 499,
// Server error
MSACHTTPCodesNo5XXSuccessUnknown = 5,
MSACHTTPCodesNo500InternalServerError = 500,
MSACHTTPCodesNo501NotImplemented = 501,
MSACHTTPCodesNo502BadGateway = 502,
MSACHTTPCodesNo503ServiceUnavailable = 503,
MSACHTTPCodesNo504GatewayTimeout = 504,
MSACHTTPCodesNo505HTTPVersionNotSupported = 505,
MSACHTTPCodesNo506VariantAlsoNegotiates = 506,
MSACHTTPCodesNo507InsufficientStorage = 507,
MSACHTTPCodesNo508LoopDetected = 508,
MSACHTTPCodesNo509BandwidthLimitExceeded = 509,
MSACHTTPCodesNo510NotExtended = 510,
MSACHTTPCodesNo511NetworkAuthenticationRequired = 511,
MSACHTTPCodesNo522ConnectionTimedOut = 522,
MSACHTTPCodesNo598NetworkReadTimeoutErrorUnknown = 598,
MSACHTTPCodesNo599NetworkConnectTimeoutErrorUnknown = 599
} NS_SWIFT_NAME(HTTPCodesNo);

View File

@@ -1,71 +0,0 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#ifndef MSAC_CUSTOM_PROPERTIES_H
#define MSAC_CUSTOM_PROPERTIES_H
#import <Foundation/Foundation.h>
/**
* Custom properties builder.
* Collects multiple properties to send in one log.
*/
NS_SWIFT_NAME(CustomProperties)
@interface MSACCustomProperties : NSObject
/**
* Set the specified property value with the specified key.
* If the properties previously contained a property for the key, the old value is replaced.
*
* @param key Key with which the specified value is to be set.
* @param value Value to be set with the specified key.
*
* @return This instance.
*/
- (instancetype)setString:(NSString *)value forKey:(NSString *)key NS_SWIFT_NAME(set(_:forKey:));
/**
* Set the specified property value with the specified key.
* If the properties previously contained a property for the key, the old value is replaced.
*
* @param key Key with which the specified value is to be set.
* @param value Value to be set with the specified key.
*
* @return This instance.
*/
- (instancetype)setNumber:(NSNumber *)value forKey:(NSString *)key NS_SWIFT_NAME(set(_:forKey:));
/**
* Set the specified property value with the specified key.
* If the properties previously contained a property for the key, the old value is replaced.
*
* @param key Key with which the specified value is to be set.
* @param value Value to be set with the specified key.
*
* @return This instance.
*/
- (instancetype)setBool:(BOOL)value forKey:(NSString *)key NS_SWIFT_NAME(set(_:forKey:));
/**
* Set the specified property value with the specified key.
* If the properties previously contained a property for the key, the old value is replaced.
*
* @param key Key with which the specified value is to be set.
* @param value Value to be set with the specified key.
*
* @return This instance.
*/
- (instancetype)setDate:(NSDate *)value forKey:(NSString *)key NS_SWIFT_NAME(set(_:forKey:));
/**
* Clear the property for the specified key.
*
* @param key Key whose mapping is to be cleared.
*
* @return This instance.
*/
- (instancetype)clearPropertyForKey:(NSString *)key NS_SWIFT_NAME(clearProperty(forKey:));
@end
#endif

View File

@@ -1,101 +0,0 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#ifndef MSAC_DEVICE_H
#define MSAC_DEVICE_H
#import <Foundation/Foundation.h>
#if __has_include(<AppCenter/MSACWrapperSdk.h>)
#import <AppCenter/MSACWrapperSdk.h>
#else
#import "MSACWrapperSdk.h"
#endif
NS_SWIFT_NAME(Device)
@interface MSACDevice : MSACWrapperSdk
/*
* Name of the SDK. Consists of the name of the SDK and the platform, e.g. "appcenter.ios", "appcenter.android"
*/
@property(nonatomic, copy, readonly) NSString *sdkName;
/*
* Version of the SDK in semver format, e.g. "1.2.0" or "0.12.3-alpha.1".
*/
@property(nonatomic, copy, readonly) NSString *sdkVersion;
/*
* Device model (example: iPad2,3).
*/
@property(nonatomic, copy, readonly) NSString *model;
/*
* Device manufacturer (example: HTC).
*/
@property(nonatomic, copy, readonly) NSString *oemName;
/*
* OS name (example: iOS).
*/
@property(nonatomic, copy, readonly) NSString *osName;
/*
* OS version (example: 9.3.0).
*/
@property(nonatomic, copy, readonly) NSString *osVersion;
/*
* OS build code (example: LMY47X). [optional]
*/
@property(nonatomic, copy, readonly) NSString *osBuild;
/*
* API level when applicable like in Android (example: 15). [optional]
*/
@property(nonatomic, copy, readonly) NSNumber *osApiLevel;
/*
* Language code (example: en_US).
*/
@property(nonatomic, copy, readonly) NSString *locale;
/*
* The offset in minutes from UTC for the device time zone, including daylight savings time.
*/
@property(nonatomic, readonly, strong) NSNumber *timeZoneOffset;
/*
* Screen size of the device in pixels (example: 640x480).
*/
@property(nonatomic, copy, readonly) NSString *screenSize;
/*
* Application version name, e.g. 1.1.0
*/
@property(nonatomic, copy, readonly) NSString *appVersion;
/*
* Carrier name (for mobile devices). [optional]
*/
@property(nonatomic, copy, readonly) NSString *carrierName;
/*
* Carrier country code (for mobile devices). [optional]
*/
@property(nonatomic, copy, readonly) NSString *carrierCountry;
/*
* The app's build number, e.g. 42.
*/
@property(nonatomic, copy, readonly) NSString *appBuild;
/*
* The bundle identifier, package identifier, or namespace, depending on what the individual plattforms use, .e.g com.microsoft.example.
* [optional]
*/
@property(nonatomic, copy, readonly) NSString *appNamespace;
@end
#endif

View File

@@ -1,27 +0,0 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#ifndef MSAC_ENABLE_H
#define MSAC_ENABLE_H
#import <Foundation/Foundation.h>
/**
* Protocol to define an instance that can be enabled/disabled.
*/
NS_SWIFT_NAME(Enable)
@protocol MSACEnable <NSObject>
@required
/**
* Enable/disable this instance and delete data on disabled state.
*
* @param isEnabled A boolean value set to YES to enable the instance or NO to disable it.
* @param deleteData A boolean value set to YES to delete data or NO to keep it.
*/
- (void)setEnabled:(BOOL)isEnabled andDeleteDataOnDisabled:(BOOL)deleteData NS_SWIFT_NAME(setEnabled(_:deleteDataOnDisabled:));
@end
#endif

View File

@@ -1,74 +0,0 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#ifndef MSAC_LOG_H
#define MSAC_LOG_H
#import <Foundation/Foundation.h>
@class MSACDevice;
NS_SWIFT_NAME(Log)
@protocol MSACLog <NSObject>
/**
* Log type.
*/
@property(nonatomic, copy) NSString *type;
/**
* Log timestamp.
*/
@property(nonatomic, strong) NSDate *timestamp;
/**
* A session identifier is used to correlate logs together. A session is an abstract concept in the API and is not necessarily an analytics
* session, it can be used to only track crashes.
*/
@property(nonatomic, copy) NSString *sid;
/**
* Optional distribution group ID value.
*/
@property(nonatomic, copy) NSString *distributionGroupId;
/**
* Optional user identifier.
*/
@property(nonatomic, copy) NSString *userId;
/**
* Device properties associated to this log.
*/
@property(nonatomic, strong) MSACDevice *device;
/**
* Transient object tag. For example, a log can be tagged with a transmission target. We do this currently to prevent properties being
* applied retroactively to previous logs by comparing their tags.
*/
@property(nonatomic, strong) NSObject *tag;
/**
* Checks if the object's values are valid.
*
* @return YES, if the object is valid.
*/
- (BOOL)isValid;
/**
* Adds a transmission target token that this log should be sent to.
*
* @param token The transmission target token.
*/
- (void)addTransmissionTargetToken:(NSString *)token;
/**
* Gets all transmission target tokens that this log should be sent to.
*
* @returns Collection of transmission target tokens that this log should be sent to.
*/
- (NSSet *)transmissionTargetTokens;
@end
#endif

View File

@@ -1,25 +0,0 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#ifndef MSAC_LOG_WITH_PROPERTIES_H
#define MSAC_LOG_WITH_PROPERTIES_H
#import <Foundation/Foundation.h>
#if __has_include(<AppCenter/MSACAbstractLog.h>)
#import <AppCenter/MSACAbstractLog.h>
#else
#import "MSACAbstractLog.h"
#endif
NS_SWIFT_NAME(LogWithProperties)
@interface MSACLogWithProperties : MSACAbstractLog
/**
* Additional key/value pair parameters. [optional]
*/
@property(nonatomic, strong) NSDictionary<NSString *, NSString *> *properties;
@end
#endif

View File

@@ -1,54 +0,0 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#import <Foundation/Foundation.h>
#ifndef MSAC_LOGGER
#define MSAC_LOGGER
#if __has_include(<AppCenter/MSACConstants.h>)
#import <AppCenter/MSACConstants.h>
#else
#import "MSACConstants.h"
#endif
#define MSACLog(_level, _tag, _message) \
[MSACLogger logMessage:_message level:_level tag:_tag file:__FILE__ function:__PRETTY_FUNCTION__ line:__LINE__]
#define MSACLogAssert(tag, format, ...) \
MSACLog(MSACLogLevelAssert, tag, (^{ \
return [NSString stringWithFormat:(format), ##__VA_ARGS__]; \
}))
#define MSACLogError(tag, format, ...) \
MSACLog(MSACLogLevelError, tag, (^{ \
return [NSString stringWithFormat:(format), ##__VA_ARGS__]; \
}))
#define MSACLogWarning(tag, format, ...) \
MSACLog(MSACLogLevelWarning, tag, (^{ \
return [NSString stringWithFormat:(format), ##__VA_ARGS__]; \
}))
#define MSACLogInfo(tag, format, ...) \
MSACLog(MSACLogLevelInfo, tag, (^{ \
return [NSString stringWithFormat:(format), ##__VA_ARGS__]; \
}))
#define MSACLogDebug(tag, format, ...) \
MSACLog(MSACLogLevelDebug, tag, (^{ \
return [NSString stringWithFormat:(format), ##__VA_ARGS__]; \
}))
#define MSACLogVerbose(tag, format, ...) \
MSACLog(MSACLogLevelVerbose, tag, (^{ \
return [NSString stringWithFormat:(format), ##__VA_ARGS__]; \
}))
NS_SWIFT_NAME(Logger)
@interface MSACLogger : NSObject
+ (void)logMessage:(MSACLogMessageProvider)messageProvider
level:(MSACLogLevel)loglevel
tag:(NSString *)tag
file:(const char *)file
function:(const char *)function
line:(uint)line;
@end
#endif

View File

@@ -1,23 +0,0 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#ifndef MSAC_SERVICE_H
#define MSAC_SERVICE_H
#import <Foundation/Foundation.h>
/**
* Protocol declaring service logic.
*/
NS_SWIFT_NAME(Service)
@protocol MSACService <NSObject>
/**
* Indicates whether this service is enabled.
* The state is persisted in the device's storage across application launches.
*/
@property(class, nonatomic, getter=isEnabled, setter=setEnabled:) BOOL enabled NS_SWIFT_NAME(enabled);
@end
#endif

View File

@@ -1,58 +0,0 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#ifndef MSAC_SERVICE_ABSTRACT_H
#define MSAC_SERVICE_ABSTRACT_H
#import <Foundation/Foundation.h>
#if __has_include(<AppCenter/MSACService.h>)
#import <AppCenter/MSACService.h>
#else
#import "MSACService.h"
#endif
@protocol MSACChannelGroupProtocol;
/**
* Abstraction of services common logic.
* This class is intended to be subclassed only not instantiated directly.
*/
NS_SWIFT_NAME(ServiceAbstract)
@interface MSACServiceAbstract : NSObject <MSACService>
/**
* The flag indicates whether the service is started from application or not.
*/
@property(nonatomic, assign) BOOL startedFromApplication;
/**
* Start this service with a channel group. Also sets the flag that indicates that a service has been started.
*
* @param channelGroup channel group used to persist and send logs.
* @param appSecret app secret for the SDK.
* @param token default transmission target token for this service.
* @param fromApplication indicates whether the service started from an application or not.
*/
- (void)startWithChannelGroup:(id<MSACChannelGroupProtocol>)channelGroup
appSecret:(NSString *)appSecret
transmissionTargetToken:(NSString *)token
fromApplication:(BOOL)fromApplication;
/**
* Update configuration when the service requires to start again. This method should only be called if the service is started from libraries
* and then is being started from an application.
*
* @param appSecret app secret for the SDK.
* @param token default transmission target token for this service.
*/
- (void)updateConfigurationWithAppSecret:(NSString *)appSecret transmissionTargetToken:(NSString *)token;
/**
* The flag indicate whether the service needs the application secret or not.
*/
@property(atomic, readonly) BOOL isAppSecretRequired;
@end
#endif

View File

@@ -1,21 +0,0 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#import <Foundation/Foundation.h>
#if __has_include(<AppCenter/MSACConstants.h>)
#import <AppCenter/MSACConstants.h>
#else
#import "MSACConstants.h"
#endif
/**
* This is a utility for producing App Center style log messages. It is only intended for use by App Center services and wrapper SDKs of App
* Center.
*/
NS_SWIFT_NAME(WrapperLogger)
@interface MSACWrapperLogger : NSObject
+ (void)MSACWrapperLog:(MSACLogMessageProvider)message tag:(NSString *)tag level:(MSACLogLevel)level;
@end

View File

@@ -1,60 +0,0 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#ifndef MSAC_WRAPPER_SDK_H
#define MSAC_WRAPPER_SDK_H
#import <Foundation/Foundation.h>
NS_SWIFT_NAME(WrapperSdk)
@interface MSACWrapperSdk : NSObject
/*
* Version of the wrapper SDK. When the SDK is embedding another base SDK (for example Xamarin.Android wraps Android), the Xamarin specific
* version is populated into this field while sdkVersion refers to the original Android SDK. [optional]
*/
@property(nonatomic, copy, readonly) NSString *wrapperSdkVersion;
/*
* Name of the wrapper SDK (examples: Xamarin, Cordova). [optional]
*/
@property(nonatomic, copy, readonly) NSString *wrapperSdkName;
/*
* Version of the wrapper technology framework (Xamarin runtime version or ReactNative or Cordova etc...). [optional]
*/
@property(nonatomic, copy, readonly) NSString *wrapperRuntimeVersion;
/*
* Label that is used to identify application code 'version' released via Live Update beacon running on device.
*/
@property(nonatomic, copy, readonly) NSString *liveUpdateReleaseLabel;
/*
* Identifier of environment that current application release belongs to, deployment key then maps to environment like Production, Staging.
*/
@property(nonatomic, copy, readonly) NSString *liveUpdateDeploymentKey;
/*
* Hash of all files (ReactNative or Cordova) deployed to device via LiveUpdate beacon. Helps identify the Release version on device or need
* to download updates in future
*/
@property(nonatomic, copy, readonly) NSString *liveUpdatePackageHash;
- (instancetype)initWithWrapperSdkVersion:(NSString *)wrapperSdkVersion
wrapperSdkName:(NSString *)wrapperSdkName
wrapperRuntimeVersion:(NSString *)wrapperRuntimeVersion
liveUpdateReleaseLabel:(NSString *)liveUpdateReleaseLabel
liveUpdateDeploymentKey:(NSString *)liveUpdateDeploymentKey
liveUpdatePackageHash:(NSString *)liveUpdatePackageHash;
/**
* Checks if the object's values are valid.
*
* @return YES, if the object is valid.
*/
- (BOOL)isValid;
@end
#endif

View File

@@ -1,13 +0,0 @@
framework module AppCenter {
umbrella header "AppCenter.h"
export *
module * { export * }
link framework "Foundation"
link framework "CoreTelephony"
link framework "SystemConfiguration"
link framework "UIKit"
link "sqlite3"
link "z"
}

View File

@@ -1,114 +0,0 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#import <Foundation/Foundation.h>
#import "MSACConstants+Flags.h"
@protocol MSACChannelUnitProtocol;
@protocol MSACChannelGroupProtocol;
@protocol MSACChannelProtocol;
@protocol MSACLog;
NS_ASSUME_NONNULL_BEGIN
@protocol MSACChannelDelegate <NSObject>
@optional
/**
* A callback that is called when a channel unit is added to the channel group.
*
* @param channelGroup The channel group.
* @param channel The newly added channel.
*/
- (void)channelGroup:(id<MSACChannelGroupProtocol>)channelGroup didAddChannelUnit:(id<MSACChannelUnitProtocol>)channel;
/**
* A callback that is called when a log is just enqueued. Delegates may want to prepare the log a little more before further processing.
*
* @param log The log to prepare.
*/
- (void)channel:(id<MSACChannelProtocol>)channel prepareLog:(id<MSACLog>)log;
/**
* A callback that is called after a log is definitely prepared.
*
* @param log The log.
* @param internalId An internal Id to keep track of logs.
* @param flags Options for the log.
*/
- (void)channel:(id<MSACChannelProtocol>)channel didPrepareLog:(id<MSACLog>)log internalId:(NSString *)internalId flags:(MSACFlags)flags;
/**
* A callback that is called after a log completed the enqueueing process whether it was successful or not.
*
* @param log The log.
* @param internalId An internal Id to keep track of logs.
*/
- (void)channel:(id<MSACChannelProtocol>)channel didCompleteEnqueueingLog:(id<MSACLog>)log internalId:(NSString *)internalId;
/**
* Callback method that will be called before each log will be send to the server.
*
* @param channel The channel object.
* @param log The log to be sent.
*/
- (void)channel:(id<MSACChannelProtocol>)channel willSendLog:(id<MSACLog>)log;
/**
* Callback method that will be called in case the SDK was able to send a log.
*
* @param channel The channel object.
* @param log The log to be sent.
*/
- (void)channel:(id<MSACChannelProtocol>)channel didSucceedSendingLog:(id<MSACLog>)log;
/**
* Callback method that will be called in case the SDK was unable to send a log.
*
* @param channel The channel object.
* @param log The log to be sent.
* @param error The error that occured.
*/
- (void)channel:(id<MSACChannelProtocol>)channel didFailSendingLog:(id<MSACLog>)log withError:(nullable NSError *)error;
/**
* A callback that is called when setEnabled has been invoked.
*
* @param channel The channel.
* @param isEnabled The boolean that indicates enabled.
* @param deletedData The boolean that indicates deleting data on disabled.
*/
- (void)channel:(id<MSACChannelProtocol>)channel didSetEnabled:(BOOL)isEnabled andDeleteDataOnDisabled:(BOOL)deletedData;
/**
* A callback that is called when pause has been invoked.
*
* @param channel The channel.
* @param identifyingObject The identifying object used to pause the channel.
*/
- (void)channel:(id<MSACChannelProtocol>)channel didPauseWithIdentifyingObject:(id<NSObject>)identifyingObject;
/**
* A callback that is called when resume has been invoked.
*
* @param channel The channel.
* @param identifyingObject The identifying object used to resume the channel.
*/
- (void)channel:(id<MSACChannelProtocol>)channel didResumeWithIdentifyingObject:(id<NSObject>)identifyingObject;
/**
* Callback method that will determine if a log should be filtered out from the usual processing pipeline. If any delegate returns true, the
* log is filtered.
*
* @param channelUnit The channel unit that is going to send the log.
* @param log The log to be filtered or not.
*
* @return `true` if the log should be filtered out.
*/
- (BOOL)channelUnit:(id<MSACChannelUnitProtocol>)channelUnit shouldFilterLog:(id<MSACLog>)log;
@end
NS_ASSUME_NONNULL_END

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>BuildMachineOSBuild</key>
<string>19H1217</string>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>AppCenter</string>
<key>CFBundleIdentifier</key>
<string>com.microsoft.appcenter</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>AppCenter</string>
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>1</string>
<key>CFBundleSupportedPlatforms</key>
<array>
<string>MacOSX</string>
</array>
<key>CFBundleVersion</key>
<string>1.0</string>
<key>DTCompiler</key>
<string>com.apple.compilers.llvm.clang.1_0</string>
<key>DTPlatformBuild</key>
<string>11C505</string>
<key>DTPlatformVersion</key>
<string>GM</string>
<key>DTSDKBuild</key>
<string>19B90</string>
<key>DTSDKName</key>
<string>macosx10.15</string>
<key>DTXcode</key>
<string>1130</string>
<key>DTXcodeBuild</key>
<string>11C505</string>
<key>LSMinimumSystemVersion</key>
<string>10.15</string>
<key>UIDeviceFamily</key>
<array>
<integer>2</integer>
</array>
</dict>
</plist>

View File

@@ -1,42 +0,0 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#import <Foundation/Foundation.h>
#if __has_include(<AppCenter/MSACAppCenter.h>)
#import <AppCenter/MSACAbstractLog.h>
#import <AppCenter/MSACAppCenter.h>
#import <AppCenter/MSACAppCenterErrors.h>
#import <AppCenter/MSACChannelGroupProtocol.h>
#import <AppCenter/MSACChannelProtocol.h>
#import <AppCenter/MSACConstants+Flags.h>
#import <AppCenter/MSACConstants.h>
#import <AppCenter/MSACCustomProperties.h>
#import <AppCenter/MSACDevice.h>
#import <AppCenter/MSACEnable.h>
#import <AppCenter/MSACLog.h>
#import <AppCenter/MSACLogWithProperties.h>
#import <AppCenter/MSACLogger.h>
#import <AppCenter/MSACService.h>
#import <AppCenter/MSACServiceAbstract.h>
#import <AppCenter/MSACWrapperLogger.h>
#import <AppCenter/MSACWrapperSdk.h>
#else
#import "MSACAbstractLog.h"
#import "MSACAppCenter.h"
#import "MSACAppCenterErrors.h"
#import "MSACChannelGroupProtocol.h"
#import "MSACChannelProtocol.h"
#import "MSACConstants+Flags.h"
#import "MSACConstants.h"
#import "MSACCustomProperties.h"
#import "MSACDevice.h"
#import "MSACEnable.h"
#import "MSACLog.h"
#import "MSACLogWithProperties.h"
#import "MSACLogger.h"
#import "MSACService.h"
#import "MSACServiceAbstract.h"
#import "MSACWrapperLogger.h"
#import "MSACWrapperSdk.h"
#endif

View File

@@ -1,14 +0,0 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#ifndef MSAC_ABSTRACT_LOG_H
#define MSAC_ABSTRACT_LOG_H
#import <Foundation/Foundation.h>
NS_SWIFT_NAME(AbstractLog)
@interface MSACAbstractLog : NSObject
@end
#endif

View File

@@ -1,203 +0,0 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#import <Foundation/Foundation.h>
#ifndef MSAC_APP_CENTER
#define MSAC_APP_CENTER
#if __has_include(<AppCenter/MSACConstants.h>)
#import <AppCenter/MSACConstants.h>
#else
#import "MSACConstants.h"
#endif
@class MSACWrapperSdk;
#if !TARGET_OS_TV
@class MSACCustomProperties;
#endif
NS_SWIFT_NAME(AppCenter)
@interface MSACAppCenter : NSObject
/**
* Returns the singleton instance of MSACAppCenter.
*/
+ (instancetype)sharedInstance;
/**
* Configure the SDK with an application secret.
*
* @param appSecret A unique and secret key used to identify the application.
*
* @discussion This may be called only once per application process lifetime.
*/
+ (void)configureWithAppSecret:(NSString *)appSecret NS_SWIFT_NAME(configure(withAppSecret:));
/**
* Configure the SDK.
*
* @discussion This may be called only once per application process lifetime.
*/
+ (void)configure;
/**
* Configure the SDK with an application secret and an array of services to start.
*
* @param appSecret A unique and secret key used to identify the application.
* @param services Array of services to start.
*
* @discussion This may be called only once per application process lifetime.
*/
+ (void)start:(NSString *)appSecret withServices:(NSArray<Class> *)services NS_SWIFT_NAME(start(withAppSecret:services:));
/**
* Start the SDK with an array of services.
*
* @param services Array of services to start.
*
* @discussion This may be called only once per application process lifetime.
*/
+ (void)startWithServices:(NSArray<Class> *)services NS_SWIFT_NAME(start(services:));
/**
* Start a service.
*
* @param service A service to start.
*
* @discussion This may be called only once per service per application process lifetime.
*/
+ (void)startService:(Class)service;
/**
* Configure the SDK with an array of services to start from a library. This will not start the service at application level, it will enable
* the service only for the library.
*
* @param services Array of services to start.
*/
+ (void)startFromLibraryWithServices:(NSArray<Class> *)services NS_SWIFT_NAME(startFromLibrary(services:));
/**
* The flag indicates whether the SDK has already been configured or not.
*/
@property(class, atomic, readonly, getter=isConfigured) BOOL configured;
/**
* The flag indicates whether app is running in App Center Test Cloud.
*/
@property(class, atomic, readonly, getter=isRunningInAppCenterTestCloud) BOOL runningInAppCenterTestCloud;
/**
* The flag indicates whether or not the SDK was enabled as a whole
*
* The state is persisted in the device's storage across application launches.
*/
@property(class, nonatomic, getter=isEnabled, setter=setEnabled:) BOOL enabled NS_SWIFT_NAME(enabled);
/**
* Flag indicating whether SDK can send network requests.
*
* The state is persisted in the device's storage across application launches.
*/
@property(class, nonatomic, getter=isNetworkRequestsAllowed, setter=setNetworkRequestsAllowed:)
BOOL networkRequestsAllowed NS_SWIFT_NAME(networkRequestsAllowed);
/**
* The SDK's log level.
*/
@property(class, nonatomic) MSACLogLevel logLevel;
/**
* Base URL to use for backend communication.
*/
@property(class, nonatomic, strong) NSString *logUrl;
/**
* Set log handler.
*/
@property(class, nonatomic) MSACLogHandler logHandler;
/**
* Set wrapper SDK information to use when building device properties. This is intended in case you are building a SDK that uses the App
* Center SDK under the hood, e.g. our Xamarin SDK or ReactNative SDk.
*/
@property(class, nonatomic, strong) MSACWrapperSdk *wrapperSdk;
#if !TARGET_OS_TV
/**
* Set the custom properties.
*
* @param customProperties Custom properties object.
*/
+ (void)setCustomProperties:(MSACCustomProperties *)customProperties;
#endif
/**
* Check whether the application delegate forwarder is enabled or not.
*
* @discussion The application delegate forwarder forwards messages that target your application delegate methods via swizzling to the SDK.
* It simplifies the SDK integration but may not be suitable to any situations. For
* instance it should be disabled if you or one of your third party SDK is doing message forwarding on the application delegate. Message
* forwarding usually implies the implementation of @see NSObject#forwardingTargetForSelector: or @see NSObject#forwardInvocation: methods.
* To disable the application delegate forwarder just add the `AppCenterAppDelegateForwarderEnabled` tag to your Info .plist file and set it
* to `0`. Then you will have to forward any application delegate needed by the SDK manually.
*/
@property(class, readonly, nonatomic, getter=isAppDelegateForwarderEnabled) BOOL appDelegateForwarderEnabled;
/**
* Unique installation identifier.
*
*/
@property(class, readonly, nonatomic) NSUUID *installId;
/**
* Detect if a debugger is attached to the app process. This is only invoked once on app startup and can not detect
* if the debugger is being attached during runtime!
*
*/
@property(class, readonly, nonatomic, getter=isDebuggerAttached) BOOL debuggerAttached;
/**
* Current version of AppCenter SDK.
*
*/
@property(class, readonly, nonatomic) NSString *sdkVersion;
/**
* Set the maximum size of the internal storage. This method must be called before App Center is started. This method is only intended for
* applications.
*
* @param sizeInBytes Maximum size of the internal storage in bytes. This will be rounded up to the nearest multiple of a SQLite page size
* (default is 4096 bytes). Values below 20,480 bytes (20 KiB) will be ignored.
*
* @param completionHandler Callback that is invoked when the database size has been set. The `BOOL` parameter is `YES` if changing the size
* is successful, and `NO` otherwise. This parameter can be null.
*
* @discussion This only sets the maximum size of the database, but App Center modules might store additional data.
* The value passed to this method is not persisted on disk. The default maximum database size is 10485760 bytes (10 MiB).
*/
+ (void)setMaxStorageSize:(long)sizeInBytes completionHandler:(void (^)(BOOL))completionHandler;
/**
* Set the user identifier.
*
* @discussion Set the user identifier for logs sent for the default target token when the secret passed in @c
* MSACAppCenter:start:withServices: contains "target={targetToken}".
*
* For App Center backend the user identifier maximum length is 256 characters.
*
* AppCenter must be configured or started before this API can be used.
*/
@property(class, nonatomic, strong) NSString *userId;
/**
* Set country code to use when building device properties.
*
* @see https://www.iso.org/obp/ui/#search for more information.
*/
@property(class, nonatomic, strong) NSString *countryCode;
@end
#endif

View File

@@ -1,41 +0,0 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#ifndef MSAC_APP_CENTER_ERRORS_H
#define MSAC_APP_CENTER_ERRORS_H
#import <Foundation/Foundation.h>
#define MSAC_APP_CENTER_BASE_DOMAIN @"com.Microsoft.AppCenter."
NS_ASSUME_NONNULL_BEGIN
#pragma mark - Domain
static NSString *const kMSACACErrorDomain = MSAC_APP_CENTER_BASE_DOMAIN @"ErrorDomain";
#pragma mark - General
// Error codes.
NS_ENUM(NSInteger){MSACACLogInvalidContainerErrorCode = 1, MSACACCanceledErrorCode = 2, MSACACDisabledErrorCode = 3};
// Error descriptions.
static NSString const *kMSACACLogInvalidContainerErrorDesc = @"Invalid log container.";
static NSString const *kMSACACCanceledErrorDesc = @"The operation was canceled.";
static NSString const *kMSACACDisabledErrorDesc = @"The service is disabled.";
#pragma mark - Connection
// Error codes.
NS_ENUM(NSInteger){MSACACConnectionPausedErrorCode = 100, MSACACConnectionHttpErrorCode = 101};
// Error descriptions.
static NSString const *kMSACACConnectionHttpErrorDesc = @"An HTTP error occured.";
static NSString const *kMSACACConnectionPausedErrorDesc = @"Canceled, connection paused with log deletion.";
// Error user info keys.
static NSString const *kMSACACConnectionHttpCodeErrorKey = @"MSConnectionHttpCode";
NS_ASSUME_NONNULL_END
#endif

View File

@@ -1,87 +0,0 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#ifndef MSAC_CHANNEL_GROUP_PROTOCOL_H
#define MSAC_CHANNEL_GROUP_PROTOCOL_H
#import <Foundation/Foundation.h>
#if __has_include(<AppCenter/MSACChannelProtocol.h>)
#import <AppCenter/MSACChannelProtocol.h>
#else
#import "MSACChannelProtocol.h"
#endif
NS_ASSUME_NONNULL_BEGIN
@class MSACChannelUnitConfiguration;
@protocol MSACIngestionProtocol;
@protocol MSACChannelUnitProtocol;
/**
* `MSACChannelGroupProtocol` represents a kind of channel that contains constituent MSACChannelUnit objects. When an operation from the
* `MSACChannelProtocol` is performed on the group, that operation should be propagated to its constituent MSACChannelUnit objects.
*/
NS_SWIFT_NAME(ChannelGroupProtocol)
@protocol MSACChannelGroupProtocol <MSACChannelProtocol>
/**
* Initialize a channel unit with the given configuration.
*
* @param configuration channel configuration.
*
* @return The added `MSACChannelUnitProtocol`. Use this object to enqueue logs.
*/
- (id<MSACChannelUnitProtocol>)addChannelUnitWithConfiguration:(MSACChannelUnitConfiguration *)configuration
NS_SWIFT_NAME(addChannelUnit(withConfiguration:));
/**
* Initialize a channel unit with the given configuration.
*
* @param configuration channel configuration.
* @param ingestion The alternative ingestion object
*
* @return The added `MSACChannelUnitProtocol`. Use this object to enqueue logs.
*/
- (id<MSACChannelUnitProtocol>)addChannelUnitWithConfiguration:(MSACChannelUnitConfiguration *)configuration
withIngestion:(nullable id<MSACIngestionProtocol>)ingestion
NS_SWIFT_NAME(addChannelUnit(_:ingestion:));
/**
* Change the base URL (schema + authority + port only) used to communicate with the backend.
*/
@property(nonatomic, strong) NSString *_Nullable logUrl;
/**
* Set the app secret.
*/
@property(nonatomic, strong) NSString *_Nullable appSecret;
/**
* Set the maximum size of the internal storage. This method must be called before App Center is started.
*
* @discussion The default maximum database size is 10485760 bytes (10 MiB).
*
* @param sizeInBytes Maximum size of the internal storage in bytes. This will be rounded up to the nearest multiple of a SQLite page size
* (default is 4096 bytes). Values below 24576 bytes (24 KiB) will be ignored.
* @param completionHandler Callback that is invoked when the database size has been set. The `BOOL` parameter is `YES` if changing the size
* is successful, and `NO` otherwise.
*/
- (void)setMaxStorageSize:(long)sizeInBytes
completionHandler:(nullable void (^)(BOOL))completionHandler NS_SWIFT_NAME(setMaxStorageSize(_:completionHandler:));
/**
* Return a channel unit instance for the given groupId.
*
* @param groupId The group ID for a channel unit.
*
* @return A channel unit instance or `nil`.
*/
- (nullable id<MSACChannelUnitProtocol>)channelUnitForGroupId:(NSString *)groupId;
@end
NS_ASSUME_NONNULL_END
#endif

View File

@@ -1,68 +0,0 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#ifndef MSAC_CHANNEL_PROTOCOL_H
#define MSAC_CHANNEL_PROTOCOL_H
#import <Foundation/Foundation.h>
#if __has_include(<AppCenter/MSACEnable.h>)
#import <AppCenter/MSACEnable.h>
#else
#import "MSACEnable.h"
#endif
NS_ASSUME_NONNULL_BEGIN
@protocol MSACChannelDelegate;
/**
* `MSACChannelProtocol` contains the essential operations of a channel. Channels are broadly responsible for enqueuing logs to be sent to
* the backend and/or stored on disk.
*/
NS_SWIFT_NAME(ChannelProtocol)
@protocol MSACChannelProtocol <NSObject, MSACEnable>
/**
* Add delegate.
*
* @param delegate delegate.
*/
- (void)addDelegate:(id<MSACChannelDelegate>)delegate;
/**
* Remove delegate.
*
* @param delegate delegate.
*/
- (void)removeDelegate:(id<MSACChannelDelegate>)delegate;
/**
* Pause operations, logs will be stored but not sent.
*
* @param identifyingObject Object used to identify the pause request.
*
* @discussion A paused channel doesn't forward logs to the ingestion. The identifying object used to pause the channel can be any unique
* object. The same identifying object must be used to call resume. For simplicity if the caller is the one owning the channel then @c self
* can be used as identifying object.
*
* @see resumeWithIdentifyingObject:
*/
- (void)pauseWithIdentifyingObject:(id<NSObject>)identifyingObject;
/**
* Resume operations, logs can be sent again.
*
* @param identifyingObject Object used to passed to the pause method.
*
* @discussion The channel only resume when all the outstanding identifying objects have been resumed.
*
* @see pauseWithIdentifyingObject:
*/
- (void)resumeWithIdentifyingObject:(id<NSObject>)identifyingObject;
@end
NS_ASSUME_NONNULL_END
#endif

View File

@@ -1,18 +0,0 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#ifndef MSAC_CONSTANTS_FLAGS_H
#define MSAC_CONSTANTS_FLAGS_H
#import <Foundation/Foundation.h>
typedef NS_OPTIONS(NSUInteger, MSACFlags) {
MSACFlagsNone = (0 << 0), // => 00000000
MSACFlagsNormal = (1 << 0), // => 00000001
MSACFlagsCritical = (1 << 1), // => 00000010
MSACFlagsPersistenceNormal DEPRECATED_MSG_ATTRIBUTE("please use MSACFlagsNormal") = MSACFlagsNormal,
MSACFlagsPersistenceCritical DEPRECATED_MSG_ATTRIBUTE("please use MSACFlagsCritical") = MSACFlagsCritical,
MSACFlagsDefault = MSACFlagsNormal
} NS_SWIFT_NAME(Flags);
#endif

View File

@@ -1,170 +0,0 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#import <Foundation/Foundation.h>
/**
* Log Levels
*/
typedef NS_ENUM(NSUInteger, MSACLogLevel) {
/**
* Logging will be very chatty
*/
MSACLogLevelVerbose = 2,
/**
* Debug information will be logged
*/
MSACLogLevelDebug = 3,
/**
* Information will be logged
*/
MSACLogLevelInfo = 4,
/**
* Errors and warnings will be logged
*/
MSACLogLevelWarning = 5,
/**
* Errors will be logged
*/
MSACLogLevelError = 6,
/**
* Only critical errors will be logged
*/
MSACLogLevelAssert = 7,
/**
* Logging is disabled
*/
MSACLogLevelNone = 99
} NS_SWIFT_NAME(LogLevel);
typedef NSString * (^MSACLogMessageProvider)(void)NS_SWIFT_NAME(LogMessageProvider);
typedef void (^MSACLogHandler)(MSACLogMessageProvider messageProvider, MSACLogLevel logLevel, NSString *tag, const char *file,
const char *function, uint line) NS_SWIFT_NAME(LogHandler);
/**
* Channel priorities, check the kMSACPriorityCount if you add a new value.
* The order matters here! Values NEED to range from low priority to high priority.
*/
typedef NS_ENUM(NSInteger, MSACPriority) { MSACPriorityBackground, MSACPriorityDefault, MSACPriorityHigh } NS_SWIFT_NAME(Priority);
static short const kMSACPriorityCount = MSACPriorityHigh + 1;
/**
* The priority by which the modules are initialized.
* MSACPriorityMax is reserved for only 1 module and this needs to be Crashes.
* Crashes needs to be initialized first to catch crashes in our other SDK Modules (which will hopefully never happen) and to avoid losing
* any log at crash time.
*/
typedef NS_ENUM(NSInteger, MSACInitializationPriority) {
MSACInitializationPriorityDefault = 500,
MSACInitializationPriorityHigh = 750,
MSACInitializationPriorityMax = 999
} NS_SWIFT_NAME(InitializationPriority);
/**
* Enum with the different HTTP status codes.
*/
typedef NS_ENUM(NSInteger, MSACHTTPCodesNo) {
// Invalid
MSACHTTPCodesNo0XXInvalidUnknown = 0,
// Informational
MSACHTTPCodesNo1XXInformationalUnknown = 1,
MSACHTTPCodesNo100Continue = 100,
MSACHTTPCodesNo101SwitchingProtocols = 101,
MSACHTTPCodesNo102Processing = 102,
// Success
MSACHTTPCodesNo2XXSuccessUnknown = 2,
MSACHTTPCodesNo200OK = 200,
MSACHTTPCodesNo201Created = 201,
MSACHTTPCodesNo202Accepted = 202,
MSACHTTPCodesNo203NonAuthoritativeInformation = 203,
MSACHTTPCodesNo204NoContent = 204,
MSACHTTPCodesNo205ResetContent = 205,
MSACHTTPCodesNo206PartialContent = 206,
MSACHTTPCodesNo207MultiStatus = 207,
MSACHTTPCodesNo208AlreadyReported = 208,
MSACHTTPCodesNo209IMUsed = 209,
// Redirection
MSACHTTPCodesNo3XXSuccessUnknown = 3,
MSACHTTPCodesNo300MultipleChoices = 300,
MSACHTTPCodesNo301MovedPermanently = 301,
MSACHTTPCodesNo302Found = 302,
MSACHTTPCodesNo303SeeOther = 303,
MSACHTTPCodesNo304NotModified = 304,
MSACHTTPCodesNo305UseProxy = 305,
MSACHTTPCodesNo306SwitchProxy = 306,
MSACHTTPCodesNo307TemporaryRedirect = 307,
MSACHTTPCodesNo308PermanentRedirect = 308,
// Client error
MSACHTTPCodesNo4XXSuccessUnknown = 4,
MSACHTTPCodesNo400BadRequest = 400,
MSACHTTPCodesNo401Unauthorised = 401,
MSACHTTPCodesNo402PaymentRequired = 402,
MSACHTTPCodesNo403Forbidden = 403,
MSACHTTPCodesNo404NotFound = 404,
MSACHTTPCodesNo405MethodNotAllowed = 405,
MSACHTTPCodesNo406NotAcceptable = 406,
MSACHTTPCodesNo407ProxyAuthenticationRequired = 407,
MSACHTTPCodesNo408RequestTimeout = 408,
MSACHTTPCodesNo409Conflict = 409,
MSACHTTPCodesNo410Gone = 410,
MSACHTTPCodesNo411LengthRequired = 411,
MSACHTTPCodesNo412PreconditionFailed = 412,
MSACHTTPCodesNo413RequestEntityTooLarge = 413,
MSACHTTPCodesNo414RequestURITooLong = 414,
MSACHTTPCodesNo415UnsupportedMediaType = 415,
MSACHTTPCodesNo416RequestedRangeNotSatisfiable = 416,
MSACHTTPCodesNo417ExpectationFailed = 417,
MSACHTTPCodesNo418IamATeapot = 418,
MSACHTTPCodesNo419AuthenticationTimeout = 419,
MSACHTTPCodesNo420MethodFailureSpringFramework = 420,
MSACHTTPCodesNo420EnhanceYourCalmTwitter = 4200,
MSACHTTPCodesNo422UnprocessableEntity = 422,
MSACHTTPCodesNo423Locked = 423,
MSACHTTPCodesNo424FailedDependency = 424,
MSACHTTPCodesNo424MethodFailureWebDaw = 4240,
MSACHTTPCodesNo425UnorderedCollection = 425,
MSACHTTPCodesNo426UpgradeRequired = 426,
MSACHTTPCodesNo428PreconditionRequired = 428,
MSACHTTPCodesNo429TooManyRequests = 429,
MSACHTTPCodesNo431RequestHeaderFieldsTooLarge = 431,
MSACHTTPCodesNo444NoResponseNginx = 444,
MSACHTTPCodesNo449RetryWithMicrosoft = 449,
MSACHTTPCodesNo450BlockedByWindowsParentalControls = 450,
MSACHTTPCodesNo451RedirectMicrosoft = 451,
MSACHTTPCodesNo451UnavailableForLegalReasons = 4510,
MSACHTTPCodesNo494RequestHeaderTooLargeNginx = 494,
MSACHTTPCodesNo495CertErrorNginx = 495,
MSACHTTPCodesNo496NoCertNginx = 496,
MSACHTTPCodesNo497HTTPToHTTPSNginx = 497,
MSACHTTPCodesNo499ClientClosedRequestNginx = 499,
// Server error
MSACHTTPCodesNo5XXSuccessUnknown = 5,
MSACHTTPCodesNo500InternalServerError = 500,
MSACHTTPCodesNo501NotImplemented = 501,
MSACHTTPCodesNo502BadGateway = 502,
MSACHTTPCodesNo503ServiceUnavailable = 503,
MSACHTTPCodesNo504GatewayTimeout = 504,
MSACHTTPCodesNo505HTTPVersionNotSupported = 505,
MSACHTTPCodesNo506VariantAlsoNegotiates = 506,
MSACHTTPCodesNo507InsufficientStorage = 507,
MSACHTTPCodesNo508LoopDetected = 508,
MSACHTTPCodesNo509BandwidthLimitExceeded = 509,
MSACHTTPCodesNo510NotExtended = 510,
MSACHTTPCodesNo511NetworkAuthenticationRequired = 511,
MSACHTTPCodesNo522ConnectionTimedOut = 522,
MSACHTTPCodesNo598NetworkReadTimeoutErrorUnknown = 598,
MSACHTTPCodesNo599NetworkConnectTimeoutErrorUnknown = 599
} NS_SWIFT_NAME(HTTPCodesNo);

View File

@@ -1,71 +0,0 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#ifndef MSAC_CUSTOM_PROPERTIES_H
#define MSAC_CUSTOM_PROPERTIES_H
#import <Foundation/Foundation.h>
/**
* Custom properties builder.
* Collects multiple properties to send in one log.
*/
NS_SWIFT_NAME(CustomProperties)
@interface MSACCustomProperties : NSObject
/**
* Set the specified property value with the specified key.
* If the properties previously contained a property for the key, the old value is replaced.
*
* @param key Key with which the specified value is to be set.
* @param value Value to be set with the specified key.
*
* @return This instance.
*/
- (instancetype)setString:(NSString *)value forKey:(NSString *)key NS_SWIFT_NAME(set(_:forKey:));
/**
* Set the specified property value with the specified key.
* If the properties previously contained a property for the key, the old value is replaced.
*
* @param key Key with which the specified value is to be set.
* @param value Value to be set with the specified key.
*
* @return This instance.
*/
- (instancetype)setNumber:(NSNumber *)value forKey:(NSString *)key NS_SWIFT_NAME(set(_:forKey:));
/**
* Set the specified property value with the specified key.
* If the properties previously contained a property for the key, the old value is replaced.
*
* @param key Key with which the specified value is to be set.
* @param value Value to be set with the specified key.
*
* @return This instance.
*/
- (instancetype)setBool:(BOOL)value forKey:(NSString *)key NS_SWIFT_NAME(set(_:forKey:));
/**
* Set the specified property value with the specified key.
* If the properties previously contained a property for the key, the old value is replaced.
*
* @param key Key with which the specified value is to be set.
* @param value Value to be set with the specified key.
*
* @return This instance.
*/
- (instancetype)setDate:(NSDate *)value forKey:(NSString *)key NS_SWIFT_NAME(set(_:forKey:));
/**
* Clear the property for the specified key.
*
* @param key Key whose mapping is to be cleared.
*
* @return This instance.
*/
- (instancetype)clearPropertyForKey:(NSString *)key NS_SWIFT_NAME(clearProperty(forKey:));
@end
#endif

View File

@@ -1,101 +0,0 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#ifndef MSAC_DEVICE_H
#define MSAC_DEVICE_H
#import <Foundation/Foundation.h>
#if __has_include(<AppCenter/MSACWrapperSdk.h>)
#import <AppCenter/MSACWrapperSdk.h>
#else
#import "MSACWrapperSdk.h"
#endif
NS_SWIFT_NAME(Device)
@interface MSACDevice : MSACWrapperSdk
/*
* Name of the SDK. Consists of the name of the SDK and the platform, e.g. "appcenter.ios", "appcenter.android"
*/
@property(nonatomic, copy, readonly) NSString *sdkName;
/*
* Version of the SDK in semver format, e.g. "1.2.0" or "0.12.3-alpha.1".
*/
@property(nonatomic, copy, readonly) NSString *sdkVersion;
/*
* Device model (example: iPad2,3).
*/
@property(nonatomic, copy, readonly) NSString *model;
/*
* Device manufacturer (example: HTC).
*/
@property(nonatomic, copy, readonly) NSString *oemName;
/*
* OS name (example: iOS).
*/
@property(nonatomic, copy, readonly) NSString *osName;
/*
* OS version (example: 9.3.0).
*/
@property(nonatomic, copy, readonly) NSString *osVersion;
/*
* OS build code (example: LMY47X). [optional]
*/
@property(nonatomic, copy, readonly) NSString *osBuild;
/*
* API level when applicable like in Android (example: 15). [optional]
*/
@property(nonatomic, copy, readonly) NSNumber *osApiLevel;
/*
* Language code (example: en_US).
*/
@property(nonatomic, copy, readonly) NSString *locale;
/*
* The offset in minutes from UTC for the device time zone, including daylight savings time.
*/
@property(nonatomic, readonly, strong) NSNumber *timeZoneOffset;
/*
* Screen size of the device in pixels (example: 640x480).
*/
@property(nonatomic, copy, readonly) NSString *screenSize;
/*
* Application version name, e.g. 1.1.0
*/
@property(nonatomic, copy, readonly) NSString *appVersion;
/*
* Carrier name (for mobile devices). [optional]
*/
@property(nonatomic, copy, readonly) NSString *carrierName;
/*
* Carrier country code (for mobile devices). [optional]
*/
@property(nonatomic, copy, readonly) NSString *carrierCountry;
/*
* The app's build number, e.g. 42.
*/
@property(nonatomic, copy, readonly) NSString *appBuild;
/*
* The bundle identifier, package identifier, or namespace, depending on what the individual plattforms use, .e.g com.microsoft.example.
* [optional]
*/
@property(nonatomic, copy, readonly) NSString *appNamespace;
@end
#endif

View File

@@ -1,27 +0,0 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#ifndef MSAC_ENABLE_H
#define MSAC_ENABLE_H
#import <Foundation/Foundation.h>
/**
* Protocol to define an instance that can be enabled/disabled.
*/
NS_SWIFT_NAME(Enable)
@protocol MSACEnable <NSObject>
@required
/**
* Enable/disable this instance and delete data on disabled state.
*
* @param isEnabled A boolean value set to YES to enable the instance or NO to disable it.
* @param deleteData A boolean value set to YES to delete data or NO to keep it.
*/
- (void)setEnabled:(BOOL)isEnabled andDeleteDataOnDisabled:(BOOL)deleteData NS_SWIFT_NAME(setEnabled(_:deleteDataOnDisabled:));
@end
#endif

View File

@@ -1,74 +0,0 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#ifndef MSAC_LOG_H
#define MSAC_LOG_H
#import <Foundation/Foundation.h>
@class MSACDevice;
NS_SWIFT_NAME(Log)
@protocol MSACLog <NSObject>
/**
* Log type.
*/
@property(nonatomic, copy) NSString *type;
/**
* Log timestamp.
*/
@property(nonatomic, strong) NSDate *timestamp;
/**
* A session identifier is used to correlate logs together. A session is an abstract concept in the API and is not necessarily an analytics
* session, it can be used to only track crashes.
*/
@property(nonatomic, copy) NSString *sid;
/**
* Optional distribution group ID value.
*/
@property(nonatomic, copy) NSString *distributionGroupId;
/**
* Optional user identifier.
*/
@property(nonatomic, copy) NSString *userId;
/**
* Device properties associated to this log.
*/
@property(nonatomic, strong) MSACDevice *device;
/**
* Transient object tag. For example, a log can be tagged with a transmission target. We do this currently to prevent properties being
* applied retroactively to previous logs by comparing their tags.
*/
@property(nonatomic, strong) NSObject *tag;
/**
* Checks if the object's values are valid.
*
* @return YES, if the object is valid.
*/
- (BOOL)isValid;
/**
* Adds a transmission target token that this log should be sent to.
*
* @param token The transmission target token.
*/
- (void)addTransmissionTargetToken:(NSString *)token;
/**
* Gets all transmission target tokens that this log should be sent to.
*
* @returns Collection of transmission target tokens that this log should be sent to.
*/
- (NSSet *)transmissionTargetTokens;
@end
#endif

View File

@@ -1,25 +0,0 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#ifndef MSAC_LOG_WITH_PROPERTIES_H
#define MSAC_LOG_WITH_PROPERTIES_H
#import <Foundation/Foundation.h>
#if __has_include(<AppCenter/MSACAbstractLog.h>)
#import <AppCenter/MSACAbstractLog.h>
#else
#import "MSACAbstractLog.h"
#endif
NS_SWIFT_NAME(LogWithProperties)
@interface MSACLogWithProperties : MSACAbstractLog
/**
* Additional key/value pair parameters. [optional]
*/
@property(nonatomic, strong) NSDictionary<NSString *, NSString *> *properties;
@end
#endif

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