diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..64048d3 --- /dev/null +++ b/.gitignore @@ -0,0 +1,5 @@ +Carthage +xcuserdata +.DS_Store +report.xml +test_output \ No newline at end of file diff --git a/Framework/Info.plist b/Framework/Info.plist new file mode 100644 index 0000000..fcd3639 --- /dev/null +++ b/Framework/Info.plist @@ -0,0 +1,24 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + FMWK + CFBundleShortVersionString + $(MARKETING_VERSION) + CFBundleVersion + $(CURRENT_PROJECT_VERSION) + NSPrincipalClass + + + diff --git a/Framework/Sources/Helpers/NSBundle+SRGDiagnostics.h b/Framework/Sources/Helpers/NSBundle+SRGDiagnostics.h new file mode 100644 index 0000000..67b5de8 --- /dev/null +++ b/Framework/Sources/Helpers/NSBundle+SRGDiagnostics.h @@ -0,0 +1,20 @@ +// +// Copyright (c) SRG SSR. All rights reserved. +// +// License information is available from the LICENSE file. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface NSBundle (SRGDiagnostics) + +/** + * The SRGDiagnostics resource bundle. + */ ++ (NSBundle *)srg_diagnosticsBundle; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Framework/Sources/Helpers/NSBundle+SRGDiagnostics.m b/Framework/Sources/Helpers/NSBundle+SRGDiagnostics.m new file mode 100644 index 0000000..e2f0eb4 --- /dev/null +++ b/Framework/Sources/Helpers/NSBundle+SRGDiagnostics.m @@ -0,0 +1,25 @@ +// +// Copyright (c) SRG SSR. All rights reserved. +// +// License information is available from the LICENSE file. +// + +#import "NSBundle+SRGDiagnostics.h" + +#import "SRGDiagnosticsService.h" + +@implementation NSBundle (SRGDiagnostics) + +#pragma mark Class methods + ++ (instancetype)srg_diagnosticsBundle +{ + static NSBundle *s_bundle; + static dispatch_once_t s_onceToken; + dispatch_once(&s_onceToken, ^{ + s_bundle = [NSBundle bundleForClass:[SRGDiagnosticsService class]]; + }); + return s_bundle; +} + +@end diff --git a/Framework/Sources/Player/SRGDiagnosticsService.h b/Framework/Sources/Player/SRGDiagnosticsService.h new file mode 100644 index 0000000..036ddb5 --- /dev/null +++ b/Framework/Sources/Player/SRGDiagnosticsService.h @@ -0,0 +1,15 @@ +// +// Copyright (c) SRG SSR. All rights reserved. +// +// License information is available from the LICENSE file. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface SRGDiagnosticsService : NSObject + +@end + +NS_ASSUME_NONNULL_END diff --git a/Framework/Sources/Player/SRGDiagnosticsService.m b/Framework/Sources/Player/SRGDiagnosticsService.m new file mode 100644 index 0000000..5bad4e7 --- /dev/null +++ b/Framework/Sources/Player/SRGDiagnosticsService.m @@ -0,0 +1,11 @@ +// +// Copyright (c) SRG SSR. All rights reserved. +// +// License information is available from the LICENSE file. +// + +#import "SRGDiagnosticsService.h" + +@implementation SRGDiagnosticsService + +@end diff --git a/Framework/Sources/SRGDiagnostics.h b/Framework/Sources/SRGDiagnostics.h new file mode 100644 index 0000000..ef1c740 --- /dev/null +++ b/Framework/Sources/SRGDiagnostics.h @@ -0,0 +1,10 @@ +// +// Copyright (c) SRG SSR. All rights reserved. +// +// License information is available from the LICENSE file. +// + +#import + +// Official version number. +FOUNDATION_EXPORT NSString *SRGDiagnosticsMarketingVersion(void); diff --git a/Framework/Sources/SRGDiagnostics.m b/Framework/Sources/SRGDiagnostics.m new file mode 100644 index 0000000..b5cbb15 --- /dev/null +++ b/Framework/Sources/SRGDiagnostics.m @@ -0,0 +1,14 @@ +// +// Copyright (c) SRG SSR. All rights reserved. +// +// License information is available from the LICENSE file. +// + +#import "SRGDiagnostics.h" + +#import "NSBundle+SRGDiagnostics.h" + +NSString *SRGDiagnosticsMarketingVersion(void) +{ + return [NSBundle srg_diagnosticsBundle].infoDictionary[@"CFBundleShortVersionString"]; +} diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..57cc62c --- /dev/null +++ b/LICENSE @@ -0,0 +1,3 @@ +(c) SRG SSR, all rights reserved. + +This library can not be copied and/or distributed without express permission. \ No newline at end of file diff --git a/SRGDiagnostics.xcodeproj/project.pbxproj b/SRGDiagnostics.xcodeproj/project.pbxproj new file mode 100644 index 0000000..964e71c --- /dev/null +++ b/SRGDiagnostics.xcodeproj/project.pbxproj @@ -0,0 +1,371 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 50; + objects = { + +/* Begin PBXBuildFile section */ + 6F0EB54020FC7FA9009C02CF /* SRGDiagnostics.h in Headers */ = {isa = PBXBuildFile; fileRef = 6F0EB53E20FC7FA9009C02CF /* SRGDiagnostics.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 6F0EB54320FC7FF4009C02CF /* SRGDiagnostics.m in Sources */ = {isa = PBXBuildFile; fileRef = 6F0EB54220FC7FF4009C02CF /* SRGDiagnostics.m */; }; + 6F0EB54720FC8049009C02CF /* NSBundle+SRGDiagnostics.m in Sources */ = {isa = PBXBuildFile; fileRef = 6F0EB54520FC8049009C02CF /* NSBundle+SRGDiagnostics.m */; }; + 6F0EB54820FC8049009C02CF /* NSBundle+SRGDiagnostics.h in Headers */ = {isa = PBXBuildFile; fileRef = 6F0EB54620FC8049009C02CF /* NSBundle+SRGDiagnostics.h */; }; + 6F0EB54C20FC80E2009C02CF /* SRGDiagnosticsService.h in Headers */ = {isa = PBXBuildFile; fileRef = 6F0EB54A20FC80E2009C02CF /* SRGDiagnosticsService.h */; }; + 6F0EB54D20FC80E2009C02CF /* SRGDiagnosticsService.m in Sources */ = {isa = PBXBuildFile; fileRef = 6F0EB54B20FC80E2009C02CF /* SRGDiagnosticsService.m */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 6F0EB53120FC7F58009C02CF /* SRGDiagnostics.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = SRGDiagnostics.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 6F0EB53E20FC7FA9009C02CF /* SRGDiagnostics.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SRGDiagnostics.h; sourceTree = ""; }; + 6F0EB53F20FC7FA9009C02CF /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 6F0EB54220FC7FF4009C02CF /* SRGDiagnostics.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SRGDiagnostics.m; sourceTree = ""; }; + 6F0EB54520FC8049009C02CF /* NSBundle+SRGDiagnostics.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSBundle+SRGDiagnostics.m"; sourceTree = ""; }; + 6F0EB54620FC8049009C02CF /* NSBundle+SRGDiagnostics.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSBundle+SRGDiagnostics.h"; sourceTree = ""; }; + 6F0EB54A20FC80E2009C02CF /* SRGDiagnosticsService.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SRGDiagnosticsService.h; sourceTree = ""; }; + 6F0EB54B20FC80E2009C02CF /* SRGDiagnosticsService.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SRGDiagnosticsService.m; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 6F0EB52D20FC7F58009C02CF /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 6F0EB52720FC7F58009C02CF = { + isa = PBXGroup; + children = ( + 6F0EB53C20FC7FA9009C02CF /* Framework */, + 6F0EB53220FC7F58009C02CF /* Products */, + ); + sourceTree = ""; + }; + 6F0EB53220FC7F58009C02CF /* Products */ = { + isa = PBXGroup; + children = ( + 6F0EB53120FC7F58009C02CF /* SRGDiagnostics.framework */, + ); + name = Products; + sourceTree = ""; + }; + 6F0EB53C20FC7FA9009C02CF /* Framework */ = { + isa = PBXGroup; + children = ( + 6F0EB53D20FC7FA9009C02CF /* Sources */, + 6F0EB53F20FC7FA9009C02CF /* Info.plist */, + ); + path = Framework; + sourceTree = ""; + }; + 6F0EB53D20FC7FA9009C02CF /* Sources */ = { + isa = PBXGroup; + children = ( + 6F0EB54920FC8097009C02CF /* Player */, + 6F0EB54420FC8049009C02CF /* Helpers */, + 6F0EB53E20FC7FA9009C02CF /* SRGDiagnostics.h */, + 6F0EB54220FC7FF4009C02CF /* SRGDiagnostics.m */, + ); + path = Sources; + sourceTree = ""; + }; + 6F0EB54420FC8049009C02CF /* Helpers */ = { + isa = PBXGroup; + children = ( + 6F0EB54620FC8049009C02CF /* NSBundle+SRGDiagnostics.h */, + 6F0EB54520FC8049009C02CF /* NSBundle+SRGDiagnostics.m */, + ); + path = Helpers; + sourceTree = ""; + }; + 6F0EB54920FC8097009C02CF /* Player */ = { + isa = PBXGroup; + children = ( + 6F0EB54A20FC80E2009C02CF /* SRGDiagnosticsService.h */, + 6F0EB54B20FC80E2009C02CF /* SRGDiagnosticsService.m */, + ); + path = Player; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXHeadersBuildPhase section */ + 6F0EB52E20FC7F58009C02CF /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + 6F0EB54020FC7FA9009C02CF /* SRGDiagnostics.h in Headers */, + 6F0EB54820FC8049009C02CF /* NSBundle+SRGDiagnostics.h in Headers */, + 6F0EB54C20FC80E2009C02CF /* SRGDiagnosticsService.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXHeadersBuildPhase section */ + +/* Begin PBXNativeTarget section */ + 6F0EB53020FC7F58009C02CF /* SRGDiagnostics */ = { + isa = PBXNativeTarget; + buildConfigurationList = 6F0EB53920FC7F58009C02CF /* Build configuration list for PBXNativeTarget "SRGDiagnostics" */; + buildPhases = ( + 6F0EB52C20FC7F58009C02CF /* Sources */, + 6F0EB52D20FC7F58009C02CF /* Frameworks */, + 6F0EB52E20FC7F58009C02CF /* Headers */, + 6F0EB52F20FC7F58009C02CF /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = SRGDiagnostics; + productName = SRGDiagnostics; + productReference = 6F0EB53120FC7F58009C02CF /* SRGDiagnostics.framework */; + productType = "com.apple.product-type.framework"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 6F0EB52820FC7F58009C02CF /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 0940; + ORGANIZATIONNAME = "SRG SSR"; + TargetAttributes = { + 6F0EB53020FC7F58009C02CF = { + CreatedOnToolsVersion = 9.4; + }; + }; + }; + buildConfigurationList = 6F0EB52B20FC7F58009C02CF /* Build configuration list for PBXProject "SRGDiagnostics" */; + compatibilityVersion = "Xcode 9.3"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + ); + mainGroup = 6F0EB52720FC7F58009C02CF; + productRefGroup = 6F0EB53220FC7F58009C02CF /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 6F0EB53020FC7F58009C02CF /* SRGDiagnostics */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 6F0EB52F20FC7F58009C02CF /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 6F0EB52C20FC7F58009C02CF /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 6F0EB54720FC8049009C02CF /* NSBundle+SRGDiagnostics.m in Sources */, + 6F0EB54320FC7FF4009C02CF /* SRGDiagnostics.m in Sources */, + 6F0EB54D20FC80E2009C02CF /* SRGDiagnosticsService.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + 6F0EB53720FC7F58009C02CF /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGN_IDENTITY = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + CURRENT_PROJECT_VERSION = 1; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; + MARKETING_VERSION = 1.0; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Debug; + }; + 6F0EB53820FC7F58009C02CF /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGN_IDENTITY = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + CURRENT_PROJECT_VERSION = 1; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; + MARKETING_VERSION = 1.0; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + VALIDATE_PRODUCT = YES; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Release; + }; + 6F0EB53A20FC7F58009C02CF /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_IDENTITY = ""; + CODE_SIGN_STYLE = Automatic; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = Framework/Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = ch.srgssr.SRGDiagnostics; + PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + 6F0EB53B20FC7F58009C02CF /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_IDENTITY = ""; + CODE_SIGN_STYLE = Automatic; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = Framework/Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = ch.srgssr.SRGDiagnostics; + PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 6F0EB52B20FC7F58009C02CF /* Build configuration list for PBXProject "SRGDiagnostics" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 6F0EB53720FC7F58009C02CF /* Debug */, + 6F0EB53820FC7F58009C02CF /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 6F0EB53920FC7F58009C02CF /* Build configuration list for PBXNativeTarget "SRGDiagnostics" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 6F0EB53A20FC7F58009C02CF /* Debug */, + 6F0EB53B20FC7F58009C02CF /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 6F0EB52820FC7F58009C02CF /* Project object */; +} diff --git a/SRGDiagnostics.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/SRGDiagnostics.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..e11e57f --- /dev/null +++ b/SRGDiagnostics.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/SRGDiagnostics.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/SRGDiagnostics.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/SRGDiagnostics.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/SRGDiagnostics.xcodeproj/xcshareddata/xcschemes/SRGDiagnostics.xcscheme b/SRGDiagnostics.xcodeproj/xcshareddata/xcschemes/SRGDiagnostics.xcscheme new file mode 100644 index 0000000..5a7c95a --- /dev/null +++ b/SRGDiagnostics.xcodeproj/xcshareddata/xcschemes/SRGDiagnostics.xcscheme @@ -0,0 +1,80 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/README-images/logo.png b/docs/README-images/logo.png new file mode 100644 index 0000000..6f7fd6b Binary files /dev/null and b/docs/README-images/logo.png differ diff --git a/docs/README.md b/docs/README.md new file mode 100644 index 0000000..0f83a76 --- /dev/null +++ b/docs/README.md @@ -0,0 +1,74 @@ +

+ +[![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage) + +## About + +## Compatibility + +The library is suitable for applications running on iOS 9 and above. The project is meant to be opened with the latest Xcode version (currently Xcode 9). + +## Installation + +The library can be added to a project using [Carthage](https://github.com/Carthage/Carthage) by adding the following dependency to your `Cartfile`: + +``` +github "SRGSSR/srgdiagnostics-ios" +``` + +Until Carthage 0.30, only dynamic frameworks could be integrated. Starting with Carthage 0.30, though, frameworks can be integrated statically as well, which avoids slow application startups usually associated with the use of too many dynamic frameworks. + +For more information about Carthage and its use, refer to the [official documentation](https://github.com/Carthage/Carthage). + +### Dependencies + +The library requires the following frameworks to be added to any target requiring it: + +* `SRGDiagnostics`: The main library framework. + +### Dynamic framework integration + +1. Run `carthage update` to update the dependencies (which is equivalent to `carthage update --configuration Release`). +2. Add the frameworks listed above and generated in the `Carthage/Build/iOS` folder to your target _Embedded binaries_. + +If your target is building an application, a few more steps are required: + +1. Add a _Run script_ build phase to your target, with `/usr/local/bin/carthage copy-frameworks` as command. +2. Add each of the required frameworks above as input file `$(SRCROOT)/Carthage/Build/iOS/FrameworkName.framework`. + +### Static framework integration + +1. Run `carthage update --configuration Release-static` to update the dependencies. +2. Add the frameworks listed above and generated in the `Carthage/Build/iOS/Static` folder to the _Linked frameworks and libraries_ list of your target. +3. Also add any resource bundle `.bundle` found within the `.framework` folders to your target directly. +4. Add the `-all_load` flag to your target _Other linker flags_. + +## Usage + +When you want to use classes or functions provided by the library in your code, you must import it from your source files first. + +### Usage from Objective-C source files + +Import the global header file using: + +```objective-c +#import +``` + +or directly import the module itself: + +```objective-c +@import SRGDiagnostics; +``` + +### Usage from Swift source files + +Import the module where needed: + +```swift +import SRGDiagnostics +``` + +## License + +See the [LICENSE](../LICENSE) file for more information.