Initial commit

This commit is contained in:
Ivan Zinovyev 2017-07-12 15:51:56 +03:00
parent 7cd40e2ded
commit 06dc034d55
21 changed files with 854 additions and 0 deletions

View File

@ -0,0 +1,466 @@
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 46;
objects = {
/* Begin PBXBuildFile section */
120377511F16466E00B02B50 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 120377501F16466E00B02B50 /* AppDelegate.swift */; };
120377531F16466E00B02B50 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 120377521F16466E00B02B50 /* ViewController.swift */; };
120377561F16466E00B02B50 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 120377541F16466E00B02B50 /* Main.storyboard */; };
120377581F16466E00B02B50 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 120377571F16466E00B02B50 /* Assets.xcassets */; };
1203775B1F16466E00B02B50 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 120377591F16466E00B02B50 /* LaunchScreen.storyboard */; };
120377691F1646FE00B02B50 /* CallDirectoryHandler.swift in Sources */ = {isa = PBXBuildFile; fileRef = 120377681F1646FE00B02B50 /* CallDirectoryHandler.swift */; };
1203776D1F1646FE00B02B50 /* TouchInCallExtension.appex in Embed App Extensions */ = {isa = PBXBuildFile; fileRef = 120377661F1646FE00B02B50 /* TouchInCallExtension.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; };
120377731F16475400B02B50 /* LineReader.swift in Sources */ = {isa = PBXBuildFile; fileRef = 120377721F16475400B02B50 /* LineReader.swift */; };
120377761F16481400B02B50 /* LineReader.swift in Sources */ = {isa = PBXBuildFile; fileRef = 120377721F16475400B02B50 /* LineReader.swift */; };
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
1203776B1F1646FE00B02B50 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 120377451F16466E00B02B50 /* Project object */;
proxyType = 1;
remoteGlobalIDString = 120377651F1646FE00B02B50;
remoteInfo = TouchInCallExtension;
};
/* End PBXContainerItemProxy section */
/* Begin PBXCopyFilesBuildPhase section */
120377711F1646FE00B02B50 /* Embed App Extensions */ = {
isa = PBXCopyFilesBuildPhase;
buildActionMask = 2147483647;
dstPath = "";
dstSubfolderSpec = 13;
files = (
1203776D1F1646FE00B02B50 /* TouchInCallExtension.appex in Embed App Extensions */,
);
name = "Embed App Extensions";
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXCopyFilesBuildPhase section */
/* Begin PBXFileReference section */
1203774D1F16466E00B02B50 /* TouchInApp.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = TouchInApp.app; sourceTree = BUILT_PRODUCTS_DIR; };
120377501F16466E00B02B50 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
120377521F16466E00B02B50 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = "<group>"; };
120377551F16466E00B02B50 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
120377571F16466E00B02B50 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
1203775A1F16466E00B02B50 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
1203775C1F16466E00B02B50 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
120377661F1646FE00B02B50 /* TouchInCallExtension.appex */ = {isa = PBXFileReference; explicitFileType = "wrapper.app-extension"; includeInIndex = 0; path = TouchInCallExtension.appex; sourceTree = BUILT_PRODUCTS_DIR; };
120377681F1646FE00B02B50 /* CallDirectoryHandler.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CallDirectoryHandler.swift; sourceTree = "<group>"; };
1203776A1F1646FE00B02B50 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
120377721F16475400B02B50 /* LineReader.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = LineReader.swift; sourceTree = "<group>"; };
120377741F1647B200B02B50 /* TouchInCallExtension.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = TouchInCallExtension.entitlements; sourceTree = "<group>"; };
120377751F1647F500B02B50 /* TouchInApp.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = TouchInApp.entitlements; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
1203774A1F16466E00B02B50 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
120377631F1646FE00B02B50 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
120377441F16466E00B02B50 = {
isa = PBXGroup;
children = (
1203774F1F16466E00B02B50 /* TouchInApp */,
120377671F1646FE00B02B50 /* TouchInCallExtension */,
1203774E1F16466E00B02B50 /* Products */,
);
sourceTree = "<group>";
};
1203774E1F16466E00B02B50 /* Products */ = {
isa = PBXGroup;
children = (
1203774D1F16466E00B02B50 /* TouchInApp.app */,
120377661F1646FE00B02B50 /* TouchInCallExtension.appex */,
);
name = Products;
sourceTree = "<group>";
};
1203774F1F16466E00B02B50 /* TouchInApp */ = {
isa = PBXGroup;
children = (
120377751F1647F500B02B50 /* TouchInApp.entitlements */,
120377501F16466E00B02B50 /* AppDelegate.swift */,
120377521F16466E00B02B50 /* ViewController.swift */,
120377541F16466E00B02B50 /* Main.storyboard */,
120377571F16466E00B02B50 /* Assets.xcassets */,
120377591F16466E00B02B50 /* LaunchScreen.storyboard */,
1203775C1F16466E00B02B50 /* Info.plist */,
120377721F16475400B02B50 /* LineReader.swift */,
);
path = TouchInApp;
sourceTree = "<group>";
};
120377671F1646FE00B02B50 /* TouchInCallExtension */ = {
isa = PBXGroup;
children = (
120377741F1647B200B02B50 /* TouchInCallExtension.entitlements */,
120377681F1646FE00B02B50 /* CallDirectoryHandler.swift */,
1203776A1F1646FE00B02B50 /* Info.plist */,
);
path = TouchInCallExtension;
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
1203774C1F16466E00B02B50 /* TouchInApp */ = {
isa = PBXNativeTarget;
buildConfigurationList = 1203775F1F16466E00B02B50 /* Build configuration list for PBXNativeTarget "TouchInApp" */;
buildPhases = (
120377491F16466E00B02B50 /* Sources */,
1203774A1F16466E00B02B50 /* Frameworks */,
1203774B1F16466E00B02B50 /* Resources */,
120377711F1646FE00B02B50 /* Embed App Extensions */,
);
buildRules = (
);
dependencies = (
1203776C1F1646FE00B02B50 /* PBXTargetDependency */,
);
name = TouchInApp;
productName = TouchInApp;
productReference = 1203774D1F16466E00B02B50 /* TouchInApp.app */;
productType = "com.apple.product-type.application";
};
120377651F1646FE00B02B50 /* TouchInCallExtension */ = {
isa = PBXNativeTarget;
buildConfigurationList = 1203776E1F1646FE00B02B50 /* Build configuration list for PBXNativeTarget "TouchInCallExtension" */;
buildPhases = (
120377621F1646FE00B02B50 /* Sources */,
120377631F1646FE00B02B50 /* Frameworks */,
120377641F1646FE00B02B50 /* Resources */,
);
buildRules = (
);
dependencies = (
);
name = TouchInCallExtension;
productName = TouchInCallExtension;
productReference = 120377661F1646FE00B02B50 /* TouchInCallExtension.appex */;
productType = "com.apple.product-type.app-extension";
};
/* End PBXNativeTarget section */
/* Begin PBXProject section */
120377451F16466E00B02B50 /* Project object */ = {
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 0830;
LastUpgradeCheck = 0830;
ORGANIZATIONNAME = touchin;
TargetAttributes = {
1203774C1F16466E00B02B50 = {
CreatedOnToolsVersion = 8.3;
DevelopmentTeam = D4HA43V467;
ProvisioningStyle = Automatic;
SystemCapabilities = {
com.apple.ApplicationGroups.iOS = {
enabled = 1;
};
};
};
120377651F1646FE00B02B50 = {
CreatedOnToolsVersion = 8.3;
DevelopmentTeam = D4HA43V467;
ProvisioningStyle = Automatic;
SystemCapabilities = {
com.apple.ApplicationGroups.iOS = {
enabled = 1;
};
};
};
};
};
buildConfigurationList = 120377481F16466E00B02B50 /* Build configuration list for PBXProject "TouchInApp" */;
compatibilityVersion = "Xcode 3.2";
developmentRegion = English;
hasScannedForEncodings = 0;
knownRegions = (
en,
Base,
);
mainGroup = 120377441F16466E00B02B50;
productRefGroup = 1203774E1F16466E00B02B50 /* Products */;
projectDirPath = "";
projectRoot = "";
targets = (
1203774C1F16466E00B02B50 /* TouchInApp */,
120377651F1646FE00B02B50 /* TouchInCallExtension */,
);
};
/* End PBXProject section */
/* Begin PBXResourcesBuildPhase section */
1203774B1F16466E00B02B50 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
1203775B1F16466E00B02B50 /* LaunchScreen.storyboard in Resources */,
120377581F16466E00B02B50 /* Assets.xcassets in Resources */,
120377561F16466E00B02B50 /* Main.storyboard in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
120377641F1646FE00B02B50 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
120377491F16466E00B02B50 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
120377531F16466E00B02B50 /* ViewController.swift in Sources */,
120377731F16475400B02B50 /* LineReader.swift in Sources */,
120377511F16466E00B02B50 /* AppDelegate.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
120377621F1646FE00B02B50 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
120377761F16481400B02B50 /* LineReader.swift in Sources */,
120377691F1646FE00B02B50 /* CallDirectoryHandler.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin PBXTargetDependency section */
1203776C1F1646FE00B02B50 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = 120377651F1646FE00B02B50 /* TouchInCallExtension */;
targetProxy = 1203776B1F1646FE00B02B50 /* PBXContainerItemProxy */;
};
/* End PBXTargetDependency section */
/* Begin PBXVariantGroup section */
120377541F16466E00B02B50 /* Main.storyboard */ = {
isa = PBXVariantGroup;
children = (
120377551F16466E00B02B50 /* Base */,
);
name = Main.storyboard;
sourceTree = "<group>";
};
120377591F16466E00B02B50 /* LaunchScreen.storyboard */ = {
isa = PBXVariantGroup;
children = (
1203775A1F16466E00B02B50 /* Base */,
);
name = LaunchScreen.storyboard;
sourceTree = "<group>";
};
/* End PBXVariantGroup section */
/* Begin XCBuildConfiguration section */
1203775D1F16466E00B02B50 /* 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;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
};
name = Debug;
};
1203775E1F16466E00B02B50 /* 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;
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
VALIDATE_PRODUCT = YES;
};
name = Release;
};
120377601F16466E00B02B50 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_ENTITLEMENTS = TouchInApp/TouchInApp.entitlements;
DEVELOPMENT_TEAM = D4HA43V467;
INFOPLIST_FILE = TouchInApp/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = ru.touchin.TouchInApp;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 3.0;
};
name = Debug;
};
120377611F16466E00B02B50 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_ENTITLEMENTS = TouchInApp/TouchInApp.entitlements;
DEVELOPMENT_TEAM = D4HA43V467;
INFOPLIST_FILE = TouchInApp/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = ru.touchin.TouchInApp;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 3.0;
};
name = Release;
};
1203776F1F1646FE00B02B50 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ARCHS = "$(ARCHS_STANDARD_64_BIT)";
CODE_SIGN_ENTITLEMENTS = TouchInCallExtension/TouchInCallExtension.entitlements;
DEVELOPMENT_TEAM = D4HA43V467;
INFOPLIST_FILE = TouchInCallExtension/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = ru.touchin.TouchInApp.TouchInCallExtension;
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
SWIFT_VERSION = 3.0;
};
name = Debug;
};
120377701F1646FE00B02B50 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ARCHS = "$(ARCHS_STANDARD_64_BIT)";
CODE_SIGN_ENTITLEMENTS = TouchInCallExtension/TouchInCallExtension.entitlements;
DEVELOPMENT_TEAM = D4HA43V467;
INFOPLIST_FILE = TouchInCallExtension/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = ru.touchin.TouchInApp.TouchInCallExtension;
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
SWIFT_VERSION = 3.0;
};
name = Release;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
120377481F16466E00B02B50 /* Build configuration list for PBXProject "TouchInApp" */ = {
isa = XCConfigurationList;
buildConfigurations = (
1203775D1F16466E00B02B50 /* Debug */,
1203775E1F16466E00B02B50 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
1203775F1F16466E00B02B50 /* Build configuration list for PBXNativeTarget "TouchInApp" */ = {
isa = XCConfigurationList;
buildConfigurations = (
120377601F16466E00B02B50 /* Debug */,
120377611F16466E00B02B50 /* Release */,
);
defaultConfigurationIsVisible = 0;
};
1203776E1F1646FE00B02B50 /* Build configuration list for PBXNativeTarget "TouchInCallExtension" */ = {
isa = XCConfigurationList;
buildConfigurations = (
1203776F1F1646FE00B02B50 /* Debug */,
120377701F1646FE00B02B50 /* Release */,
);
defaultConfigurationIsVisible = 0;
};
/* End XCConfigurationList section */
};
rootObject = 120377451F16466E00B02B50 /* Project object */;
}

View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "self:TouchInApp.xcodeproj">
</FileRef>
</Workspace>

View File

@ -0,0 +1,13 @@
import UIKit
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
return true
}
}

View File

@ -0,0 +1,56 @@
{
"images" : [
{
"size" : "20x20",
"idiom" : "iphone",
"filename" : "Icon-App-20x20@2x.png",
"scale" : "2x"
},
{
"size" : "20x20",
"idiom" : "iphone",
"filename" : "Icon-App-20x20@3x.png",
"scale" : "3x"
},
{
"size" : "29x29",
"idiom" : "iphone",
"filename" : "Icon-App-29x29@2x.png",
"scale" : "2x"
},
{
"size" : "29x29",
"idiom" : "iphone",
"filename" : "Icon-App-29x29@3x.png",
"scale" : "3x"
},
{
"size" : "40x40",
"idiom" : "iphone",
"filename" : "Icon-App-40x40@2x.png",
"scale" : "2x"
},
{
"size" : "40x40",
"idiom" : "iphone",
"filename" : "Icon-App-40x40@3x.png",
"scale" : "3x"
},
{
"size" : "60x60",
"idiom" : "iphone",
"filename" : "Icon-App-60x60@2x.png",
"scale" : "2x"
},
{
"size" : "60x60",
"idiom" : "iphone",
"filename" : "Icon-App-60x60@3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB

View File

@ -0,0 +1,27 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="11134" systemVersion="15F34" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="11106"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
<!--View Controller-->
<scene sceneID="EHf-IW-A2E">
<objects>
<viewController id="01J-lp-oVM" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="Llm-lL-Icb"/>
<viewControllerLayoutGuide type="bottom" id="xb3-aO-Qok"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="53" y="375"/>
</scene>
</scenes>
</document>

View File

@ -0,0 +1,43 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="12118" systemVersion="16D32" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="BYZ-38-t0r">
<device id="retina4_7" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="12086"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
<!--View Controller-->
<scene sceneID="tne-QT-ifu">
<objects>
<viewController id="BYZ-38-t0r" customClass="ViewController" customModule="TouchInApp" customModuleProvider="target" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="y3c-jy-aDJ"/>
<viewControllerLayoutGuide type="bottom" id="wfy-db-euE"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="xGE-AJ-0R4">
<rect key="frame" x="140" y="120" width="94" height="30"/>
<state key="normal" title="Add Contacts"/>
<connections>
<action selector="addContacts:" destination="BYZ-38-t0r" eventType="touchUpInside" id="Ifq-Ud-FHd"/>
</connections>
</button>
</subviews>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstItem="xGE-AJ-0R4" firstAttribute="centerX" secondItem="8bC-Xf-vdC" secondAttribute="centerX" id="Ufm-pS-04U"/>
<constraint firstItem="xGE-AJ-0R4" firstAttribute="top" secondItem="y3c-jy-aDJ" secondAttribute="bottom" constant="100" id="rfd-Z8-y8a"/>
</constraints>
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
</objects>
</scene>
</scenes>
</document>

View File

@ -0,0 +1,40 @@
<?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>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleDisplayName</key>
<string>Touch In App</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIMainStoryboardFile</key>
<string>Main</string>
<key>UIRequiredDeviceCapabilities</key>
<array>
<string>armv7</string>
</array>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
</dict>
</plist>

View File

@ -0,0 +1,35 @@
import Foundation
class LineReader {
let path: String
fileprivate let file: UnsafeMutablePointer<FILE>!
init?(path: String) {
self.path = path
file = fopen(path, "r")
guard file != nil else { return nil }
}
var nextLine: String? {
var line:UnsafeMutablePointer<CChar>? = nil
var linecap:Int = 0
defer { free(line) }
return getline(&line, &linecap, file) > 0 ? String(cString: line!) : nil
}
deinit {
fclose(file)
}
}
extension LineReader: Sequence {
func makeIterator() -> AnyIterator<String> {
return AnyIterator<String> {
return self.nextLine
}
}
}

View File

@ -0,0 +1,10 @@
<?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>com.apple.security.application-groups</key>
<array>
<string>group.ru.touchin.TouchInApp</string>
</array>
</dict>
</plist>

View File

@ -0,0 +1,37 @@
import UIKit
import CallKit
class ViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
}
@IBAction func addContacts(_ sender: Any) {
let numbers = ["79214203692",
"79640982354",
"79982434663"]
let titles = ["Иванов Петр Петрович",
"Сергеев Иван Николаевич",
"Николаев Андрей Михайлович"]
writeFileForCallDirectory(numbers: numbers, titles: titles)
}
fileprivate func writeFileForCallDirectory(numbers: [String], titles: [String]) {
guard let fileUrl = FileManager.default
.containerURL(forSecurityApplicationGroupIdentifier: "group.ru.touchin.TouchInApp")?
.appendingPathComponent("contacts") else { return }
var string = ""
for (number, title) in zip(numbers, titles) {
string += "\(number),\(title)\n"
}
try? string.write(to: fileUrl, atomically: true, encoding: .utf8)
CXCallDirectoryManager.sharedInstance.reloadExtension(withIdentifier: "ru.touchin.TouchInApp.TouchInCallExtension")
}
}

View File

@ -0,0 +1,79 @@
import Foundation
import CallKit
class CallDirectoryHandler: CXCallDirectoryProvider {
override func beginRequest(with context: CXCallDirectoryExtensionContext) {
context.delegate = self
do {
try addBlockingPhoneNumbers(to: context)
} catch {
NSLog("Unable to add blocking phone numbers")
let error = NSError(domain: "CallDirectoryHandler", code: 1, userInfo: nil)
context.cancelRequest(withError: error)
return
}
do {
try addIdentificationPhoneNumbers(to: context)
} catch {
NSLog("Unable to add identification phone numbers")
let error = NSError(domain: "CallDirectoryHandler", code: 2, userInfo: nil)
context.cancelRequest(withError: error)
return
}
context.completeRequest()
}
private func addBlockingPhoneNumbers(to context: CXCallDirectoryExtensionContext) throws {
// Retrieve phone numbers to block from data store. For optimal performance and memory usage when there are many phone numbers,
// consider only loading a subset of numbers at a given time and using autorelease pool(s) to release objects allocated during each batch of numbers which are loaded.
//
// Numbers must be provided in numerically ascending order.
let phoneNumbers: [CXCallDirectoryPhoneNumber] = [ 14085555555, 18005555555 ]
for phoneNumber in phoneNumbers {
context.addBlockingEntry(withNextSequentialPhoneNumber: phoneNumber)
}
}
private func addIdentificationPhoneNumbers(to context: CXCallDirectoryExtensionContext) throws {
guard let fileUrl = FileManager.default
.containerURL(forSecurityApplicationGroupIdentifier: "group.ru.touchin.TouchInApp")?
.appendingPathComponent("contacts") else { return }
guard let reader = LineReader(path: fileUrl.path) else { return }
for line in reader {
autoreleasepool {
// считываем строку и удаляем перевод строки в конце
let line = line.trimmingCharacters(in: .whitespacesAndNewlines)
// отделяем номер от имени
var components = line.components(separatedBy: ",")
// приводим номер к Int64
guard let phone = Int64(components[0]) else { return }
let name = components[1]
context.addIdentificationEntry(withNextSequentialPhoneNumber: phone, label: name)
}
}
}
}
extension CallDirectoryHandler: CXCallDirectoryExtensionContextDelegate {
func requestFailed(for extensionContext: CXCallDirectoryExtensionContext, withError error: Error) {
// An error occurred while adding blocking or identification entries, check the NSError for details.
// For Call Directory error codes, see the CXErrorCodeCallDirectoryManagerError enum in <CallKit/CXError.h>.
//
// This may be used to store the error details in a location accessible by the extension's containing app, so that the
// app may be notified about errors which occured while loading data even if the request to load data was initiated by
// the user in Settings instead of via the app itself.
}
}

View File

@ -0,0 +1,31 @@
<?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>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleDisplayName</key>
<string>TouchInCallExtension</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>XPC!</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>NSExtension</key>
<dict>
<key>NSExtensionPointIdentifier</key>
<string>com.apple.callkit.call-directory</string>
<key>NSExtensionPrincipalClass</key>
<string>$(PRODUCT_MODULE_NAME).CallDirectoryHandler</string>
</dict>
</dict>
</plist>

View File

@ -0,0 +1,10 @@
<?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>com.apple.security.application-groups</key>
<array>
<string>group.ru.touchin.TouchInApp</string>
</array>
</dict>
</plist>