Skip to content

Commit 43680ab

Browse files
google-ima-devrel-botIMA Developer Relations
authored andcommitted
Adds a Snippets sample app for IMA documentation code snippets.
- Adds secure signals snippet to the Snippets app. PiperOrigin-RevId: 814335864
1 parent a9f8b9d commit 43680ab

File tree

14 files changed

+690
-0
lines changed

14 files changed

+690
-0
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ jobs:
2323
- "Objective-C/BasicExample"
2424
- "Objective-C/PodServingExample"
2525
- "Objective-C/SampleVideoPlayer"
26+
- "Objective-C/Snippets"
2627
- "Objective-C/VideoStitcherExample"
2728
- "Swift/BasicExample"
2829
- "Swift/PodServingExample"

Objective-C/Snippets/Podfile

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
source 'https://github.com/CocoaPods/Specs.git'
2+
3+
platform :ios, '14'
4+
5+
target 'Snippets' do
6+
pod 'GoogleAds-IMA-iOS-SDK', '~> 3.27.4'
7+
end
Lines changed: 323 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,323 @@
1+
// !$*UTF8*$!
2+
{
3+
archiveVersion = 1;
4+
classes = {
5+
};
6+
objectVersion = 46;
7+
objects = {
8+
9+
/* Begin PBXBuildFile section */
10+
151685FB19A515770063079C /* iPhone.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 151685F919A515770063079C /* iPhone.storyboard */; };
11+
151685FD19A515800063079C /* iPad.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 151685FC19A515800063079C /* iPad.storyboard */; };
12+
1589E15D199126CA00E5DF1A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 1589E15C199126CA00E5DF1A /* main.m */; };
13+
1589E160199126CA00E5DF1A /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 1589E15F199126CA00E5DF1A /* AppDelegate.m */; };
14+
1589E163199126CA00E5DF1A /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 1589E162199126CA00E5DF1A /* ViewController.m */; };
15+
1589E168199126CA00E5DF1A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 1589E167199126CA00E5DF1A /* Images.xcassets */; };
16+
1F1409382E8D711700362718 /* SecureSignalsSnippet.m in Sources */ = {isa = PBXBuildFile; fileRef = 1F1409372E8D710400362718 /* SecureSignalsSnippet.m */; };
17+
/* End PBXBuildFile section */
18+
19+
/* Begin PBXFileReference section */
20+
151685FA19A515770063079C /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/iPhone.storyboard; sourceTree = "<group>"; };
21+
151685FC19A515800063079C /* iPad.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = iPad.storyboard; sourceTree = "<group>"; };
22+
1589E157199126CA00E5DF1A /* Snippets.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Snippets.app; sourceTree = BUILT_PRODUCTS_DIR; };
23+
1589E15B199126CA00E5DF1A /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
24+
1589E15C199126CA00E5DF1A /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
25+
1589E15E199126CA00E5DF1A /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; };
26+
1589E15F199126CA00E5DF1A /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = "<group>"; };
27+
1589E161199126CA00E5DF1A /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = "<group>"; };
28+
1589E162199126CA00E5DF1A /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = "<group>"; };
29+
1589E167199126CA00E5DF1A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = "<group>"; };
30+
1F1409372E8D710400362718 /* SecureSignalsSnippet.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SecureSignalsSnippet.m; sourceTree = "<group>"; };
31+
/* End PBXFileReference section */
32+
33+
/* Begin PBXFrameworksBuildPhase section */
34+
1589E154199126CA00E5DF1A /* Frameworks */ = {
35+
isa = PBXFrameworksBuildPhase;
36+
buildActionMask = 2147483647;
37+
files = (
38+
);
39+
runOnlyForDeploymentPostprocessing = 0;
40+
};
41+
/* End PBXFrameworksBuildPhase section */
42+
43+
/* Begin PBXGroup section */
44+
152D49DE19B10DA0003400E4 /* Resources */ = {
45+
isa = PBXGroup;
46+
children = (
47+
);
48+
name = Resources;
49+
sourceTree = "<group>";
50+
};
51+
1589E14E199126CA00E5DF1A = {
52+
isa = PBXGroup;
53+
children = (
54+
152D49DE19B10DA0003400E4 /* Resources */,
55+
1589E159199126CA00E5DF1A /* Snippets */,
56+
1589E158199126CA00E5DF1A /* Products */,
57+
EF5500AFC5B331632B6ADC57 /* Pods */,
58+
);
59+
sourceTree = "<group>";
60+
};
61+
1589E158199126CA00E5DF1A /* Products */ = {
62+
isa = PBXGroup;
63+
children = (
64+
1589E157199126CA00E5DF1A /* Snippets.app */,
65+
);
66+
name = Products;
67+
sourceTree = "<group>";
68+
};
69+
1589E159199126CA00E5DF1A /* Snippets */ = {
70+
isa = PBXGroup;
71+
children = (
72+
1F1409372E8D710400362718 /* SecureSignalsSnippet.m */,
73+
1589E15E199126CA00E5DF1A /* AppDelegate.h */,
74+
1589E15F199126CA00E5DF1A /* AppDelegate.m */,
75+
1589E161199126CA00E5DF1A /* ViewController.h */,
76+
1589E162199126CA00E5DF1A /* ViewController.m */,
77+
151685F919A515770063079C /* iPhone.storyboard */,
78+
151685FC19A515800063079C /* iPad.storyboard */,
79+
1589E167199126CA00E5DF1A /* Images.xcassets */,
80+
1589E15A199126CA00E5DF1A /* Supporting Files */,
81+
);
82+
path = Snippets;
83+
sourceTree = "<group>";
84+
};
85+
1589E15A199126CA00E5DF1A /* Supporting Files */ = {
86+
isa = PBXGroup;
87+
children = (
88+
1589E15B199126CA00E5DF1A /* Info.plist */,
89+
1589E15C199126CA00E5DF1A /* main.m */,
90+
);
91+
name = "Supporting Files";
92+
sourceTree = "<group>";
93+
};
94+
EF5500AFC5B331632B6ADC57 /* Pods */ = {
95+
isa = PBXGroup;
96+
children = (
97+
);
98+
path = Pods;
99+
sourceTree = "<group>";
100+
};
101+
/* End PBXGroup section */
102+
103+
/* Begin PBXNativeTarget section */
104+
1589E156199126CA00E5DF1A /* Snippets */ = {
105+
isa = PBXNativeTarget;
106+
buildConfigurationList = 1589E177199126CA00E5DF1A /* Build configuration list for PBXNativeTarget "Snippets" */;
107+
buildPhases = (
108+
1589E153199126CA00E5DF1A /* Sources */,
109+
1589E154199126CA00E5DF1A /* Frameworks */,
110+
1589E155199126CA00E5DF1A /* Resources */,
111+
);
112+
buildRules = (
113+
);
114+
dependencies = (
115+
);
116+
name = Snippets;
117+
productName = Snippets;
118+
productReference = 1589E157199126CA00E5DF1A /* Snippets.app */;
119+
productType = "com.apple.product-type.application";
120+
};
121+
/* End PBXNativeTarget section */
122+
123+
/* Begin PBXProject section */
124+
1589E14F199126CA00E5DF1A /* Project object */ = {
125+
isa = PBXProject;
126+
attributes = {
127+
LastUpgradeCheck = 0600;
128+
ORGANIZATIONNAME = "Google, Inc.";
129+
TargetAttributes = {
130+
1589E156199126CA00E5DF1A = {
131+
CreatedOnToolsVersion = 6.0;
132+
};
133+
};
134+
};
135+
buildConfigurationList = 1589E152199126CA00E5DF1A /* Build configuration list for PBXProject "Snippets" */;
136+
compatibilityVersion = "Xcode 3.2";
137+
developmentRegion = English;
138+
hasScannedForEncodings = 0;
139+
knownRegions = (
140+
English,
141+
en,
142+
Base,
143+
);
144+
mainGroup = 1589E14E199126CA00E5DF1A;
145+
productRefGroup = 1589E158199126CA00E5DF1A /* Products */;
146+
projectDirPath = "";
147+
projectRoot = "";
148+
targets = (
149+
1589E156199126CA00E5DF1A /* Snippets */,
150+
);
151+
};
152+
/* End PBXProject section */
153+
154+
/* Begin PBXResourcesBuildPhase section */
155+
1589E155199126CA00E5DF1A /* Resources */ = {
156+
isa = PBXResourcesBuildPhase;
157+
buildActionMask = 2147483647;
158+
files = (
159+
1589E168199126CA00E5DF1A /* Images.xcassets in Resources */,
160+
151685FD19A515800063079C /* iPad.storyboard in Resources */,
161+
151685FB19A515770063079C /* iPhone.storyboard in Resources */,
162+
);
163+
runOnlyForDeploymentPostprocessing = 0;
164+
};
165+
/* End PBXResourcesBuildPhase section */
166+
167+
/* Begin PBXSourcesBuildPhase section */
168+
1589E153199126CA00E5DF1A /* Sources */ = {
169+
isa = PBXSourcesBuildPhase;
170+
buildActionMask = 2147483647;
171+
files = (
172+
1589E163199126CA00E5DF1A /* ViewController.m in Sources */,
173+
1F1409382E8D711700362718 /* SecureSignalsSnippet.m in Sources */,
174+
1589E160199126CA00E5DF1A /* AppDelegate.m in Sources */,
175+
1589E15D199126CA00E5DF1A /* main.m in Sources */,
176+
);
177+
runOnlyForDeploymentPostprocessing = 0;
178+
};
179+
/* End PBXSourcesBuildPhase section */
180+
181+
/* Begin PBXVariantGroup section */
182+
151685F919A515770063079C /* iPhone.storyboard */ = {
183+
isa = PBXVariantGroup;
184+
children = (
185+
151685FA19A515770063079C /* Base */,
186+
);
187+
name = iPhone.storyboard;
188+
sourceTree = "<group>";
189+
};
190+
/* End PBXVariantGroup section */
191+
192+
/* Begin XCBuildConfiguration section */
193+
1589E175199126CA00E5DF1A /* Debug */ = {
194+
isa = XCBuildConfiguration;
195+
buildSettings = {
196+
ALWAYS_SEARCH_USER_PATHS = NO;
197+
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
198+
CLANG_CXX_LIBRARY = "libc++";
199+
CLANG_ENABLE_MODULES = YES;
200+
CLANG_ENABLE_OBJC_ARC = YES;
201+
CLANG_WARN_BOOL_CONVERSION = YES;
202+
CLANG_WARN_CONSTANT_CONVERSION = YES;
203+
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
204+
CLANG_WARN_EMPTY_BODY = YES;
205+
CLANG_WARN_ENUM_CONVERSION = YES;
206+
CLANG_WARN_INT_CONVERSION = YES;
207+
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
208+
CLANG_WARN_UNREACHABLE_CODE = YES;
209+
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
210+
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
211+
COPY_PHASE_STRIP = NO;
212+
ENABLE_STRICT_OBJC_MSGSEND = YES;
213+
GCC_C_LANGUAGE_STANDARD = gnu99;
214+
GCC_DYNAMIC_NO_PIC = NO;
215+
GCC_OPTIMIZATION_LEVEL = 0;
216+
GCC_PREPROCESSOR_DEFINITIONS = (
217+
"DEBUG=1",
218+
"$(inherited)",
219+
);
220+
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
221+
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
222+
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
223+
GCC_WARN_UNDECLARED_SELECTOR = YES;
224+
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
225+
GCC_WARN_UNUSED_FUNCTION = YES;
226+
GCC_WARN_UNUSED_VARIABLE = YES;
227+
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
228+
MTL_ENABLE_DEBUG_INFO = YES;
229+
ONLY_ACTIVE_ARCH = YES;
230+
SDKROOT = iphoneos;
231+
TARGETED_DEVICE_FAMILY = "1,2";
232+
};
233+
name = Debug;
234+
};
235+
1589E176199126CA00E5DF1A /* Release */ = {
236+
isa = XCBuildConfiguration;
237+
buildSettings = {
238+
ALWAYS_SEARCH_USER_PATHS = NO;
239+
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
240+
CLANG_CXX_LIBRARY = "libc++";
241+
CLANG_ENABLE_MODULES = YES;
242+
CLANG_ENABLE_OBJC_ARC = YES;
243+
CLANG_WARN_BOOL_CONVERSION = YES;
244+
CLANG_WARN_CONSTANT_CONVERSION = YES;
245+
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
246+
CLANG_WARN_EMPTY_BODY = YES;
247+
CLANG_WARN_ENUM_CONVERSION = YES;
248+
CLANG_WARN_INT_CONVERSION = YES;
249+
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
250+
CLANG_WARN_UNREACHABLE_CODE = YES;
251+
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
252+
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
253+
COPY_PHASE_STRIP = YES;
254+
ENABLE_NS_ASSERTIONS = NO;
255+
ENABLE_STRICT_OBJC_MSGSEND = YES;
256+
GCC_C_LANGUAGE_STANDARD = gnu99;
257+
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
258+
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
259+
GCC_WARN_UNDECLARED_SELECTOR = YES;
260+
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
261+
GCC_WARN_UNUSED_FUNCTION = YES;
262+
GCC_WARN_UNUSED_VARIABLE = YES;
263+
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
264+
MTL_ENABLE_DEBUG_INFO = NO;
265+
SDKROOT = iphoneos;
266+
TARGETED_DEVICE_FAMILY = "1,2";
267+
VALIDATE_PRODUCT = YES;
268+
};
269+
name = Release;
270+
};
271+
1589E178199126CA00E5DF1A /* Debug */ = {
272+
isa = XCBuildConfiguration;
273+
buildSettings = {
274+
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
275+
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
276+
ENABLE_BITCODE = YES;
277+
INFOPLIST_FILE = Snippets/Info.plist;
278+
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
279+
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
280+
OTHER_LDFLAGS = "$(inherited)";
281+
PRODUCT_NAME = "$(TARGET_NAME)";
282+
};
283+
name = Debug;
284+
};
285+
1589E179199126CA00E5DF1A /* Release */ = {
286+
isa = XCBuildConfiguration;
287+
buildSettings = {
288+
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
289+
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
290+
ENABLE_BITCODE = YES;
291+
INFOPLIST_FILE = Snippets/Info.plist;
292+
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
293+
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
294+
OTHER_LDFLAGS = "$(inherited)";
295+
PRODUCT_NAME = "$(TARGET_NAME)";
296+
};
297+
name = Release;
298+
};
299+
/* End XCBuildConfiguration section */
300+
301+
/* Begin XCConfigurationList section */
302+
1589E152199126CA00E5DF1A /* Build configuration list for PBXProject "Snippets" */ = {
303+
isa = XCConfigurationList;
304+
buildConfigurations = (
305+
1589E175199126CA00E5DF1A /* Debug */,
306+
1589E176199126CA00E5DF1A /* Release */,
307+
);
308+
defaultConfigurationIsVisible = 0;
309+
defaultConfigurationName = Release;
310+
};
311+
1589E177199126CA00E5DF1A /* Build configuration list for PBXNativeTarget "Snippets" */ = {
312+
isa = XCConfigurationList;
313+
buildConfigurations = (
314+
1589E178199126CA00E5DF1A /* Debug */,
315+
1589E179199126CA00E5DF1A /* Release */,
316+
);
317+
defaultConfigurationIsVisible = 0;
318+
defaultConfigurationName = Release;
319+
};
320+
/* End XCConfigurationList section */
321+
};
322+
rootObject = 1589E14F199126CA00E5DF1A /* Project object */;
323+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#import <UIKit/UIKit.h>
2+
3+
@interface AppDelegate : UIResponder<UIApplicationDelegate>
4+
5+
@property(nonatomic, strong) UIWindow *window;
6+
7+
@end
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#import "AppDelegate.h"
2+
3+
@interface AppDelegate ()
4+
5+
@end
6+
7+
@implementation AppDelegate
8+
9+
- (BOOL)application:(UIApplication *)application
10+
didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
11+
// Override point for customization after application launch.
12+
return YES;
13+
}
14+
15+
@end

0 commit comments

Comments
 (0)