Commit bd00671b authored by Thomas Van Lenten's avatar Thomas Van Lenten

ObjC: Add a Xcode project for tvOS.

The CocoaPod (and source) have always support tvOS, but adding the project
makes it easier to run the tests and debug if there ever were an issue.

(not adding a watchOS project at the moment because Apple doesn't provide
 XCTest, so all it could do is build the library. We still support that,
 just can't "test" it.)
parent f56adaeb
......@@ -473,6 +473,12 @@ objectivec_EXTRA_DIST= \
objectivec/ProtocolBuffers_OSX.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings \
objectivec/ProtocolBuffers_OSX.xcodeproj/xcshareddata/xcschemes/PerformanceTests.xcscheme \
objectivec/ProtocolBuffers_OSX.xcodeproj/xcshareddata/xcschemes/ProtocolBuffers.xcscheme \
objectivec/ProtocolBuffers_tvOS.xcodeproj/project.pbxproj \
objectivec/ProtocolBuffers_tvOS.xcodeproj/project.xcworkspace/contents.xcworkspacedata \
objectivec/ProtocolBuffers_tvOS.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist \
objectivec/ProtocolBuffers_tvOS.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings \
objectivec/ProtocolBuffers_tvOS.xcodeproj/xcshareddata/xcschemes/PerformanceTests.xcscheme \
objectivec/ProtocolBuffers_tvOS.xcodeproj/xcshareddata/xcschemes/ProtocolBuffers.xcscheme \
objectivec/README.md \
objectivec/Tests/CocoaPods/OSXCocoaPodsTester/OSXCocoaPodsTester.xcodeproj/project.pbxproj \
objectivec/Tests/CocoaPods/OSXCocoaPodsTester/OSXCocoaPodsTester.xcodeproj/project.xcworkspace/contents.xcworkspacedata \
......
......@@ -43,6 +43,8 @@ OPTIONS:
Skip the Xcode Release configuration.
--skip-xcode-osx
Skip the invoke of Xcode to test the runtime on OS X.
--skip-xcode-tvos
Skip the invoke of Xcode to test the runtime on tvOS.
--skip-objc-conformance
Skip the Objective C conformance tests (run on OS X).
--xcode-quiet
......@@ -82,6 +84,7 @@ REGEN_DESCRIPTORS=no
CORE_ONLY=no
DO_XCODE_IOS_TESTS=yes
DO_XCODE_OSX_TESTS=yes
DO_XCODE_TVOS_TESTS=yes
DO_XCODE_DEBUG=yes
DO_XCODE_RELEASE=yes
DO_OBJC_CONFORMANCE_TESTS=yes
......@@ -111,6 +114,7 @@ while [[ $# != 0 ]]; do
--skip-xcode )
DO_XCODE_IOS_TESTS=no
DO_XCODE_OSX_TESTS=no
DO_XCODE_TVOS_TESTS=no
;;
--skip-xcode-ios )
DO_XCODE_IOS_TESTS=no
......@@ -118,6 +122,9 @@ while [[ $# != 0 ]]; do
--skip-xcode-osx )
DO_XCODE_OSX_TESTS=no
;;
--skip-xcode-tvos )
DO_XCODE_TVOS_TESTS=no
;;
--skip-xcode-debug )
DO_XCODE_DEBUG=no
;;
......@@ -189,6 +196,19 @@ if [[ "${DO_CLEAN}" == "yes" ]] ; then
"${XCODEBUILD_CLEAN_BASE_OSX[@]}" -configuration Release clean
fi
fi
if [[ "${DO_XCODE_TVOS_TESTS}" == "yes" ]] ; then
XCODEBUILD_CLEAN_BASE_OSX=(
xcodebuild
-project objectivec/ProtocolBuffers_tvOS.xcodeproj
-scheme ProtocolBuffers
)
if [[ "${DO_XCODE_DEBUG}" == "yes" ]] ; then
"${XCODEBUILD_CLEAN_BASE_OSX[@]}" -configuration Debug clean
fi
if [[ "${DO_XCODE_RELEASE}" == "yes" ]] ; then
"${XCODEBUILD_CLEAN_BASE_OSX[@]}" -configuration Release clean
fi
fi
fi
if [[ "${REGEN_DESCRIPTORS}" == "yes" ]] ; then
......@@ -316,6 +336,27 @@ if [[ "${DO_XCODE_OSX_TESTS}" == "yes" ]] ; then
"${XCODEBUILD_TEST_BASE_OSX[@]}" -configuration Release test
fi
fi
if [[ "${DO_XCODE_TVOS_TESTS}" == "yes" ]] ; then
XCODEBUILD_TEST_BASE_TVOS=(
xcodebuild
-project objectivec/ProtocolBuffers_tvOS.xcodeproj
-scheme ProtocolBuffers
# Test on the oldest and current.
-destination "platform=tvOS Simulator,name=Apple TV 1080p,OS=9.0"
-destination "platform=tvOS Simulator,name=Apple TV,OS=latest"
)
if [[ "${XCODE_QUIET}" == "yes" ]] ; then
XCODEBUILD_TEST_BASE_TVOS+=( -quiet )
fi
if [[ "${DO_XCODE_DEBUG}" == "yes" ]] ; then
header "Doing Xcode tvOS build/tests - Debug"
"${XCODEBUILD_TEST_BASE_TVOS[@]}" -configuration Debug test
fi
if [[ "${DO_XCODE_RELEASE}" == "yes" ]] ; then
header "Doing Xcode tvOS build/tests - Release"
"${XCODEBUILD_TEST_BASE_TVOS[@]}" -configuration Release test
fi
fi
if [[ "${DO_OBJC_CONFORMANCE_TESTS}" == "yes" ]] ; then
header "Running ObjC Conformance Tests"
......
This diff is collapsed.
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "self:ProtocolBuffers_tvOS.xcodeproj">
</FileRef>
</Workspace>
<?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>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>
<?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>IDEWorkspaceSharedSettings_AutocreateContextsIfNeeded</key>
<false/>
</dict>
</plist>
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0930"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "NO">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "7461B52D0F94FAF800A0C422"
BuildableName = "libProtocolBuffers.a"
BlueprintName = "ProtocolBuffers"
ReferencedContainer = "container:ProtocolBuffers_tvOS.xcodeproj">
</BuildableReference>
</BuildActionEntry>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "NO"
buildForArchiving = "NO"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "F4487C551A9F8F8100531423"
BuildableName = "libTestSingleSourceBuild.a"
BlueprintName = "TestSingleSourceBuild"
ReferencedContainer = "container:ProtocolBuffers_tvOS.xcodeproj">
</BuildableReference>
</BuildActionEntry>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "NO"
buildForProfiling = "NO"
buildForArchiving = "NO"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "8BBEA4A5147C727100C4ADB7"
BuildableName = "UnitTests.xctest"
BlueprintName = "UnitTests"
ReferencedContainer = "container:ProtocolBuffers_tvOS.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
codeCoverageEnabled = "YES"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "8BBEA4A5147C727100C4ADB7"
BuildableName = "UnitTests.xctest"
BlueprintName = "UnitTests"
ReferencedContainer = "container:ProtocolBuffers_tvOS.xcodeproj">
</BuildableReference>
<SkippedTests>
<Test
Identifier = "PerfTests">
</Test>
</SkippedTests>
</TestableReference>
</Testables>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "7461B52D0F94FAF800A0C422"
BuildableName = "libProtocolBuffers.a"
BlueprintName = "ProtocolBuffers"
ReferencedContainer = "container:ProtocolBuffers_tvOS.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "7461B52D0F94FAF800A0C422"
BuildableName = "libProtocolBuffers.a"
BlueprintName = "ProtocolBuffers"
ReferencedContainer = "container:ProtocolBuffers_tvOS.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "7461B52D0F94FAF800A0C422"
BuildableName = "libProtocolBuffers.a"
BlueprintName = "ProtocolBuffers"
ReferencedContainer = "container:ProtocolBuffers_tvOS.xcodeproj">
</BuildableReference>
</MacroExpansion>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
......@@ -180,11 +180,8 @@ build_objectivec_ios() {
# Reused the build script that takes care of configuring and ensuring things
# are up to date. The OS X test runs the objc conformance test, so skip it
# here.
# Note: travis has xctool installed, and we've looked at using it in the past
# but it has ended up proving unreliable (bugs), an they are removing build
# support in favor of xcbuild (or just xcodebuild).
objectivec/DevTools/full_mac_build.sh \
--core-only --skip-xcode-osx --skip-objc-conformance "$@"
--core-only --skip-xcode-osx --skip-xcode-tvos --skip-objc-conformance "$@"
}
build_objectivec_ios_debug() {
......@@ -199,7 +196,23 @@ build_objectivec_osx() {
# Reused the build script that takes care of configuring and ensuring things
# are up to date.
objectivec/DevTools/full_mac_build.sh \
--core-only --skip-xcode-ios
--core-only --skip-xcode-ios --skip-xcode-tvos
}
build_objectivec_tvos() {
# Reused the build script that takes care of configuring and ensuring things
# are up to date. The OS X test runs the objc conformance test, so skip it
# here.
objectivec/DevTools/full_mac_build.sh \
--core-only --skip-xcode-ios --skip-xcode-osx --skip-objc-conformance "$@"
}
build_objectivec_tvos_debug() {
build_objectivec_tvos --skip-xcode-release
}
build_objectivec_tvos_release() {
build_objectivec_tvos --skip-xcode-debug
}
build_objectivec_cocoapods_integration() {
......@@ -608,6 +621,9 @@ Usage: $0 { cpp |
objectivec_ios_debug |
objectivec_ios_release |
objectivec_osx |
objectivec_tvos |
objectivec_tvos_debug |
objectivec_tvos_release |
objectivec_cocoapods_integration |
python |
python_cpp |
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment