diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..448e74d --- /dev/null +++ b/.travis.yml @@ -0,0 +1,23 @@ +language: objective-c +osx_image: xcode6.4 + +install: + - brew install gcovr + +before_script: + - curl -L -ocast.zip https://redirector.gvt1.com/edgedl/chromecast/sdk/ios/GoogleCastSDK-2.7.1-Release-ios-default.zip + - unzip cast.zip 'GoogleCastSDK-2.7.1-Release/GoogleCast.framework/*' + - mv -v GoogleCastSDK-2.7.1-Release/GoogleCast.framework modules/google-cast/ + - curl -L -ofling.zip https://s3-us-west-1.amazonaws.com/amazon-fling/AmazonFling-SDK.zip + - unzip fling.zip 'ios-sdk/frameworks/*' + - mv -v ios-sdk/frameworks/{AmazonFling,third_party_framework/Bolts}.framework modules/firetv/Frameworks/ + +script: + - xctool -scheme ConnectSDK -configuration Debug -sdk iphonesimulator -IDECustomDerivedDataLocation="out/tests_build" GCC_INSTRUMENT_PROGRAM_FLOW_ARCS=YES GCC_GENERATE_TEST_COVERAGE_FILES=YES test + - xctool -scheme ConnectSDKIntegrationTests -configuration Debug -sdk iphonesimulator -IDECustomDerivedDataLocation="out/integration_tests_build" test + +after_success: + - gcovr --object-directory="out/tests_build/ConnectSDK/Build/Intermediates/ConnectSDK.build/Debug-iphonesimulator/ConnectSDK.build/Objects-normal/i386/" --root=. --xml-pretty --gcov-exclude='.*#(?:\w*Tests|Frameworks)#.*' --print-summary --output="cobertura.xml" + - bash <(curl -s https://codecov.io/bash) -f "cobertura.xml" + +# vim: set sw=2 ts=2 sts=2 diff --git a/ConnectSDK-Lite.podspec b/ConnectSDK-Lite.podspec new file mode 100644 index 0000000..e65d569 --- /dev/null +++ b/ConnectSDK-Lite.podspec @@ -0,0 +1,105 @@ +# There are two usage options of this podspec: +# * pod "ConnectSDK" will install the full ConnectSDK version (without Amazon +# Fling SDK support; if you need it, please use the source ConnectSDK project +# directly); +# * pod "ConnectSDK/Core" will install the core only (Lite version) without +# external dependencies. +# +# Unfortunately, Amazon Fling SDK is not distributed via CocoaPods, so we +# cannot include its support in a subspec in an automated way. + +Pod::Spec.new do |s| + s.name = "ConnectSDK-Lite" + s.version = "1.6.2" + s.summary = "Connect SDK is an open source framework that connects your mobile apps with multiple TV platforms." + + s.description = <<-DESC + Connect SDK is an open source framework that connects your mobile apps with multiple TV platforms. Because most TV platforms support a variety of protocols, Connect SDK integrates and abstracts the discovery and connectivity between all supported protocols. + + To discover supported platforms and protocols, Connect SDK uses SSDP to discover services such as DIAL, DLNA, UDAP, and Roku's External Control Guide (ECG). Connect SDK also supports ZeroConf to discover devices such as Chromecast and Apple TV. Even while supporting multiple discovery protocols, Connect SDK is able to generate one unified list of discovered devices from the same network. + + To communicate with discovered devices, Connect SDK integrates support for protocols such as DLNA, DIAL, SSAP, ECG, AirPlay, Chromecast, UDAP, and webOS second screen protocol. Connect SDK intelligently picks which protocol to use depending on the feature being used. + + For example, when connecting to a 2013 LG Smart TV, Connect SDK uses DLNA for media playback, DIAL for YouTube launching, and UDAP for system controls. On Roku, media playback and system controls are made available through ECG, and YouTube launching through DIAL. On Chromecast, media playback occurs through the Cast protocol and YouTube is launched via DIAL. + + To support the aforementioned use case without Connect SDK, a developer would need to implement DIAL, ECG, Chromecast, and DLNA in their app. With Connect SDK, discovering the three devices is handled for you. Furthermore, the method calls between each protocol is abstracted. That means you can use one method call to beam a video to Roku, 3 generations of LG Smart TVs, Apple TV, and Chromecast. + DESC + + s.homepage = "http://www.connectsdk.com/" + s.license = { :type => "Apache License, Version 2.0", :file => "LICENSE" } + s.author = { "Connect SDK" => "support@connectsdk.com" } + s.social_media_url = "http://twitter.com/ConnectSDK" + s.platform = :ios, "7.1" + s.ios.deployment_target = "7.1" + s.source = { :git => "https://github.com/ConnectSDK/Connect-SDK-iOS-Lite.git", + :tag => s.version, + :submodules => true } + + s.xcconfig = { + "OTHER_LDFLAGS" => "$(inherited) -ObjC" + } + + s.requires_arc = true + s.libraries = "z", "icucore" + s.prefix_header_contents = <<-PREFIX + // + // Prefix header + // + // The contents of this file are implicitly included at the beginning of every source file. + // + // Copyright (c) 2015 LG Electronics. + // + // Licensed under the Apache License, Version 2.0 (the "License"); + // you may not use this file except in compliance with the License. + // You may obtain a copy of the License at + // + // http://www.apache.org/licenses/LICENSE-2.0 + // + // Unless required by applicable law or agreed to in writing, software + // distributed under the License is distributed on an "AS IS" BASIS, + // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + // See the License for the specific language governing permissions and + // limitations under the License. + // + + #define CONNECT_SDK_VERSION @"#{s.version}" + + // Uncomment this line to enable SDK logging + //#define CONNECT_SDK_ENABLE_LOG + + #ifndef kConnectSDKWirelessSSIDChanged + #define kConnectSDKWirelessSSIDChanged @"Connect_SDK_Wireless_SSID_Changed" + #endif + + #ifdef CONNECT_SDK_ENABLE_LOG + // credit: http://stackoverflow.com/a/969291/2715 + #ifdef DEBUG + # define DLog(fmt, ...) NSLog((@"%s [Line %d] " fmt), __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__); + #else + # define DLog(...) + #endif + #else + # define DLog(...) + #endif + PREFIX + + non_arc_files = + "core/Frameworks/asi-http-request/External/Reachability/*.{h,m}", + "core/Frameworks/asi-http-request/Classes/*.{h,m}" + + s.subspec 'Core' do |sp| + sp.source_files = "ConnectSDKDefaultPlatforms.h", "core/**/*.{h,m}" + sp.exclude_files = (non_arc_files.dup << "core/ConnectSDK*Tests/**/*") + sp.private_header_files = "core/**/*_Private.h" + sp.requires_arc = true + + sp.dependency 'ConnectSDK/no-arc' + end + + s.subspec 'no-arc' do |sp| + sp.source_files = non_arc_files + sp.requires_arc = false + # disable all warnings from asi-http-request + sp.compiler_flags = '-w' + end +end diff --git a/ConnectSDK.xcodeproj/project.pbxproj b/ConnectSDK-Lite.xcodeproj/project.pbxproj similarity index 99% rename from ConnectSDK.xcodeproj/project.pbxproj rename to ConnectSDK-Lite.xcodeproj/project.pbxproj index 0d9fdb8..f156cb5 100644 --- a/ConnectSDK.xcodeproj/project.pbxproj +++ b/ConnectSDK-Lite.xcodeproj/project.pbxproj @@ -1636,6 +1636,7 @@ developmentRegion = English; hasScannedForEncodings = 0; knownRegions = ( + English, en, ); mainGroup = EA61EB0718FE485B00D75696; @@ -2132,6 +2133,7 @@ CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; COPY_PHASE_STRIP = NO; + ENABLE_BITCODE = NO; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_DYNAMIC_NO_PIC = NO; GCC_OPTIMIZATION_LEVEL = 0; @@ -2170,6 +2172,7 @@ CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; COPY_PHASE_STRIP = YES; + ENABLE_BITCODE = NO; ENABLE_NS_ASSERTIONS = NO; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; @@ -2192,6 +2195,7 @@ COPY_PHASE_STRIP = NO; DEAD_CODE_STRIPPING = NO; DSTROOT = /tmp/Connect_SDK.dst; + ENABLE_BITCODE = NO; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", "$(PROJECT_DIR)/modules/**", @@ -2216,6 +2220,7 @@ DEAD_CODE_STRIPPING = NO; DEPLOYMENT_POSTPROCESSING = YES; DSTROOT = /tmp/Connect_SDK.dst; + ENABLE_BITCODE = NO; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", "$(PROJECT_DIR)/modules/**", @@ -2236,6 +2241,7 @@ EECAED54193F611900D31F61 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { + ENABLE_BITCODE = NO; ONLY_ACTIVE_ARCH = NO; PRODUCT_NAME = "$(TARGET_NAME)"; VALID_ARCHS = "arm64 armv7 armv7s i386 x86_64"; @@ -2245,6 +2251,7 @@ EECAED55193F611900D31F61 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { + ENABLE_BITCODE = NO; ONLY_ACTIVE_ARCH = NO; PRODUCT_NAME = "$(TARGET_NAME)"; VALID_ARCHS = "arm64 armv7 armv7s i386 x86_64"; diff --git a/ConnectSDK.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/ConnectSDK-Lite.xcodeproj/project.xcworkspace/contents.xcworkspacedata similarity index 100% rename from ConnectSDK.xcodeproj/project.xcworkspace/contents.xcworkspacedata rename to ConnectSDK-Lite.xcodeproj/project.xcworkspace/contents.xcworkspacedata diff --git a/ConnectSDK-Lite.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/ConnectSDK-Lite.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/ConnectSDK-Lite.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/ConnectSDK.xcodeproj/xcshareddata/xcschemes/ConnectSDK.xcscheme b/ConnectSDK-Lite.xcodeproj/xcshareddata/xcschemes/ConnectSDK.xcscheme similarity index 96% rename from ConnectSDK.xcodeproj/xcshareddata/xcschemes/ConnectSDK.xcscheme rename to ConnectSDK-Lite.xcodeproj/xcshareddata/xcschemes/ConnectSDK.xcscheme index 6a527d8..468d734 100644 --- a/ConnectSDK.xcodeproj/xcshareddata/xcschemes/ConnectSDK.xcscheme +++ b/ConnectSDK-Lite.xcodeproj/xcshareddata/xcschemes/ConnectSDK.xcscheme @@ -37,7 +37,7 @@ + + + +