diff options
Diffstat (limited to 'media/webrtc/trunk/tools/gyp/test/ios')
100 files changed, 3100 insertions, 0 deletions
diff --git a/media/webrtc/trunk/tools/gyp/test/ios/app-bundle/TestApp/English.lproj/InfoPlist-error.strings b/media/webrtc/trunk/tools/gyp/test/ios/app-bundle/TestApp/English.lproj/InfoPlist-error.strings new file mode 100644 index 000000000..452e7fabf --- /dev/null +++ b/media/webrtc/trunk/tools/gyp/test/ios/app-bundle/TestApp/English.lproj/InfoPlist-error.strings @@ -0,0 +1,3 @@ +/* Localized versions of Info.plist keys */ + +NSHumanReadableCopyright = "Copyright ©2011 Google Inc." diff --git a/media/webrtc/trunk/tools/gyp/test/ios/app-bundle/TestApp/English.lproj/InfoPlist.strings b/media/webrtc/trunk/tools/gyp/test/ios/app-bundle/TestApp/English.lproj/InfoPlist.strings new file mode 100644 index 000000000..35bd33a96 --- /dev/null +++ b/media/webrtc/trunk/tools/gyp/test/ios/app-bundle/TestApp/English.lproj/InfoPlist.strings @@ -0,0 +1,3 @@ +/* Localized versions of Info.plist keys */ + +NSHumanReadableCopyright = "Copyright ©2011 Google Inc."; diff --git a/media/webrtc/trunk/tools/gyp/test/ios/app-bundle/TestApp/English.lproj/LanguageMap.plist b/media/webrtc/trunk/tools/gyp/test/ios/app-bundle/TestApp/English.lproj/LanguageMap.plist new file mode 100644 index 000000000..6b9488232 --- /dev/null +++ b/media/webrtc/trunk/tools/gyp/test/ios/app-bundle/TestApp/English.lproj/LanguageMap.plist @@ -0,0 +1,8 @@ +<?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>en</key> + <string>en</string> +</dict> +</plist> diff --git a/media/webrtc/trunk/tools/gyp/test/ios/app-bundle/TestApp/English.lproj/MainMenu.xib b/media/webrtc/trunk/tools/gyp/test/ios/app-bundle/TestApp/English.lproj/MainMenu.xib new file mode 100644 index 000000000..21b60448a --- /dev/null +++ b/media/webrtc/trunk/tools/gyp/test/ios/app-bundle/TestApp/English.lproj/MainMenu.xib @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="9060" systemVersion="15B42" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES"> + <dependencies> + <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="9051"/> + <capability name="Aspect ratio constraints" minToolsVersion="5.1"/> + <capability name="Constraints with non-1.0 multipliers" minToolsVersion="5.1"/> + </dependencies> + <objects> + <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/> + <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/> + <viewController id="Ssz-5V-cv2"> + <view key="view" contentMode="scaleToFill" id="tRS-Cx-RH3"> + </view> + <point key="canvasLocation" x="548" y="1086"/> + </viewController> + </objects> +</document> diff --git a/media/webrtc/trunk/tools/gyp/test/ios/app-bundle/TestApp/English.lproj/Main_iPhone.storyboard b/media/webrtc/trunk/tools/gyp/test/ios/app-bundle/TestApp/English.lproj/Main_iPhone.storyboard new file mode 100644 index 000000000..723bc8512 --- /dev/null +++ b/media/webrtc/trunk/tools/gyp/test/ios/app-bundle/TestApp/English.lproj/Main_iPhone.storyboard @@ -0,0 +1,27 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="1.0" toolsVersion="1906" systemVersion="11A511" targetRuntime="iOS.CocoaTouch" nextObjectID="6" propertyAccessControl="none" initialViewController="2"> + <dependencies> + <development defaultVersion="4200" identifier="xcode"/> + <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="902"/> + </dependencies> + <scenes> + <scene sceneID="5"> + <objects> + <placeholder placeholderIdentifier="IBFirstResponder" id="4" sceneMemberID="firstResponder"/> + <viewController id="2" customClass="ViewController" sceneMemberID="viewController"> + <view key="view" contentMode="scaleToFill" id="3"> + <rect key="frame" x="0.0" y="20" width="320" height="460"/> + <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/> + <subviews/> + <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/> + </view> + </viewController> + </objects> + </scene> + </scenes> + <simulatedMetricsContainer key="defaultSimulatedMetrics"> + <simulatedStatusBarMetrics key="statusBar"/> + <simulatedOrientationMetrics key="orientation"/> + <simulatedScreenMetrics key="destination"/> + </simulatedMetricsContainer> +</document> diff --git a/media/webrtc/trunk/tools/gyp/test/ios/app-bundle/TestApp/Images.xcassets/AppIcon.appiconset/Contents.json b/media/webrtc/trunk/tools/gyp/test/ios/app-bundle/TestApp/Images.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 000000000..2db2b1c7c --- /dev/null +++ b/media/webrtc/trunk/tools/gyp/test/ios/app-bundle/TestApp/Images.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,58 @@ +{ + "images" : [ + { + "idiom" : "mac", + "size" : "16x16", + "scale" : "1x" + }, + { + "idiom" : "mac", + "size" : "16x16", + "scale" : "2x" + }, + { + "idiom" : "mac", + "size" : "32x32", + "scale" : "1x" + }, + { + "idiom" : "mac", + "size" : "32x32", + "scale" : "2x" + }, + { + "idiom" : "mac", + "size" : "128x128", + "scale" : "1x" + }, + { + "idiom" : "mac", + "size" : "128x128", + "scale" : "2x" + }, + { + "idiom" : "mac", + "size" : "256x256", + "scale" : "1x" + }, + { + "idiom" : "mac", + "size" : "256x256", + "scale" : "2x" + }, + { + "idiom" : "mac", + "size" : "512x512", + "scale" : "1x" + }, + { + "idiom" : "mac", + "size" : "512x512", + "scale" : "2x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +}
\ No newline at end of file diff --git a/media/webrtc/trunk/tools/gyp/test/ios/app-bundle/TestApp/Images.xcassets/image.imageset/Contents.json b/media/webrtc/trunk/tools/gyp/test/ios/app-bundle/TestApp/Images.xcassets/image.imageset/Contents.json new file mode 100644 index 000000000..0a87b6edc --- /dev/null +++ b/media/webrtc/trunk/tools/gyp/test/ios/app-bundle/TestApp/Images.xcassets/image.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x", + "filename" : "super_sylvain.png" + }, + { + "idiom" : "universal", + "scale" : "2x", + "filename" : "super_sylvain@2x.png" + }, + { + "idiom" : "universal", + "scale" : "3x", + "filename" : "super_sylvain@3x.png" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +}
\ No newline at end of file diff --git a/media/webrtc/trunk/tools/gyp/test/ios/app-bundle/TestApp/Images.xcassets/image.imageset/super_sylvain.png b/media/webrtc/trunk/tools/gyp/test/ios/app-bundle/TestApp/Images.xcassets/image.imageset/super_sylvain.png Binary files differnew file mode 100644 index 000000000..0ba769182 --- /dev/null +++ b/media/webrtc/trunk/tools/gyp/test/ios/app-bundle/TestApp/Images.xcassets/image.imageset/super_sylvain.png diff --git a/media/webrtc/trunk/tools/gyp/test/ios/app-bundle/TestApp/Images.xcassets/image.imageset/super_sylvain@2x.png b/media/webrtc/trunk/tools/gyp/test/ios/app-bundle/TestApp/Images.xcassets/image.imageset/super_sylvain@2x.png Binary files differnew file mode 100644 index 000000000..edfa6a568 --- /dev/null +++ b/media/webrtc/trunk/tools/gyp/test/ios/app-bundle/TestApp/Images.xcassets/image.imageset/super_sylvain@2x.png diff --git a/media/webrtc/trunk/tools/gyp/test/ios/app-bundle/TestApp/Images.xcassets/image.imageset/super_sylvain@3x.png b/media/webrtc/trunk/tools/gyp/test/ios/app-bundle/TestApp/Images.xcassets/image.imageset/super_sylvain@3x.png Binary files differnew file mode 100644 index 000000000..e0652efc7 --- /dev/null +++ b/media/webrtc/trunk/tools/gyp/test/ios/app-bundle/TestApp/Images.xcassets/image.imageset/super_sylvain@3x.png diff --git a/media/webrtc/trunk/tools/gyp/test/ios/app-bundle/TestApp/TestApp-Info.plist b/media/webrtc/trunk/tools/gyp/test/ios/app-bundle/TestApp/TestApp-Info.plist new file mode 100644 index 000000000..bb9004368 --- /dev/null +++ b/media/webrtc/trunk/tools/gyp/test/ios/app-bundle/TestApp/TestApp-Info.plist @@ -0,0 +1,28 @@ +<?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>English</string> + <key>CFBundleExecutable</key> + <string>${EXECUTABLE_NAME}</string> + <key>CFBundleIdentifier</key> + <string>com.google.${PRODUCT_NAME}</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>CFBundleSignature</key> + <string>ause</string> + <key>CFBundleVersion</key> + <string>1</string> + <key>NSMainNibFile</key> + <string>MainMenu</string> + <key>NSPrincipalClass</key> + <string>NSApplication</string> +</dict> +</plist> diff --git a/media/webrtc/trunk/tools/gyp/test/ios/app-bundle/TestApp/check_no_signature.py b/media/webrtc/trunk/tools/gyp/test/ios/app-bundle/TestApp/check_no_signature.py new file mode 100644 index 000000000..4f6e34007 --- /dev/null +++ b/media/webrtc/trunk/tools/gyp/test/ios/app-bundle/TestApp/check_no_signature.py @@ -0,0 +1,13 @@ +#!/usr/bin/python + +import os +import subprocess +import sys + +p = os.path.join(os.environ['BUILT_PRODUCTS_DIR'],os.environ['EXECUTABLE_PATH']) +proc = subprocess.Popen(['codesign', '-v', p], + stderr=subprocess.STDOUT, stdout=subprocess.PIPE) +o = proc.communicate()[0].strip() +if "code object is not signed at all" not in o: + sys.stderr.write('File should not already be signed.') + sys.exit(1) diff --git a/media/webrtc/trunk/tools/gyp/test/ios/app-bundle/TestApp/main.m b/media/webrtc/trunk/tools/gyp/test/ios/app-bundle/TestApp/main.m new file mode 100644 index 000000000..ec93e0e23 --- /dev/null +++ b/media/webrtc/trunk/tools/gyp/test/ios/app-bundle/TestApp/main.m @@ -0,0 +1,13 @@ +// Copyright (c) 2011 Google Inc. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#import <UIKit/UIKit.h> + +int main(int argc, char *argv[]) +{ + NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init]; + int retVal = UIApplicationMain(argc, argv, nil, nil); + [pool release]; + return retVal; +} diff --git a/media/webrtc/trunk/tools/gyp/test/ios/app-bundle/TestApp/only-compile-in-32-bits.m b/media/webrtc/trunk/tools/gyp/test/ios/app-bundle/TestApp/only-compile-in-32-bits.m new file mode 100644 index 000000000..28bb11778 --- /dev/null +++ b/media/webrtc/trunk/tools/gyp/test/ios/app-bundle/TestApp/only-compile-in-32-bits.m @@ -0,0 +1,7 @@ +// Copyright (c) 2013 Google Inc. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#if defined(__LP64__) +# error 64-bit build +#endif diff --git a/media/webrtc/trunk/tools/gyp/test/ios/app-bundle/TestApp/only-compile-in-64-bits.m b/media/webrtc/trunk/tools/gyp/test/ios/app-bundle/TestApp/only-compile-in-64-bits.m new file mode 100644 index 000000000..e6d255841 --- /dev/null +++ b/media/webrtc/trunk/tools/gyp/test/ios/app-bundle/TestApp/only-compile-in-64-bits.m @@ -0,0 +1,7 @@ +// Copyright (c) 2013 Google Inc. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#if !defined(__LP64__) +# error 32-bit build +#endif diff --git a/media/webrtc/trunk/tools/gyp/test/ios/app-bundle/test-archs.gyp b/media/webrtc/trunk/tools/gyp/test/ios/app-bundle/test-archs.gyp new file mode 100644 index 000000000..fa935c4fb --- /dev/null +++ b/media/webrtc/trunk/tools/gyp/test/ios/app-bundle/test-archs.gyp @@ -0,0 +1,109 @@ +# Copyright (c) 2013 Google Inc. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. +{ + 'make_global_settings': [ + ['CC', '/usr/bin/clang'], + ], + 'target_defaults': { + 'mac_bundle_resources': [ + 'TestApp/English.lproj/InfoPlist.strings', + 'TestApp/English.lproj/MainMenu.xib', + ], + 'link_settings': { + 'libraries': [ + '$(SDKROOT)/System/Library/Frameworks/Foundation.framework', + '$(SDKROOT)/System/Library/Frameworks/UIKit.framework', + ], + }, + 'xcode_settings': { + 'OTHER_CFLAGS': [ + '-fobjc-abi-version=2', + ], + 'CODE_SIGNING_REQUIRED': 'NO', + 'SDKROOT': 'iphoneos', # -isysroot + 'TARGETED_DEVICE_FAMILY': '1,2', + 'INFOPLIST_FILE': 'TestApp/TestApp-Info.plist', + 'IPHONEOS_DEPLOYMENT_TARGET': '7.0', + 'CONFIGURATION_BUILD_DIR':'build/Default', + }, + }, + 'targets': [ + { + 'target_name': 'TestNoArchs', + 'product_name': 'TestNoArchs', + 'type': 'executable', + 'mac_bundle': 1, + 'sources': [ + 'TestApp/main.m', + 'TestApp/only-compile-in-32-bits.m', + ], + 'xcode_settings': { + 'VALID_ARCHS': [ + 'i386', + 'x86_64', + 'arm64', + 'armv7', + ], + } + }, + { + 'target_name': 'TestArch32Bits', + 'product_name': 'TestArch32Bits', + 'type': 'executable', + 'mac_bundle': 1, + 'sources': [ + 'TestApp/main.m', + 'TestApp/only-compile-in-32-bits.m', + ], + 'xcode_settings': { + 'ARCHS': [ + '$(ARCHS_STANDARD)', + ], + 'VALID_ARCHS': [ + 'i386', + 'armv7', + ], + }, + }, + { + 'target_name': 'TestArch64Bits', + 'product_name': 'TestArch64Bits', + 'type': 'executable', + 'mac_bundle': 1, + 'sources': [ + 'TestApp/main.m', + 'TestApp/only-compile-in-64-bits.m', + ], + 'xcode_settings': { + 'ARCHS': [ + '$(ARCHS_STANDARD_INCLUDING_64_BIT)', + ], + 'VALID_ARCHS': [ + 'x86_64', + 'arm64', + ], + }, + }, + { + 'target_name': 'TestMultiArchs', + 'product_name': 'TestMultiArchs', + 'type': 'executable', + 'mac_bundle': 1, + 'sources': [ + 'TestApp/main.m', + ], + 'xcode_settings': { + 'ARCHS': [ + '$(ARCHS_STANDARD_INCLUDING_64_BIT)', + ], + 'VALID_ARCHS': [ + 'x86_64', + 'i386', + 'arm64', + 'armv7', + ], + } + }, + ], +} diff --git a/media/webrtc/trunk/tools/gyp/test/ios/app-bundle/test-assets-catalog.gyp b/media/webrtc/trunk/tools/gyp/test/ios/app-bundle/test-assets-catalog.gyp new file mode 100644 index 000000000..9a12d07af --- /dev/null +++ b/media/webrtc/trunk/tools/gyp/test/ios/app-bundle/test-assets-catalog.gyp @@ -0,0 +1,45 @@ +# Copyright (c) 2011 Google Inc. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. +{ + 'conditions': [ + ['"<(GENERATOR)"=="ninja"', { + 'make_global_settings': [ + ['CC', '/usr/bin/clang'], + ['CXX', '/usr/bin/clang++'], + ], + }], + ], + 'targets': [ + { + 'target_name': 'test_app', + 'product_name': 'Test App Assets Catalog Gyp', + 'type': 'executable', + 'mac_bundle': 1, + 'sources': [ + 'TestApp/main.m', + ], + 'mac_bundle_resources': [ + 'TestApp/English.lproj/InfoPlist.strings', + 'TestApp/English.lproj/MainMenu.xib', + 'TestApp/English.lproj/Main_iPhone.storyboard', + 'TestApp/Images.xcassets', + ], + 'link_settings': { + 'libraries': [ + '$(SDKROOT)/System/Library/Frameworks/Foundation.framework', + '$(SDKROOT)/System/Library/Frameworks/UIKit.framework', + ], + }, + 'xcode_settings': { + 'OTHER_CFLAGS': [ + '-fobjc-abi-version=2', + ], + 'INFOPLIST_FILE': 'TestApp/TestApp-Info.plist', + 'SDKROOT': 'iphonesimulator', # -isysroot + 'IPHONEOS_DEPLOYMENT_TARGET': '7.0', + 'CONFIGURATION_BUILD_DIR':'build/Default', + }, + }, + ], +} diff --git a/media/webrtc/trunk/tools/gyp/test/ios/app-bundle/test-crosscompile.gyp b/media/webrtc/trunk/tools/gyp/test/ios/app-bundle/test-crosscompile.gyp new file mode 100644 index 000000000..d9049588b --- /dev/null +++ b/media/webrtc/trunk/tools/gyp/test/ios/app-bundle/test-crosscompile.gyp @@ -0,0 +1,47 @@ +# Copyright (c) 2014 Google Inc. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. +{ + 'make_global_settings': [ + ['CC', '/usr/bin/clang'], + ], + 'targets': [ + # This target will not be built, but is here so that ninja Xcode emulation + # understand this is a multi-platform (ios + mac) build. + { + 'target_name': 'TestDummy', + 'product_name': 'TestDummy', + 'toolsets': ['target'], + 'type': 'executable', + 'mac_bundle': 1, + 'sources': [ + 'tool_main.cc', + ], + 'xcode_settings': { + 'SDKROOT': 'iphonesimulator', # -isysroot + 'TARGETED_DEVICE_FAMILY': '1,2', + 'IPHONEOS_DEPLOYMENT_TARGET': '7.0', + }, + }, + { + 'target_name': 'TestHost', + 'product_name': 'TestHost', + 'toolsets': ['host'], + 'type': 'executable', + 'mac_bundle': 0, + 'sources': [ + 'tool_main.cc', + ], + 'xcode_settings': { + 'SDKROOT': 'macosx', + 'ARCHS': [ + '$(ARCHS_STANDARD)', + 'x86_64', + ], + 'VALID_ARCHS': [ + 'x86_64', + ], + } + } + ], +} diff --git a/media/webrtc/trunk/tools/gyp/test/ios/app-bundle/test-device.gyp b/media/webrtc/trunk/tools/gyp/test/ios/app-bundle/test-device.gyp new file mode 100644 index 000000000..a0cfff7cd --- /dev/null +++ b/media/webrtc/trunk/tools/gyp/test/ios/app-bundle/test-device.gyp @@ -0,0 +1,109 @@ +# Copyright (c) 2011 Google Inc. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. +{ + 'conditions': [ + ['"<(GENERATOR)"=="xcode"', { + 'target_defaults': { + 'configurations': { + 'Default': { + 'xcode_settings': { + 'SDKROOT': 'iphonesimulator', + 'CONFIGURATION_BUILD_DIR':'build/Default', + } + }, + 'Default-iphoneos': { + 'xcode_settings': { + 'SDKROOT': 'iphoneos', + 'CONFIGURATION_BUILD_DIR':'build/Default-iphoneos', + } + }, + }, + }, + }, { + 'target_defaults': { + 'configurations': { + 'Default': { + 'xcode_settings': { + 'SDKROOT': 'iphonesimulator', + } + }, + }, + }, + }], + ], + 'targets': [ + { + 'target_name': 'test_app', + 'product_name': 'Test App Gyp', + 'type': 'executable', + 'mac_bundle': 1, + 'sources': [ + 'TestApp/main.m', + ], + 'mac_bundle_resources': [ + 'TestApp/English.lproj/InfoPlist.strings', + 'TestApp/English.lproj/MainMenu.xib', + ], + 'link_settings': { + 'libraries': [ + '$(SDKROOT)/System/Library/Frameworks/Foundation.framework', + '$(SDKROOT)/System/Library/Frameworks/UIKit.framework', + ], + }, + 'xcode_settings': { + 'OTHER_CFLAGS': [ + '-fobjc-abi-version=2', + ], + 'SDKROOT': 'iphonesimulator', # -isysroot + 'TARGETED_DEVICE_FAMILY': '1,2', + 'INFOPLIST_OUTPUT_FORMAT':'xml', + 'GCC_VERSION': 'com.apple.compilers.llvm.clang.1_0', + 'INFOPLIST_FILE': 'TestApp/TestApp-Info.plist', + 'IPHONEOS_DEPLOYMENT_TARGET': '8.0', + 'CODE_SIGNING_REQUIRED': 'NO', + 'CODE_SIGN_IDENTITY[sdk=iphoneos*]': '', + + }, + }, + { + 'target_name': 'sig_test', + 'product_name': 'sigtest', + 'type': 'executable', + 'mac_bundle': 1, + 'sources': [ + 'TestApp/main.m', + ], + 'mac_bundle_resources': [ + 'TestApp/English.lproj/InfoPlist.strings', + 'TestApp/English.lproj/MainMenu.xib', + ], + 'link_settings': { + 'libraries': [ + '$(SDKROOT)/System/Library/Frameworks/Foundation.framework', + '$(SDKROOT)/System/Library/Frameworks/UIKit.framework', + ], + }, + 'postbuilds': [ + { + 'postbuild_name': 'Verify no signature', + 'action': [ + 'python', + 'TestApp/check_no_signature.py' + ], + }, + ], + 'xcode_settings': { + 'OTHER_CFLAGS': [ + '-fobjc-abi-version=2', + ], + 'SDKROOT': 'iphonesimulator', # -isysroot + 'CODE_SIGN_IDENTITY[sdk=iphoneos*]': 'iPhone Developer', + 'INFOPLIST_OUTPUT_FORMAT':'xml', + 'INFOPLIST_FILE': 'TestApp/TestApp-Info.plist', + 'IPHONEOS_DEPLOYMENT_TARGET': '8.0', + 'CONFIGURATION_BUILD_DIR':'buildsig/Default', + }, + }, + ], +} diff --git a/media/webrtc/trunk/tools/gyp/test/ios/app-bundle/test.gyp b/media/webrtc/trunk/tools/gyp/test/ios/app-bundle/test.gyp new file mode 100644 index 000000000..544c589f6 --- /dev/null +++ b/media/webrtc/trunk/tools/gyp/test/ios/app-bundle/test.gyp @@ -0,0 +1,75 @@ +# Copyright (c) 2011 Google Inc. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. +{ + 'conditions': [ + ['"<(GENERATOR)"=="ninja"', { + 'make_global_settings': [ + ['CC', '/usr/bin/clang'], + ['CXX', '/usr/bin/clang++'], + ], + }], + ], + 'targets': [ + { + 'target_name': 'test_app', + 'product_name': 'Test App Gyp', + 'type': 'executable', + 'mac_bundle': 1, + 'sources': [ + 'TestApp/main.m', + ], + 'mac_bundle_resources': [ + 'TestApp/English.lproj/InfoPlist.strings', + 'TestApp/English.lproj/LanguageMap.plist', + 'TestApp/English.lproj/MainMenu.xib', + 'TestApp/English.lproj/Main_iPhone.storyboard', + ], + 'link_settings': { + 'libraries': [ + '$(SDKROOT)/System/Library/Frameworks/Foundation.framework', + '$(SDKROOT)/System/Library/Frameworks/UIKit.framework', + ], + }, + 'xcode_settings': { + 'OTHER_CFLAGS': [ + '-fobjc-abi-version=2', + ], + 'INFOPLIST_FILE': 'TestApp/TestApp-Info.plist', + 'SDKROOT': 'iphonesimulator', # -isysroot + 'IPHONEOS_DEPLOYMENT_TARGET': '5.0', + 'CONFIGURATION_BUILD_DIR':'build/Default', + }, + }, + { + 'target_name': 'test_app_xml', + 'product_name': 'Test App Gyp XML', + 'type': 'executable', + 'mac_bundle': 1, + 'sources': [ + 'TestApp/main.m', + ], + 'mac_bundle_resources': [ + 'TestApp/English.lproj/InfoPlist.strings', + 'TestApp/English.lproj/MainMenu.xib', + 'TestApp/English.lproj/Main_iPhone.storyboard', + ], + 'link_settings': { + 'libraries': [ + '$(SDKROOT)/System/Library/Frameworks/Foundation.framework', + '$(SDKROOT)/System/Library/Frameworks/UIKit.framework', + ], + }, + 'xcode_settings': { + 'OTHER_CFLAGS': [ + '-fobjc-abi-version=2', + ], + 'INFOPLIST_FILE': 'TestApp/TestApp-Info.plist', + 'INFOPLIST_OUTPUT_FORMAT':'xml', + 'SDKROOT': 'iphonesimulator', # -isysroot + 'IPHONEOS_DEPLOYMENT_TARGET': '5.0', + 'CONFIGURATION_BUILD_DIR':'build/Default', + }, + }, + ], +} diff --git a/media/webrtc/trunk/tools/gyp/test/ios/app-bundle/tool_main.cc b/media/webrtc/trunk/tools/gyp/test/ios/app-bundle/tool_main.cc new file mode 100644 index 000000000..9dc3c94f3 --- /dev/null +++ b/media/webrtc/trunk/tools/gyp/test/ios/app-bundle/tool_main.cc @@ -0,0 +1,7 @@ +// Copyright (c) 2014 Google Inc. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +int main() { + return 0; +} diff --git a/media/webrtc/trunk/tools/gyp/test/ios/copies-with-xcode-envvars/Info.plist b/media/webrtc/trunk/tools/gyp/test/ios/copies-with-xcode-envvars/Info.plist new file mode 100644 index 000000000..a0985c3e4 --- /dev/null +++ b/media/webrtc/trunk/tools/gyp/test/ios/copies-with-xcode-envvars/Info.plist @@ -0,0 +1,24 @@ +<?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>English</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>CFBundleSignature</key> + <string>????</string> + <key>CFBundleVersion</key> + <string>1</string> +</dict> +</plist> diff --git a/media/webrtc/trunk/tools/gyp/test/ios/copies-with-xcode-envvars/copies-with-xcode-envvars.gyp b/media/webrtc/trunk/tools/gyp/test/ios/copies-with-xcode-envvars/copies-with-xcode-envvars.gyp new file mode 100644 index 000000000..217dbb047 --- /dev/null +++ b/media/webrtc/trunk/tools/gyp/test/ios/copies-with-xcode-envvars/copies-with-xcode-envvars.gyp @@ -0,0 +1,97 @@ +# Copyright (c) 2016 Mark Callow. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. +# +# For testing use of the UI settings & environment variables +# available in Xcode's PBXCopyFilesBuildPhase. +{ + 'targets': [ + { + 'target_name': 'copies-with-xcode-envvars', + 'type': 'executable', + 'mac_bundle': 1, + 'xcode_settings': { + 'SDKROOT': 'iphoneos', + 'TARGETED_DEVICE_FAMILY': '1,2', + 'IPHONEOS_DEPLOYMENT_TARGET': '7.0', + 'CODE_SIGNING_REQUIRED': 'NO', + 'INFOPLIST_FILE': 'Info.plist', + # This is where the test framework looks for results. Without + # this line the result will be in build/Default-iphoneos. + 'CONFIGURATION_BUILD_DIR':'build/Default', + }, + 'sources': [ 'empty.c' ], + 'conditions': [ + ['OS == "ios" or OS == "mac"', { + 'copies': [{ + 'destination': '$(BUILT_PRODUCTS_DIR)', + 'files': [ + 'file0', + ], + }, { + 'destination': '$(BUILT_PRODUCTS_DIR)/$(WRAPPER_NAME)', + 'files': [ + 'file1', + ], + }, { + 'destination': '<(PRODUCT_DIR)/$(EXECUTABLE_FOLDER_PATH)', + 'files': [ + 'file2', + ], + }, { + 'destination': '<(PRODUCT_DIR)/$(UNLOCALIZED_RESOURCES_FOLDER_PATH)', + 'files': [ + 'file3', + ], + }, { + 'destination': '<(PRODUCT_DIR)/$(UNLOCALIZED_RESOURCES_FOLDER_PATH)/testimages', + 'files': [ + 'file4', + ], + }, { + 'destination': '$(BUILT_PRODUCTS_DIR)/$(JAVA_FOLDER_PATH)', + 'files': [ + 'file5', + ], + }, { + 'destination': '<(PRODUCT_DIR)/$(FRAMEWORKS_FOLDER_PATH)', + 'files': [ + 'file6', + ], + }, { + # NOTE: This is not an Xcode macro name but + # xcodeproj_file.py recognizes it and sends + # the output to the same place as + # $(FRAMEWORKS_FOLDER_PATH). xcode_emulation.py + # sets its value to an absolute path. + 'destination': '$(BUILT_FRAMEWORKS_DIR)', + 'files': [ + 'file7', + ], + }, { + 'destination': '<(PRODUCT_DIR)/$(SHARED_FRAMEWORKS_FOLDER_PATH)', + 'files': [ + 'file8', + ], + }, { + 'destination': '<(PRODUCT_DIR)/$(SHARED_SUPPORT_FOLDER_PATH)', + 'files': [ + 'file9', + ], + }, { + 'destination': '<(PRODUCT_DIR)/$(PLUGINS_FOLDER_PATH)', + 'files': [ + 'file10', + ], + }, { + 'destination': '<(PRODUCT_DIR)/$(XPCSERVICES_FOLDER_PATH)', + 'files': [ + 'file11', + ], + }], # copies + }], # OS == "ios" or OS == "mac" + ], # conditions + }], # targets +} + +# vim:ai:ts=4:sts=4:sw=2:expandtab:textwidth=70 diff --git a/media/webrtc/trunk/tools/gyp/test/ios/copies-with-xcode-envvars/empty.c b/media/webrtc/trunk/tools/gyp/test/ios/copies-with-xcode-envvars/empty.c new file mode 100644 index 000000000..237c8ce18 --- /dev/null +++ b/media/webrtc/trunk/tools/gyp/test/ios/copies-with-xcode-envvars/empty.c @@ -0,0 +1 @@ +int main() {} diff --git a/media/webrtc/trunk/tools/gyp/test/ios/copies-with-xcode-envvars/file0 b/media/webrtc/trunk/tools/gyp/test/ios/copies-with-xcode-envvars/file0 new file mode 100644 index 000000000..117889361 --- /dev/null +++ b/media/webrtc/trunk/tools/gyp/test/ios/copies-with-xcode-envvars/file0 @@ -0,0 +1 @@ +file0 contents diff --git a/media/webrtc/trunk/tools/gyp/test/ios/copies-with-xcode-envvars/file1 b/media/webrtc/trunk/tools/gyp/test/ios/copies-with-xcode-envvars/file1 new file mode 100644 index 000000000..84d55c575 --- /dev/null +++ b/media/webrtc/trunk/tools/gyp/test/ios/copies-with-xcode-envvars/file1 @@ -0,0 +1 @@ +file1 contents diff --git a/media/webrtc/trunk/tools/gyp/test/ios/copies-with-xcode-envvars/file10 b/media/webrtc/trunk/tools/gyp/test/ios/copies-with-xcode-envvars/file10 new file mode 100644 index 000000000..372e992ef --- /dev/null +++ b/media/webrtc/trunk/tools/gyp/test/ios/copies-with-xcode-envvars/file10 @@ -0,0 +1 @@ +file10 contents diff --git a/media/webrtc/trunk/tools/gyp/test/ios/copies-with-xcode-envvars/file11 b/media/webrtc/trunk/tools/gyp/test/ios/copies-with-xcode-envvars/file11 new file mode 100644 index 000000000..923e760e1 --- /dev/null +++ b/media/webrtc/trunk/tools/gyp/test/ios/copies-with-xcode-envvars/file11 @@ -0,0 +1 @@ +file11 contents diff --git a/media/webrtc/trunk/tools/gyp/test/ios/copies-with-xcode-envvars/file2 b/media/webrtc/trunk/tools/gyp/test/ios/copies-with-xcode-envvars/file2 new file mode 100644 index 000000000..af1b8ae35 --- /dev/null +++ b/media/webrtc/trunk/tools/gyp/test/ios/copies-with-xcode-envvars/file2 @@ -0,0 +1 @@ +file2 contents diff --git a/media/webrtc/trunk/tools/gyp/test/ios/copies-with-xcode-envvars/file3 b/media/webrtc/trunk/tools/gyp/test/ios/copies-with-xcode-envvars/file3 new file mode 100644 index 000000000..43f16f352 --- /dev/null +++ b/media/webrtc/trunk/tools/gyp/test/ios/copies-with-xcode-envvars/file3 @@ -0,0 +1 @@ +file3 contents diff --git a/media/webrtc/trunk/tools/gyp/test/ios/copies-with-xcode-envvars/file4 b/media/webrtc/trunk/tools/gyp/test/ios/copies-with-xcode-envvars/file4 new file mode 100644 index 000000000..5f7270a08 --- /dev/null +++ b/media/webrtc/trunk/tools/gyp/test/ios/copies-with-xcode-envvars/file4 @@ -0,0 +1 @@ +file4 contents diff --git a/media/webrtc/trunk/tools/gyp/test/ios/copies-with-xcode-envvars/file5 b/media/webrtc/trunk/tools/gyp/test/ios/copies-with-xcode-envvars/file5 new file mode 100644 index 000000000..41f47186b --- /dev/null +++ b/media/webrtc/trunk/tools/gyp/test/ios/copies-with-xcode-envvars/file5 @@ -0,0 +1 @@ +file5 contents diff --git a/media/webrtc/trunk/tools/gyp/test/ios/copies-with-xcode-envvars/file6 b/media/webrtc/trunk/tools/gyp/test/ios/copies-with-xcode-envvars/file6 new file mode 100644 index 000000000..f5d575734 --- /dev/null +++ b/media/webrtc/trunk/tools/gyp/test/ios/copies-with-xcode-envvars/file6 @@ -0,0 +1 @@ +file6 contents diff --git a/media/webrtc/trunk/tools/gyp/test/ios/copies-with-xcode-envvars/file7 b/media/webrtc/trunk/tools/gyp/test/ios/copies-with-xcode-envvars/file7 new file mode 100644 index 000000000..90dbe6e9e --- /dev/null +++ b/media/webrtc/trunk/tools/gyp/test/ios/copies-with-xcode-envvars/file7 @@ -0,0 +1 @@ +file7 contents diff --git a/media/webrtc/trunk/tools/gyp/test/ios/copies-with-xcode-envvars/file8 b/media/webrtc/trunk/tools/gyp/test/ios/copies-with-xcode-envvars/file8 new file mode 100644 index 000000000..9eb613fab --- /dev/null +++ b/media/webrtc/trunk/tools/gyp/test/ios/copies-with-xcode-envvars/file8 @@ -0,0 +1 @@ +file8 contents diff --git a/media/webrtc/trunk/tools/gyp/test/ios/copies-with-xcode-envvars/file9 b/media/webrtc/trunk/tools/gyp/test/ios/copies-with-xcode-envvars/file9 new file mode 100644 index 000000000..e37ac72ad --- /dev/null +++ b/media/webrtc/trunk/tools/gyp/test/ios/copies-with-xcode-envvars/file9 @@ -0,0 +1 @@ +file9 contents diff --git a/media/webrtc/trunk/tools/gyp/test/ios/deployment-target/check-version-min.c b/media/webrtc/trunk/tools/gyp/test/ios/deployment-target/check-version-min.c new file mode 100644 index 000000000..761c52908 --- /dev/null +++ b/media/webrtc/trunk/tools/gyp/test/ios/deployment-target/check-version-min.c @@ -0,0 +1,33 @@ +/* Copyright (c) 2013 Google Inc. All rights reserved. + * Use of this source code is governed by a BSD-style license that can be + * found in the LICENSE file. */ + +#include <Availability.h> + +/* GYPTEST_MAC_VERSION_MIN: should be set to the corresponding value of + * xcode setting 'MACOSX_DEPLOYMENT_TARGET', otherwise both should be + * left undefined. + * + * GYPTEST_IOS_VERSION_MIN: should be set to the corresponding value of + * xcode setting 'IPHONEOS_DEPLOYMENT_TARGET', otherwise both should be + * left undefined. + */ + +#if defined(GYPTEST_MAC_VERSION_MIN) +# if GYPTEST_MAC_VERSION_MIN != __MAC_OS_X_VERSION_MIN_REQUIRED +# error __MAC_OS_X_VERSION_MIN_REQUIRED has wrong value +# endif +#elif defined(__MAC_OS_X_VERSION_MIN_REQUIRED) +# error __MAC_OS_X_VERSION_MIN_REQUIRED should be undefined +#endif + +#if defined(GYPTEST_IOS_VERSION_MIN) +# if GYPTEST_IOS_VERSION_MIN != __IPHONE_OS_VERSION_MIN_REQUIRED +# error __IPHONE_OS_VERSION_MIN_REQUIRED has wrong value +# endif +#elif defined(__IPHONE_OS_VERSION_MIN_REQUIRED) +# error __IPHONE_OS_VERSION_MIN_REQUIRED should be undefined +#endif + +int main() { return 0; } + diff --git a/media/webrtc/trunk/tools/gyp/test/ios/deployment-target/deployment-target.gyp b/media/webrtc/trunk/tools/gyp/test/ios/deployment-target/deployment-target.gyp new file mode 100644 index 000000000..bdc1439b5 --- /dev/null +++ b/media/webrtc/trunk/tools/gyp/test/ios/deployment-target/deployment-target.gyp @@ -0,0 +1,34 @@ +# Copyright (c) 2013 Google Inc. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. +{ + 'make_global_settings': [ + ['CC', '/usr/bin/clang'], + ['CXX', '/usr/bin/clang++'], + ], + 'targets': [ + { + 'target_name': 'version-min-4.3', + 'type': 'static_library', + 'sources': [ 'check-version-min.c', ], + 'defines': [ 'GYPTEST_IOS_VERSION_MIN=40300', ], + 'xcode_settings': { + 'GCC_VERSION': 'com.apple.compilers.llvm.clang.1_0', + 'SDKROOT': 'iphoneos', + 'IPHONEOS_DEPLOYMENT_TARGET': '4.3', + }, + }, + { + 'target_name': 'version-min-5.0', + 'type': 'static_library', + 'sources': [ 'check-version-min.c', ], + 'defines': [ 'GYPTEST_IOS_VERSION_MIN=50000', ], + 'xcode_settings': { + 'GCC_VERSION': 'com.apple.compilers.llvm.clang.1_0', + 'SDKROOT': 'iphoneos', + 'IPHONEOS_DEPLOYMENT_TARGET': '5.0', + }, + } + ], +} + diff --git a/media/webrtc/trunk/tools/gyp/test/ios/extension/ActionExtension/ActionViewController.h b/media/webrtc/trunk/tools/gyp/test/ios/extension/ActionExtension/ActionViewController.h new file mode 100644 index 000000000..1c9250902 --- /dev/null +++ b/media/webrtc/trunk/tools/gyp/test/ios/extension/ActionExtension/ActionViewController.h @@ -0,0 +1,9 @@ +// Copyright (c) 2014 Google Inc. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#import <UIKit/UIKit.h> + +@interface ActionViewController : UIViewController + +@end diff --git a/media/webrtc/trunk/tools/gyp/test/ios/extension/ActionExtension/ActionViewController.m b/media/webrtc/trunk/tools/gyp/test/ios/extension/ActionExtension/ActionViewController.m new file mode 100644 index 000000000..d37bacdae --- /dev/null +++ b/media/webrtc/trunk/tools/gyp/test/ios/extension/ActionExtension/ActionViewController.m @@ -0,0 +1,31 @@ +// Copyright (c) 2014 Google Inc. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#import "ActionViewController.h" +#import <MobileCoreServices/MobileCoreServices.h> + +@interface ActionViewController () + +@end + +@implementation ActionViewController + +- (void)viewDidLoad { + [super viewDidLoad]; +} + +- (void)didReceiveMemoryWarning { + [super didReceiveMemoryWarning]; + // Dispose of any resources that can be recreated. +} + +- (IBAction)done { + // Return any edited content to the host app. + // This template doesn't do anything, so we just echo the passed in items. + [self.extensionContext + completeRequestReturningItems:self.extensionContext.inputItems + completionHandler:nil]; +} + +@end diff --git a/media/webrtc/trunk/tools/gyp/test/ios/extension/ActionExtension/Info.plist b/media/webrtc/trunk/tools/gyp/test/ios/extension/ActionExtension/Info.plist new file mode 100644 index 000000000..f89cd790b --- /dev/null +++ b/media/webrtc/trunk/tools/gyp/test/ios/extension/ActionExtension/Info.plist @@ -0,0 +1,42 @@ +<?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>ActionExtension</string> + <key>CFBundleExecutable</key> + <string>${EXECUTABLE_NAME}</string> + <key>CFBundleIdentifier</key> + <string>com.google.gyptest.extension.ActionExtension</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>CFBundleSignature</key> + <string>????</string> + <key>CFBundleVersion</key> + <string>1</string> + <key>NSExtension</key> + <dict> + <key>NSExtensionAttributes</key> + <dict> + <key>NSExtensionActivationRule</key> + <string>TRUEPREDICATE</string> + <key>NSExtensionPointName</key> + <string>com.apple.ui-services</string> + <key>NSExtensionPointVersion</key> + <string>1.0</string> + </dict> + <key>NSExtensionMainStoryboard</key> + <string>MainInterface</string> + <key>NSExtensionPointIdentifier</key> + <string>com.apple.ui-services</string> + </dict> +</dict> +</plist> diff --git a/media/webrtc/trunk/tools/gyp/test/ios/extension/ActionExtension/MainInterface.storyboard b/media/webrtc/trunk/tools/gyp/test/ios/extension/ActionExtension/MainInterface.storyboard new file mode 100644 index 000000000..5aa58184e --- /dev/null +++ b/media/webrtc/trunk/tools/gyp/test/ios/extension/ActionExtension/MainInterface.storyboard @@ -0,0 +1,63 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="6148" systemVersion="14A229a" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" initialViewController="ObA-dk-sSI"> + <dependencies> + <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="6147"/> + </dependencies> + <scenes> + <!--Action View Controller - Image--> + <scene sceneID="7MM-of-jgj"> + <objects> + <viewController title="Image" id="ObA-dk-sSI" customClass="ActionViewController" customModuleProvider="" sceneMemberID="viewController"> + <layoutGuides> + <viewControllerLayoutGuide type="top" id="qkL-Od-lgU"/> + <viewControllerLayoutGuide type="bottom" id="n38-gi-rB5"/> + </layoutGuides> + <view key="view" contentMode="scaleToFill" id="zMn-AG-sqS"> + <rect key="frame" x="0.0" y="0.0" width="320" height="528"/> + <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> + <subviews> + <imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="9ga-4F-77Z"> + <rect key="frame" x="0.0" y="64" width="320" height="464"/> + </imageView> + <navigationBar contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="NOA-Dm-cuz"> + <rect key="frame" x="0.0" y="20" width="320" height="44"/> + <items> + <navigationItem id="3HJ-uW-3hn"> + <barButtonItem key="leftBarButtonItem" title="Done" style="done" id="WYi-yp-eM6"> + <connections> + <action selector="done" destination="ObA-dk-sSI" id="Qdu-qn-U6V"/> + </connections> + </barButtonItem> + </navigationItem> + </items> + </navigationBar> + </subviews> + <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/> + <constraints> + <constraint firstAttribute="trailing" secondItem="NOA-Dm-cuz" secondAttribute="trailing" id="A05-Pj-hrr"/> + <constraint firstItem="9ga-4F-77Z" firstAttribute="top" secondItem="NOA-Dm-cuz" secondAttribute="bottom" id="Fps-3D-QQW"/> + <constraint firstItem="NOA-Dm-cuz" firstAttribute="leading" secondItem="zMn-AG-sqS" secondAttribute="leading" id="HxO-8t-aoh"/> + <constraint firstAttribute="trailing" secondItem="9ga-4F-77Z" secondAttribute="trailing" id="Ozw-Hg-0yh"/> + <constraint firstItem="9ga-4F-77Z" firstAttribute="leading" secondItem="zMn-AG-sqS" secondAttribute="leading" id="XH5-ld-ONA"/> + <constraint firstItem="n38-gi-rB5" firstAttribute="top" secondItem="9ga-4F-77Z" secondAttribute="bottom" id="eQg-nn-Zy4"/> + <constraint firstItem="NOA-Dm-cuz" firstAttribute="top" secondItem="qkL-Od-lgU" secondAttribute="bottom" id="we0-1t-bgp"/> + </constraints> + </view> + <freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/> + <size key="freeformSize" width="320" height="528"/> + <connections> + <outlet property="imageView" destination="9ga-4F-77Z" id="5y6-5w-9QO"/> + <outlet property="view" destination="zMn-AG-sqS" id="Qma-de-2ek"/> + </connections> + </viewController> + <placeholder placeholderIdentifier="IBFirstResponder" id="X47-rx-isc" userLabel="First Responder" sceneMemberID="firstResponder"/> + </objects> + <point key="canvasLocation" x="252" y="-124"/> + </scene> + </scenes> + <simulatedMetricsContainer key="defaultSimulatedMetrics"> + <simulatedStatusBarMetrics key="statusBar"/> + <simulatedOrientationMetrics key="orientation"/> + <simulatedScreenMetrics key="destination" type="retina4"/> + </simulatedMetricsContainer> +</document> diff --git a/media/webrtc/trunk/tools/gyp/test/ios/extension/ExtensionContainer/AppDelegate.h b/media/webrtc/trunk/tools/gyp/test/ios/extension/ExtensionContainer/AppDelegate.h new file mode 100644 index 000000000..510e2300b --- /dev/null +++ b/media/webrtc/trunk/tools/gyp/test/ios/extension/ExtensionContainer/AppDelegate.h @@ -0,0 +1,12 @@ +// Copyright (c) 2014 Google Inc. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#import <UIKit/UIKit.h> + +@interface AppDelegate : UIResponder <UIApplicationDelegate> + +@property (strong, nonatomic) UIWindow *window; + +@end + diff --git a/media/webrtc/trunk/tools/gyp/test/ios/extension/ExtensionContainer/AppDelegate.m b/media/webrtc/trunk/tools/gyp/test/ios/extension/ExtensionContainer/AppDelegate.m new file mode 100644 index 000000000..1197bc1bb --- /dev/null +++ b/media/webrtc/trunk/tools/gyp/test/ios/extension/ExtensionContainer/AppDelegate.m @@ -0,0 +1,19 @@ +// Copyright (c) 2014 Google Inc. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#import "AppDelegate.h" + +@interface AppDelegate () + +@end + +@implementation AppDelegate + +- (BOOL)application:(UIApplication*)application + didFinishLaunchingWithOptions:(NSDictionary*)launchOptions { + // Override point for customization after application launch. + return YES; +} + +@end diff --git a/media/webrtc/trunk/tools/gyp/test/ios/extension/ExtensionContainer/Base.lproj/Main.storyboard b/media/webrtc/trunk/tools/gyp/test/ios/extension/ExtensionContainer/Base.lproj/Main.storyboard new file mode 100644 index 000000000..e8f3cfb40 --- /dev/null +++ b/media/webrtc/trunk/tools/gyp/test/ios/extension/ExtensionContainer/Base.lproj/Main.storyboard @@ -0,0 +1,25 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="6162" systemVersion="14A238h" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="BYZ-38-t0r"> + <dependencies> + <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="6160"/> + </dependencies> + <scenes> + <!--View Controller--> + <scene sceneID="tne-QT-ifu"> + <objects> + <viewController id="BYZ-38-t0r" customClass="ViewController" customModuleProvider="" 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="480" height="480"/> + <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> + <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/> + </view> + </viewController> + <placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/> + </objects> + </scene> + </scenes> +</document> diff --git a/media/webrtc/trunk/tools/gyp/test/ios/extension/ExtensionContainer/Images.xcassets/AppIcon.appiconset/Contents.json b/media/webrtc/trunk/tools/gyp/test/ios/extension/ExtensionContainer/Images.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 000000000..f697f61f4 --- /dev/null +++ b/media/webrtc/trunk/tools/gyp/test/ios/extension/ExtensionContainer/Images.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,53 @@ +{ + "images" : [ + { + "idiom" : "iphone", + "size" : "29x29", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "40x40", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "60x60", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "29x29", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "29x29", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "40x40", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "40x40", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "76x76", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "76x76", + "scale" : "2x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} diff --git a/media/webrtc/trunk/tools/gyp/test/ios/extension/ExtensionContainer/Images.xcassets/LaunchImage.launchimage/Contents.json b/media/webrtc/trunk/tools/gyp/test/ios/extension/ExtensionContainer/Images.xcassets/LaunchImage.launchimage/Contents.json new file mode 100644 index 000000000..4458b40c0 --- /dev/null +++ b/media/webrtc/trunk/tools/gyp/test/ios/extension/ExtensionContainer/Images.xcassets/LaunchImage.launchimage/Contents.json @@ -0,0 +1,51 @@ +{ + "images" : [ + { + "orientation" : "portrait", + "idiom" : "iphone", + "extent" : "full-screen", + "minimum-system-version" : "7.0", + "scale" : "2x" + }, + { + "orientation" : "portrait", + "idiom" : "iphone", + "subtype" : "retina4", + "extent" : "full-screen", + "minimum-system-version" : "7.0", + "scale" : "2x" + }, + { + "orientation" : "portrait", + "idiom" : "ipad", + "extent" : "full-screen", + "minimum-system-version" : "7.0", + "scale" : "1x" + }, + { + "orientation" : "landscape", + "idiom" : "ipad", + "extent" : "full-screen", + "minimum-system-version" : "7.0", + "scale" : "1x" + }, + { + "orientation" : "portrait", + "idiom" : "ipad", + "extent" : "full-screen", + "minimum-system-version" : "7.0", + "scale" : "2x" + }, + { + "orientation" : "landscape", + "idiom" : "ipad", + "extent" : "full-screen", + "minimum-system-version" : "7.0", + "scale" : "2x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} diff --git a/media/webrtc/trunk/tools/gyp/test/ios/extension/ExtensionContainer/Info.plist b/media/webrtc/trunk/tools/gyp/test/ios/extension/ExtensionContainer/Info.plist new file mode 100644 index 000000000..31ccf4cc8 --- /dev/null +++ b/media/webrtc/trunk/tools/gyp/test/ios/extension/ExtensionContainer/Info.plist @@ -0,0 +1,32 @@ +<?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>CFBundleExecutable</key> + <string>ExtensionContainer</string> + <key>CFBundleIdentifier</key> + <string>com.google.gyptest.extension</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>CFBundleSignature</key> + <string>????</string> + <key>CFBundleVersion</key> + <string>1</string> + <key>LSRequiresIPhoneOS</key> + <true/> + <key>UIMainStoryboardFile</key> + <string>Main</string> + <key>UIRequiredDeviceCapabilities</key> + <array> + <string>armv7</string> + </array> +</dict> +</plist> diff --git a/media/webrtc/trunk/tools/gyp/test/ios/extension/ExtensionContainer/ViewController.h b/media/webrtc/trunk/tools/gyp/test/ios/extension/ExtensionContainer/ViewController.h new file mode 100644 index 000000000..fad775471 --- /dev/null +++ b/media/webrtc/trunk/tools/gyp/test/ios/extension/ExtensionContainer/ViewController.h @@ -0,0 +1,11 @@ +// Copyright (c) 2014 Google Inc. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#import <UIKit/UIKit.h> + +@interface ViewController : UIViewController + + +@end + diff --git a/media/webrtc/trunk/tools/gyp/test/ios/extension/ExtensionContainer/ViewController.m b/media/webrtc/trunk/tools/gyp/test/ios/extension/ExtensionContainer/ViewController.m new file mode 100644 index 000000000..3810fa9cb --- /dev/null +++ b/media/webrtc/trunk/tools/gyp/test/ios/extension/ExtensionContainer/ViewController.m @@ -0,0 +1,24 @@ +// Copyright (c) 2014 Google Inc. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#import "ViewController.h" + +@interface ViewController () + + +@end + +@implementation ViewController + +- (void)viewDidLoad { + [super viewDidLoad]; + // Do any additional setup after loading the view, typically from a nib. +} + +- (void)didReceiveMemoryWarning { + [super didReceiveMemoryWarning]; + // Dispose of any resources that can be recreated. +} + +@end diff --git a/media/webrtc/trunk/tools/gyp/test/ios/extension/ExtensionContainer/main.m b/media/webrtc/trunk/tools/gyp/test/ios/extension/ExtensionContainer/main.m new file mode 100644 index 000000000..47aecb514 --- /dev/null +++ b/media/webrtc/trunk/tools/gyp/test/ios/extension/ExtensionContainer/main.m @@ -0,0 +1,13 @@ +// Copyright (c) 2014 Google Inc. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. +// +#import <UIKit/UIKit.h> +#import "AppDelegate.h" + +int main(int argc, char* argv[]) { + @autoreleasepool { + return UIApplicationMain(argc, argv, nil, + NSStringFromClass([AppDelegate class])); + } +} diff --git a/media/webrtc/trunk/tools/gyp/test/ios/extension/extension.gyp b/media/webrtc/trunk/tools/gyp/test/ios/extension/extension.gyp new file mode 100644 index 000000000..91c068413 --- /dev/null +++ b/media/webrtc/trunk/tools/gyp/test/ios/extension/extension.gyp @@ -0,0 +1,91 @@ +# Copyright (c) 2014 Google Inc. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +{ + 'make_global_settings': [ + ['CC', '/usr/bin/clang'], + ['CXX', '/usr/bin/clang++'], + ], + 'targets': [ + { + 'target_name': 'ExtensionContainer', + 'product_name': 'ExtensionContainer', + 'type': 'executable', + 'mac_bundle': 1, + 'mac_bundle_resources': [ + 'ExtensionContainer/Base.lproj/Main.storyboard', + ], + 'sources': [ + 'ExtensionContainer/AppDelegate.h', + 'ExtensionContainer/AppDelegate.m', + 'ExtensionContainer/ViewController.h', + 'ExtensionContainer/ViewController.m', + 'ExtensionContainer/main.m', + ], + 'copies': [ + { + 'destination': '<(PRODUCT_DIR)/ExtensionContainer.app/PlugIns', + 'files': [ + '<(PRODUCT_DIR)/ActionExtension.appex', + ]}], + 'dependencies': [ + 'ActionExtension' + ], + + 'link_settings': { + 'libraries': [ + '$(SDKROOT)/System/Library/Frameworks/Foundation.framework', + '$(SDKROOT)/System/Library/Frameworks/UIKit.framework', + ], + }, + 'xcode_settings': { + 'OTHER_CFLAGS': [ + '-fobjc-abi-version=2', + ], + 'INFOPLIST_FILE': 'ExtensionContainer/Info.plist', + 'GCC_VERSION': 'com.apple.compilers.llvm.clang.1_0', + 'ARCHS': [ 'armv7' ], + 'SDKROOT': 'iphoneos', + 'IPHONEOS_DEPLOYMENT_TARGET': '7.0', + 'CODE_SIGNING_REQUIRED': 'NO', + 'DEPLOYMENT_POSTPROCESSING': 'YES', + 'STRIP_INSTALLED_PRODUCT': 'YES', + 'CONFIGURATION_BUILD_DIR':'build/Default', + }, + }, + { + 'target_name': 'ActionExtension', + 'product_name': 'ActionExtension', + 'type': 'executable', + 'mac_bundle': 1, + 'ios_app_extension': 1, + 'sources': [ + 'ActionExtension/ActionViewController.h', + 'ActionExtension/ActionViewController.m', + ], + 'link_settings': { + 'libraries': [ + '$(SDKROOT)/System/Library/Frameworks/Foundation.framework', + '$(SDKROOT)/System/Library/Frameworks/UIKit.framework', + '$(SDKROOT)/System/Library/Frameworks/MobileCoreServices.framework', + ], + }, + 'xcode_settings': { + 'OTHER_CFLAGS': [ + '-fobjc-abi-version=2', + ], + 'INFOPLIST_FILE': 'ActionExtension/Info.plist', + 'GCC_VERSION': 'com.apple.compilers.llvm.clang.1_0', + 'ARCHS': [ 'armv7' ], + 'SDKROOT': 'iphoneos', + 'IPHONEOS_DEPLOYMENT_TARGET': '7.0', + 'CODE_SIGNING_REQUIRED': 'NO', + 'DEPLOYMENT_POSTPROCESSING': 'YES', + 'STRIP_INSTALLED_PRODUCT': 'YES', + 'CONFIGURATION_BUILD_DIR':'build/Default', + }, + }, + ], +} + diff --git a/media/webrtc/trunk/tools/gyp/test/ios/framework/framework.gyp b/media/webrtc/trunk/tools/gyp/test/ios/framework/framework.gyp new file mode 100644 index 000000000..2c6fdd5b2 --- /dev/null +++ b/media/webrtc/trunk/tools/gyp/test/ios/framework/framework.gyp @@ -0,0 +1,43 @@ +# Copyright 2016 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +{ + 'targets': [ + { + 'target_name': 'iOSFramework', + 'type': 'shared_library', + 'mac_bundle': 1, + 'sources': [ + 'iOSFramework/iOSFramework.h', + 'iOSFramework/Thing.h', + 'iOSFramework/Thing.m', + ], + 'link_settings': { + 'libraries': [ + '$(SDKROOT)/System/Library/Frameworks/Foundation.framework', + '$(SDKROOT)/System/Library/Frameworks/UIKit.framework', + ], + }, + 'mac_framework_headers': [ + # Using two headers here tests mac_tool.py NextGreaterPowerOf2. + 'iOSFramework/iOSFramework.h', + 'iOSFramework/Thing.h', + ], + 'mac_framework_dirs': [ + '$(SDKROOT)/../../Library/Frameworks', + ], + 'xcode_settings': { + 'OTHER_CFLAGS': [ + '-fobjc-abi-version=2', + ], + 'INFOPLIST_FILE': 'iOSFramework/Info.plist', + 'GCC_VERSION': 'com.apple.compilers.llvm.clang.1_0', + 'SDKROOT': 'iphoneos', + 'IPHONEOS_DEPLOYMENT_TARGET': '8.0', + 'CONFIGURATION_BUILD_DIR':'build/Default', + 'CODE_SIGN_IDENTITY[sdk=iphoneos*]': 'iPhone Developer', + }, + }, + ], +} diff --git a/media/webrtc/trunk/tools/gyp/test/ios/framework/iOSFramework/Info.plist b/media/webrtc/trunk/tools/gyp/test/ios/framework/iOSFramework/Info.plist new file mode 100644 index 000000000..d3de8eefb --- /dev/null +++ b/media/webrtc/trunk/tools/gyp/test/ios/framework/iOSFramework/Info.plist @@ -0,0 +1,26 @@ +<?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>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>FMWK</string> + <key>CFBundleShortVersionString</key> + <string>1.0</string> + <key>CFBundleSignature</key> + <string>????</string> + <key>CFBundleVersion</key> + <string>$(CURRENT_PROJECT_VERSION)</string> + <key>NSPrincipalClass</key> + <string></string> +</dict> +</plist> diff --git a/media/webrtc/trunk/tools/gyp/test/ios/framework/iOSFramework/Thing.h b/media/webrtc/trunk/tools/gyp/test/ios/framework/iOSFramework/Thing.h new file mode 100644 index 000000000..a34e908fc --- /dev/null +++ b/media/webrtc/trunk/tools/gyp/test/ios/framework/iOSFramework/Thing.h @@ -0,0 +1,10 @@ +#import <Foundation/Foundation.h> +#import <UIKit/UIKit.h> + +@interface Thing : NSObject + ++ (instancetype)thing; + +- (void)sayHello; + +@end diff --git a/media/webrtc/trunk/tools/gyp/test/ios/framework/iOSFramework/Thing.m b/media/webrtc/trunk/tools/gyp/test/ios/framework/iOSFramework/Thing.m new file mode 100644 index 000000000..5b2b54925 --- /dev/null +++ b/media/webrtc/trunk/tools/gyp/test/ios/framework/iOSFramework/Thing.m @@ -0,0 +1,22 @@ +#import "Thing.h" + +@interface Thing () + +@end + +@implementation Thing + ++ (instancetype)thing { + static Thing* thing = nil; + static dispatch_once_t onceToken; + dispatch_once(&onceToken, ^{ + thing = [[[self class] alloc] init]; + }); + return thing; +} + +- (void)sayHello { + NSLog(@"Hello World"); +} + +@end diff --git a/media/webrtc/trunk/tools/gyp/test/ios/framework/iOSFramework/iOSFramework.h b/media/webrtc/trunk/tools/gyp/test/ios/framework/iOSFramework/iOSFramework.h new file mode 100644 index 000000000..e86b524d1 --- /dev/null +++ b/media/webrtc/trunk/tools/gyp/test/ios/framework/iOSFramework/iOSFramework.h @@ -0,0 +1,9 @@ +#import <UIKit/UIKit.h> + +//! Project version number for iOSFramework. +FOUNDATION_EXPORT double iOSFrameworkVersionNumber; + +//! Project version string for iOSFramework. +FOUNDATION_EXPORT const unsigned char iOSFrameworkVersionString[]; + +#import <iOSFramework/Thing.h> diff --git a/media/webrtc/trunk/tools/gyp/test/ios/gyptest-app-ios-assets-catalog.py b/media/webrtc/trunk/tools/gyp/test/ios/gyptest-app-ios-assets-catalog.py new file mode 100755 index 000000000..efd96ac75 --- /dev/null +++ b/media/webrtc/trunk/tools/gyp/test/ios/gyptest-app-ios-assets-catalog.py @@ -0,0 +1,57 @@ +#!/usr/bin/env python + +# Copyright (c) 2012 Google Inc. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +""" +Verifies that ios app bundles are built correctly. +""" + +import TestGyp +import TestMac + +import os.path +import sys + +# Xcode supports for assets catalog was introduced in Xcode 6.0 +if sys.platform == 'darwin' and TestMac.Xcode.Version() >= '0600': + test_gyp_path = 'test-assets-catalog.gyp' + test_app_path = 'Test App Assets Catalog Gyp.app' + + test = TestGyp.TestGyp(formats=['xcode', 'ninja']) + test.run_gyp(test_gyp_path, chdir='app-bundle') + test.build(test_gyp_path, test.ALL, chdir='app-bundle') + + # Test that the extension is .bundle + test.built_file_must_exist( + os.path.join(test_app_path, 'Test App Assets Catalog Gyp'), + chdir='app-bundle') + + # Info.plist + info_plist = test.built_file_path( + os.path.join(test_app_path, 'Info.plist'), + chdir='app-bundle') + # Resources + test.built_file_must_exist( + os.path.join(test_app_path, 'English.lproj/InfoPlist.strings'), + chdir='app-bundle') + test.built_file_must_exist( + os.path.join(test_app_path, 'English.lproj/MainMenu.nib'), + chdir='app-bundle') + test.built_file_must_exist( + os.path.join(test_app_path, 'English.lproj/Main_iPhone.storyboardc'), + chdir='app-bundle') + test.built_file_must_exist( + os.path.join(test_app_path, 'Assets.car'), + chdir='app-bundle') + + # Packaging + test.built_file_must_exist( + os.path.join(test_app_path, 'PkgInfo'), + chdir='app-bundle') + test.built_file_must_match( + os.path.join(test_app_path, 'PkgInfo'), 'APPLause', + chdir='app-bundle') + + test.pass_test() diff --git a/media/webrtc/trunk/tools/gyp/test/ios/gyptest-app-ios.py b/media/webrtc/trunk/tools/gyp/test/ios/gyptest-app-ios.py new file mode 100755 index 000000000..f9052549d --- /dev/null +++ b/media/webrtc/trunk/tools/gyp/test/ios/gyptest-app-ios.py @@ -0,0 +1,77 @@ +#!/usr/bin/env python + +# Copyright (c) 2012 Google Inc. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +""" +Verifies that ios app bundles are built correctly. +""" + +import TestGyp + +import subprocess +import sys + +def CheckFileXMLPropertyList(file): + output = subprocess.check_output(['file', file]) + # The double space after XML is intentional. + if not 'XML document text' in output: + print 'File: Expected XML document text, got %s' % output + test.fail_test() + +def CheckFileBinaryPropertyList(file): + output = subprocess.check_output(['file', file]) + if not 'Apple binary property list' in output: + print 'File: Expected Apple binary property list, got %s' % output + test.fail_test() + +if sys.platform == 'darwin': + test = TestGyp.TestGyp(formats=['xcode', 'ninja']) + + test.run_gyp('test.gyp', chdir='app-bundle') + + test.build('test.gyp', test.ALL, chdir='app-bundle') + + # Test that the extension is .bundle + test.built_file_must_exist('Test App Gyp.app/Test App Gyp', + chdir='app-bundle') + + # Info.plist + info_plist = test.built_file_path('Test App Gyp.app/Info.plist', + chdir='app-bundle') + test.built_file_must_exist(info_plist) + CheckFileBinaryPropertyList(info_plist) + + # XML Info.plist + info_plist = test.built_file_path('Test App Gyp XML.app/Info.plist', + chdir='app-bundle') + CheckFileXMLPropertyList(info_plist) + + # Resources + strings_file = test.built_file_path( + 'Test App Gyp.app/English.lproj/InfoPlist.strings', + chdir='app-bundle') + test.built_file_must_exist(strings_file) + CheckFileBinaryPropertyList(strings_file) + + extra_plist_file = test.built_file_path( + 'Test App Gyp.app/English.lproj/LanguageMap.plist', + chdir='app-bundle') + test.built_file_must_exist(extra_plist_file) + CheckFileBinaryPropertyList(extra_plist_file) + + test.built_file_must_exist( + 'Test App Gyp.app/English.lproj/MainMenu.nib', + chdir='app-bundle') + test.built_file_must_exist( + 'Test App Gyp.app/English.lproj/Main_iPhone.storyboardc', + chdir='app-bundle') + + # Packaging + test.built_file_must_exist('Test App Gyp.app/PkgInfo', + chdir='app-bundle') + test.built_file_must_match('Test App Gyp.app/PkgInfo', 'APPLause', + chdir='app-bundle') + + test.pass_test() diff --git a/media/webrtc/trunk/tools/gyp/test/ios/gyptest-archs.py b/media/webrtc/trunk/tools/gyp/test/ios/gyptest-archs.py new file mode 100644 index 000000000..c653d997a --- /dev/null +++ b/media/webrtc/trunk/tools/gyp/test/ios/gyptest-archs.py @@ -0,0 +1,58 @@ +#!/usr/bin/env python + +# Copyright (c) 2013 Google Inc. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +""" +Verifies that device and simulator bundles are built correctly. +""" + +import TestGyp +import TestMac + +import collections +import sys + + +if sys.platform == 'darwin': + test = TestGyp.TestGyp(formats=['ninja', 'xcode']) + + test_cases = [ + ('Default', 'TestArch32Bits', ['i386']), + ('Default-iphoneos', 'TestArch32Bits', ['armv7']), + ] + + if TestMac.Xcode.Version() < '0510': + test_cases.extend([ + ('Default', 'TestNoArchs', ['i386']), + ('Default-iphoneos', 'TestNoArchs', ['armv7'])]) + + if TestMac.Xcode.Version() >= '0500': + test_cases.extend([ + ('Default', 'TestArch64Bits', ['x86_64']), + ('Default', 'TestMultiArchs', ['i386', 'x86_64']), + ('Default-iphoneos', 'TestArch64Bits', ['arm64']), + ('Default-iphoneos', 'TestMultiArchs', ['armv7', 'arm64'])]) + + test.run_gyp('test-archs.gyp', chdir='app-bundle') + for configuration, target, archs in test_cases: + is_device_build = configuration.endswith('-iphoneos') + + kwds = collections.defaultdict(list) + if test.format == 'xcode': + if is_device_build: + configuration, sdk = configuration.split('-') + kwds['arguments'].extend(['-sdk', sdk]) + if TestMac.Xcode.Version() < '0500': + kwds['arguments'].extend(['-arch', archs[0]]) + + test.set_configuration(configuration) + filename = '%s.app/%s' % (target, target) + test.build('test-archs.gyp', target, chdir='app-bundle', **kwds) + result_file = test.built_file_path(filename, chdir='app-bundle') + + test.must_exist(result_file) + TestMac.CheckFileType(test, result_file, archs) + + test.pass_test() diff --git a/media/webrtc/trunk/tools/gyp/test/ios/gyptest-copies-with-xcode-envvars.py b/media/webrtc/trunk/tools/gyp/test/ios/gyptest-copies-with-xcode-envvars.py new file mode 100644 index 000000000..88d9e028b --- /dev/null +++ b/media/webrtc/trunk/tools/gyp/test/ios/gyptest-copies-with-xcode-envvars.py @@ -0,0 +1,65 @@ +#!/usr/bin/env python + +# Copyright (c) 2016 Mark Callow. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +""" +Verifies that files are copied to the correct destinations when those +destinations are specified using environment variables available in +Xcode's PBXCopyFilesBuildPhase. +""" + +import TestGyp + +import os +import stat +import sys + + +test = TestGyp.TestGyp(formats=['ninja', 'xcode']) + +if sys.platform == 'darwin': + test.run_gyp('copies-with-xcode-envvars.gyp', + chdir='copies-with-xcode-envvars') + + test.build('copies-with-xcode-envvars.gyp', chdir='copies-with-xcode-envvars') + + wrapper_name = 'copies-with-xcode-envvars.app/' + contents_path = wrapper_name + out_path = test.built_file_path('file0', chdir='copies-with-xcode-envvars') + test.must_contain(out_path, 'file0 contents\n') + out_path = test.built_file_path(wrapper_name + 'file1', + chdir='copies-with-xcode-envvars') + test.must_contain(out_path, 'file1 contents\n') + out_path = test.built_file_path(contents_path + 'file2', + chdir='copies-with-xcode-envvars') + test.must_contain(out_path, 'file2 contents\n') + out_path = test.built_file_path(contents_path + 'file3', + chdir='copies-with-xcode-envvars') + test.must_contain(out_path, 'file3 contents\n') + out_path = test.built_file_path(contents_path + 'testimages/file4', + chdir='copies-with-xcode-envvars') + test.must_contain(out_path, 'file4 contents\n') + out_path = test.built_file_path(contents_path + 'Java/file5', + chdir='copies-with-xcode-envvars') + test.must_contain(out_path, 'file5 contents\n') + out_path = test.built_file_path(contents_path + 'Frameworks/file6', + chdir='copies-with-xcode-envvars') + test.must_contain(out_path, 'file6 contents\n') + out_path = test.built_file_path(contents_path + 'Frameworks/file7', + chdir='copies-with-xcode-envvars') + test.must_contain(out_path, 'file7 contents\n') + out_path = test.built_file_path(contents_path + 'SharedFrameworks/file8', + chdir='copies-with-xcode-envvars') + test.must_contain(out_path, 'file8 contents\n') + out_path = test.built_file_path(contents_path + 'SharedSupport/file9', + chdir='copies-with-xcode-envvars') + test.must_contain(out_path, 'file9 contents\n') + out_path = test.built_file_path(contents_path + 'PlugIns/file10', + chdir='copies-with-xcode-envvars') + test.must_contain(out_path, 'file10 contents\n') + out_path = test.built_file_path(contents_path + 'XPCServices/file11', + chdir='copies-with-xcode-envvars') + test.must_contain(out_path, 'file11 contents\n') + test.pass_test() diff --git a/media/webrtc/trunk/tools/gyp/test/ios/gyptest-crosscompile.py b/media/webrtc/trunk/tools/gyp/test/ios/gyptest-crosscompile.py new file mode 100644 index 000000000..a0816836e --- /dev/null +++ b/media/webrtc/trunk/tools/gyp/test/ios/gyptest-crosscompile.py @@ -0,0 +1,34 @@ +#!/usr/bin/env python + +# Copyright (c) 2014 Google Inc. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +""" +Verifies that tools are built correctly. +""" + +import TestGyp +import TestMac + +import sys +import os + +if sys.platform == 'darwin': + test = TestGyp.TestGyp(formats=['ninja', 'xcode']) + + oldenv = os.environ.copy() + try: + os.environ['GYP_CROSSCOMPILE'] = '1' + test.run_gyp('test-crosscompile.gyp', chdir='app-bundle') + finally: + os.environ.clear() + os.environ.update(oldenv) + + test.set_configuration('Default') + test.build('test-crosscompile.gyp', 'TestHost', chdir='app-bundle') + result_file = test.built_file_path('TestHost', chdir='app-bundle') + test.must_exist(result_file) + TestMac.CheckFileType(test, result_file, ['x86_64']) + + test.pass_test() diff --git a/media/webrtc/trunk/tools/gyp/test/ios/gyptest-deployment-target.py b/media/webrtc/trunk/tools/gyp/test/ios/gyptest-deployment-target.py new file mode 100644 index 000000000..6c09d9dc0 --- /dev/null +++ b/media/webrtc/trunk/tools/gyp/test/ios/gyptest-deployment-target.py @@ -0,0 +1,23 @@ +#!/usr/bin/env python + +# Copyright (c) 2013 Google Inc. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +""" +Verifies that IPHONEOS_DEPLOYMENT_TARGET works. +""" + +import TestGyp + +import sys + +if sys.platform == 'darwin': + test = TestGyp.TestGyp(formats=['make', 'ninja', 'xcode']) + + test.run_gyp('deployment-target.gyp', chdir='deployment-target') + + test.build('deployment-target.gyp', test.ALL, chdir='deployment-target') + + test.pass_test() + diff --git a/media/webrtc/trunk/tools/gyp/test/ios/gyptest-extension.py b/media/webrtc/trunk/tools/gyp/test/ios/gyptest-extension.py new file mode 100755 index 000000000..c5e76d93f --- /dev/null +++ b/media/webrtc/trunk/tools/gyp/test/ios/gyptest-extension.py @@ -0,0 +1,46 @@ +#!/usr/bin/env python + +# Copyright (c) 2014 Google Inc. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +""" +Verifies that ios app extensions are built correctly. +""" + +import TestGyp +import TestMac +import subprocess +import sys + +def CheckStrip(p, expected): + if expected not in subprocess.check_output(['nm','-gU', p]): + print expected + " shouldn't get stripped out." + test.fail_test() + +def CheckEntrypoint(p, expected): + if expected not in subprocess.check_output(['nm', p]): + print expected + "not found." + test.fail_test() + +if sys.platform == 'darwin' and TestMac.Xcode.Version()>="0600": + + test = TestGyp.TestGyp(formats=['ninja', 'xcode']) + + test.run_gyp('extension.gyp', chdir='extension') + + test.build('extension.gyp', 'ExtensionContainer', chdir='extension') + + # Test that the extension is .appex + test.built_file_must_exist( + 'ExtensionContainer.app/PlugIns/ActionExtension.appex', + chdir='extension') + + path = test.built_file_path( + 'ExtensionContainer.app/PlugIns/ActionExtension.appex/ActionExtension', + chdir='extension') + CheckStrip(path, "ActionViewController") + CheckEntrypoint(path, "_NSExtensionMain") + + test.pass_test() + diff --git a/media/webrtc/trunk/tools/gyp/test/ios/gyptest-framework.py b/media/webrtc/trunk/tools/gyp/test/ios/gyptest-framework.py new file mode 100755 index 000000000..a6dd857b2 --- /dev/null +++ b/media/webrtc/trunk/tools/gyp/test/ios/gyptest-framework.py @@ -0,0 +1,37 @@ +#!/usr/bin/env python + +# Copyright 2016 Google Inc. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +""" +Verifies that ios app frameworks are built correctly. +""" + +import TestGyp +import TestMac +import subprocess +import sys + +if sys.platform == 'darwin' and TestMac.Xcode.Version()>="0700": + + test = TestGyp.TestGyp(formats=['ninja']) + if test.format == 'xcode-ninja': + test.skip_test() + + test.run_gyp('framework.gyp', chdir='framework') + + test.build('framework.gyp', 'iOSFramework', chdir='framework') + + test.built_file_must_exist( + 'iOSFramework.framework/Headers/iOSFramework.h', + chdir='framework') + test.built_file_must_exist( + 'iOSFramework.framework/Headers/Thing.h', + chdir='framework') + test.built_file_must_exist( + 'iOSFramework.framework/iOSFramework', + chdir='framework') + + test.pass_test() + diff --git a/media/webrtc/trunk/tools/gyp/test/ios/gyptest-per-config-settings.py b/media/webrtc/trunk/tools/gyp/test/ios/gyptest-per-config-settings.py new file mode 100644 index 000000000..7313e5634 --- /dev/null +++ b/media/webrtc/trunk/tools/gyp/test/ios/gyptest-per-config-settings.py @@ -0,0 +1,185 @@ +#!/usr/bin/env python + +# Copyright (c) 2012 Google Inc. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +""" +Verifies that device and simulator bundles are built correctly. +""" + +import plistlib +import TestGyp +import os +import struct +import subprocess +import sys +import tempfile +import TestMac + +def CheckFileType(file, expected): + proc = subprocess.Popen(['lipo', '-info', file], stdout=subprocess.PIPE) + o = proc.communicate()[0].strip() + assert not proc.returncode + if not expected in o: + print 'File: Expected %s, got %s' % (expected, o) + test.fail_test() + +def HasCerts(): + # Because the bots do not have certs, don't check them if there are no + # certs available. + proc = subprocess.Popen(['security','find-identity','-p', 'codesigning', + '-v'], stdout=subprocess.PIPE) + return "0 valid identities found" not in proc.communicate()[0].strip() + +def CheckSignature(file): + proc = subprocess.Popen(['codesign', '-v', file], stdout=subprocess.PIPE) + o = proc.communicate()[0].strip() + assert not proc.returncode + if "code object is not signed at all" in o: + print 'File %s not properly signed.' % (file) + test.fail_test() + +def CheckEntitlements(file, expected_entitlements): + with tempfile.NamedTemporaryFile() as temp: + proc = subprocess.Popen(['codesign', '--display', '--entitlements', + temp.name, file], stdout=subprocess.PIPE) + o = proc.communicate()[0].strip() + assert not proc.returncode + data = temp.read() + entitlements = ParseEntitlements(data) + if not entitlements: + print 'No valid entitlements found in %s.' % (file) + test.fail_test() + if entitlements != expected_entitlements: + print 'Unexpected entitlements found in %s.' % (file) + test.fail_test() + +def ParseEntitlements(data): + if len(data) < 8: + return None + magic, length = struct.unpack('>II', data[:8]) + if magic != 0xfade7171 or length != len(data): + return None + return data[8:] + +def GetXcodeVersionValue(type): + args = ['xcodebuild', '-version', '-sdk', 'iphoneos', type] + job = subprocess.Popen(args, stdout=subprocess.PIPE) + return job.communicate()[0].strip() + +def GetMachineBuild(): + args = ['sw_vers', '-buildVersion'] + job = subprocess.Popen(args, stdout=subprocess.PIPE) + return job.communicate()[0].strip() + +def CheckPlistvalue(plist, key, expected): + if key not in plist: + print '%s not set in plist' % key + test.fail_test() + return + actual = plist[key] + if actual != expected: + print 'File: Expected %s, got %s for %s' % (expected, actual, key) + test.fail_test() + +def CheckPlistNotSet(plist, key): + if key in plist: + print '%s should not be set in plist' % key + test.fail_test() + return + +def ConvertBinaryPlistToXML(path): + proc = subprocess.call(['plutil', '-convert', 'xml1', path], + stdout=subprocess.PIPE) + +if sys.platform == 'darwin': + test = TestGyp.TestGyp(formats=['ninja', 'xcode']) + + test.run_gyp('test-device.gyp', chdir='app-bundle') + + test_configs = ['Default-iphoneos', 'Default'] + for configuration in test_configs: + test.set_configuration(configuration) + test.build('test-device.gyp', 'test_app', chdir='app-bundle') + result_file = test.built_file_path('Test App Gyp.app/Test App Gyp', + chdir='app-bundle') + test.must_exist(result_file) + info_plist = test.built_file_path('Test App Gyp.app/Info.plist', + chdir='app-bundle') + plist = plistlib.readPlist(info_plist) + xcode_version = TestMac.Xcode.Version() + if xcode_version >= '0720': + if len(plist) != 23: + print 'plist should have 23 entries, but it has %s' % len(plist) + test.fail_test() + + # Values that will hopefully never change. + CheckPlistvalue(plist, 'CFBundleDevelopmentRegion', 'English') + CheckPlistvalue(plist, 'CFBundleExecutable', 'Test App Gyp') + CheckPlistvalue(plist, 'CFBundleIdentifier', 'com.google.Test App Gyp') + CheckPlistvalue(plist, 'CFBundleInfoDictionaryVersion', '6.0') + CheckPlistvalue(plist, 'CFBundleName', 'Test App Gyp') + CheckPlistvalue(plist, 'CFBundlePackageType', 'APPL') + CheckPlistvalue(plist, 'CFBundleShortVersionString', '1.0') + CheckPlistvalue(plist, 'CFBundleSignature', 'ause') + CheckPlistvalue(plist, 'CFBundleVersion', '1') + CheckPlistvalue(plist, 'NSMainNibFile', 'MainMenu') + CheckPlistvalue(plist, 'NSPrincipalClass', 'NSApplication') + CheckPlistvalue(plist, 'UIDeviceFamily', [1, 2]) + + # Values that get pulled from xcodebuild. + machine_build = GetMachineBuild() + platform_version = GetXcodeVersionValue('ProductVersion') + sdk_build = GetXcodeVersionValue('ProductBuildVersion') + xcode_build = TestMac.Xcode.Build() + + # Xcode keeps changing what gets included in executable plists, and it + # changes between device and simuator builds. Allow the strictest tests for + # Xcode 7.2 and above. + if xcode_version >= '0720': + CheckPlistvalue(plist, 'BuildMachineOSBuild', machine_build) + CheckPlistvalue(plist, 'DTCompiler', 'com.apple.compilers.llvm.clang.1_0') + CheckPlistvalue(plist, 'DTPlatformVersion', platform_version) + CheckPlistvalue(plist, 'DTSDKBuild', sdk_build) + CheckPlistvalue(plist, 'DTXcode', xcode_version) + CheckPlistvalue(plist, 'DTXcodeBuild', xcode_build) + CheckPlistvalue(plist, 'MinimumOSVersion', '8.0') + + + if configuration == 'Default-iphoneos': + platform_name = 'iphoneos' + CheckFileType(result_file, 'armv7') + CheckPlistvalue(plist, 'CFBundleSupportedPlatforms', ['iPhoneOS']) + # Apple keeps changing their mind. + if xcode_version >= '0720': + CheckPlistvalue(plist, 'DTPlatformBuild', sdk_build) + else: + platform_name = 'iphonesimulator' + CheckFileType(result_file, 'i386') + CheckPlistvalue(plist, 'CFBundleSupportedPlatforms', ['iPhoneSimulator']) + if xcode_version >= '0720': + CheckPlistvalue(plist, 'DTPlatformBuild', '') + + CheckPlistvalue(plist, 'DTPlatformName', platform_name) + CheckPlistvalue(plist, 'DTSDKName', platform_name + platform_version) + + + if HasCerts() and configuration == 'Default-iphoneos': + test.build('test-device.gyp', 'sig_test', chdir='app-bundle') + result_file = test.built_file_path('sigtest.app/sigtest', + chdir='app-bundle') + CheckSignature(result_file) + info_plist = test.built_file_path('sigtest.app/Info.plist', + chdir='app-bundle') + + plist = plistlib.readPlist(info_plist) + CheckPlistvalue(plist, 'UIDeviceFamily', [1]) + + entitlements_file = test.built_file_path('sig_test.xcent', + chdir='app-bundle') + if os.path.isfile(entitlements_file): + expected_entitlements = open(entitlements_file).read() + CheckEntitlements(result_file, expected_entitlements) + + test.pass_test() diff --git a/media/webrtc/trunk/tools/gyp/test/ios/gyptest-watch.py b/media/webrtc/trunk/tools/gyp/test/ios/gyptest-watch.py new file mode 100755 index 000000000..f5c4601d8 --- /dev/null +++ b/media/webrtc/trunk/tools/gyp/test/ios/gyptest-watch.py @@ -0,0 +1,42 @@ +#!/usr/bin/env python + +# Copyright (c) 2014 Google Inc. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +""" +Verifies that ios watch extensions and apps are built correctly. +""" + +import TestGyp +import TestMac + +import sys + +if sys.platform == 'darwin': + print "This test is currently disabled: https://crbug.com/483696." + sys.exit(0) + + +if sys.platform == 'darwin' and TestMac.Xcode.Version() >= "0620": + test = TestGyp.TestGyp(formats=['ninja', 'xcode']) + + test.run_gyp('watch.gyp', chdir='watch') + + test.build( + 'watch.gyp', + 'WatchContainer', + chdir='watch') + + # Test that the extension exists + test.built_file_must_exist( + 'WatchContainer.app/PlugIns/WatchKitExtension.appex', + chdir='watch') + + # Test that the watch app exists + test.built_file_must_exist( + 'WatchContainer.app/PlugIns/WatchKitExtension.appex/WatchApp.app', + chdir='watch') + + test.pass_test() + diff --git a/media/webrtc/trunk/tools/gyp/test/ios/gyptest-xcode-ninja.py b/media/webrtc/trunk/tools/gyp/test/ios/gyptest-xcode-ninja.py new file mode 100644 index 000000000..609db8c98 --- /dev/null +++ b/media/webrtc/trunk/tools/gyp/test/ios/gyptest-xcode-ninja.py @@ -0,0 +1,25 @@ +#!/usr/bin/env python + +# Copyright (c) 2012 Google Inc. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +""" +Verify that the xcode-ninja GYP_GENERATOR runs and builds correctly. +""" + +import TestGyp + +import os +import sys + +if sys.platform == 'darwin': + test = TestGyp.TestGyp(formats=['xcode']) + + # Run ninja and xcode-ninja + test.formats = ['ninja', 'xcode-ninja'] + test.run_gyp('test.gyp', chdir='app-bundle') + + # If it builds the target, it works. + test.build('test.ninja.gyp', chdir='app-bundle') + test.pass_test() diff --git a/media/webrtc/trunk/tools/gyp/test/ios/watch/WatchApp/Images.xcassets/AppIcon.appiconset/Contents.json b/media/webrtc/trunk/tools/gyp/test/ios/watch/WatchApp/Images.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 000000000..562c5eff9 --- /dev/null +++ b/media/webrtc/trunk/tools/gyp/test/ios/watch/WatchApp/Images.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,62 @@ +{ + "images" : [ + { + "size" : "14.5x14.5", + "idiom" : "watch", + "scale" : "2x", + "role" : "notificationCenter", + "subtype" : "38mm" + }, + { + "size" : "18x18", + "idiom" : "watch", + "scale" : "2x", + "role" : "notificationCenter", + "subtype" : "42mm" + }, + { + "size" : "29x29", + "idiom" : "watch", + "role" : "companionSettings", + "scale" : "2x" + }, + { + "size" : "29.3x29.3", + "idiom" : "watch", + "role" : "companionSettings", + "scale" : "3x" + }, + { + "size" : "40x40", + "idiom" : "watch", + "scale" : "2x", + "role" : "appLauncher", + "subtype" : "38mm" + }, + { + "size" : "44x44", + "idiom" : "watch", + "scale" : "2x", + "role" : "appLauncher", + "subtype" : "42mm" + }, + { + "size" : "86x86", + "idiom" : "watch", + "scale" : "2x", + "role" : "quickLook", + "subtype" : "38mm" + }, + { + "size" : "98x98", + "idiom" : "watch", + "scale" : "2x", + "role" : "quickLook", + "subtype" : "42mm" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} diff --git a/media/webrtc/trunk/tools/gyp/test/ios/watch/WatchApp/Images.xcassets/LaunchImage.launchimage/Contents.json b/media/webrtc/trunk/tools/gyp/test/ios/watch/WatchApp/Images.xcassets/LaunchImage.launchimage/Contents.json new file mode 100644 index 000000000..ed123feff --- /dev/null +++ b/media/webrtc/trunk/tools/gyp/test/ios/watch/WatchApp/Images.xcassets/LaunchImage.launchimage/Contents.json @@ -0,0 +1,24 @@ +{ + "images" : [ + { + "orientation" : "portrait", + "idiom" : "watch", + "extent" : "full-screen", + "minimum-system-version" : "8.0", + "subtype" : "38mm", + "scale" : "2x" + }, + { + "orientation" : "portrait", + "idiom" : "watch", + "extent" : "full-screen", + "minimum-system-version" : "8.0", + "subtype" : "42mm", + "scale" : "2x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} diff --git a/media/webrtc/trunk/tools/gyp/test/ios/watch/WatchApp/Info.plist b/media/webrtc/trunk/tools/gyp/test/ios/watch/WatchApp/Info.plist new file mode 100644 index 000000000..3cf65b828 --- /dev/null +++ b/media/webrtc/trunk/tools/gyp/test/ios/watch/WatchApp/Info.plist @@ -0,0 +1,35 @@ +<?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>WatchApp</string> + <key>CFBundleExecutable</key> + <string>$(EXECUTABLE_NAME)</string> + <key>CFBundleIdentifier</key> + <string>com.google.gyptest.watch.watchapp</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>CFBundleSignature</key> + <string>????</string> + <key>CFBundleVersion</key> + <string>1</string> + <key>UISupportedInterfaceOrientations</key> + <array> + <string>UIInterfaceOrientationPortrait</string> + <string>UIInterfaceOrientationPortraitUpsideDown</string> + </array> + <key>WKCompanionAppBundleIdentifier</key> + <string>com.google.gyptest.watch</string> + <key>WKWatchKitApp</key> + <true/> +</dict> +</plist> diff --git a/media/webrtc/trunk/tools/gyp/test/ios/watch/WatchApp/Interface.storyboard b/media/webrtc/trunk/tools/gyp/test/ios/watch/WatchApp/Interface.storyboard new file mode 100644 index 000000000..5f52cb6c9 --- /dev/null +++ b/media/webrtc/trunk/tools/gyp/test/ios/watch/WatchApp/Interface.storyboard @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<document type="com.apple.InterfaceBuilder.WatchKit.Storyboard" version="3.0" toolsVersion="6221" systemVersion="13E28" targetRuntime="watchKit" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="AgC-eL-Hgc"> + <dependencies> + <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="6213"/> + <plugIn identifier="com.apple.InterfaceBuilder.IBWatchKitPlugin" version="3733"/> + </dependencies> + <scenes> + <!--Interface Controller--> + <scene sceneID="aou-V4-d1y"> + <objects> + <controller id="AgC-eL-Hgc" customClass="InterfaceController" customModuleProvider=""/> + </objects> + </scene> + </scenes> +</document> diff --git a/media/webrtc/trunk/tools/gyp/test/ios/watch/WatchContainer/AppDelegate.h b/media/webrtc/trunk/tools/gyp/test/ios/watch/WatchContainer/AppDelegate.h new file mode 100644 index 000000000..510e2300b --- /dev/null +++ b/media/webrtc/trunk/tools/gyp/test/ios/watch/WatchContainer/AppDelegate.h @@ -0,0 +1,12 @@ +// Copyright (c) 2014 Google Inc. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#import <UIKit/UIKit.h> + +@interface AppDelegate : UIResponder <UIApplicationDelegate> + +@property (strong, nonatomic) UIWindow *window; + +@end + diff --git a/media/webrtc/trunk/tools/gyp/test/ios/watch/WatchContainer/AppDelegate.m b/media/webrtc/trunk/tools/gyp/test/ios/watch/WatchContainer/AppDelegate.m new file mode 100644 index 000000000..1197bc1bb --- /dev/null +++ b/media/webrtc/trunk/tools/gyp/test/ios/watch/WatchContainer/AppDelegate.m @@ -0,0 +1,19 @@ +// Copyright (c) 2014 Google Inc. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#import "AppDelegate.h" + +@interface AppDelegate () + +@end + +@implementation AppDelegate + +- (BOOL)application:(UIApplication*)application + didFinishLaunchingWithOptions:(NSDictionary*)launchOptions { + // Override point for customization after application launch. + return YES; +} + +@end diff --git a/media/webrtc/trunk/tools/gyp/test/ios/watch/WatchContainer/Base.lproj/Main.storyboard b/media/webrtc/trunk/tools/gyp/test/ios/watch/WatchContainer/Base.lproj/Main.storyboard new file mode 100644 index 000000000..e8f3cfb40 --- /dev/null +++ b/media/webrtc/trunk/tools/gyp/test/ios/watch/WatchContainer/Base.lproj/Main.storyboard @@ -0,0 +1,25 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="6162" systemVersion="14A238h" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="BYZ-38-t0r"> + <dependencies> + <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="6160"/> + </dependencies> + <scenes> + <!--View Controller--> + <scene sceneID="tne-QT-ifu"> + <objects> + <viewController id="BYZ-38-t0r" customClass="ViewController" customModuleProvider="" 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="480" height="480"/> + <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> + <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/> + </view> + </viewController> + <placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/> + </objects> + </scene> + </scenes> +</document> diff --git a/media/webrtc/trunk/tools/gyp/test/ios/watch/WatchContainer/Images.xcassets/AppIcon.appiconset/Contents.json b/media/webrtc/trunk/tools/gyp/test/ios/watch/WatchContainer/Images.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 000000000..f697f61f4 --- /dev/null +++ b/media/webrtc/trunk/tools/gyp/test/ios/watch/WatchContainer/Images.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,53 @@ +{ + "images" : [ + { + "idiom" : "iphone", + "size" : "29x29", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "40x40", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "60x60", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "29x29", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "29x29", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "40x40", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "40x40", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "76x76", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "76x76", + "scale" : "2x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} diff --git a/media/webrtc/trunk/tools/gyp/test/ios/watch/WatchContainer/Images.xcassets/LaunchImage.launchimage/Contents.json b/media/webrtc/trunk/tools/gyp/test/ios/watch/WatchContainer/Images.xcassets/LaunchImage.launchimage/Contents.json new file mode 100644 index 000000000..4458b40c0 --- /dev/null +++ b/media/webrtc/trunk/tools/gyp/test/ios/watch/WatchContainer/Images.xcassets/LaunchImage.launchimage/Contents.json @@ -0,0 +1,51 @@ +{ + "images" : [ + { + "orientation" : "portrait", + "idiom" : "iphone", + "extent" : "full-screen", + "minimum-system-version" : "7.0", + "scale" : "2x" + }, + { + "orientation" : "portrait", + "idiom" : "iphone", + "subtype" : "retina4", + "extent" : "full-screen", + "minimum-system-version" : "7.0", + "scale" : "2x" + }, + { + "orientation" : "portrait", + "idiom" : "ipad", + "extent" : "full-screen", + "minimum-system-version" : "7.0", + "scale" : "1x" + }, + { + "orientation" : "landscape", + "idiom" : "ipad", + "extent" : "full-screen", + "minimum-system-version" : "7.0", + "scale" : "1x" + }, + { + "orientation" : "portrait", + "idiom" : "ipad", + "extent" : "full-screen", + "minimum-system-version" : "7.0", + "scale" : "2x" + }, + { + "orientation" : "landscape", + "idiom" : "ipad", + "extent" : "full-screen", + "minimum-system-version" : "7.0", + "scale" : "2x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} diff --git a/media/webrtc/trunk/tools/gyp/test/ios/watch/WatchContainer/Info.plist b/media/webrtc/trunk/tools/gyp/test/ios/watch/WatchContainer/Info.plist new file mode 100644 index 000000000..a40319c78 --- /dev/null +++ b/media/webrtc/trunk/tools/gyp/test/ios/watch/WatchContainer/Info.plist @@ -0,0 +1,32 @@ +<?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>CFBundleExecutable</key> + <string>WatchContainer</string> + <key>CFBundleIdentifier</key> + <string>com.google.gyptest.watch</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>CFBundleSignature</key> + <string>????</string> + <key>CFBundleVersion</key> + <string>1</string> + <key>LSRequiresIPhoneOS</key> + <true/> + <key>UIMainStoryboardFile</key> + <string>Main</string> + <key>UIRequiredDeviceCapabilities</key> + <array> + <string>armv7</string> + </array> +</dict> +</plist> diff --git a/media/webrtc/trunk/tools/gyp/test/ios/watch/WatchContainer/ViewController.h b/media/webrtc/trunk/tools/gyp/test/ios/watch/WatchContainer/ViewController.h new file mode 100644 index 000000000..fad775471 --- /dev/null +++ b/media/webrtc/trunk/tools/gyp/test/ios/watch/WatchContainer/ViewController.h @@ -0,0 +1,11 @@ +// Copyright (c) 2014 Google Inc. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#import <UIKit/UIKit.h> + +@interface ViewController : UIViewController + + +@end + diff --git a/media/webrtc/trunk/tools/gyp/test/ios/watch/WatchContainer/ViewController.m b/media/webrtc/trunk/tools/gyp/test/ios/watch/WatchContainer/ViewController.m new file mode 100644 index 000000000..3810fa9cb --- /dev/null +++ b/media/webrtc/trunk/tools/gyp/test/ios/watch/WatchContainer/ViewController.m @@ -0,0 +1,24 @@ +// Copyright (c) 2014 Google Inc. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#import "ViewController.h" + +@interface ViewController () + + +@end + +@implementation ViewController + +- (void)viewDidLoad { + [super viewDidLoad]; + // Do any additional setup after loading the view, typically from a nib. +} + +- (void)didReceiveMemoryWarning { + [super didReceiveMemoryWarning]; + // Dispose of any resources that can be recreated. +} + +@end diff --git a/media/webrtc/trunk/tools/gyp/test/ios/watch/WatchContainer/main.m b/media/webrtc/trunk/tools/gyp/test/ios/watch/WatchContainer/main.m new file mode 100644 index 000000000..47aecb514 --- /dev/null +++ b/media/webrtc/trunk/tools/gyp/test/ios/watch/WatchContainer/main.m @@ -0,0 +1,13 @@ +// Copyright (c) 2014 Google Inc. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. +// +#import <UIKit/UIKit.h> +#import "AppDelegate.h" + +int main(int argc, char* argv[]) { + @autoreleasepool { + return UIApplicationMain(argc, argv, nil, + NSStringFromClass([AppDelegate class])); + } +} diff --git a/media/webrtc/trunk/tools/gyp/test/ios/watch/WatchKitExtension/Images.xcassets/MyImage.imageset/Contents.json b/media/webrtc/trunk/tools/gyp/test/ios/watch/WatchKitExtension/Images.xcassets/MyImage.imageset/Contents.json new file mode 100644 index 000000000..f80d95086 --- /dev/null +++ b/media/webrtc/trunk/tools/gyp/test/ios/watch/WatchKitExtension/Images.xcassets/MyImage.imageset/Contents.json @@ -0,0 +1,20 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} diff --git a/media/webrtc/trunk/tools/gyp/test/ios/watch/WatchKitExtension/Info.plist b/media/webrtc/trunk/tools/gyp/test/ios/watch/WatchKitExtension/Info.plist new file mode 100644 index 000000000..7a354643e --- /dev/null +++ b/media/webrtc/trunk/tools/gyp/test/ios/watch/WatchKitExtension/Info.plist @@ -0,0 +1,38 @@ +<?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>WatchContainer WatchKit Extension</string> + <key>CFBundleExecutable</key> + <string>$(EXECUTABLE_NAME)</string> + <key>CFBundleIdentifier</key> + <string>com.google.gyptest.watch.watchkitextension</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>CFBundleSignature</key> + <string>????</string> + <key>CFBundleVersion</key> + <string>1.0</string> + <key>NSExtension</key> + <dict> + <key>NSExtensionAttributes</key> + <dict> + <key>WKAppBundleIdentifier</key> + <string>com.google.gyptest.watch.watchapp</string> + </dict> + <key>NSExtensionPointIdentifier</key> + <string>com.apple.watchkit</string> + </dict> + <key>RemoteInterfacePrincipalClass</key> + <string>InterfaceController</string> +</dict> +</plist> diff --git a/media/webrtc/trunk/tools/gyp/test/ios/watch/WatchKitExtension/InterfaceController.h b/media/webrtc/trunk/tools/gyp/test/ios/watch/WatchKitExtension/InterfaceController.h new file mode 100644 index 000000000..c3395eb48 --- /dev/null +++ b/media/webrtc/trunk/tools/gyp/test/ios/watch/WatchKitExtension/InterfaceController.h @@ -0,0 +1,10 @@ +// Copyright (c) 2014 Google Inc. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#import <Foundation/Foundation.h> +#import <WatchKit/WatchKit.h> + +@interface InterfaceController : WKInterfaceController +@end + diff --git a/media/webrtc/trunk/tools/gyp/test/ios/watch/WatchKitExtension/InterfaceController.m b/media/webrtc/trunk/tools/gyp/test/ios/watch/WatchKitExtension/InterfaceController.m new file mode 100644 index 000000000..564b7d1da --- /dev/null +++ b/media/webrtc/trunk/tools/gyp/test/ios/watch/WatchKitExtension/InterfaceController.m @@ -0,0 +1,25 @@ +// Copyright (c) 2014 Google Inc. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#import "InterfaceController.h" + +@implementation InterfaceController + +- (instancetype)initWithContext:(id)context { + if ((self = [super initWithContext:context])) { + // -initWithContext: + } + return self; +} + +- (void)willActivate { + // -willActivate +} + +- (void)didDeactivate { + // -didDeactivate +} + +@end + diff --git a/media/webrtc/trunk/tools/gyp/test/ios/watch/WatchKitExtension/MainInterface.storyboard b/media/webrtc/trunk/tools/gyp/test/ios/watch/WatchKitExtension/MainInterface.storyboard new file mode 100644 index 000000000..5aa58184e --- /dev/null +++ b/media/webrtc/trunk/tools/gyp/test/ios/watch/WatchKitExtension/MainInterface.storyboard @@ -0,0 +1,63 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="6148" systemVersion="14A229a" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" initialViewController="ObA-dk-sSI"> + <dependencies> + <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="6147"/> + </dependencies> + <scenes> + <!--Action View Controller - Image--> + <scene sceneID="7MM-of-jgj"> + <objects> + <viewController title="Image" id="ObA-dk-sSI" customClass="ActionViewController" customModuleProvider="" sceneMemberID="viewController"> + <layoutGuides> + <viewControllerLayoutGuide type="top" id="qkL-Od-lgU"/> + <viewControllerLayoutGuide type="bottom" id="n38-gi-rB5"/> + </layoutGuides> + <view key="view" contentMode="scaleToFill" id="zMn-AG-sqS"> + <rect key="frame" x="0.0" y="0.0" width="320" height="528"/> + <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> + <subviews> + <imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="9ga-4F-77Z"> + <rect key="frame" x="0.0" y="64" width="320" height="464"/> + </imageView> + <navigationBar contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="NOA-Dm-cuz"> + <rect key="frame" x="0.0" y="20" width="320" height="44"/> + <items> + <navigationItem id="3HJ-uW-3hn"> + <barButtonItem key="leftBarButtonItem" title="Done" style="done" id="WYi-yp-eM6"> + <connections> + <action selector="done" destination="ObA-dk-sSI" id="Qdu-qn-U6V"/> + </connections> + </barButtonItem> + </navigationItem> + </items> + </navigationBar> + </subviews> + <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/> + <constraints> + <constraint firstAttribute="trailing" secondItem="NOA-Dm-cuz" secondAttribute="trailing" id="A05-Pj-hrr"/> + <constraint firstItem="9ga-4F-77Z" firstAttribute="top" secondItem="NOA-Dm-cuz" secondAttribute="bottom" id="Fps-3D-QQW"/> + <constraint firstItem="NOA-Dm-cuz" firstAttribute="leading" secondItem="zMn-AG-sqS" secondAttribute="leading" id="HxO-8t-aoh"/> + <constraint firstAttribute="trailing" secondItem="9ga-4F-77Z" secondAttribute="trailing" id="Ozw-Hg-0yh"/> + <constraint firstItem="9ga-4F-77Z" firstAttribute="leading" secondItem="zMn-AG-sqS" secondAttribute="leading" id="XH5-ld-ONA"/> + <constraint firstItem="n38-gi-rB5" firstAttribute="top" secondItem="9ga-4F-77Z" secondAttribute="bottom" id="eQg-nn-Zy4"/> + <constraint firstItem="NOA-Dm-cuz" firstAttribute="top" secondItem="qkL-Od-lgU" secondAttribute="bottom" id="we0-1t-bgp"/> + </constraints> + </view> + <freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/> + <size key="freeformSize" width="320" height="528"/> + <connections> + <outlet property="imageView" destination="9ga-4F-77Z" id="5y6-5w-9QO"/> + <outlet property="view" destination="zMn-AG-sqS" id="Qma-de-2ek"/> + </connections> + </viewController> + <placeholder placeholderIdentifier="IBFirstResponder" id="X47-rx-isc" userLabel="First Responder" sceneMemberID="firstResponder"/> + </objects> + <point key="canvasLocation" x="252" y="-124"/> + </scene> + </scenes> + <simulatedMetricsContainer key="defaultSimulatedMetrics"> + <simulatedStatusBarMetrics key="statusBar"/> + <simulatedOrientationMetrics key="orientation"/> + <simulatedScreenMetrics key="destination" type="retina4"/> + </simulatedMetricsContainer> +</document> diff --git a/media/webrtc/trunk/tools/gyp/test/ios/watch/watch.gyp b/media/webrtc/trunk/tools/gyp/test/ios/watch/watch.gyp new file mode 100644 index 000000000..49be5554e --- /dev/null +++ b/media/webrtc/trunk/tools/gyp/test/ios/watch/watch.gyp @@ -0,0 +1,105 @@ +# Copyright (c) 2014 Google Inc. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +{ + 'make_global_settings': [ + ['CC', '/usr/bin/clang'], + ['CXX', '/usr/bin/clang++'], + ], + 'target_defaults': { + 'xcode_settings': { + 'OTHER_CFLAGS': [ + '-fobjc-abi-version=2', + ], + 'GCC_VERSION': 'com.apple.compilers.llvm.clang.1_0', + 'SDKROOT': 'iphoneos', + 'IPHONEOS_DEPLOYMENT_TARGET': '8.2', + 'CODE_SIGN_IDENTITY[sdk=iphoneos*]': 'iPhone Developer', + } + }, + 'targets': [ + { + 'target_name': 'WatchContainer', + 'product_name': 'WatchContainer', + 'type': 'executable', + 'mac_bundle': 1, + 'mac_bundle_resources': [ + 'WatchContainer/Base.lproj/Main.storyboard', + ], + 'sources': [ + 'WatchContainer/AppDelegate.h', + 'WatchContainer/AppDelegate.m', + 'WatchContainer/ViewController.h', + 'WatchContainer/ViewController.m', + 'WatchContainer/main.m', + ], + 'copies': [ + { + 'destination': '<(PRODUCT_DIR)/WatchContainer.app/PlugIns', + 'files': [ + '<(PRODUCT_DIR)/WatchKitExtension.appex', + ]}], + 'dependencies': [ + 'WatchKitExtension' + ], + 'link_settings': { + 'libraries': [ + '$(SDKROOT)/System/Library/Frameworks/Foundation.framework', + '$(SDKROOT)/System/Library/Frameworks/UIKit.framework', + ], + }, + 'xcode_settings': { + 'INFOPLIST_FILE': 'WatchContainer/Info.plist', + }, + }, + { + 'target_name': 'WatchKitExtension', + 'product_name': 'WatchKitExtension', + 'type': 'executable', + 'mac_bundle': 1, + 'ios_watchkit_extension': 1, + 'sources': [ + 'WatchKitExtension/InterfaceController.h', + 'WatchKitExtension/InterfaceController.m', + ], + 'mac_bundle_resources': [ + 'WatchKitExtension/Images.xcassets', + '<(PRODUCT_DIR)/WatchApp.app', + ], + 'dependencies': [ + 'WatchApp' + ], + 'link_settings': { + 'libraries': [ + '$(SDKROOT)/System/Library/Frameworks/Foundation.framework', + '$(SDKROOT)/System/Library/Frameworks/WatchKit.framework', + ], + }, + 'xcode_settings': { + 'INFOPLIST_FILE': 'WatchKitExtension/Info.plist', + 'SKIP_INSTALL': 'YES', + 'COPY_PHASE_STRIP': 'NO', + }, + }, + { + 'target_name': 'WatchApp', + 'product_name': 'WatchApp', + 'type': 'executable', + 'mac_bundle': 1, + 'ios_watch_app': 1, + 'mac_bundle_resources': [ + 'WatchApp/Images.xcassets', + 'WatchApp/Interface.storyboard', + ], + 'xcode_settings': { + 'INFOPLIST_FILE': 'WatchApp/Info.plist', + 'SKIP_INSTALL': 'YES', + 'COPY_PHASE_STRIP': 'NO', + 'TARGETED_DEVICE_FAMILY': '4', + 'TARGETED_DEVICE_FAMILY[sdk=iphonesimulator*]': '1,4', + }, + }, + ], +} + diff --git a/media/webrtc/trunk/tools/gyp/test/ios/xctests/App/AppDelegate.h b/media/webrtc/trunk/tools/gyp/test/ios/xctests/App/AppDelegate.h new file mode 100644 index 000000000..f8efce97e --- /dev/null +++ b/media/webrtc/trunk/tools/gyp/test/ios/xctests/App/AppDelegate.h @@ -0,0 +1,11 @@ +// Copyright 2015 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#import <UIKit/UIKit.h> + +@interface AppDelegate : UIResponder<UIApplicationDelegate> + +@property(strong, nonatomic) UIWindow* window; + +@end diff --git a/media/webrtc/trunk/tools/gyp/test/ios/xctests/App/AppDelegate.m b/media/webrtc/trunk/tools/gyp/test/ios/xctests/App/AppDelegate.m new file mode 100644 index 000000000..825dda75b --- /dev/null +++ b/media/webrtc/trunk/tools/gyp/test/ios/xctests/App/AppDelegate.m @@ -0,0 +1,18 @@ +// Copyright 2015 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#import "AppDelegate.h" + +@interface AppDelegate () + +@end + +@implementation AppDelegate + +- (BOOL)application:(UIApplication*)application + didFinishLaunchingWithOptions:(NSDictionary*)launchOptions { + return YES; +} + +@end diff --git a/media/webrtc/trunk/tools/gyp/test/ios/xctests/App/Base.lproj/LaunchScreen.xib b/media/webrtc/trunk/tools/gyp/test/ios/xctests/App/Base.lproj/LaunchScreen.xib new file mode 100644 index 000000000..063dc5ea7 --- /dev/null +++ b/media/webrtc/trunk/tools/gyp/test/ios/xctests/App/Base.lproj/LaunchScreen.xib @@ -0,0 +1,41 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="6214" systemVersion="14A314h" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES"> + <dependencies> + <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="6207"/> + <capability name="Constraints with non-1.0 multipliers" minToolsVersion="5.1"/> + </dependencies> + <objects> + <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/> + <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/> + <view contentMode="scaleToFill" id="iN0-l3-epB"> + <rect key="frame" x="0.0" y="0.0" width="480" height="480"/> + <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> + <subviews> + <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text=" Copyright (c) 2014 Google. All rights reserved." textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumFontSize="9" translatesAutoresizingMaskIntoConstraints="NO" id="8ie-xW-0ye"> + <rect key="frame" x="20" y="439" width="441" height="21"/> + <fontDescription key="fontDescription" type="system" pointSize="17"/> + <color key="textColor" cocoaTouchSystemColor="darkTextColor"/> + <nil key="highlightedColor"/> + </label> + <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="App" textAlignment="center" lineBreakMode="middleTruncation" baselineAdjustment="alignBaselines" minimumFontSize="18" translatesAutoresizingMaskIntoConstraints="NO" id="kId-c2-rCX"> + <rect key="frame" x="20" y="140" width="441" height="43"/> + <fontDescription key="fontDescription" type="boldSystem" pointSize="36"/> + <color key="textColor" cocoaTouchSystemColor="darkTextColor"/> + <nil key="highlightedColor"/> + </label> + </subviews> + <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/> + <constraints> + <constraint firstItem="kId-c2-rCX" firstAttribute="centerY" secondItem="iN0-l3-epB" secondAttribute="bottom" multiplier="1/3" constant="1" id="5cJ-9S-tgC"/> + <constraint firstAttribute="centerX" secondItem="kId-c2-rCX" secondAttribute="centerX" id="Koa-jz-hwk"/> + <constraint firstAttribute="bottom" secondItem="8ie-xW-0ye" secondAttribute="bottom" constant="20" id="Kzo-t9-V3l"/> + <constraint firstItem="8ie-xW-0ye" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="20" symbolic="YES" id="MfP-vx-nX0"/> + <constraint firstAttribute="centerX" secondItem="8ie-xW-0ye" secondAttribute="centerX" id="ZEH-qu-HZ9"/> + <constraint firstItem="kId-c2-rCX" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="20" symbolic="YES" id="fvb-Df-36g"/> + </constraints> + <nil key="simulatedStatusBarMetrics"/> + <freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/> + <point key="canvasLocation" x="548" y="455"/> + </view> + </objects> +</document> diff --git a/media/webrtc/trunk/tools/gyp/test/ios/xctests/App/Base.lproj/Main.storyboard b/media/webrtc/trunk/tools/gyp/test/ios/xctests/App/Base.lproj/Main.storyboard new file mode 100644 index 000000000..f56d2f3bb --- /dev/null +++ b/media/webrtc/trunk/tools/gyp/test/ios/xctests/App/Base.lproj/Main.storyboard @@ -0,0 +1,25 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="6211" systemVersion="14A298i" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="BYZ-38-t0r"> + <dependencies> + <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="6204"/> + </dependencies> + <scenes> + <!--View Controller--> + <scene sceneID="tne-QT-ifu"> + <objects> + <viewController id="BYZ-38-t0r" customClass="ViewController" customModuleProvider="" 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="600" height="600"/> + <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> + <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/> + </view> + </viewController> + <placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/> + </objects> + </scene> + </scenes> +</document> diff --git a/media/webrtc/trunk/tools/gyp/test/ios/xctests/App/Images.xcassets/AppIcon.appiconset/Contents.json b/media/webrtc/trunk/tools/gyp/test/ios/xctests/App/Images.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 000000000..36d2c80d8 --- /dev/null +++ b/media/webrtc/trunk/tools/gyp/test/ios/xctests/App/Images.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,68 @@ +{ + "images" : [ + { + "idiom" : "iphone", + "size" : "29x29", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "29x29", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "40x40", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "40x40", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "60x60", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "60x60", + "scale" : "3x" + }, + { + "idiom" : "ipad", + "size" : "29x29", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "29x29", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "40x40", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "40x40", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "76x76", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "76x76", + "scale" : "2x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +}
\ No newline at end of file diff --git a/media/webrtc/trunk/tools/gyp/test/ios/xctests/App/Info.plist b/media/webrtc/trunk/tools/gyp/test/ios/xctests/App/Info.plist new file mode 100644 index 000000000..3f938f60f --- /dev/null +++ b/media/webrtc/trunk/tools/gyp/test/ios/xctests/App/Info.plist @@ -0,0 +1,47 @@ +<?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>CFBundleExecutable</key> + <string>${EXECUTABLE_NAME}</string> + <key>CFBundleIdentifier</key> + <string>com.google.gyptest.App</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>CFBundleSignature</key> + <string>????</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> + <key>UISupportedInterfaceOrientations~ipad</key> + <array> + <string>UIInterfaceOrientationPortrait</string> + <string>UIInterfaceOrientationPortraitUpsideDown</string> + <string>UIInterfaceOrientationLandscapeLeft</string> + <string>UIInterfaceOrientationLandscapeRight</string> + </array> +</dict> +</plist> diff --git a/media/webrtc/trunk/tools/gyp/test/ios/xctests/App/ViewController.h b/media/webrtc/trunk/tools/gyp/test/ios/xctests/App/ViewController.h new file mode 100644 index 000000000..95a281e8d --- /dev/null +++ b/media/webrtc/trunk/tools/gyp/test/ios/xctests/App/ViewController.h @@ -0,0 +1,9 @@ +// Copyright 2015 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#import <UIKit/UIKit.h> + +@interface ViewController : UIViewController + +@end diff --git a/media/webrtc/trunk/tools/gyp/test/ios/xctests/App/ViewController.m b/media/webrtc/trunk/tools/gyp/test/ios/xctests/App/ViewController.m new file mode 100644 index 000000000..d38e3c5bb --- /dev/null +++ b/media/webrtc/trunk/tools/gyp/test/ios/xctests/App/ViewController.m @@ -0,0 +1,21 @@ +// Copyright 2015 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#import "ViewController.h" + +@interface ViewController () + +@end + +@implementation ViewController + +- (void)viewDidLoad { + [super viewDidLoad]; +} + +- (void)didReceiveMemoryWarning { + [super didReceiveMemoryWarning]; +} + +@end diff --git a/media/webrtc/trunk/tools/gyp/test/ios/xctests/App/main.m b/media/webrtc/trunk/tools/gyp/test/ios/xctests/App/main.m new file mode 100644 index 000000000..83368075c --- /dev/null +++ b/media/webrtc/trunk/tools/gyp/test/ios/xctests/App/main.m @@ -0,0 +1,13 @@ +// Copyright 2015 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#import <UIKit/UIKit.h> +#import "AppDelegate.h" + +int main(int argc, char* argv[]) { + @autoreleasepool { + return UIApplicationMain( + argc, argv, nil, NSStringFromClass([AppDelegate class])); + } +} diff --git a/media/webrtc/trunk/tools/gyp/test/ios/xctests/AppTests/AppTests.m b/media/webrtc/trunk/tools/gyp/test/ios/xctests/AppTests/AppTests.m new file mode 100644 index 000000000..22121b089 --- /dev/null +++ b/media/webrtc/trunk/tools/gyp/test/ios/xctests/AppTests/AppTests.m @@ -0,0 +1,31 @@ +// Copyright 2015 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#import <UIKit/UIKit.h> +#import <XCTest/XCTest.h> + +@interface AppTests : XCTestCase + +@end + +@implementation AppTests + +- (void)setUp { + [super setUp]; +} + +- (void)tearDown { + [super tearDown]; +} + +- (void)testExample { + XCTAssert(YES, @"Pass"); +} + +- (void)testPerformanceExample { + [self measureBlock:^{ + }]; +} + +@end diff --git a/media/webrtc/trunk/tools/gyp/test/ios/xctests/AppTests/Info.plist b/media/webrtc/trunk/tools/gyp/test/ios/xctests/AppTests/Info.plist new file mode 100644 index 000000000..d43ff4ba8 --- /dev/null +++ b/media/webrtc/trunk/tools/gyp/test/ios/xctests/AppTests/Info.plist @@ -0,0 +1,24 @@ +<?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>CFBundleExecutable</key> + <string>${EXECUTABLE_NAME}</string> + <key>CFBundleIdentifier</key> + <string>com.google.gyptest.AppTests</string> + <key>CFBundleInfoDictionaryVersion</key> + <string>6.0</string> + <key>CFBundleName</key> + <string>${PRODUCT_NAME}</string> + <key>CFBundlePackageType</key> + <string>BNDL</string> + <key>CFBundleShortVersionString</key> + <string>1.0</string> + <key>CFBundleSignature</key> + <string>????</string> + <key>CFBundleVersion</key> + <string>1</string> +</dict> +</plist> diff --git a/media/webrtc/trunk/tools/gyp/test/ios/xctests/gyptest-xctests.py b/media/webrtc/trunk/tools/gyp/test/ios/xctests/gyptest-xctests.py new file mode 100644 index 000000000..42610d1fc --- /dev/null +++ b/media/webrtc/trunk/tools/gyp/test/ios/xctests/gyptest-xctests.py @@ -0,0 +1,46 @@ +#!/usr/bin/env python + +# Copyright 2015 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +""" +Verifies that iOS XCTests can be built correctly. +""" + +import TestGyp + +import os +import subprocess +import sys + +def HasCerts(): + # Because the bots do not have certs, don't check them if there are no + # certs available. + proc = subprocess.Popen(['security','find-identity','-p', 'codesigning', + '-v'], stdout=subprocess.PIPE) + return "0 valid identities found" not in proc.communicate()[0].strip() + +if sys.platform == "darwin": + test = TestGyp.TestGyp(formats=['xcode', 'ninja']) + test.run_gyp('xctests.gyp') + test_configs = ['Default'] + # TODO(crbug.com/557418): Enable this once xcodebuild works for iOS devices. + #if HasCerts() and test.format == 'xcode': + # test_configs.append('Default-iphoneos') + for config in test_configs: + test.set_configuration(config) + test.build('xctests.gyp', test.ALL) + test.built_file_must_exist('app_under_test.app/app_under_test') + test.built_file_must_exist('app_tests.xctest/app_tests') + if 'ninja' in test.format: + test.built_file_must_exist('obj/AppTests/app_tests.AppTests.i386.o') + test.built_file_must_exist('obj/AppTests/app_tests.AppTests.x86_64.o') + elif test.format == 'xcode': + xcode_object_path = os.path.join('..', 'xctests.build', + 'Default-iphonesimulator', + 'app_tests.build', 'Objects-normal', + '%s', 'AppTests.o') + test.built_file_must_exist(xcode_object_path % 'i386') + test.built_file_must_exist(xcode_object_path % 'x86_64') + test.pass_test() diff --git a/media/webrtc/trunk/tools/gyp/test/ios/xctests/xctests.gyp b/media/webrtc/trunk/tools/gyp/test/ios/xctests/xctests.gyp new file mode 100644 index 000000000..8d4d6393b --- /dev/null +++ b/media/webrtc/trunk/tools/gyp/test/ios/xctests/xctests.gyp @@ -0,0 +1,74 @@ +# Copyright 2015 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. +{ + 'conditions': [ + ['"<(GENERATOR)"=="ninja"', { + 'make_global_settings': [ + ['CC', '/usr/bin/clang'], + ['CXX', '/usr/bin/clang++'], + ], + }] + ], + 'target_defaults': { + 'xcode_settings': { + 'OTHER_CFLAGS': [ + '-fobjc-abi-version=2', + ], + 'GCC_VERSION': 'com.apple.compilers.llvm.clang.1_0', + 'SDKROOT': 'iphonesimulator', # -isysroot + 'CONFIGURATION_BUILD_DIR':'build/Default', + 'IPHONEOS_DEPLOYMENT_TARGET': '9.0', + 'CODE_SIGN_IDENTITY[sdk=iphoneos*]': 'iPhone Developer', + } + }, + 'targets': [ + { + 'target_name': 'app_under_test', + 'type': 'executable', + 'mac_bundle': 1, + 'mac_bundle_resources': [ + 'App/Base.lproj/LaunchScreen.xib', + 'App/Base.lproj/Main.storyboard', + ], + 'sources': [ + 'App/AppDelegate.h', + 'App/AppDelegate.m', + 'App/ViewController.h', + 'App/ViewController.m', + 'App/main.m', + ], + 'link_settings': { + 'libraries': [ + '$(SDKROOT)/System/Library/Frameworks/Foundation.framework', + '$(SDKROOT)/System/Library/Frameworks/UIKit.framework', + ], + }, + 'xcode_settings': { + 'INFOPLIST_FILE': 'App/Info.plist', + }, + }, + { + 'target_name': 'app_tests', + 'type': 'loadable_module', + 'mac_xctest_bundle': 1, + 'sources': [ + 'AppTests/AppTests.m', + ], + 'dependencies': [ + 'app_under_test' + ], + 'link_settings': { + 'libraries': [ + '$(SDKROOT)/System/Library/Frameworks/Foundation.framework', + ], + }, + 'xcode_settings': { + 'WRAPPER_EXTENSION': 'xctest', + 'INFOPLIST_FILE': 'AppTests/Info.plist', + 'BUNDLE_LOADER': '$(BUILT_PRODUCTS_DIR)/app_under_test.app/app_under_test', + 'TEST_HOST': '$(BUNDLE_LOADER)', + }, + }, + ], +} |