Moving build/ios to tools-webrtc/ios

BUG=webrtc:7030
NOTRY=True
R=kjellander@webrtc.org

Review-Url: https://codereview.webrtc.org/2651973002 .
Cr-Commit-Position: refs/heads/master@{#16295}
This commit is contained in:
Mirko Bonadei
2017-01-26 14:20:05 +01:00
parent 7b58960032
commit ad524d66d3
33 changed files with 0 additions and 0 deletions

2
tools-webrtc/ios/OWNERS Normal file
View File

@ -0,0 +1,2 @@
kjellander@webrtc.org
tkchin@webrtc.org

View File

@ -0,0 +1,387 @@
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 46;
objects = {
/* Begin PBXBuildFile section */
35CCB21D484D1895C69C8136 /* libPods-PodTest.a in Frameworks */ = {isa = PBXBuildFile; fileRef = B440848658A273284BE622B2 /* libPods-PodTest.a */; };
980224E81CA2492B00295D57 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 980224E71CA2492B00295D57 /* main.m */; };
980224EB1CA2492B00295D57 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 980224EA1CA2492B00295D57 /* AppDelegate.m */; };
980224EE1CA2492B00295D57 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 980224ED1CA2492B00295D57 /* ViewController.m */; };
980224F11CA2492B00295D57 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 980224EF1CA2492B00295D57 /* Main.storyboard */; };
980224F31CA2492B00295D57 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 980224F21CA2492B00295D57 /* Assets.xcassets */; };
980224F61CA2492B00295D57 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 980224F41CA2492B00295D57 /* LaunchScreen.storyboard */; };
/* End PBXBuildFile section */
/* Begin PBXFileReference section */
958C1C282F79C7CA1502DE3B /* Pods-PodTest.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-PodTest.debug.xcconfig"; path = "Pods/Target Support Files/Pods-PodTest/Pods-PodTest.debug.xcconfig"; sourceTree = "<group>"; };
980224E31CA2492B00295D57 /* PodTest.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = PodTest.app; sourceTree = BUILT_PRODUCTS_DIR; };
980224E71CA2492B00295D57 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
980224E91CA2492B00295D57 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; };
980224EA1CA2492B00295D57 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = "<group>"; };
980224EC1CA2492B00295D57 /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = "<group>"; };
980224ED1CA2492B00295D57 /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = "<group>"; };
980224F01CA2492B00295D57 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
980224F21CA2492B00295D57 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
980224F51CA2492B00295D57 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
980224F71CA2492B00295D57 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
A08398FF9AFA120A294C8B4A /* Pods-PodTest.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-PodTest.release.xcconfig"; path = "Pods/Target Support Files/Pods-PodTest/Pods-PodTest.release.xcconfig"; sourceTree = "<group>"; };
B440848658A273284BE622B2 /* libPods-PodTest.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-PodTest.a"; sourceTree = BUILT_PRODUCTS_DIR; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
980224E01CA2492B00295D57 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
35CCB21D484D1895C69C8136 /* libPods-PodTest.a in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
2D0689FF9D90317696844B09 /* Pods */ = {
isa = PBXGroup;
children = (
958C1C282F79C7CA1502DE3B /* Pods-PodTest.debug.xcconfig */,
A08398FF9AFA120A294C8B4A /* Pods-PodTest.release.xcconfig */,
);
name = Pods;
sourceTree = "<group>";
};
94F704D644F27718B3DC8356 /* Frameworks */ = {
isa = PBXGroup;
children = (
B440848658A273284BE622B2 /* libPods-PodTest.a */,
);
name = Frameworks;
sourceTree = "<group>";
};
980224DA1CA2492B00295D57 = {
isa = PBXGroup;
children = (
980224E51CA2492B00295D57 /* PodTest */,
980224E41CA2492B00295D57 /* Products */,
2D0689FF9D90317696844B09 /* Pods */,
94F704D644F27718B3DC8356 /* Frameworks */,
);
sourceTree = "<group>";
};
980224E41CA2492B00295D57 /* Products */ = {
isa = PBXGroup;
children = (
980224E31CA2492B00295D57 /* PodTest.app */,
);
name = Products;
sourceTree = "<group>";
};
980224E51CA2492B00295D57 /* PodTest */ = {
isa = PBXGroup;
children = (
980224E91CA2492B00295D57 /* AppDelegate.h */,
980224EA1CA2492B00295D57 /* AppDelegate.m */,
980224EC1CA2492B00295D57 /* ViewController.h */,
980224ED1CA2492B00295D57 /* ViewController.m */,
980224EF1CA2492B00295D57 /* Main.storyboard */,
980224F21CA2492B00295D57 /* Assets.xcassets */,
980224F41CA2492B00295D57 /* LaunchScreen.storyboard */,
980224F71CA2492B00295D57 /* Info.plist */,
980224E61CA2492B00295D57 /* Supporting Files */,
);
path = PodTest;
sourceTree = "<group>";
};
980224E61CA2492B00295D57 /* Supporting Files */ = {
isa = PBXGroup;
children = (
980224E71CA2492B00295D57 /* main.m */,
);
name = "Supporting Files";
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
980224E21CA2492B00295D57 /* PodTest */ = {
isa = PBXNativeTarget;
buildConfigurationList = 980224FA1CA2492B00295D57 /* Build configuration list for PBXNativeTarget "PodTest" */;
buildPhases = (
1DF1B456F5E58A85BF7C31CB /* Check Pods Manifest.lock */,
980224DF1CA2492B00295D57 /* Sources */,
980224E01CA2492B00295D57 /* Frameworks */,
980224E11CA2492B00295D57 /* Resources */,
38335E508F0DC12B95F1FA81 /* Embed Pods Frameworks */,
AC997D7BBE631007E4045090 /* Copy Pods Resources */,
);
buildRules = (
);
dependencies = (
);
name = PodTest;
productName = PodTest;
productReference = 980224E31CA2492B00295D57 /* PodTest.app */;
productType = "com.apple.product-type.application";
};
/* End PBXNativeTarget section */
/* Begin PBXProject section */
980224DB1CA2492B00295D57 /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0720;
ORGANIZATIONNAME = "Google Inc.";
TargetAttributes = {
980224E21CA2492B00295D57 = {
CreatedOnToolsVersion = 7.2.1;
};
};
};
buildConfigurationList = 980224DE1CA2492B00295D57 /* Build configuration list for PBXProject "PodTest" */;
compatibilityVersion = "Xcode 3.2";
developmentRegion = English;
hasScannedForEncodings = 0;
knownRegions = (
en,
Base,
);
mainGroup = 980224DA1CA2492B00295D57;
productRefGroup = 980224E41CA2492B00295D57 /* Products */;
projectDirPath = "";
projectRoot = "";
targets = (
980224E21CA2492B00295D57 /* PodTest */,
);
};
/* End PBXProject section */
/* Begin PBXResourcesBuildPhase section */
980224E11CA2492B00295D57 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
980224F61CA2492B00295D57 /* LaunchScreen.storyboard in Resources */,
980224F31CA2492B00295D57 /* Assets.xcassets in Resources */,
980224F11CA2492B00295D57 /* Main.storyboard in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */
/* Begin PBXShellScriptBuildPhase section */
1DF1B456F5E58A85BF7C31CB /* Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "Check Pods Manifest.lock";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n";
showEnvVarsInLog = 0;
};
38335E508F0DC12B95F1FA81 /* Embed Pods Frameworks */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "Embed Pods Frameworks";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-PodTest/Pods-PodTest-frameworks.sh\"\n";
showEnvVarsInLog = 0;
};
AC997D7BBE631007E4045090 /* Copy Pods Resources */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "Copy Pods Resources";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-PodTest/Pods-PodTest-resources.sh\"\n";
showEnvVarsInLog = 0;
};
/* End PBXShellScriptBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
980224DF1CA2492B00295D57 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
980224EE1CA2492B00295D57 /* ViewController.m in Sources */,
980224EB1CA2492B00295D57 /* AppDelegate.m in Sources */,
980224E81CA2492B00295D57 /* main.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin PBXVariantGroup section */
980224EF1CA2492B00295D57 /* Main.storyboard */ = {
isa = PBXVariantGroup;
children = (
980224F01CA2492B00295D57 /* Base */,
);
name = Main.storyboard;
sourceTree = "<group>";
};
980224F41CA2492B00295D57 /* LaunchScreen.storyboard */ = {
isa = PBXVariantGroup;
children = (
980224F51CA2492B00295D57 /* Base */,
);
name = LaunchScreen.storyboard;
sourceTree = "<group>";
};
/* End PBXVariantGroup section */
/* Begin XCBuildConfiguration section */
980224F81CA2492B00295D57 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = dwarf;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_DYNAMIC_NO_PIC = NO;
GCC_NO_COMMON_BLOCKS = YES;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
"$(inherited)",
);
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 9.2;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Debug;
};
980224F91CA2492B00295D57 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_NO_COMMON_BLOCKS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 9.2;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2";
VALIDATE_PRODUCT = YES;
};
name = Release;
};
980224FB1CA2492B00295D57 /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 958C1C282F79C7CA1502DE3B /* Pods-PodTest.debug.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ENABLE_BITCODE = NO;
INFOPLIST_FILE = PodTest/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.google.PodTest;
PRODUCT_NAME = "$(TARGET_NAME)";
};
name = Debug;
};
980224FC1CA2492B00295D57 /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = A08398FF9AFA120A294C8B4A /* Pods-PodTest.release.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ENABLE_BITCODE = NO;
INFOPLIST_FILE = PodTest/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.google.PodTest;
PRODUCT_NAME = "$(TARGET_NAME)";
};
name = Release;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
980224DE1CA2492B00295D57 /* Build configuration list for PBXProject "PodTest" */ = {
isa = XCConfigurationList;
buildConfigurations = (
980224F81CA2492B00295D57 /* Debug */,
980224F91CA2492B00295D57 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
980224FA1CA2492B00295D57 /* Build configuration list for PBXNativeTarget "PodTest" */ = {
isa = XCConfigurationList;
buildConfigurations = (
980224FB1CA2492B00295D57 /* Debug */,
980224FC1CA2492B00295D57 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
rootObject = 980224DB1CA2492B00295D57 /* Project object */;
}

View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "self:PodTest.xcodeproj">
</FileRef>
</Workspace>

View File

@ -0,0 +1,17 @@
/*
* Copyright 2016 The WebRTC project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
#import <UIKit/UIKit.h>
@interface AppDelegate : UIResponder <UIApplicationDelegate>
@property (strong, nonatomic) UIWindow *window;
@end

View File

@ -0,0 +1,26 @@
/*
* Copyright 2016 The WebRTC project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
#import "AppDelegate.h"
#import <WebRTC/WebRTC.h>
@implementation AppDelegate
- (BOOL)application:(UIApplication *)application
didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
RTCInitializeSSL();
return YES;
}
- (void)applicationWillTerminate:(UIApplication *)application {
RTCCleanupSSL();
}
@end

View File

@ -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"
}
}

View File

@ -0,0 +1,27 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="8150" systemVersion="15A204g" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" initialViewController="01J-lp-oVM">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="8122"/>
</dependencies>
<scenes>
<!--View Controller-->
<scene sceneID="EHf-IW-A2E">
<objects>
<viewController id="01J-lp-oVM" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="Llm-lL-Icb"/>
<viewControllerLayoutGuide type="bottom" id="xb3-aO-Qok"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<animations/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="53" y="375"/>
</scene>
</scenes>
</document>

View File

@ -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>

View File

@ -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>$(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>
<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>

View File

@ -0,0 +1,15 @@
/*
* Copyright 2016 The WebRTC project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
#import <UIKit/UIKit.h>
@interface ViewController : UIViewController
@end

View File

@ -0,0 +1,27 @@
/*
* Copyright 2016 The WebRTC project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
#import "ViewController.h"
#import <WebRTC/WebRTC.h>
@interface ViewController ()
@property (nonatomic, strong) RTCPeerConnectionFactory *factory;
@property (nonatomic, strong) RTCAVFoundationVideoSource *videoSource;
@end
@implementation ViewController
- (void)viewDidLoad {
[super viewDidLoad];
self.factory = [[RTCPeerConnectionFactory alloc] init];
self.videoSource = [self.factory avFoundationVideoSourceWithConstraints:nil];
}
@end

View File

@ -0,0 +1,21 @@
/*
* Copyright 2016 The WebRTC project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
#import <UIKit/UIKit.h>
#import "AppDelegate.h"
int main(int argc, char* argv[]) {
@autoreleasepool {
return UIApplicationMain(argc,
argv,
nil,
NSStringFromClass([AppDelegate class]));
}
}

View File

@ -0,0 +1,9 @@
# Uncomment this line to define a global platform for your project
# platform :ios, '8.0'
# Uncomment this line if you're using Swift
# use_frameworks!
target 'PodTest' do
pod "WebRTC", :path => "../../../../../out_ios_libs"
end

View File

@ -0,0 +1,216 @@
#!/bin/bash
# Copyright 2015 The WebRTC project authors. All Rights Reserved.
#
# Use of this source code is governed by a BSD-style license
# that can be found in the LICENSE file in the root of the source
# tree. An additional intellectual property rights grant can be found
# in the file PATENTS. All contributing project authors may
# be found in the AUTHORS file in the root of the source tree.
# Generates static FAT libraries for ios in out_ios_libs.
# Exit on errors.
set -e
# Environment
export PATH=/usr/libexec:$PATH
SCRIPT_DIR=$(cd $(dirname $0) && pwd)
WEBRTC_BASE_DIR=${SCRIPT_DIR}/../../..
function clean_artifacts {
local output_dir=$1
if [[ -d ${output_dir} ]]; then
echo "Deleting ${output_dir}"
rm -r ${output_dir}
fi
}
function build_webrtc {
local target_arch=$1
local flavor=$2
local build_type=$3
local ios_deployment_target=$4
local libvpx_build_vp9=$5
local use_bitcode=$6
local custom_gn_options=$7
OUTPUT_DIR=${SDK_OUTPUT_DIR}/${target_arch}_libs
GN_ARGS="target_os=\"ios\" ios_enable_code_signing=false \
use_xcode_clang=true is_component_build=false"
# Add flavor option.
if [[ ${flavor} = "debug" ]]; then
GN_ARGS="${GN_ARGS} is_debug=true"
elif [[ ${flavor} = "release" ]]; then
GN_ARGS="${GN_ARGS} is_debug=false"
else
echo "Unexpected flavor type: ${flavor}"
exit 1
fi
# Add the specified architecture.
GN_ARGS="${GN_ARGS} target_cpu=\"${target_arch}\""
# Add deployment target.
GN_ARGS="${GN_ARGS} ios_deployment_target=\"${ios_deployment_target}\""
# Add vp9 option.
GN_ARGS="${GN_ARGS} rtc_libvpx_build_vp9=${libvpx_build_vp9}"
# Add bitcode option.
GN_ARGS="${GN_ARGS} enable_ios_bitcode=${use_bitcode}"
# Add custom options.
if [[ -n "${custom_gn_options}" ]]; then
GN_ARGS="${GN_ARGS} ${custom_gn_options}"
fi
# Generate static or dynamic.
if [[ ${build_type} = "static_only" ]]; then
GN_TARGET_NAME="rtc_sdk_objc"
elif [[ ${build_type} == "framework" ]]; then
GN_TARGET_NAME="rtc_sdk_framework_objc"
GN_ARGS="${GN_ARGS} enable_dsyms=true enable_stripping=true"
else
echo "Build type \"${build_type}\" is not supported."
exit 1
fi
echo "Building WebRTC with args: ${GN_ARGS}"
gn gen ${OUTPUT_DIR} --args="${GN_ARGS}"
echo "Building target: ${GN_TARGET_NAME}"
ninja -C ${OUTPUT_DIR} ${GN_TARGET_NAME}
# Strip debug symbols to reduce size.
if [[ ${build_type} = "static_only" ]]; then
strip -S ${OUTPUT_DIR}/obj/webrtc/sdk/lib${GN_TARGET_NAME}.a -o \
${OUTPUT_DIR}/lib${GN_TARGET_NAME}.a
fi
}
function usage {
echo "WebRTC iOS FAT libraries build script."
echo "Each architecture is compiled separately before being merged together."
echo "By default, the library is created in out_ios_libs/. (Change with -o.)"
echo "The headers will be copied to out_ios_libs/include."
echo "Usage: $0 [-h] [-b build_type] [-c] [-o output_dir] [-r rev_num] [-e]"
echo " -h Print this help."
echo " -b The build type. Can be \"framework\" or \"static_only\"."
echo " Defaults to \"framework\"."
echo " -c Removes the previously generated build output, if any."
echo " -o Specifies a directory to output the build artifacts to."
echo " If specified together with -c, deletes the dir."
echo " -r Specifies a revision number to embed if building the framework."
echo " -e Compile with bitcode."
exit 0
}
SDK_OUTPUT_DIR=${WEBRTC_BASE_DIR}/out_ios_libs
SDK_LIB_NAME="librtc_sdk_objc.a"
SDK_FRAMEWORK_NAME="WebRTC.framework"
BUILD_FLAVOR="release"
BUILD_TYPE="framework"
ENABLED_ARCHITECTURES=("arm" "arm64" "x64")
IOS_DEPLOYMENT_TARGET="8.0"
LIBVPX_BUILD_VP9="false"
USE_BITCODE="false"
CUSTOM_GN_OPTS=""
WEBRTC_REVISION="0"
# Parse arguments.
while getopts "hb:co:r:e" opt; do
case "${opt}" in
h) usage;;
b) BUILD_TYPE="${OPTARG}";;
c) PERFORM_CLEAN=1;;
e) USE_BITCODE="true";;
o) SDK_OUTPUT_DIR="${OPTARG}";;
r) WEBRTC_REVISION="${OPTARG}";;
*)
usage
exit 1
;;
esac
done
if [[ ${PERFORM_CLEAN} -ne 0 ]]; then
clean_artifacts ${SDK_OUTPUT_DIR}
exit 0
fi
# Build all architectures.
for arch in ${ENABLED_ARCHITECTURES[*]}; do
build_webrtc $arch ${BUILD_FLAVOR} ${BUILD_TYPE} \
${IOS_DEPLOYMENT_TARGET} ${LIBVPX_BUILD_VP9} ${USE_BITCODE} \
${CUSTOM_GN_OPTS}
done
# Ignoring x86 except for static libraries for now because of a GN build issue
# where the generated dynamic framework has the wrong architectures.
# Create FAT archive.
if [[ ${BUILD_TYPE} = "static_only" ]]; then
build_webrtc "x86" ${BUILD_FLAVOR} ${BUILD_TYPE} \
${IOS_DEPLOYMENT_TARGET} ${LIBVPX_BUILD_VP9} ${USE_BITCODE} \
${CUSTOM_GN_OPTS}
ARM_LIB_PATH=${SDK_OUTPUT_DIR}/arm_libs/${SDK_LIB_NAME}
ARM64_LIB_PATH=${SDK_OUTPUT_DIR}/arm64_libs/${SDK_LIB_NAME}
X64_LIB_PATH=${SDK_OUTPUT_DIR}/x64_libs/${SDK_LIB_NAME}
X86_LIB_PATH=${SDK_OUTPUT_DIR}/x86_libs/${SDK_LIB_NAME}
# Combine the slices.
lipo ${ARM_LIB_PATH} ${ARM64_LIB_PATH} ${X64_LIB_PATH} ${X86_LIB_PATH} \
-create -output ${SDK_OUTPUT_DIR}/${SDK_LIB_NAME}
elif [[ ${BUILD_TYPE} = "framework" ]]; then
ARM_LIB_PATH=${SDK_OUTPUT_DIR}/arm_libs
ARM64_LIB_PATH=${SDK_OUTPUT_DIR}/arm64_libs
X64_LIB_PATH=${SDK_OUTPUT_DIR}/x64_libs
X86_LIB_PATH=${SDK_OUTPUT_DIR}/x86_libs
# Combine the slices.
DYLIB_PATH="WebRTC.framework/WebRTC"
cp -R ${ARM64_LIB_PATH}/WebRTC.framework ${SDK_OUTPUT_DIR}
rm ${SDK_OUTPUT_DIR}/${DYLIB_PATH}
echo "Merging framework slices."
lipo ${ARM_LIB_PATH}/${DYLIB_PATH} \
${ARM64_LIB_PATH}/${DYLIB_PATH} \
${X64_LIB_PATH}/${DYLIB_PATH} \
-create -output ${SDK_OUTPUT_DIR}/${DYLIB_PATH}
# Remove stray mobileprovision if it exists until chromium roll lands.
# See https://codereview.chromium.org/2397433002.
PROVISION_FILE=${SDK_OUTPUT_DIR}/WebRTC.framework/embedded.mobileprovision
if [[ -e ${PROVISION_FILE} ]]; then
rm ${PROVISION_FILE}
fi
# Merge the dSYM slices.
DSYM_PATH="WebRTC.dSYM/Contents/Resources/DWARF/WebRTC"
cp -R ${ARM64_LIB_PATH}/WebRTC.dSYM ${SDK_OUTPUT_DIR}
rm ${SDK_OUTPUT_DIR}/${DSYM_PATH}
echo "Merging dSYM slices."
lipo ${ARM_LIB_PATH}/${DSYM_PATH} \
${ARM64_LIB_PATH}/${DSYM_PATH} \
${X64_LIB_PATH}/${DSYM_PATH} \
-create -output ${SDK_OUTPUT_DIR}/${DSYM_PATH}
# Modify the version number.
# Format should be <Branch cut MXX>.<Hotfix #>.<Rev #>.
# e.g. 55.0.14986 means branch cut 55, no hotfixes, and revision number 14986.
INFOPLIST_PATH=${SDK_OUTPUT_DIR}/WebRTC.framework/Info.plist
MAJOR_MINOR=$(PlistBuddy -c "Print :CFBundleShortVersionString" \
${INFOPLIST_PATH})
VERSION_NUMBER="${MAJOR_MINOR}.${WEBRTC_REVISION}"
echo "Substituting revision number: ${VERSION_NUMBER}"
PlistBuddy -c "Set :CFBundleVersion ${VERSION_NUMBER}" ${INFOPLIST_PATH}
plutil -convert binary1 ${INFOPLIST_PATH}
else
echo "BUILD_TYPE ${BUILD_TYPE} not supported."
exit 1
fi
echo "Done."

View File

@ -0,0 +1,21 @@
{
"owners": [
"kjellander"
],
"comments": [
"Builder for 32-bit devices.",
"gn_args in this file is only read by the buildbot recipe; ",
"webrtc/build/mb_config.pyl contains the actual build configuration.",
"TODO(kjellander): remove gn_args when the recipe is updated."
],
"xcode version": "8.0",
"gn_args": [
"use_goma=true"
],
"compiler": "ninja",
"additional_compile_targets": [ "all" ],
"configuration": "Debug",
"sdk": "iphoneos10.0",
"tests": [
]
}

View File

@ -0,0 +1,21 @@
{
"owners": [
"kjellander"
],
"comments": [
"Builder for 32-bit devices.",
"gn_args in this file is only read by the buildbot recipe; ",
"webrtc/build/mb_config.pyl contains the actual build configuration.",
"TODO(kjellander): remove gn_args when the recipe is updated."
],
"xcode version": "8.0",
"gn_args": [
"use_goma=true"
],
"compiler": "ninja",
"additional_compile_targets": [ "all" ],
"configuration": "Release",
"sdk": "iphoneos10.0",
"tests": [
]
}

View File

@ -0,0 +1,26 @@
{
"owners": [
"kjellander"
],
"comments": [
"Tests for 32-bit iOS simulators.",
"gn_args in this file is only read by the buildbot recipe; ",
"webrtc/build/mb_config.pyl contains the actual build configuration.",
"TODO(kjellander): remove gn_args when the recipe is updated."
],
"xcode version": "8.0",
"gn_args": [
"use_goma=true"
],
"compiler": "ninja",
"additional_compile_targets": [ "all" ],
"configuration": "Debug",
"sdk": "iphonesimulator9.0",
"tests": [
{
"include": "common_tests.json",
"device type": "iPhone 5",
"os": "9.0"
}
]
}

View File

@ -0,0 +1,21 @@
{
"owners": [
"kjellander"
],
"comments": [
"Builder for 64-bit devices.",
"gn_args in this file is only read by the buildbot recipe; ",
"webrtc/build/mb_config.pyl contains the actual build configuration.",
"TODO(kjellander): remove gn_args when the recipe is updated."
],
"xcode version": "8.0",
"gn_args": [
"use_goma=true"
],
"compiler": "ninja",
"additional_compile_targets": [ "all" ],
"configuration": "Debug",
"sdk": "iphoneos10.0",
"tests": [
]
}

View File

@ -0,0 +1,21 @@
{
"owners": [
"kjellander"
],
"comments": [
"Builder for 64-bit devices.",
"gn_args in this file is only read by the buildbot recipe; ",
"webrtc/build/mb_config.pyl contains the actual build configuration.",
"TODO(kjellander): remove gn_args when the recipe is updated."
],
"xcode version": "8.0",
"gn_args": [
"use_goma=true"
],
"compiler": "ninja",
"additional_compile_targets": [ "all" ],
"configuration": "Release",
"sdk": "iphoneos10.0",
"tests": [
]
}

View File

@ -0,0 +1,26 @@
{
"owners": [
"kjellander"
],
"comments": [
"Tests for 64-bit iOS simulators.",
"gn_args in this file is only read by the buildbot recipe; ",
"webrtc/build/mb_config.pyl contains the actual build configuration.",
"TODO(kjellander): remove gn_args when the recipe is updated."
],
"xcode version": "8.0",
"gn_args": [
"use_goma=true"
],
"compiler": "ninja",
"additional_compile_targets": [ "all" ],
"configuration": "Debug",
"sdk": "iphonesimulator10.0",
"tests": [
{
"include": "common_tests.json",
"device type": "iPhone 6s",
"os": "10.0"
}
]
}

View File

@ -0,0 +1,26 @@
{
"owners": [
"kjellander"
],
"comments": [
"Tests for 64-bit iOS simulators.",
"gn_args in this file is only read by the buildbot recipe; ",
"webrtc/build/mb_config.pyl contains the actual build configuration.",
"TODO(kjellander): remove gn_args when the recipe is updated."
],
"xcode version": "8.0",
"gn_args": [
"use_goma=true"
],
"compiler": "ninja",
"additional_compile_targets": [ "all" ],
"configuration": "Debug",
"sdk": "iphonesimulator9.0",
"tests": [
{
"include": "common_tests.json",
"device type": "iPhone 6s",
"os": "9.0"
}
]
}

View File

@ -0,0 +1,145 @@
#!/usr/bin/python
# Copyright 2016 The WebRTC project authors. All Rights Reserved.
#
# Use of this source code is governed by a BSD-style license
# that can be found in the LICENSE file in the root of the source
# tree. An additional intellectual property rights grant can be found
# in the file PATENTS. All contributing project authors may
# be found in the AUTHORS file in the root of the source tree.
"""Generates license HTML for a prebuilt version of WebRTC for iOS."""
import sys
import argparse
import cgi
import fnmatch
import os
import re
import textwrap
LIB_TO_LICENSES_DICT = {
'boringssl': ['third_party/boringssl/src/LICENSE'],
'expat': ['third_party/expat/files/COPYING'],
'jsoncpp': ['third_party/jsoncpp/LICENSE'],
'opus': ['third_party/opus/src/COPYING'],
'protobuf_lite': ['third_party/protobuf/LICENSE'],
'srtp': ['third_party/libsrtp/srtp/LICENSE'],
'usrsctplib': ['third_party/usrsctp/LICENSE'],
'webrtc': ['webrtc/LICENSE', 'webrtc/LICENSE_THIRD_PARTY'],
'vpx': ['third_party/libvpx/source/libvpx/LICENSE'],
'yuv': ['third_party/libyuv/LICENSE'],
}
SCRIPT_DIR = os.path.dirname(os.path.realpath(sys.argv[0]))
CHECKOUT_ROOT = os.path.abspath(os.path.join(SCRIPT_DIR, os.pardir, os.pardir,
os.pardir))
TALK_ROOT = os.path.join(CHECKOUT_ROOT, 'talk')
WEBRTC_ROOT = os.path.join(CHECKOUT_ROOT, 'webrtc')
def GetWebRTCGypFilePaths():
gyp_filepaths = []
search_roots = [TALK_ROOT, WEBRTC_ROOT]
for search_root in search_roots:
for root, _, filenames in os.walk(search_root):
for filename in fnmatch.filter(filenames, '*.gyp*'):
gyp_filepaths.append(os.path.join(root, filename))
return gyp_filepaths
def GetWebRTCTargetNames():
gyp_filepaths = GetWebRTCGypFilePaths()
target_names = []
for gyp_filepath in gyp_filepaths:
with open(gyp_filepath, 'r') as gyp_file:
for line in gyp_file:
match = re.search(r'\'target_name\'.*\'(\w+)\'', line)
if match:
target_name = match.group(1)
target_names.append(target_name)
return target_names
class LicenseBuilder(object):
def __init__(self):
self.webrtc_target_names = GetWebRTCTargetNames()
def IsWebRTCLib(self, lib_name):
alternate_lib_name = 'lib' + lib_name
return (lib_name in self.webrtc_target_names or
alternate_lib_name in self.webrtc_target_names)
def GenerateLicenseText(self, static_lib_dir, output_dir):
# Get a list of libs from the files without their prefix and extension.
static_libs = []
for static_lib in os.listdir(static_lib_dir):
# Skip non libraries.
if not (static_lib.endswith('.a') and static_lib.startswith('lib')):
continue
# Extract library name.
static_libs.append(static_lib[3:-2])
# Generate amalgamated list of libraries. Mostly this just collapses the
# various WebRTC libs names into just 'webrtc'. Will exit with error if a
# lib is unrecognized.
license_libs = set()
for static_lib in static_libs:
license_lib = 'webrtc' if self.IsWebRTCLib(static_lib) else static_lib
license_path = LIB_TO_LICENSES_DICT.get(license_lib)
if license_path is None:
print 'Missing license path for lib: %s' % license_lib
return 1
license_libs.add(license_lib)
# Put webrtc at the front of the list.
assert 'webrtc' in license_libs
license_libs.remove('webrtc')
license_libs = sorted(license_libs)
license_libs.insert(0, 'webrtc')
# Generate HTML.
output_license_file = open(os.path.join(output_dir, 'LICENSE.html'), 'w+')
output_license_file.write('<!DOCTYPE html>\n')
output_license_file.write('<html>\n<head>\n')
output_license_file.write('<meta charset="UTF-8">\n')
output_license_file.write('<title>Licenses</title>\n')
style_tag = textwrap.dedent('''\
<style>
body { margin: 0; font-family: sans-serif; }
pre { background-color: #eeeeee; padding: 1em; white-space: pre-wrap; }
p { margin: 1em; white-space: nowrap; }
</style>
''')
output_license_file.write(style_tag)
output_license_file.write('</head>\n')
for license_lib in license_libs:
output_license_file.write('<p>%s<br/></p>\n' % license_lib)
output_license_file.write('<pre>\n')
for path in LIB_TO_LICENSES_DICT[license_lib]:
license_path = os.path.join(CHECKOUT_ROOT, path)
with open(license_path, 'r') as license_file:
license_text = cgi.escape(license_file.read(), quote=True)
output_license_file.write(license_text)
output_license_file.write('\n')
output_license_file.write('</pre>\n')
output_license_file.write('</body>\n')
output_license_file.write('</html>')
output_license_file.close()
return 0
if __name__ == '__main__':
parser = argparse.ArgumentParser(description='Generate WebRTC LICENSE.html')
parser.add_argument('static_lib_dir',
help='Directory with built static libraries.')
parser.add_argument('output_dir',
help='Directory to output LICENSE.html to.')
args = parser.parse_args()
builder = LicenseBuilder()
sys.exit(builder.GenerateLicenseText(args.static_lib_dir, args.output_dir))

View File

@ -0,0 +1,124 @@
#!/usr/bin/python
# Copyright 2016 The WebRTC project authors. All Rights Reserved.
#
# Use of this source code is governed by a BSD-style license
# that can be found in the LICENSE file in the root of the source
# tree. An additional intellectual property rights grant can be found
# in the file PATENTS. All contributing project authors may
# be found in the AUTHORS file in the root of the source tree.
"""Script for merging generated iOS libraries."""
import sys
import argparse
import os
import re
import subprocess
# Valid arch subdir names.
VALID_ARCHS = ['arm_libs', 'arm64_libs', 'ia32_libs', 'x64_libs']
def MergeLibs(lib_base_dir):
"""Merges generated iOS libraries for different archs.
Uses libtool to generate FAT archive files for each generated library.
Args:
lib_base_dir: directory whose subdirectories are named by architecture and
contain the built libraries for that architecture
Returns:
Exit code of libtool.
"""
output_dir_name = 'fat_libs'
archs = [arch for arch in os.listdir(lib_base_dir)
if arch in VALID_ARCHS]
# For each arch, find (library name, libary path) for arch. We will merge
# all libraries with the same name.
libs = {}
for lib_dir in [os.path.join(lib_base_dir, arch) for arch in VALID_ARCHS]:
if not os.path.exists(lib_dir):
continue
for dirpath, _, filenames in os.walk(lib_dir):
for filename in filenames:
if not filename.endswith('.a'):
continue
entry = libs.get(filename, [])
entry.append(os.path.join(dirpath, filename))
libs[filename] = entry
orphaned_libs = {}
valid_libs = {}
for library, paths in libs.items():
if len(paths) < len(archs):
orphaned_libs[library] = paths
else:
valid_libs[library] = paths
for library, paths in orphaned_libs.items():
components = library[:-2].split('_')[:-1]
found = False
# Find directly matching parent libs by stripping suffix.
while components and not found:
parent_library = '_'.join(components) + '.a'
if parent_library in valid_libs:
valid_libs[parent_library].extend(paths)
found = True
break
components = components[:-1]
# Find next best match by finding parent libs with the same prefix.
if not found:
base_prefix = library[:-2].split('_')[0]
for valid_lib, valid_paths in valid_libs.items():
if valid_lib[:len(base_prefix)] == base_prefix:
valid_paths.extend(paths)
found = True
break
assert found
# Create output directory.
output_dir_path = os.path.join(lib_base_dir, output_dir_name)
if not os.path.exists(output_dir_path):
os.mkdir(output_dir_path)
# Use this so libtool merged binaries are always the same.
env = os.environ.copy()
env['ZERO_AR_DATE'] = '1'
# Ignore certain errors.
libtool_re = re.compile(r'^.*libtool:.*file: .* has no symbols$')
# Merge libraries using libtool.
libtool_returncode = 0
for library, paths in valid_libs.items():
cmd_list = ['libtool', '-static', '-v', '-o',
os.path.join(output_dir_path, library)] + paths
libtoolout = subprocess.Popen(cmd_list, stderr=subprocess.PIPE, env=env)
_, err = libtoolout.communicate()
for line in err.splitlines():
if not libtool_re.match(line):
print >>sys.stderr, line
# Unconditionally touch the output .a file on the command line if present
# and the command succeeded. A bit hacky.
libtool_returncode = libtoolout.returncode
if not libtool_returncode:
for i in range(len(cmd_list) - 1):
if cmd_list[i] == '-o' and cmd_list[i+1].endswith('.a'):
os.utime(cmd_list[i+1], None)
break
return libtool_returncode
def Main():
parser_description = 'Merge WebRTC libraries.'
parser = argparse.ArgumentParser(description=parser_description)
parser.add_argument('lib_base_dir',
help='Directory with built libraries. ',
type=str)
args = parser.parse_args()
lib_base_dir = args.lib_base_dir
MergeLibs(lib_base_dir)
if __name__ == '__main__':
sys.exit(Main())

14
tools-webrtc/ios/no_op.cc Normal file
View File

@ -0,0 +1,14 @@
/*
* Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
// No-op main() to provide a dummy executable target.
int main() {
return 0;
}

View File

@ -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>CFBundleDisplayName</key>
<string>${PRODUCT_NAME}</string>
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
<key>CFBundleIdentifier</key>
<string>com.Google.${PRODUCT_NAME:rfc1034identifier}</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>CFBundleVersion</key>
<string>1.0</string>
</dict>
</plist>

View File

@ -0,0 +1,28 @@
{
"tests": [
{
"app": "audio_decoder_unittests"
},
{
"app": "common_audio_unittests"
},
{
"app": "common_video_unittests"
},
{
"app": "modules_tests"
},
{
"app": "rtc_pc_unittests"
},
{
"app": "system_wrappers_unittests"
},
{
"app": "test_support_unittests"
},
{
"app": "voice_engine_unittests"
}
]
}

View File

@ -0,0 +1,27 @@
{
"owners": [
"kjellander"
],
"comments": [
"Tests for 32-bit iOS simulators.",
"gn_args in this file is only read by the buildbot recipe; ",
"webrtc/build/mb_config.pyl contains the actual build configuration.",
"TODO(kjellander): remove gn_args when the recipe is updated."
],
"xcode version": "8.0",
"gn_args": [
"use_goma=true"
],
"use_analyze": false,
"compiler": "ninja",
"additional_compile_targets": [ "all" ],
"configuration": "Debug",
"sdk": "iphonesimulator9.0",
"tests": [
{
"include": "common_tests.json",
"device type": "iPhone 5",
"os": "9.0"
}
]
}

View File

@ -0,0 +1,27 @@
{
"owners": [
"kjellander"
],
"comments": [
"Tests for 64-bit iOS simulators.",
"gn_args in this file is only read by the buildbot recipe; ",
"webrtc/build/mb_config.pyl contains the actual build configuration.",
"TODO(kjellander): remove gn_args when the recipe is updated."
],
"xcode version": "8.0",
"gn_args": [
"use_goma=true"
],
"use_analyze": false,
"compiler": "ninja",
"additional_compile_targets": [ "all" ],
"configuration": "Debug",
"sdk": "iphonesimulator10.0",
"tests": [
{
"include": "common_tests.json",
"device type": "iPhone 6s",
"os": "10.0"
}
]
}

View File

@ -0,0 +1,27 @@
{
"owners": [
"kjellander"
],
"comments": [
"Tests for 64-bit iOS simulators.",
"gn_args in this file is only read by the buildbot recipe; ",
"webrtc/build/mb_config.pyl contains the actual build configuration.",
"TODO(kjellander): remove gn_args when the recipe is updated."
],
"xcode version": "8.0",
"gn_args": [
"use_goma=true"
],
"use_analyze": false,
"compiler": "ninja",
"additional_compile_targets": [ "all" ],
"configuration": "Debug",
"sdk": "iphonesimulator9.0",
"tests": [
{
"include": "common_tests.json",
"device type": "iPhone 6s",
"os": "9.0"
}
]
}

View File

@ -0,0 +1,22 @@
{
"owners": [
"kjellander"
],
"comments": [
"Builder for 64-bit devices.",
"gn_args in this file is only read by the buildbot recipe; ",
"webrtc/build/mb_config.pyl contains the actual build configuration.",
"TODO(kjellander): remove gn_args when the recipe is updated."
],
"xcode version": "8.0",
"gn_args": [
"use_goma=true"
],
"use_analyze": false,
"compiler": "ninja",
"additional_compile_targets": [ "all" ],
"configuration": "Debug",
"sdk": "iphoneos10.0",
"tests": [
]
}

View File

@ -0,0 +1,22 @@
{
"owners": [
"kjellander"
],
"comments": [
"Builder for 64-bit devices.",
"gn_args in this file is only read by the buildbot recipe; ",
"webrtc/build/mb_config.pyl contains the actual build configuration.",
"TODO(kjellander): remove gn_args when the recipe is updated."
],
"xcode version": "8.0",
"gn_args": [
"use_goma=true"
],
"use_analyze": false,
"compiler": "ninja",
"additional_compile_targets": [ "all" ],
"configuration": "Release",
"sdk": "iphoneos10.0",
"tests": [
]
}

View File

@ -0,0 +1,22 @@
{
"owners": [
"kjellander"
],
"comments": [
"Builder for 32-bit devices.",
"gn_args in this file is only read by the buildbot recipe; ",
"webrtc/build/mb_config.pyl contains the actual build configuration.",
"TODO(kjellander): remove gn_args when the recipe is updated."
],
"xcode version": "8.0",
"gn_args": [
"use_goma=true"
],
"use_analyze": false,
"compiler": "ninja",
"additional_compile_targets": [ "all" ],
"configuration": "Debug",
"sdk": "iphoneos10.0",
"tests": [
]
}

View File

@ -0,0 +1,22 @@
{
"owners": [
"kjellander"
],
"comments": [
"Builder for 32-bit devices.",
"gn_args in this file is only read by the buildbot recipe; ",
"webrtc/build/mb_config.pyl contains the actual build configuration.",
"TODO(kjellander): remove gn_args when the recipe is updated."
],
"xcode version": "8.0",
"gn_args": [
"use_goma=true"
],
"use_analyze": false,
"compiler": "ninja",
"additional_compile_targets": [ "all" ],
"configuration": "Release",
"sdk": "iphoneos10.0",
"tests": [
]
}