Skip to content

Commit

Permalink
Merge branch 'release/2.0'
Browse files Browse the repository at this point in the history
# Conflicts:
#	Podfile.lock
#	Pods/Local Podspecs/SRGAnalytics.podspec.json
#	Pods/Manifest.lock
#	Pods/Pods.xcodeproj/project.pbxproj
#	Pods/SRGMediaPlayer/RTSMediaPlayer/RTSSegmentedTimelineView.m
#	Pods/Target Support Files/SRGMediaPlayer/ResourceBundle-SRGMediaPlayer-Info.plist
#	README.md
#	RTSAnalytics Demo/SRGAnalytics Demo.xcodeproj/project.pbxproj
#	RTSAnalytics Demo/SRGAnalytics Demo.xcodeproj/xcshareddata/xcschemes/SRGAnalytics Demo.xcscheme
#	RTSAnalytics/Core/RTSAnalyticsNetmetrixTracker.m
#	RTSAnalytics/Core/RTSAnalyticsTracker.m
#	SRGAnalytics.podspec
#	SRGAnalytics.xcodeproj/project.pbxproj
  • Loading branch information
defagos committed Apr 4, 2017
2 parents d8cf235 + 813afbf commit 732c4df
Show file tree
Hide file tree
Showing 735 changed files with 7,086 additions and 49,891 deletions.
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Carthage
xcuserdata
.DS_Store

report.xml
test_output
3 changes: 3 additions & 0 deletions Cartfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
github "SRGSSR/SRGMediaPlayer-iOS" "2.0"
github "SRGSSR/srgdataprovider-ios" "5.0"
github "comScore/ComScore-iOS-SDK" "92f34897cd7659d56bb5a3e9e85b808cf3758bda"
7 changes: 7 additions & 0 deletions Cartfile.resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
github "Mantle/Mantle" "2.1.0"
github "SRGSSR/MAKVONotificationCenter" "4a127e52997889729286510103f7e27100223730"
github "SRGSSR/SRGMediaPlayer-iOS" "2.0"
github "SRGSSR/libextobjc" "076c968c9ade619ee836c89a935e09e6708d6ef2"
github "SRGSSR/srgdataprovider-ios" "5.0"
github "SRGSSR/srglogger-ios" "1.0"
github "comScore/ComScore-iOS-SDK" "92f34897cd7659d56bb5a3e9e85b808cf3758bda"
1 change: 1 addition & 0 deletions Demo/Cartfile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
github "kif-framework/KIF" == 3.5.1
1 change: 1 addition & 0 deletions Demo/Cartfile.resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
github "kif-framework/KIF" "v3.5.1"
13 changes: 2 additions & 11 deletions ...nalytics Demo/Supporting Files/Info.plist → Demo/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<string>$(MARKETING_VERSION)</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1</string>
<string>$(CURRENT_PROJECT_VERSION)</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>NSAppTransportSecurity</key>
Expand All @@ -29,8 +29,6 @@
</dict>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIMainStoryboardFile</key>
<string>Main</string>
<key>UIRequiredDeviceCapabilities</key>
<array>
<string>armv7</string>
Expand All @@ -48,12 +46,5 @@
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>RTSAnalytics</key>
<dict>
<key>ComscoreVirtualSite</key>
<string>rts-app-test-v</string>
<key>NetmetrixAppID</key>
<string>test</string>
</dict>
</dict>
</plist>
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
{
"images" : [
{
"idiom" : "iphone",
"size" : "20x20",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "20x20",
"scale" : "3x"
},
{
"size" : "29x29",
"idiom" : "iphone",
Expand Down Expand Up @@ -36,6 +46,16 @@
"filename" : "Icon-60@3x.png",
"scale" : "3x"
},
{
"idiom" : "ipad",
"size" : "20x20",
"scale" : "1x"
},
{
"idiom" : "ipad",
"size" : "20x20",
"scale" : "2x"
},
{
"size" : "29x29",
"idiom" : "ipad",
Expand Down
6 changes: 6 additions & 0 deletions Demo/Resources/Images.xcassets/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"info" : {
"version" : 1,
"author" : "xcode"
}
}
22 changes: 22 additions & 0 deletions Demo/Resources/Images.xcassets/close_button.imageset/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"images" : [
{
"idiom" : "universal",
"filename" : "close_button.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "close_button@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="7706" systemVersion="14E46" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="10117" systemVersion="15G31" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES">
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="7703"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="10085"/>
<capability name="Constraints with non-1.0 multipliers" minToolsVersion="5.1"/>
</dependencies>
<objects>
Expand All @@ -12,7 +12,7 @@
<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) RTS. All rights reserved." textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumFontSize="9" translatesAutoresizingMaskIntoConstraints="NO" id="8ie-xW-0ye">
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Copyright (c) SRG SSR. 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" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,12 @@

#import <UIKit/UIKit.h>

NS_ASSUME_NONNULL_BEGIN

@interface AppDelegate : UIResponder <UIApplicationDelegate>

@property (strong, nonatomic) UIWindow *window;
@property (nonatomic) UIWindow *window;

@end

NS_ASSUME_NONNULL_END
38 changes: 38 additions & 0 deletions Demo/Sources/Application/AppDelegate.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
//
// Copyright (c) SRG SSR. All rights reserved.
//
// License information is available from the LICENSE file.
//

#import "AppDelegate.h"

#import "DemosViewController.h"
#import "SimpleViewController.h"

#import <SRGAnalytics/SRGAnalytics.h>
#import <SRGAnalytics_MediaPlayer/SRGAnalytics_MediaPlayer.h>
#import <SRGLogger/SRGLogger.h>

@implementation AppDelegate

#pragma mark Application lifecycle

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
self.window.backgroundColor = [UIColor blackColor];
[self.window makeKeyAndVisible];

[SRGLogger setLogHandler:SRGNSLogHandler()];

[[SRGAnalyticsTracker sharedTracker] startWithBusinessUnitIdentifier:SRGAnalyticsBusinessUnitIdentifierTEST
comScoreVirtualSite:@"rts-app-test-v"
netMetrixIdentifier:@"test"];

DemosViewController *demosViewController = [[DemosViewController alloc] init];
self.window.rootViewController = [[UINavigationController alloc] initWithRootViewController:demosViewController];

return YES;
}

@end
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,13 @@
// License information is available from 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]));
}
#import <UIKit/UIKit.h>

int main(int argc, char *argv[])
{
@autoreleasepool {
return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
}
}
16 changes: 16 additions & 0 deletions Demo/Sources/Demos/DemosViewController.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
//
// Copyright (c) SRG SSR. All rights reserved.
//
// License information is available from the LICENSE file.
//

#import <SRGAnalytics/SRGAnalytics.h>
#import <UIKit/UIKit.h>

NS_ASSUME_NONNULL_BEGIN

@interface DemosViewController : UITableViewController <UITableViewDelegate, SRGAnalyticsViewTracking>

@end

NS_ASSUME_NONNULL_END
155 changes: 155 additions & 0 deletions Demo/Sources/Demos/DemosViewController.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,155 @@
//
// Copyright (c) SRG SSR. All rights reserved.
//
// License information is available from the LICENSE file.
//

#import "DemosViewController.h"

#import "AppDelegate.h"
#import "PlayerViewController.h"
#import "SimpleViewController.h"

#import <SRGAnalytics_MediaPlayer/SRGAnalytics_MediaPlayer.h>

@implementation DemosViewController

#pragma mark Object lifecycle

- (instancetype)init
{
UIStoryboard *storyboard = [UIStoryboard storyboardWithName:NSStringFromClass([self class]) bundle:nil];
return [storyboard instantiateInitialViewController];
}

#pragma mark SRGAnalyticsViewTracking protocol

- (NSString *)srg_pageViewTitle
{
return @"Demo list";
}

#pragma mark UITableViewDelegate protocol

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
[tableView deselectRowAtIndexPath:indexPath animated:YES];

switch (indexPath.section) {
case 0: {
SimpleViewController *simpleViewController = nil;

switch (indexPath.row) {
case 0: {
simpleViewController = [[SimpleViewController alloc] initWithTitle:@"Automatic tracking"
levels:nil
customLabels:nil
openedFromPushNotification:NO
trackedAutomatically:YES];
break;
}

case 1: {
simpleViewController = [[SimpleViewController alloc] initWithTitle:@"Automatic tracking with levels"
levels:@[@"level1", @"level2", @"level3"]
customLabels:nil
openedFromPushNotification:NO
trackedAutomatically:YES];
break;
}

case 2: {
simpleViewController = [[SimpleViewController alloc] initWithTitle:@"Automatic tracking with many levels"
levels:@[@"level1", @"level2", @"level3", @"level4", @"level5", @"level6", @"level7", @"level8", @"level9", @"level10", @"level11", @"level12"]
customLabels:nil
openedFromPushNotification:NO
trackedAutomatically:YES];
break;
}

case 3: {
simpleViewController = [[SimpleViewController alloc] initWithTitle:@"Automatic tracking with levels and custom labels"
levels:@[@"level1", @"level2"]
customLabels:@{ @"custom_label": @"custom_value" }
openedFromPushNotification:NO
trackedAutomatically:YES];
break;
}

case 4: {
simpleViewController = [[SimpleViewController alloc] initWithTitle:@"Manual tracking"
levels:nil
customLabels:nil
openedFromPushNotification:NO
trackedAutomatically:NO];
break;
}

case 5: {
simpleViewController = [[SimpleViewController alloc] initWithTitle:@""
levels:nil
customLabels:nil
openedFromPushNotification:NO
trackedAutomatically:YES];
break;
}

default: {
return;
break;
}
}
[self.navigationController pushViewController:simpleViewController animated:YES];
break;
}

case 1: {
NSURL *URL = nil;

switch (indexPath.row) {
case 0: {
URL = [NSURL URLWithString:@"http://fr-par-iphone-2.cdn.hexaglobe.net/streaming/euronews_ewns/9-live.m3u8"];
break;
}

case 1: {
URL = [NSURL URLWithString:@"http://stream-i.rts.ch/i/tp/1993/tp_10071993-,450,k.mp4.csmil/master.m3u8"];
break;
}

case 2: {
URL = [NSURL URLWithString:@"https://wowza.jwplayer.com/live/jelly.stream/playlist.m3u8?DVR"];
break;
}


default: {
return;
break;
}
}

PlayerViewController *playerViewController = [[PlayerViewController alloc] initWithURL:URL];
UINavigationController *navigationController = [[UINavigationController alloc] initWithRootViewController:playerViewController];
[self presentViewController:navigationController animated:YES completion:nil];
break;
}

case 2: {
UIViewController *simpleViewController = [[SimpleViewController alloc] initWithTitle:@"From push notification"
levels:nil
customLabels:nil
openedFromPushNotification:YES
trackedAutomatically:YES];
[self.navigationController pushViewController:simpleViewController animated:YES];
break;
}

default: {
return;
break;
}
}
}

@end
Loading

0 comments on commit 732c4df

Please sign in to comment.