Skip to content

Commit f978c16

Browse files
committed
Manager class to handle current app url
Client class to call action on others app
1 parent d386556 commit f978c16

File tree

13 files changed

+1023
-0
lines changed

13 files changed

+1023
-0
lines changed

CallbackURLKit.podspec

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
Pod::Spec.new do |s|
2+
3+
# ――― Spec Metadata ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
4+
s.name = "CallbackURLKit"
5+
s.version = "0.0.1"
6+
s.summary = "Implemenation of x-callback-url in swift"
7+
s.homepage = "https://github.com/phimage/CallbackURLKit"
8+
9+
# ――― Spec License ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
10+
s.license = "MIT"
11+
12+
# ――― Author Metadata ――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
13+
s.author = { "phimage" => "[email protected]" }
14+
15+
# ――― Platform Specifics ――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
16+
s.ios.deployment_target = '8.0'
17+
s.osx.deployment_target = '10.9'
18+
s.tvos.deployment_target = '9.0'
19+
20+
# ――― Source Location ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
21+
s.source = { :git => "https://github.com/phimage/CallbackURLKit.git", :tag => s.version }
22+
23+
# ――― Source Code ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
24+
25+
s.default_subspecs = 'Core'
26+
27+
s.subspec "Core" do |sp|
28+
sp.source_files = "CallbackURLKit/*.swift"
29+
end
30+
31+
end

CallbackURLKit.xcodeproj/project.pbxproj

Lines changed: 150 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,42 @@
77
objects = {
88

99
/* Begin PBXBuildFile section */
10+
C418B1D41C3860190097FDD9 /* CallbackURLKit.swift in Sources */ = {isa = PBXBuildFile; fileRef = C418B1D31C3860190097FDD9 /* CallbackURLKit.swift */; };
11+
C418B1DD1C386C160097FDD9 /* CallbackURLKitOSX.h in Headers */ = {isa = PBXBuildFile; fileRef = C418B1DC1C386C160097FDD9 /* CallbackURLKitOSX.h */; settings = {ATTRIBUTES = (Public, ); }; };
12+
C418B1E21C386C1E0097FDD9 /* CallbackURLKit.swift in Sources */ = {isa = PBXBuildFile; fileRef = C418B1D31C3860190097FDD9 /* CallbackURLKit.swift */; };
13+
C418B1E31C386C1E0097FDD9 /* Manager.swift in Sources */ = {isa = PBXBuildFile; fileRef = C4A8D51D1C37E11F00DB3306 /* Manager.swift */; };
14+
C418B1E41C386C1E0097FDD9 /* Client.swift in Sources */ = {isa = PBXBuildFile; fileRef = C4A8D51B1C37DF0900DB3306 /* Client.swift */; };
15+
C418B1E51C386C1E0097FDD9 /* Request.swift in Sources */ = {isa = PBXBuildFile; fileRef = C4A8D51F1C380F5100DB3306 /* Request.swift */; };
16+
C418B1E61C386C1E0097FDD9 /* Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = C4A8D5211C380F6B00DB3306 /* Extensions.swift */; };
1017
C4A8D5141C37D84A00DB3306 /* CallbackURLKit.h in Headers */ = {isa = PBXBuildFile; fileRef = C4A8D5131C37D84A00DB3306 /* CallbackURLKit.h */; settings = {ATTRIBUTES = (Public, ); }; };
18+
C4A8D51C1C37DF0900DB3306 /* Client.swift in Sources */ = {isa = PBXBuildFile; fileRef = C4A8D51B1C37DF0900DB3306 /* Client.swift */; };
19+
C4A8D51E1C37E11F00DB3306 /* Manager.swift in Sources */ = {isa = PBXBuildFile; fileRef = C4A8D51D1C37E11F00DB3306 /* Manager.swift */; };
20+
C4A8D5201C380F5100DB3306 /* Request.swift in Sources */ = {isa = PBXBuildFile; fileRef = C4A8D51F1C380F5100DB3306 /* Request.swift */; };
21+
C4A8D5221C380F6B00DB3306 /* Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = C4A8D5211C380F6B00DB3306 /* Extensions.swift */; };
1122
/* End PBXBuildFile section */
1223

1324
/* Begin PBXFileReference section */
25+
C418B1D31C3860190097FDD9 /* CallbackURLKit.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CallbackURLKit.swift; sourceTree = "<group>"; };
26+
C418B1DA1C386C160097FDD9 /* CallbackURLKit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = CallbackURLKit.framework; sourceTree = BUILT_PRODUCTS_DIR; };
27+
C418B1DC1C386C160097FDD9 /* CallbackURLKitOSX.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CallbackURLKitOSX.h; sourceTree = "<group>"; };
28+
C418B1DE1C386C160097FDD9 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
1429
C4A8D5101C37D84A00DB3306 /* CallbackURLKit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = CallbackURLKit.framework; sourceTree = BUILT_PRODUCTS_DIR; };
1530
C4A8D5131C37D84A00DB3306 /* CallbackURLKit.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CallbackURLKit.h; sourceTree = "<group>"; };
1631
C4A8D5151C37D84A00DB3306 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
32+
C4A8D51B1C37DF0900DB3306 /* Client.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Client.swift; sourceTree = "<group>"; };
33+
C4A8D51D1C37E11F00DB3306 /* Manager.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Manager.swift; sourceTree = "<group>"; };
34+
C4A8D51F1C380F5100DB3306 /* Request.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Request.swift; sourceTree = "<group>"; };
35+
C4A8D5211C380F6B00DB3306 /* Extensions.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Extensions.swift; sourceTree = "<group>"; };
1736
/* End PBXFileReference section */
1837

1938
/* Begin PBXFrameworksBuildPhase section */
39+
C418B1D61C386C160097FDD9 /* Frameworks */ = {
40+
isa = PBXFrameworksBuildPhase;
41+
buildActionMask = 2147483647;
42+
files = (
43+
);
44+
runOnlyForDeploymentPostprocessing = 0;
45+
};
2046
C4A8D50C1C37D84A00DB3306 /* Frameworks */ = {
2147
isa = PBXFrameworksBuildPhase;
2248
buildActionMask = 2147483647;
@@ -27,10 +53,20 @@
2753
/* End PBXFrameworksBuildPhase section */
2854

2955
/* Begin PBXGroup section */
56+
C418B1DB1C386C160097FDD9 /* CallbackURLKitOSX */ = {
57+
isa = PBXGroup;
58+
children = (
59+
C418B1DC1C386C160097FDD9 /* CallbackURLKitOSX.h */,
60+
C418B1DE1C386C160097FDD9 /* Info.plist */,
61+
);
62+
path = CallbackURLKitOSX;
63+
sourceTree = "<group>";
64+
};
3065
C4A8D5061C37D84A00DB3306 = {
3166
isa = PBXGroup;
3267
children = (
3368
C4A8D5121C37D84A00DB3306 /* CallbackURLKit */,
69+
C418B1DB1C386C160097FDD9 /* CallbackURLKitOSX */,
3470
C4A8D5111C37D84A00DB3306 /* Products */,
3571
);
3672
sourceTree = "<group>";
@@ -39,13 +75,19 @@
3975
isa = PBXGroup;
4076
children = (
4177
C4A8D5101C37D84A00DB3306 /* CallbackURLKit.framework */,
78+
C418B1DA1C386C160097FDD9 /* CallbackURLKit.framework */,
4279
);
4380
name = Products;
4481
sourceTree = "<group>";
4582
};
4683
C4A8D5121C37D84A00DB3306 /* CallbackURLKit */ = {
4784
isa = PBXGroup;
4885
children = (
86+
C418B1D31C3860190097FDD9 /* CallbackURLKit.swift */,
87+
C4A8D51D1C37E11F00DB3306 /* Manager.swift */,
88+
C4A8D51B1C37DF0900DB3306 /* Client.swift */,
89+
C4A8D51F1C380F5100DB3306 /* Request.swift */,
90+
C4A8D5211C380F6B00DB3306 /* Extensions.swift */,
4991
C4A8D5131C37D84A00DB3306 /* CallbackURLKit.h */,
5092
C4A8D5151C37D84A00DB3306 /* Info.plist */,
5193
);
@@ -55,6 +97,14 @@
5597
/* End PBXGroup section */
5698

5799
/* Begin PBXHeadersBuildPhase section */
100+
C418B1D71C386C160097FDD9 /* Headers */ = {
101+
isa = PBXHeadersBuildPhase;
102+
buildActionMask = 2147483647;
103+
files = (
104+
C418B1DD1C386C160097FDD9 /* CallbackURLKitOSX.h in Headers */,
105+
);
106+
runOnlyForDeploymentPostprocessing = 0;
107+
};
58108
C4A8D50D1C37D84A00DB3306 /* Headers */ = {
59109
isa = PBXHeadersBuildPhase;
60110
buildActionMask = 2147483647;
@@ -66,6 +116,24 @@
66116
/* End PBXHeadersBuildPhase section */
67117

68118
/* Begin PBXNativeTarget section */
119+
C418B1D91C386C160097FDD9 /* CallbackURLKitOSX */ = {
120+
isa = PBXNativeTarget;
121+
buildConfigurationList = C418B1DF1C386C160097FDD9 /* Build configuration list for PBXNativeTarget "CallbackURLKitOSX" */;
122+
buildPhases = (
123+
C418B1D51C386C160097FDD9 /* Sources */,
124+
C418B1D61C386C160097FDD9 /* Frameworks */,
125+
C418B1D71C386C160097FDD9 /* Headers */,
126+
C418B1D81C386C160097FDD9 /* Resources */,
127+
);
128+
buildRules = (
129+
);
130+
dependencies = (
131+
);
132+
name = CallbackURLKitOSX;
133+
productName = CallbackURLKitOSX;
134+
productReference = C418B1DA1C386C160097FDD9 /* CallbackURLKit.framework */;
135+
productType = "com.apple.product-type.framework";
136+
};
69137
C4A8D50F1C37D84A00DB3306 /* CallbackURLKit */ = {
70138
isa = PBXNativeTarget;
71139
buildConfigurationList = C4A8D5181C37D84A00DB3306 /* Build configuration list for PBXNativeTarget "CallbackURLKit" */;
@@ -93,6 +161,9 @@
93161
LastUpgradeCheck = 0720;
94162
ORGANIZATIONNAME = phimage;
95163
TargetAttributes = {
164+
C418B1D91C386C160097FDD9 = {
165+
CreatedOnToolsVersion = 7.2;
166+
};
96167
C4A8D50F1C37D84A00DB3306 = {
97168
CreatedOnToolsVersion = 7.2;
98169
};
@@ -111,11 +182,19 @@
111182
projectRoot = "";
112183
targets = (
113184
C4A8D50F1C37D84A00DB3306 /* CallbackURLKit */,
185+
C418B1D91C386C160097FDD9 /* CallbackURLKitOSX */,
114186
);
115187
};
116188
/* End PBXProject section */
117189

118190
/* Begin PBXResourcesBuildPhase section */
191+
C418B1D81C386C160097FDD9 /* Resources */ = {
192+
isa = PBXResourcesBuildPhase;
193+
buildActionMask = 2147483647;
194+
files = (
195+
);
196+
runOnlyForDeploymentPostprocessing = 0;
197+
};
119198
C4A8D50E1C37D84A00DB3306 /* Resources */ = {
120199
isa = PBXResourcesBuildPhase;
121200
buildActionMask = 2147483647;
@@ -126,16 +205,75 @@
126205
/* End PBXResourcesBuildPhase section */
127206

128207
/* Begin PBXSourcesBuildPhase section */
208+
C418B1D51C386C160097FDD9 /* Sources */ = {
209+
isa = PBXSourcesBuildPhase;
210+
buildActionMask = 2147483647;
211+
files = (
212+
C418B1E61C386C1E0097FDD9 /* Extensions.swift in Sources */,
213+
C418B1E21C386C1E0097FDD9 /* CallbackURLKit.swift in Sources */,
214+
C418B1E51C386C1E0097FDD9 /* Request.swift in Sources */,
215+
C418B1E31C386C1E0097FDD9 /* Manager.swift in Sources */,
216+
C418B1E41C386C1E0097FDD9 /* Client.swift in Sources */,
217+
);
218+
runOnlyForDeploymentPostprocessing = 0;
219+
};
129220
C4A8D50B1C37D84A00DB3306 /* Sources */ = {
130221
isa = PBXSourcesBuildPhase;
131222
buildActionMask = 2147483647;
132223
files = (
224+
C4A8D51C1C37DF0900DB3306 /* Client.swift in Sources */,
225+
C4A8D5221C380F6B00DB3306 /* Extensions.swift in Sources */,
226+
C4A8D5201C380F5100DB3306 /* Request.swift in Sources */,
227+
C4A8D51E1C37E11F00DB3306 /* Manager.swift in Sources */,
228+
C418B1D41C3860190097FDD9 /* CallbackURLKit.swift in Sources */,
133229
);
134230
runOnlyForDeploymentPostprocessing = 0;
135231
};
136232
/* End PBXSourcesBuildPhase section */
137233

138234
/* Begin XCBuildConfiguration section */
235+
C418B1E01C386C160097FDD9 /* Debug */ = {
236+
isa = XCBuildConfiguration;
237+
buildSettings = {
238+
CODE_SIGN_IDENTITY = "-";
239+
COMBINE_HIDPI_IMAGES = YES;
240+
DEFINES_MODULE = YES;
241+
DYLIB_COMPATIBILITY_VERSION = 1;
242+
DYLIB_CURRENT_VERSION = 1;
243+
DYLIB_INSTALL_NAME_BASE = "@rpath";
244+
FRAMEWORK_VERSION = A;
245+
INFOPLIST_FILE = CallbackURLKitOSX/Info.plist;
246+
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
247+
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks";
248+
MACOSX_DEPLOYMENT_TARGET = 10.10;
249+
PRODUCT_BUNDLE_IDENTIFIER = fr.phimage.CallbackURLKitOSX;
250+
PRODUCT_NAME = CallbackURLKit;
251+
SDKROOT = macosx;
252+
SKIP_INSTALL = YES;
253+
};
254+
name = Debug;
255+
};
256+
C418B1E11C386C160097FDD9 /* Release */ = {
257+
isa = XCBuildConfiguration;
258+
buildSettings = {
259+
CODE_SIGN_IDENTITY = "-";
260+
COMBINE_HIDPI_IMAGES = YES;
261+
DEFINES_MODULE = YES;
262+
DYLIB_COMPATIBILITY_VERSION = 1;
263+
DYLIB_CURRENT_VERSION = 1;
264+
DYLIB_INSTALL_NAME_BASE = "@rpath";
265+
FRAMEWORK_VERSION = A;
266+
INFOPLIST_FILE = CallbackURLKitOSX/Info.plist;
267+
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
268+
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks";
269+
MACOSX_DEPLOYMENT_TARGET = 10.10;
270+
PRODUCT_BUNDLE_IDENTIFIER = fr.phimage.CallbackURLKitOSX;
271+
PRODUCT_NAME = CallbackURLKit;
272+
SDKROOT = macosx;
273+
SKIP_INSTALL = YES;
274+
};
275+
name = Release;
276+
};
139277
C4A8D5161C37D84A00DB3306 /* Debug */ = {
140278
isa = XCBuildConfiguration;
141279
buildSettings = {
@@ -228,6 +366,7 @@
228366
C4A8D5191C37D84A00DB3306 /* Debug */ = {
229367
isa = XCBuildConfiguration;
230368
buildSettings = {
369+
CLANG_ENABLE_MODULES = YES;
231370
DEFINES_MODULE = YES;
232371
DYLIB_COMPATIBILITY_VERSION = 1;
233372
DYLIB_CURRENT_VERSION = 1;
@@ -238,12 +377,14 @@
238377
PRODUCT_BUNDLE_IDENTIFIER = fr.phimage.CallbackURLKit;
239378
PRODUCT_NAME = "$(TARGET_NAME)";
240379
SKIP_INSTALL = YES;
380+
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
241381
};
242382
name = Debug;
243383
};
244384
C4A8D51A1C37D84A00DB3306 /* Release */ = {
245385
isa = XCBuildConfiguration;
246386
buildSettings = {
387+
CLANG_ENABLE_MODULES = YES;
247388
DEFINES_MODULE = YES;
248389
DYLIB_COMPATIBILITY_VERSION = 1;
249390
DYLIB_CURRENT_VERSION = 1;
@@ -260,6 +401,14 @@
260401
/* End XCBuildConfiguration section */
261402

262403
/* Begin XCConfigurationList section */
404+
C418B1DF1C386C160097FDD9 /* Build configuration list for PBXNativeTarget "CallbackURLKitOSX" */ = {
405+
isa = XCConfigurationList;
406+
buildConfigurations = (
407+
C418B1E01C386C160097FDD9 /* Debug */,
408+
C418B1E11C386C160097FDD9 /* Release */,
409+
);
410+
defaultConfigurationIsVisible = 0;
411+
};
263412
C4A8D50A1C37D84A00DB3306 /* Build configuration list for PBXProject "CallbackURLKit" */ = {
264413
isa = XCConfigurationList;
265414
buildConfigurations = (
@@ -276,6 +425,7 @@
276425
C4A8D51A1C37D84A00DB3306 /* Release */,
277426
);
278427
defaultConfigurationIsVisible = 0;
428+
defaultConfigurationName = Release;
279429
};
280430
/* End XCConfigurationList section */
281431
};
Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<Scheme
3+
LastUpgradeVersion = "0720"
4+
version = "1.3">
5+
<BuildAction
6+
parallelizeBuildables = "YES"
7+
buildImplicitDependencies = "YES">
8+
<BuildActionEntries>
9+
<BuildActionEntry
10+
buildForTesting = "YES"
11+
buildForRunning = "YES"
12+
buildForProfiling = "YES"
13+
buildForArchiving = "YES"
14+
buildForAnalyzing = "YES">
15+
<BuildableReference
16+
BuildableIdentifier = "primary"
17+
BlueprintIdentifier = "C4A8D50F1C37D84A00DB3306"
18+
BuildableName = "CallbackURLKit.framework"
19+
BlueprintName = "CallbackURLKit"
20+
ReferencedContainer = "container:CallbackURLKit.xcodeproj">
21+
</BuildableReference>
22+
</BuildActionEntry>
23+
</BuildActionEntries>
24+
</BuildAction>
25+
<TestAction
26+
buildConfiguration = "Debug"
27+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
28+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
29+
shouldUseLaunchSchemeArgsEnv = "YES">
30+
<Testables>
31+
</Testables>
32+
<AdditionalOptions>
33+
</AdditionalOptions>
34+
</TestAction>
35+
<LaunchAction
36+
buildConfiguration = "Debug"
37+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
38+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
39+
launchStyle = "0"
40+
useCustomWorkingDirectory = "NO"
41+
ignoresPersistentStateOnLaunch = "NO"
42+
debugDocumentVersioning = "YES"
43+
debugServiceExtension = "internal"
44+
allowLocationSimulation = "YES">
45+
<MacroExpansion>
46+
<BuildableReference
47+
BuildableIdentifier = "primary"
48+
BlueprintIdentifier = "C4A8D50F1C37D84A00DB3306"
49+
BuildableName = "CallbackURLKit.framework"
50+
BlueprintName = "CallbackURLKit"
51+
ReferencedContainer = "container:CallbackURLKit.xcodeproj">
52+
</BuildableReference>
53+
</MacroExpansion>
54+
<AdditionalOptions>
55+
</AdditionalOptions>
56+
</LaunchAction>
57+
<ProfileAction
58+
buildConfiguration = "Release"
59+
shouldUseLaunchSchemeArgsEnv = "YES"
60+
savedToolIdentifier = ""
61+
useCustomWorkingDirectory = "NO"
62+
debugDocumentVersioning = "YES">
63+
<MacroExpansion>
64+
<BuildableReference
65+
BuildableIdentifier = "primary"
66+
BlueprintIdentifier = "C4A8D50F1C37D84A00DB3306"
67+
BuildableName = "CallbackURLKit.framework"
68+
BlueprintName = "CallbackURLKit"
69+
ReferencedContainer = "container:CallbackURLKit.xcodeproj">
70+
</BuildableReference>
71+
</MacroExpansion>
72+
</ProfileAction>
73+
<AnalyzeAction
74+
buildConfiguration = "Debug">
75+
</AnalyzeAction>
76+
<ArchiveAction
77+
buildConfiguration = "Release"
78+
revealArchiveInOrganizer = "YES">
79+
</ArchiveAction>
80+
</Scheme>

0 commit comments

Comments
 (0)