diff --git a/ios/RCTAppMetrica/RCTAppMetrica.xcodeproj/project.pbxproj b/ios/RCTAppMetrica/RCTAppMetrica.xcodeproj/project.pbxproj new file mode 100644 index 0000000..e01da64 --- /dev/null +++ b/ios/RCTAppMetrica/RCTAppMetrica.xcodeproj/project.pbxproj @@ -0,0 +1,264 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 59FB35C71F6FA64700A6608F /* RCTAppMetrica.m in Sources */ = {isa = PBXBuildFile; fileRef = 59FB35C61F6FA64700A6608F /* RCTAppMetrica.m */; }; + 59FB35C81F6FA64700A6608F /* RCTAppMetrica.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 59FB35C51F6FA64700A6608F /* RCTAppMetrica.h */; }; +/* End PBXBuildFile section */ + +/* Begin PBXCopyFilesBuildPhase section */ + 59FB35C01F6FA64700A6608F /* CopyFiles */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = "include/$(PRODUCT_NAME)"; + dstSubfolderSpec = 16; + files = ( + 59FB35C81F6FA64700A6608F /* RCTAppMetrica.h in CopyFiles */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + 59FB35C21F6FA64700A6608F /* libRCTAppMetrica.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libRCTAppMetrica.a; sourceTree = BUILT_PRODUCTS_DIR; }; + 59FB35C51F6FA64700A6608F /* RCTAppMetrica.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RCTAppMetrica.h; sourceTree = ""; }; + 59FB35C61F6FA64700A6608F /* RCTAppMetrica.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RCTAppMetrica.m; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 59FB35BF1F6FA64700A6608F /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 59FB35B91F6FA64700A6608F = { + isa = PBXGroup; + children = ( + 59FB35C41F6FA64700A6608F /* RCTAppMetrica */, + 59FB35C31F6FA64700A6608F /* Products */, + ); + sourceTree = ""; + }; + 59FB35C31F6FA64700A6608F /* Products */ = { + isa = PBXGroup; + children = ( + 59FB35C21F6FA64700A6608F /* libRCTAppMetrica.a */, + ); + name = Products; + sourceTree = ""; + }; + 59FB35C41F6FA64700A6608F /* RCTAppMetrica */ = { + isa = PBXGroup; + children = ( + 59FB35C51F6FA64700A6608F /* RCTAppMetrica.h */, + 59FB35C61F6FA64700A6608F /* RCTAppMetrica.m */, + ); + path = RCTAppMetrica; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 59FB35C11F6FA64700A6608F /* RCTAppMetrica */ = { + isa = PBXNativeTarget; + buildConfigurationList = 59FB35CB1F6FA64700A6608F /* Build configuration list for PBXNativeTarget "RCTAppMetrica" */; + buildPhases = ( + 59FB35BE1F6FA64700A6608F /* Sources */, + 59FB35BF1F6FA64700A6608F /* Frameworks */, + 59FB35C01F6FA64700A6608F /* CopyFiles */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = RCTAppMetrica; + productName = RCTAppMetrica; + productReference = 59FB35C21F6FA64700A6608F /* libRCTAppMetrica.a */; + productType = "com.apple.product-type.library.static"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 59FB35BA1F6FA64700A6608F /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 0830; + ORGANIZATIONNAME = "Aleksei Androsov"; + TargetAttributes = { + 59FB35C11F6FA64700A6608F = { + CreatedOnToolsVersion = 8.3.3; + ProvisioningStyle = Automatic; + }; + }; + }; + buildConfigurationList = 59FB35BD1F6FA64700A6608F /* Build configuration list for PBXProject "RCTAppMetrica" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + en, + ); + mainGroup = 59FB35B91F6FA64700A6608F; + productRefGroup = 59FB35C31F6FA64700A6608F /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 59FB35C11F6FA64700A6608F /* RCTAppMetrica */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXSourcesBuildPhase section */ + 59FB35BE1F6FA64700A6608F /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 59FB35C71F6FA64700A6608F /* RCTAppMetrica.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + 59FB35C91F6FA64700A6608F /* 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++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = 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_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + 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 = 10.3; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + }; + name = Debug; + }; + 59FB35CA1F6FA64700A6608F /* 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++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = 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_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + 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 = 10.3; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 59FB35CC1F6FA64700A6608F /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + OTHER_LDFLAGS = "-ObjC"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SKIP_INSTALL = YES; + }; + name = Debug; + }; + 59FB35CD1F6FA64700A6608F /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + OTHER_LDFLAGS = "-ObjC"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SKIP_INSTALL = YES; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 59FB35BD1F6FA64700A6608F /* Build configuration list for PBXProject "RCTAppMetrica" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 59FB35C91F6FA64700A6608F /* Debug */, + 59FB35CA1F6FA64700A6608F /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 59FB35CB1F6FA64700A6608F /* Build configuration list for PBXNativeTarget "RCTAppMetrica" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 59FB35CC1F6FA64700A6608F /* Debug */, + 59FB35CD1F6FA64700A6608F /* Release */, + ); + defaultConfigurationIsVisible = 0; + }; +/* End XCConfigurationList section */ + }; + rootObject = 59FB35BA1F6FA64700A6608F /* Project object */; +} diff --git a/ios/RCTAppMetrica/RCTAppMetrica.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/ios/RCTAppMetrica/RCTAppMetrica.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..3a9c01c --- /dev/null +++ b/ios/RCTAppMetrica/RCTAppMetrica.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/ios/RCTAppMetrica/RCTAppMetrica.xcodeproj/project.xcworkspace/xcuserdata/aandrosov.xcuserdatad/UserInterfaceState.xcuserstate b/ios/RCTAppMetrica/RCTAppMetrica.xcodeproj/project.xcworkspace/xcuserdata/aandrosov.xcuserdatad/UserInterfaceState.xcuserstate new file mode 100644 index 0000000..d0b2f77 Binary files /dev/null and b/ios/RCTAppMetrica/RCTAppMetrica.xcodeproj/project.xcworkspace/xcuserdata/aandrosov.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/ios/RCTAppMetrica/RCTAppMetrica.xcodeproj/xcuserdata/aandrosov.xcuserdatad/xcschemes/RCTAppMetrica.xcscheme b/ios/RCTAppMetrica/RCTAppMetrica.xcodeproj/xcuserdata/aandrosov.xcuserdatad/xcschemes/RCTAppMetrica.xcscheme new file mode 100644 index 0000000..711b76f --- /dev/null +++ b/ios/RCTAppMetrica/RCTAppMetrica.xcodeproj/xcuserdata/aandrosov.xcuserdatad/xcschemes/RCTAppMetrica.xcscheme @@ -0,0 +1,80 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ios/RCTAppMetrica/RCTAppMetrica.xcodeproj/xcuserdata/aandrosov.xcuserdatad/xcschemes/xcschememanagement.plist b/ios/RCTAppMetrica/RCTAppMetrica.xcodeproj/xcuserdata/aandrosov.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..20946f3 --- /dev/null +++ b/ios/RCTAppMetrica/RCTAppMetrica.xcodeproj/xcuserdata/aandrosov.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,22 @@ + + + + + SchemeUserState + + RCTAppMetrica.xcscheme + + orderHint + 0 + + + SuppressBuildableAutocreation + + 59FB35C11F6FA64700A6608F + + primary + + + + + diff --git a/ios/RCTAppMetrica/RCTAppMetrica/RCTAppMetrica.h b/ios/RCTAppMetrica/RCTAppMetrica/RCTAppMetrica.h new file mode 100644 index 0000000..9b6b2ec --- /dev/null +++ b/ios/RCTAppMetrica/RCTAppMetrica/RCTAppMetrica.h @@ -0,0 +1,4 @@ +#import + +@interface RCTAppMetrica : NSObject +@end diff --git a/ios/RCTAppMetrica/RCTAppMetrica/RCTAppMetrica.m b/ios/RCTAppMetrica/RCTAppMetrica/RCTAppMetrica.m new file mode 100644 index 0000000..3746181 --- /dev/null +++ b/ios/RCTAppMetrica/RCTAppMetrica/RCTAppMetrica.m @@ -0,0 +1,25 @@ +#import "RCTAppMetrica.h" +#import + +@implementation RCTAppMetrica { + +} + +RCT_EXPORT_MODULE(); + +RCT_EXPORT_METHOD(activateWithApiKey:(NSString *)apiKey) +{ + [YMMYandexMetrica activateWithApiKey:apiKey]; +} + +RCT_EXPORT_METHOD(reportEvent:(NSString *)message) +{ + [YMMYandexMetrica reportEvent:message onFailure:NULL]; +} + +RCT_EXPORT_METHOD(reportEvent:(NSString *)message parameters:(nullable NSDictionary *)params) +{ + [YMMYandexMetrica reportEvent:message parameters:params onFailure:NULL]; +} + +@end