Skip to content

Commit 4b6d328

Browse files
committed
add example of UIActivityItemProvider and UIActivityItemSource; use built-in AVPlayer time observer instead of NSTimer
1 parent 78ce5d0 commit 4b6d328

File tree

10 files changed

+567
-11
lines changed

10 files changed

+567
-11
lines changed
Lines changed: 289 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,289 @@
1+
// !$*UTF8*$!
2+
{
3+
archiveVersion = 1;
4+
classes = {
5+
};
6+
objectVersion = 46;
7+
objects = {
8+
9+
/* Begin PBXBuildFile section */
10+
3217DF21199688DF001092A9 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3217DF20199688DF001092A9 /* ViewController.swift */; };
11+
3219EB3C1BB0F58E0037939C /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3219EB3B1BB0F58E0037939C /* AppDelegate.swift */; settings = {ASSET_TAGS = (); }; };
12+
3219EB3E1BB0F5B10037939C /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 3219EB3D1BB0F5B10037939C /* LaunchScreen.storyboard */; settings = {ASSET_TAGS = (); }; };
13+
C97D40F61822B36D002DFE75 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = C97D40F41822B36D002DFE75 /* Main.storyboard */; };
14+
C97D40FB1822B36D002DFE75 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = C97D40FA1822B36D002DFE75 /* Assets.xcassets */; };
15+
C97D41231822B626002DFE75 /* sunglasses.png in Resources */ = {isa = PBXBuildFile; fileRef = C97D41221822B626002DFE75 /* sunglasses.png */; };
16+
/* End PBXBuildFile section */
17+
18+
/* Begin PBXFileReference section */
19+
3217DF20199688DF001092A9 /* ViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = "<group>"; };
20+
3219EB3B1BB0F58E0037939C /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
21+
3219EB3D1BB0F5B10037939C /* LaunchScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = LaunchScreen.storyboard; sourceTree = "<group>"; };
22+
C97D40DF1822B36D002DFE75 /* ch26p901activityView.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = ch26p901activityView.app; sourceTree = BUILT_PRODUCTS_DIR; };
23+
C97D40EA1822B36D002DFE75 /* ch26p901activityView-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "ch26p901activityView-Info.plist"; sourceTree = "<group>"; };
24+
C97D40F51822B36D002DFE75 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
25+
C97D40FA1822B36D002DFE75 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
26+
C97D41221822B626002DFE75 /* sunglasses.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = sunglasses.png; sourceTree = "<group>"; };
27+
/* End PBXFileReference section */
28+
29+
/* Begin PBXFrameworksBuildPhase section */
30+
C97D40DC1822B36D002DFE75 /* Frameworks */ = {
31+
isa = PBXFrameworksBuildPhase;
32+
buildActionMask = 2147483647;
33+
files = (
34+
);
35+
runOnlyForDeploymentPostprocessing = 0;
36+
};
37+
/* End PBXFrameworksBuildPhase section */
38+
39+
/* Begin PBXGroup section */
40+
C97D40D61822B36D002DFE75 = {
41+
isa = PBXGroup;
42+
children = (
43+
C97D40E81822B36D002DFE75 /* ch26p901activityView */,
44+
C97D40E01822B36D002DFE75 /* Products */,
45+
);
46+
sourceTree = "<group>";
47+
};
48+
C97D40E01822B36D002DFE75 /* Products */ = {
49+
isa = PBXGroup;
50+
children = (
51+
C97D40DF1822B36D002DFE75 /* ch26p901activityView.app */,
52+
);
53+
name = Products;
54+
sourceTree = "<group>";
55+
};
56+
C97D40E81822B36D002DFE75 /* ch26p901activityView */ = {
57+
isa = PBXGroup;
58+
children = (
59+
3219EB3B1BB0F58E0037939C /* AppDelegate.swift */,
60+
C97D40F41822B36D002DFE75 /* Main.storyboard */,
61+
3217DF20199688DF001092A9 /* ViewController.swift */,
62+
C97D41221822B626002DFE75 /* sunglasses.png */,
63+
C97D40FA1822B36D002DFE75 /* Assets.xcassets */,
64+
3219EB3D1BB0F5B10037939C /* LaunchScreen.storyboard */,
65+
C97D40EA1822B36D002DFE75 /* ch26p901activityView-Info.plist */,
66+
);
67+
path = ch26p901activityView;
68+
sourceTree = "<group>";
69+
};
70+
/* End PBXGroup section */
71+
72+
/* Begin PBXNativeTarget section */
73+
C97D40DE1822B36D002DFE75 /* ch26p901activityView */ = {
74+
isa = PBXNativeTarget;
75+
buildConfigurationList = C97D41111822B36D002DFE75 /* Build configuration list for PBXNativeTarget "ch26p901activityView" */;
76+
buildPhases = (
77+
C97D40DB1822B36D002DFE75 /* Sources */,
78+
C97D40DC1822B36D002DFE75 /* Frameworks */,
79+
C97D40DD1822B36D002DFE75 /* Resources */,
80+
);
81+
buildRules = (
82+
);
83+
dependencies = (
84+
);
85+
name = ch26p901activityView;
86+
productName = ch26p901activityView;
87+
productReference = C97D40DF1822B36D002DFE75 /* ch26p901activityView.app */;
88+
productType = "com.apple.product-type.application";
89+
};
90+
/* End PBXNativeTarget section */
91+
92+
/* Begin PBXProject section */
93+
C97D40D71822B36D002DFE75 /* Project object */ = {
94+
isa = PBXProject;
95+
attributes = {
96+
LastSwiftUpdateCheck = 0700;
97+
LastUpgradeCheck = 0500;
98+
ORGANIZATIONNAME = "Matt Neuburg";
99+
};
100+
buildConfigurationList = C97D40DA1822B36D002DFE75 /* Build configuration list for PBXProject "ch26p901activityView" */;
101+
compatibilityVersion = "Xcode 3.2";
102+
developmentRegion = English;
103+
hasScannedForEncodings = 0;
104+
knownRegions = (
105+
en,
106+
Base,
107+
);
108+
mainGroup = C97D40D61822B36D002DFE75;
109+
productRefGroup = C97D40E01822B36D002DFE75 /* Products */;
110+
projectDirPath = "";
111+
projectRoot = "";
112+
targets = (
113+
C97D40DE1822B36D002DFE75 /* ch26p901activityView */,
114+
);
115+
};
116+
/* End PBXProject section */
117+
118+
/* Begin PBXResourcesBuildPhase section */
119+
C97D40DD1822B36D002DFE75 /* Resources */ = {
120+
isa = PBXResourcesBuildPhase;
121+
buildActionMask = 2147483647;
122+
files = (
123+
C97D40FB1822B36D002DFE75 /* Assets.xcassets in Resources */,
124+
C97D41231822B626002DFE75 /* sunglasses.png in Resources */,
125+
3219EB3E1BB0F5B10037939C /* LaunchScreen.storyboard in Resources */,
126+
C97D40F61822B36D002DFE75 /* Main.storyboard in Resources */,
127+
);
128+
runOnlyForDeploymentPostprocessing = 0;
129+
};
130+
/* End PBXResourcesBuildPhase section */
131+
132+
/* Begin PBXSourcesBuildPhase section */
133+
C97D40DB1822B36D002DFE75 /* Sources */ = {
134+
isa = PBXSourcesBuildPhase;
135+
buildActionMask = 2147483647;
136+
files = (
137+
3217DF21199688DF001092A9 /* ViewController.swift in Sources */,
138+
3219EB3C1BB0F58E0037939C /* AppDelegate.swift in Sources */,
139+
);
140+
runOnlyForDeploymentPostprocessing = 0;
141+
};
142+
/* End PBXSourcesBuildPhase section */
143+
144+
/* Begin PBXVariantGroup section */
145+
C97D40F41822B36D002DFE75 /* Main.storyboard */ = {
146+
isa = PBXVariantGroup;
147+
children = (
148+
C97D40F51822B36D002DFE75 /* Base */,
149+
);
150+
name = Main.storyboard;
151+
sourceTree = "<group>";
152+
};
153+
/* End PBXVariantGroup section */
154+
155+
/* Begin XCBuildConfiguration section */
156+
C97D410F1822B36D002DFE75 /* Debug */ = {
157+
isa = XCBuildConfiguration;
158+
buildSettings = {
159+
ALWAYS_SEARCH_USER_PATHS = NO;
160+
ARCHS = "$(ARCHS_STANDARD_INCLUDING_64_BIT)";
161+
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
162+
CLANG_CXX_LIBRARY = "libc++";
163+
CLANG_ENABLE_MODULES = YES;
164+
CLANG_ENABLE_OBJC_ARC = YES;
165+
CLANG_WARN_BOOL_CONVERSION = YES;
166+
CLANG_WARN_CONSTANT_CONVERSION = YES;
167+
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
168+
CLANG_WARN_EMPTY_BODY = YES;
169+
CLANG_WARN_ENUM_CONVERSION = YES;
170+
CLANG_WARN_INT_CONVERSION = YES;
171+
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
172+
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
173+
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
174+
COPY_PHASE_STRIP = NO;
175+
GCC_C_LANGUAGE_STANDARD = gnu99;
176+
GCC_DYNAMIC_NO_PIC = NO;
177+
GCC_OPTIMIZATION_LEVEL = 0;
178+
GCC_PREPROCESSOR_DEFINITIONS = (
179+
"DEBUG=1",
180+
"$(inherited)",
181+
);
182+
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
183+
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
184+
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
185+
GCC_WARN_UNDECLARED_SELECTOR = YES;
186+
GCC_WARN_UNINITIALIZED_AUTOS = YES;
187+
GCC_WARN_UNUSED_FUNCTION = YES;
188+
GCC_WARN_UNUSED_VARIABLE = YES;
189+
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
190+
ONLY_ACTIVE_ARCH = YES;
191+
SDKROOT = iphoneos;
192+
};
193+
name = Debug;
194+
};
195+
C97D41101822B36D002DFE75 /* Release */ = {
196+
isa = XCBuildConfiguration;
197+
buildSettings = {
198+
ALWAYS_SEARCH_USER_PATHS = NO;
199+
ARCHS = "$(ARCHS_STANDARD_INCLUDING_64_BIT)";
200+
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
201+
CLANG_CXX_LIBRARY = "libc++";
202+
CLANG_ENABLE_MODULES = YES;
203+
CLANG_ENABLE_OBJC_ARC = YES;
204+
CLANG_WARN_BOOL_CONVERSION = YES;
205+
CLANG_WARN_CONSTANT_CONVERSION = YES;
206+
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
207+
CLANG_WARN_EMPTY_BODY = YES;
208+
CLANG_WARN_ENUM_CONVERSION = YES;
209+
CLANG_WARN_INT_CONVERSION = YES;
210+
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
211+
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
212+
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
213+
COPY_PHASE_STRIP = YES;
214+
ENABLE_NS_ASSERTIONS = NO;
215+
GCC_C_LANGUAGE_STANDARD = gnu99;
216+
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
217+
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
218+
GCC_WARN_UNDECLARED_SELECTOR = YES;
219+
GCC_WARN_UNINITIALIZED_AUTOS = YES;
220+
GCC_WARN_UNUSED_FUNCTION = YES;
221+
GCC_WARN_UNUSED_VARIABLE = YES;
222+
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
223+
SDKROOT = iphoneos;
224+
VALIDATE_PRODUCT = YES;
225+
};
226+
name = Release;
227+
};
228+
C97D41121822B36D002DFE75 /* Debug */ = {
229+
isa = XCBuildConfiguration;
230+
buildSettings = {
231+
ARCHS = "$(ARCHS_STANDARD)";
232+
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
233+
CLANG_ENABLE_MODULES = YES;
234+
GCC_PRECOMPILE_PREFIX_HEADER = YES;
235+
GCC_PREFIX_HEADER = "ch26p901activityView/ch26p901activityView-Prefix.pch";
236+
INFOPLIST_FILE = "ch26p901activityView/ch26p901activityView-Info.plist";
237+
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
238+
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
239+
ONLY_ACTIVE_ARCH = NO;
240+
PRODUCT_NAME = "$(TARGET_NAME)";
241+
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
242+
TARGETED_DEVICE_FAMILY = "1,2";
243+
WRAPPER_EXTENSION = app;
244+
};
245+
name = Debug;
246+
};
247+
C97D41131822B36D002DFE75 /* Release */ = {
248+
isa = XCBuildConfiguration;
249+
buildSettings = {
250+
ARCHS = "$(ARCHS_STANDARD)";
251+
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
252+
CLANG_ENABLE_MODULES = YES;
253+
GCC_PRECOMPILE_PREFIX_HEADER = YES;
254+
GCC_PREFIX_HEADER = "ch26p901activityView/ch26p901activityView-Prefix.pch";
255+
INFOPLIST_FILE = "ch26p901activityView/ch26p901activityView-Info.plist";
256+
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
257+
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
258+
ONLY_ACTIVE_ARCH = NO;
259+
PRODUCT_NAME = "$(TARGET_NAME)";
260+
TARGETED_DEVICE_FAMILY = "1,2";
261+
WRAPPER_EXTENSION = app;
262+
};
263+
name = Release;
264+
};
265+
/* End XCBuildConfiguration section */
266+
267+
/* Begin XCConfigurationList section */
268+
C97D40DA1822B36D002DFE75 /* Build configuration list for PBXProject "ch26p901activityView" */ = {
269+
isa = XCConfigurationList;
270+
buildConfigurations = (
271+
C97D410F1822B36D002DFE75 /* Debug */,
272+
C97D41101822B36D002DFE75 /* Release */,
273+
);
274+
defaultConfigurationIsVisible = 0;
275+
defaultConfigurationName = Release;
276+
};
277+
C97D41111822B36D002DFE75 /* Build configuration list for PBXNativeTarget "ch26p901activityView" */ = {
278+
isa = XCConfigurationList;
279+
buildConfigurations = (
280+
C97D41121822B36D002DFE75 /* Debug */,
281+
C97D41131822B36D002DFE75 /* Release */,
282+
);
283+
defaultConfigurationIsVisible = 0;
284+
defaultConfigurationName = Release;
285+
};
286+
/* End XCConfigurationList section */
287+
};
288+
rootObject = C97D40D71822B36D002DFE75 /* Project object */;
289+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import UIKit
2+
3+
@UIApplicationMain
4+
class AppDelegate : UIResponder, UIApplicationDelegate {
5+
var window : UIWindow?
6+
7+
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
8+
9+
return true
10+
}
11+
}
12+
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
{
2+
"images" : [
3+
{
4+
"idiom" : "iphone",
5+
"size" : "29x29",
6+
"scale" : "2x"
7+
},
8+
{
9+
"idiom" : "iphone",
10+
"size" : "29x29",
11+
"scale" : "3x"
12+
},
13+
{
14+
"idiom" : "iphone",
15+
"size" : "40x40",
16+
"scale" : "2x"
17+
},
18+
{
19+
"idiom" : "iphone",
20+
"size" : "40x40",
21+
"scale" : "3x"
22+
},
23+
{
24+
"idiom" : "iphone",
25+
"size" : "60x60",
26+
"scale" : "2x"
27+
},
28+
{
29+
"idiom" : "iphone",
30+
"size" : "60x60",
31+
"scale" : "3x"
32+
}
33+
],
34+
"info" : {
35+
"version" : 1,
36+
"author" : "xcode"
37+
}
38+
}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"images" : [
3+
{
4+
"orientation" : "portrait",
5+
"idiom" : "iphone",
6+
"extent" : "full-screen",
7+
"minimum-system-version" : "7.0",
8+
"scale" : "2x"
9+
},
10+
{
11+
"orientation" : "portrait",
12+
"idiom" : "iphone",
13+
"subtype" : "retina4",
14+
"extent" : "full-screen",
15+
"minimum-system-version" : "7.0",
16+
"scale" : "2x"
17+
}
18+
],
19+
"info" : {
20+
"version" : 1,
21+
"author" : "xcode"
22+
}
23+
}

0 commit comments

Comments
 (0)