Skip to content

Commit 40eaa4c

Browse files
google-ima-devrel-botIMA Developer Relations
authored andcommitted
Adds a Swift Snippets sample app for IMA documentation code snippets.
- Adds secure signals snippet to the Snippets app. PiperOrigin-RevId: 813387605
1 parent ee3db73 commit 40eaa4c

File tree

11 files changed

+638
-0
lines changed

11 files changed

+638
-0
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ jobs:
2828
- "Swift/BasicExample"
2929
- "Swift/PodServingExample"
3030
- "Swift/SampleVideoPlayer"
31+
- "Swift/Snippets"
3132
- "Swift/VideoStitcherExample"
3233
- "Swift/SGAIClientSideExample"
3334
steps:

Swift/Snippets/Podfile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
platform :ios, '17'
2+
project 'Snippets.xcodeproj'
3+
4+
target 'Snippets' do
5+
pod 'GoogleAds-IMA-iOS-SDK', '~> 3.27.4'
6+
end
Lines changed: 364 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,364 @@
1+
// !$*UTF8*$!
2+
{
3+
archiveVersion = 1;
4+
classes = {
5+
};
6+
objectVersion = 56;
7+
objects = {
8+
9+
/* Begin PBXBuildFile section */
10+
D20D1DC82C1652260021D157 /* iPhone.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = D20D1DC62C1652260021D157 /* iPhone.storyboard */; };
11+
D20D1DC92C1652260021D157 /* iPad.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = D20D1DC72C1652260021D157 /* iPad.storyboard */; };
12+
D21627942C165053004B08EF /* SecureSignalsSnippet.swift in Sources */ = {isa = PBXBuildFile; fileRef = D21627932C165053004B08EF /* SecureSignalsSnippet.swift */; };
13+
D21627A02C165055004B08EF /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = D216279F2C165055004B08EF /* Assets.xcassets */; };
14+
/* End PBXBuildFile section */
15+
16+
/* Begin PBXFileReference section */
17+
D20D1DC62C1652260021D157 /* iPhone.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = iPhone.storyboard; sourceTree = "<group>"; };
18+
D20D1DC72C1652260021D157 /* iPad.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = iPad.storyboard; sourceTree = "<group>"; };
19+
D21627902C165053004B08EF /* Snippets.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Snippets.app; sourceTree = BUILT_PRODUCTS_DIR; };
20+
D21627932C165053004B08EF /* SecureSignalsSnippet.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SecureSignalsSnippet.swift; sourceTree = "<group>"; };
21+
D216279F2C165055004B08EF /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
22+
D21627A42C165055004B08EF /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
23+
/* End PBXFileReference section */
24+
25+
/* Begin PBXFrameworksBuildPhase section */
26+
D216278D2C165053004B08EF /* Frameworks */ = {
27+
isa = PBXFrameworksBuildPhase;
28+
buildActionMask = 2147483647;
29+
files = (
30+
);
31+
runOnlyForDeploymentPostprocessing = 0;
32+
};
33+
/* End PBXFrameworksBuildPhase section */
34+
35+
/* Begin PBXGroup section */
36+
C3F09BE363D05255D29BD1ED /* Pods */ = {
37+
isa = PBXGroup;
38+
children = (
39+
);
40+
path = Pods;
41+
sourceTree = "<group>";
42+
};
43+
D21627872C165053004B08EF = {
44+
isa = PBXGroup;
45+
children = (
46+
D21627922C165053004B08EF /* Snippets */,
47+
D21627912C165053004B08EF /* Products */,
48+
C3F09BE363D05255D29BD1ED /* Pods */,
49+
);
50+
sourceTree = "<group>";
51+
};
52+
D21627912C165053004B08EF /* Products */ = {
53+
isa = PBXGroup;
54+
children = (
55+
D21627902C165053004B08EF /* Snippets.app */,
56+
);
57+
name = Products;
58+
sourceTree = "<group>";
59+
};
60+
D21627922C165053004B08EF /* Snippets */ = {
61+
isa = PBXGroup;
62+
children = (
63+
D21627932C165053004B08EF /* SecureSignalsSnippet.swift */,
64+
D216279F2C165055004B08EF /* Assets.xcassets */,
65+
D20D1DC72C1652260021D157 /* iPad.storyboard */,
66+
D20D1DC62C1652260021D157 /* iPhone.storyboard */,
67+
D21627A42C165055004B08EF /* Info.plist */,
68+
);
69+
name = Snippets;
70+
path = app;
71+
sourceTree = "<group>";
72+
};
73+
/* End PBXGroup section */
74+
75+
/* Begin PBXNativeTarget section */
76+
D216278F2C165053004B08EF /* Snippets */ = {
77+
isa = PBXNativeTarget;
78+
buildConfigurationList = D21627A72C165055004B08EF /* Build configuration list for PBXNativeTarget "Snippets" */;
79+
buildPhases = (
80+
D216278C2C165053004B08EF /* Sources */,
81+
D216278D2C165053004B08EF /* Frameworks */,
82+
D216278E2C165053004B08EF /* Resources */,
83+
);
84+
buildRules = (
85+
);
86+
dependencies = (
87+
);
88+
name = Snippets;
89+
productName = Snippets;
90+
productReference = D21627902C165053004B08EF /* Snippets.app */;
91+
productType = "com.apple.product-type.application";
92+
};
93+
/* End PBXNativeTarget section */
94+
95+
/* Begin PBXProject section */
96+
D21627882C165053004B08EF /* Project object */ = {
97+
isa = PBXProject;
98+
attributes = {
99+
BuildIndependentTargetsInParallel = 1;
100+
LastSwiftUpdateCheck = 1530;
101+
LastUpgradeCheck = 1530;
102+
TargetAttributes = {
103+
D216278F2C165053004B08EF = {
104+
CreatedOnToolsVersion = 15.3;
105+
};
106+
};
107+
};
108+
buildConfigurationList = D216278B2C165053004B08EF /* Build configuration list for PBXProject "Snippets" */;
109+
compatibilityVersion = "Xcode 14.0";
110+
developmentRegion = en;
111+
hasScannedForEncodings = 0;
112+
knownRegions = (
113+
en,
114+
Base,
115+
);
116+
mainGroup = D21627872C165053004B08EF;
117+
productRefGroup = D21627912C165053004B08EF /* Products */;
118+
projectDirPath = "";
119+
projectRoot = "";
120+
targets = (
121+
D216278F2C165053004B08EF /* Snippets */,
122+
);
123+
};
124+
/* End PBXProject section */
125+
126+
/* Begin PBXResourcesBuildPhase section */
127+
D216278E2C165053004B08EF /* Resources */ = {
128+
isa = PBXResourcesBuildPhase;
129+
buildActionMask = 2147483647;
130+
files = (
131+
D21627A02C165055004B08EF /* Assets.xcassets in Resources */,
132+
D20D1DC92C1652260021D157 /* iPad.storyboard in Resources */,
133+
D20D1DC82C1652260021D157 /* iPhone.storyboard in Resources */,
134+
);
135+
runOnlyForDeploymentPostprocessing = 0;
136+
};
137+
/* End PBXResourcesBuildPhase section */
138+
139+
/* Begin PBXSourcesBuildPhase section */
140+
D216278C2C165053004B08EF /* Sources */ = {
141+
isa = PBXSourcesBuildPhase;
142+
buildActionMask = 2147483647;
143+
files = (
144+
D21627942C165053004B08EF /* SecureSignalsSnippet.swift in Sources */,
145+
);
146+
runOnlyForDeploymentPostprocessing = 0;
147+
};
148+
/* End PBXSourcesBuildPhase section */
149+
150+
/* Begin XCBuildConfiguration section */
151+
D21627A52C165055004B08EF /* Debug */ = {
152+
isa = XCBuildConfiguration;
153+
buildSettings = {
154+
ALWAYS_SEARCH_USER_PATHS = NO;
155+
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
156+
CLANG_ANALYZER_NONNULL = YES;
157+
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
158+
CLANG_CXX_LANGUAGE_STANDARD = "gnu++20";
159+
CLANG_ENABLE_MODULES = YES;
160+
CLANG_ENABLE_OBJC_ARC = YES;
161+
CLANG_ENABLE_OBJC_WEAK = YES;
162+
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
163+
CLANG_WARN_BOOL_CONVERSION = YES;
164+
CLANG_WARN_COMMA = YES;
165+
CLANG_WARN_CONSTANT_CONVERSION = YES;
166+
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
167+
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
168+
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
169+
CLANG_WARN_EMPTY_BODY = YES;
170+
CLANG_WARN_ENUM_CONVERSION = YES;
171+
CLANG_WARN_INFINITE_RECURSION = YES;
172+
CLANG_WARN_INT_CONVERSION = YES;
173+
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
174+
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
175+
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
176+
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
177+
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
178+
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
179+
CLANG_WARN_STRICT_PROTOTYPES = YES;
180+
CLANG_WARN_SUSPICIOUS_MOVE = YES;
181+
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
182+
CLANG_WARN_UNREACHABLE_CODE = YES;
183+
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
184+
COPY_PHASE_STRIP = NO;
185+
DEBUG_INFORMATION_FORMAT = dwarf;
186+
ENABLE_STRICT_OBJC_MSGSEND = YES;
187+
ENABLE_TESTABILITY = YES;
188+
ENABLE_USER_SCRIPT_SANDBOXING = NO;
189+
GCC_C_LANGUAGE_STANDARD = gnu17;
190+
GCC_DYNAMIC_NO_PIC = NO;
191+
GCC_NO_COMMON_BLOCKS = YES;
192+
GCC_OPTIMIZATION_LEVEL = 0;
193+
GCC_PREPROCESSOR_DEFINITIONS = (
194+
"DEBUG=1",
195+
"$(inherited)",
196+
);
197+
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
198+
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
199+
GCC_WARN_UNDECLARED_SELECTOR = YES;
200+
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
201+
GCC_WARN_UNUSED_FUNCTION = YES;
202+
GCC_WARN_UNUSED_VARIABLE = YES;
203+
IPHONEOS_DEPLOYMENT_TARGET = 17.4;
204+
LOCALIZATION_PREFERS_STRING_CATALOGS = YES;
205+
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
206+
MTL_FAST_MATH = YES;
207+
ONLY_ACTIVE_ARCH = YES;
208+
SDKROOT = iphoneos;
209+
SWIFT_ACTIVE_COMPILATION_CONDITIONS = "DEBUG $(inherited)";
210+
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
211+
};
212+
name = Debug;
213+
};
214+
D21627A62C165055004B08EF /* Release */ = {
215+
isa = XCBuildConfiguration;
216+
buildSettings = {
217+
ALWAYS_SEARCH_USER_PATHS = NO;
218+
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
219+
CLANG_ANALYZER_NONNULL = YES;
220+
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
221+
CLANG_CXX_LANGUAGE_STANDARD = "gnu++20";
222+
CLANG_ENABLE_MODULES = YES;
223+
CLANG_ENABLE_OBJC_ARC = YES;
224+
CLANG_ENABLE_OBJC_WEAK = YES;
225+
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
226+
CLANG_WARN_BOOL_CONVERSION = YES;
227+
CLANG_WARN_COMMA = YES;
228+
CLANG_WARN_CONSTANT_CONVERSION = YES;
229+
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
230+
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
231+
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
232+
CLANG_WARN_EMPTY_BODY = YES;
233+
CLANG_WARN_ENUM_CONVERSION = YES;
234+
CLANG_WARN_INFINITE_RECURSION = YES;
235+
CLANG_WARN_INT_CONVERSION = YES;
236+
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
237+
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
238+
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
239+
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
240+
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
241+
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
242+
CLANG_WARN_STRICT_PROTOTYPES = YES;
243+
CLANG_WARN_SUSPICIOUS_MOVE = YES;
244+
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
245+
CLANG_WARN_UNREACHABLE_CODE = YES;
246+
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
247+
COPY_PHASE_STRIP = NO;
248+
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
249+
ENABLE_NS_ASSERTIONS = NO;
250+
ENABLE_STRICT_OBJC_MSGSEND = YES;
251+
ENABLE_USER_SCRIPT_SANDBOXING = NO;
252+
GCC_C_LANGUAGE_STANDARD = gnu17;
253+
GCC_NO_COMMON_BLOCKS = YES;
254+
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
255+
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
256+
GCC_WARN_UNDECLARED_SELECTOR = YES;
257+
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
258+
GCC_WARN_UNUSED_FUNCTION = YES;
259+
GCC_WARN_UNUSED_VARIABLE = YES;
260+
IPHONEOS_DEPLOYMENT_TARGET = 17.4;
261+
LOCALIZATION_PREFERS_STRING_CATALOGS = YES;
262+
MTL_ENABLE_DEBUG_INFO = NO;
263+
MTL_FAST_MATH = YES;
264+
SDKROOT = iphoneos;
265+
SWIFT_COMPILATION_MODE = wholemodule;
266+
VALIDATE_PRODUCT = YES;
267+
};
268+
name = Release;
269+
};
270+
D21627A82C165055004B08EF /* Debug */ = {
271+
isa = XCBuildConfiguration;
272+
buildSettings = {
273+
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
274+
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
275+
CODE_SIGN_STYLE = Automatic;
276+
CURRENT_PROJECT_VERSION = 1;
277+
DEVELOPMENT_TEAM = Z95L3YYF93;
278+
ENABLE_USER_SCRIPT_SANDBOXING = NO;
279+
GENERATE_INFOPLIST_FILE = YES;
280+
INFOPLIST_FILE = app/Info.plist;
281+
INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
282+
INFOPLIST_KEY_UILaunchStoryboardName = iPhone.storyboard;
283+
INFOPLIST_KEY_UIMainStoryboardFile = iPhone;
284+
INFOPLIST_KEY_UIRequiredDeviceCapabilities = arm64;
285+
INFOPLIST_KEY_UISupportedInterfaceOrientations = UIInterfaceOrientationPortrait;
286+
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
287+
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
288+
LD_RUNPATH_SEARCH_PATHS = (
289+
"$(inherited)",
290+
"@executable_path/Frameworks",
291+
);
292+
MARKETING_VERSION = 1.0;
293+
PRODUCT_BUNDLE_IDENTIFIER = google.Snippets;
294+
PRODUCT_NAME = "$(TARGET_NAME)";
295+
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
296+
SUPPORTS_MACCATALYST = NO;
297+
SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO;
298+
SUPPORTS_XR_DESIGNED_FOR_IPHONE_IPAD = NO;
299+
SWIFT_EMIT_LOC_STRINGS = YES;
300+
SWIFT_VERSION = 5.0;
301+
TARGETED_DEVICE_FAMILY = "1,2";
302+
};
303+
name = Debug;
304+
};
305+
D21627A92C165055004B08EF /* Release */ = {
306+
isa = XCBuildConfiguration;
307+
buildSettings = {
308+
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
309+
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
310+
CODE_SIGN_STYLE = Automatic;
311+
CURRENT_PROJECT_VERSION = 1;
312+
DEVELOPMENT_TEAM = Z95L3YYF93;
313+
ENABLE_USER_SCRIPT_SANDBOXING = NO;
314+
GENERATE_INFOPLIST_FILE = YES;
315+
INFOPLIST_FILE = app/Info.plist;
316+
INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
317+
INFOPLIST_KEY_UILaunchStoryboardName = iPhone.storyboard;
318+
INFOPLIST_KEY_UIMainStoryboardFile = iPhone;
319+
INFOPLIST_KEY_UIRequiredDeviceCapabilities = arm64;
320+
INFOPLIST_KEY_UISupportedInterfaceOrientations = UIInterfaceOrientationPortrait;
321+
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
322+
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
323+
LD_RUNPATH_SEARCH_PATHS = (
324+
"$(inherited)",
325+
"@executable_path/Frameworks",
326+
);
327+
MARKETING_VERSION = 1.0;
328+
PRODUCT_BUNDLE_IDENTIFIER = google.Snippets;
329+
PRODUCT_NAME = "$(TARGET_NAME)";
330+
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
331+
SUPPORTS_MACCATALYST = NO;
332+
SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO;
333+
SUPPORTS_XR_DESIGNED_FOR_IPHONE_IPAD = NO;
334+
SWIFT_EMIT_LOC_STRINGS = YES;
335+
SWIFT_VERSION = 5.0;
336+
TARGETED_DEVICE_FAMILY = "1,2";
337+
};
338+
name = Release;
339+
};
340+
/* End XCBuildConfiguration section */
341+
342+
/* Begin XCConfigurationList section */
343+
D216278B2C165053004B08EF /* Build configuration list for PBXProject "Snippets" */ = {
344+
isa = XCConfigurationList;
345+
buildConfigurations = (
346+
D21627A52C165055004B08EF /* Debug */,
347+
D21627A62C165055004B08EF /* Release */,
348+
);
349+
defaultConfigurationIsVisible = 0;
350+
defaultConfigurationName = Release;
351+
};
352+
D21627A72C165055004B08EF /* Build configuration list for PBXNativeTarget "Snippets" */ = {
353+
isa = XCConfigurationList;
354+
buildConfigurations = (
355+
D21627A82C165055004B08EF /* Debug */,
356+
D21627A92C165055004B08EF /* Release */,
357+
);
358+
defaultConfigurationIsVisible = 0;
359+
defaultConfigurationName = Release;
360+
};
361+
/* End XCConfigurationList section */
362+
};
363+
rootObject = D21627882C165053004B08EF /* Project object */;
364+
}

0 commit comments

Comments
 (0)