remove useless scheme and files

This commit is contained in:
Danmei Chen 2020-03-12 13:04:50 +01:00
parent c893a77d57
commit 06b461ec5b
48 changed files with 9 additions and 4486 deletions

View file

@ -1,26 +0,0 @@
/*
* Copyright (c) 2010-2019 Belledonne Communications SARL.
*
* This file is part of linphone-iphone
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#import <UIKit/UIKit.h>
@interface AppDelegate : UIResponder <UIApplicationDelegate>
@property(strong, nonatomic) UIWindow *window;
@end

View file

@ -1,64 +0,0 @@
/*
* Copyright (c) 2010-2019 Belledonne Communications SARL.
*
* This file is part of linphone-iphone
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#import "AppDelegate.h"
@implementation AppDelegate
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
// Override point for customization after application launch.
if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPad) {
UISplitViewController *splitViewController = (UISplitViewController *)self.window.rootViewController;
UINavigationController *navigationController = [splitViewController.viewControllers lastObject];
splitViewController.delegate = (id)navigationController.topViewController;
}
return YES;
}
- (void)applicationWillResignActive:(UIApplication *)application {
// Sent when the application is about to move from active to inactive state. This can occur for certain types of
// temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application
// and it begins the transition to the background state.
// Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use
// this method to pause the game.
}
- (void)applicationDidEnterBackground:(UIApplication *)application {
// Use this method to release shared resources, save user data, invalidate timers, and store enough application
// state information to restore your application to its current state in case it is terminated later.
// If your application supports background execution, this method is called instead of applicationWillTerminate:
// when the user quits.
}
- (void)applicationWillEnterForeground:(UIApplication *)application {
// Called as part of the transition from the background to the inactive state; here you can undo many of the changes
// made on entering the background.
}
- (void)applicationDidBecomeActive:(UIApplication *)application {
// Restart any tasks that were paused (or not yet started) while the application was inactive. If the application
// was previously in the background, optionally refresh the user interface.
}
- (void)applicationWillTerminate:(UIApplication *)application {
// Called when the application is about to terminate. Save data if appropriate. See also
// applicationDidEnterBackground:.
}
@end

View file

@ -1,130 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="10117" systemVersion="15E65" targetRuntime="iOS.CocoaTouch.iPad" propertyAccessControl="none" useAutolayout="YES" initialViewController="H1p-Uh-vWS">
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="10085"/>
</dependencies>
<scenes>
<!--Navigation Controller-->
<scene sceneID="pY4-Hu-kfo">
<objects>
<navigationController id="RMx-3f-FxP" sceneMemberID="viewController">
<navigationBar key="navigationBar" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" id="Pmd-2v-anx">
<autoresizingMask key="autoresizingMask"/>
</navigationBar>
<connections>
<segue destination="7bK-jq-Zjz" kind="relationship" relationship="rootViewController" id="tsl-Nk-0bq"/>
</connections>
</navigationController>
<placeholder placeholderIdentifier="IBFirstResponder" id="8fS-aE-onr" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="448" y="-630"/>
</scene>
<!--Detail-->
<scene sceneID="yUG-lL-AsK">
<objects>
<viewController title="Detail" id="JEX-9P-axG" customClass="DetailTableView" sceneMemberID="viewController">
<tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="44" sectionHeaderHeight="22" sectionFooterHeight="22" id="aVY-Yw-ztG">
<rect key="frame" x="0.0" y="0.0" width="703" height="768"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<prototypes>
<tableViewCell contentMode="scaleToFill" selectionStyle="blue" indentationWidth="10" reuseIdentifier="testCellIdentifier" textLabel="6lf-XI-z9S" style="IBUITableViewCellStyleDefault" id="fGk-UB-StR">
<rect key="frame" x="0.0" y="86" width="703" height="44"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="fGk-UB-StR" id="oMv-Vp-OY1">
<rect key="frame" x="0.0" y="0.0" width="703" height="43"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="left" text="Title" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="6lf-XI-z9S">
<rect key="frame" x="35" y="0.0" width="633" height="43"/>
<autoresizingMask key="autoresizingMask"/>
<fontDescription key="fontDescription" type="system" pointSize="18"/>
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
<nil key="highlightedColor"/>
</label>
</subviews>
</tableViewCellContentView>
</tableViewCell>
</prototypes>
<sections/>
</tableView>
<toolbarItems/>
<navigationItem key="navigationItem" title="Detail" id="mOI-FS-AaM"/>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="FJe-Yq-33r" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="448" y="248"/>
</scene>
<!--Split View Controller-->
<scene sceneID="Nki-YV-4Qg">
<objects>
<splitViewController id="H1p-Uh-vWS" sceneMemberID="viewController">
<toolbarItems/>
<simulatedOrientationMetrics key="simulatedOrientationMetrics" orientation="landscapeRight"/>
<connections>
<segue destination="RMx-3f-FxP" kind="relationship" relationship="masterViewController" id="BlO-5A-QYV"/>
<segue destination="vC3-pB-5Vb" kind="relationship" relationship="detailViewController" id="Tll-UG-LXB"/>
</connections>
</splitViewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="cZU-Oi-B1e" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="-687" y="-630"/>
</scene>
<!--Master-->
<scene sceneID="smW-Zh-WAh">
<objects>
<tableViewController title="Master" clearsSelectionOnViewWillAppear="NO" id="7bK-jq-Zjz" customClass="MasterView" sceneMemberID="viewController">
<tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="44" sectionHeaderHeight="22" sectionFooterHeight="22" id="r7i-6Z-zg0">
<rect key="frame" x="0.0" y="0.0" width="320" height="768"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<prototypes>
<tableViewCell contentMode="scaleToFill" selectionStyle="blue" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" reuseIdentifier="Cell" textLabel="Arm-wq-HPj" style="IBUITableViewCellStyleDefault" id="WCw-Qf-5nD">
<rect key="frame" x="0.0" y="86" width="320" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="WCw-Qf-5nD" id="37f-cq-3Eg">
<rect key="frame" x="0.0" y="0.0" width="320" height="43"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" text="Title" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="Arm-wq-HPj">
<rect key="frame" x="15" y="0.0" width="290" height="43"/>
<autoresizingMask key="autoresizingMask"/>
<fontDescription key="fontDescription" type="boldSystem" pointSize="20"/>
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
<color key="highlightedColor" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/>
</label>
</subviews>
</tableViewCellContentView>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
</tableViewCell>
</prototypes>
<sections/>
<connections>
<outlet property="dataSource" destination="7bK-jq-Zjz" id="Gho-Na-rnu"/>
<outlet property="delegate" destination="7bK-jq-Zjz" id="RA6-mI-bju"/>
</connections>
</tableView>
<navigationItem key="navigationItem" title="Master" id="Zdf-7t-Un8"/>
</tableViewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="Rux-fX-hf1" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="859" y="-631"/>
</scene>
<!--Navigation Controller-->
<scene sceneID="r7l-gg-dq7">
<objects>
<navigationController id="vC3-pB-5Vb" sceneMemberID="viewController">
<navigationBar key="navigationBar" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" id="DjV-YW-jjY">
<autoresizingMask key="autoresizingMask"/>
</navigationBar>
<connections>
<segue destination="JEX-9P-axG" kind="relationship" relationship="rootViewController" id="GKi-kA-LjT"/>
</connections>
</navigationController>
<placeholder placeholderIdentifier="IBFirstResponder" id="SLD-UC-DBI" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="-366" y="248"/>
</scene>
</scenes>
</document>

View file

@ -1,101 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="9531" systemVersion="15C50" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" initialViewController="rS3-R9-Ivy">
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="9529"/>
</dependencies>
<scenes>
<!--Navigation Controller-->
<scene sceneID="cUi-kZ-frf">
<objects>
<navigationController id="rS3-R9-Ivy" sceneMemberID="viewController">
<navigationBar key="navigationBar" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" id="yXu-0R-QUA">
<autoresizingMask key="autoresizingMask"/>
</navigationBar>
<connections>
<segue destination="pGg-6v-bdr" kind="relationship" relationship="rootViewController" id="RxB-wf-QIq"/>
</connections>
</navigationController>
<placeholder placeholderIdentifier="IBFirstResponder" id="eq9-QA-ai8" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="-1" y="64"/>
</scene>
<!--Master-->
<scene sceneID="VgW-fR-Quf">
<objects>
<tableViewController title="Master" id="pGg-6v-bdr" customClass="MasterView" sceneMemberID="viewController">
<tableView key="view" opaque="NO" clipsSubviews="YES" clearsContextBeforeDrawing="NO" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="44" sectionHeaderHeight="22" sectionFooterHeight="22" id="mLL-gJ-YKr">
<rect key="frame" x="0.0" y="0.0" width="320" height="568"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<prototypes>
<tableViewCell contentMode="scaleToFill" selectionStyle="blue" accessoryType="disclosureIndicator" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" reuseIdentifier="Cell" textLabel="2pz-XF-uhl" style="IBUITableViewCellStyleDefault" id="m0d-ak-lc9">
<rect key="frame" x="0.0" y="86" width="320" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="m0d-ak-lc9" id="d3P-M7-ByW">
<rect key="frame" x="0.0" y="0.0" width="287" height="43"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" text="Title" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="2pz-XF-uhl">
<rect key="frame" x="15" y="0.0" width="270" height="43"/>
<autoresizingMask key="autoresizingMask"/>
<fontDescription key="fontDescription" type="boldSystem" pointSize="20"/>
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
<color key="highlightedColor" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/>
</label>
</subviews>
</tableViewCellContentView>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<connections>
<segue destination="Ah7-4n-0Wa" kind="push" identifier="showDetail" id="jUr-3t-vfg"/>
</connections>
</tableViewCell>
</prototypes>
<sections/>
<connections>
<outlet property="dataSource" destination="pGg-6v-bdr" id="P41-gY-KXY"/>
<outlet property="delegate" destination="pGg-6v-bdr" id="Y6K-Cp-Qkv"/>
</connections>
</tableView>
<navigationItem key="navigationItem" title="List of Categories" id="tQt-TN-PWz"/>
</tableViewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="6Cn-md-YlS" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="459" y="64"/>
</scene>
<!--Detail-->
<scene sceneID="Cn3-H9-jdl">
<objects>
<viewController title="Detail" id="Ah7-4n-0Wa" customClass="DetailTableView" sceneMemberID="viewController">
<tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="44" sectionHeaderHeight="22" sectionFooterHeight="22" id="HbK-cV-Nw3">
<rect key="frame" x="0.0" y="0.0" width="320" height="568"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<prototypes>
<tableViewCell contentMode="scaleToFill" selectionStyle="blue" indentationWidth="10" reuseIdentifier="testCellIdentifier" textLabel="PRJ-ig-cCG" style="IBUITableViewCellStyleDefault" id="SPF-nj-zBJ">
<rect key="frame" x="0.0" y="86" width="320" height="44"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="SPF-nj-zBJ" id="FWx-5H-KOf">
<rect key="frame" x="0.0" y="0.0" width="320" height="43"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="left" text="Title" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="PRJ-ig-cCG">
<rect key="frame" x="15" y="0.0" width="290" height="43"/>
<autoresizingMask key="autoresizingMask"/>
<fontDescription key="fontDescription" type="system" pointSize="18"/>
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
<nil key="highlightedColor"/>
</label>
</subviews>
</tableViewCellContentView>
</tableViewCell>
</prototypes>
</tableView>
<navigationItem key="navigationItem" title="Tests" id="cra-N8-TIN"/>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="lrm-kH-fPn" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="1002" y="78"/>
</scene>
</scenes>
</document>

View file

@ -1,39 +0,0 @@
/*
* Copyright (c) 2010-2019 Belledonne Communications SARL.
*
* This file is part of linphone-iphone
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#import <UIKit/UIKit.h>
typedef NS_ENUM(int, TestState) { TestStateIdle, TestStatePassed, TestStateInProgress, TestStateFailed };
@interface TestItem : NSObject
@property(strong, nonatomic) NSString *suite;
@property(strong, nonatomic) NSString *name;
@property(nonatomic) TestState state;
- (id)initWithName:(NSString *)name fromSuite:(NSString *)suite;
+ (TestItem *)testWithName:(NSString *)name fromSuite:(NSString *)suite;
@end
@interface DetailTableView : UITableViewController
@property(strong, nonatomic) NSString *detailItem;
@end

View file

@ -1,258 +0,0 @@
/*
* Copyright (c) 2010-2019 Belledonne Communications SARL.
*
* This file is part of linphone-iphone
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#import "DetailTableView.h"
#import "MasterView.h"
#include "linphonetester/liblinphone_tester.h"
#import "Log.h"
static NSString *const kAllTestsName = @"Run All tests";
@implementation TestItem
- (id)initWithName:(NSString *)name fromSuite:(NSString *)suite {
self = [super init];
if (self) {
self.name = name;
self.suite = suite;
self.state = TestStateIdle;
}
return self;
}
+ (TestItem *)testWithName:(NSString *)name fromSuite:(NSString *)suite {
return [[TestItem alloc] initWithName:name fromSuite:suite];
}
- (NSString *)description {
return [NSString stringWithFormat:@"{suite:'%@', test:'%@', state:%d}", _suite, _name, _state];
}
@end
@interface DetailTableView () {
NSMutableArray *_tests;
BOOL in_progress;
}
@property(strong, nonatomic) UIPopoverController *masterPopoverController;
- (void)configureView;
@end
@implementation DetailTableView
#pragma mark - Managing the detail item
- (void)setDetailItem:(id)newDetailItem {
if (_detailItem != newDetailItem) {
_detailItem = newDetailItem;
// Update the view.
[self configureView];
[self.tableView reloadData];
}
if (self.masterPopoverController != nil) {
[self.masterPopoverController dismissPopoverAnimated:YES];
}
}
- (void)addTestsFromSuite:(NSString *)suite {
int count = bc_tester_nb_tests([suite UTF8String]);
for (int i = 0; i < count; i++) {
const char *test_name = bc_tester_test_name([suite UTF8String], i);
if (test_name) {
NSString *testName = [NSString stringWithUTF8String:test_name];
TestItem *item = [[TestItem alloc] initWithName:testName fromSuite:suite];
[_tests addObject:item];
}
}
}
- (void)configureView {
_tests = [[NSMutableArray alloc] initWithCapacity:0];
if (self.detailItem == nil) {
return;
}
if ([self.detailItem isEqualToString:@"All"]) {
// dont sort tests if we use all suites at once
for (int i = 0; i < bc_tester_nb_suites(); i++) {
const char *suite = bc_tester_suite_name(i);
if (suite) {
[self addTestsFromSuite:[NSString stringWithUTF8String:suite]];
}
}
} else {
[self addTestsFromSuite:self.detailItem];
[_tests sortUsingComparator:^(TestItem *obj1, TestItem *obj2) {
return [obj1.name compare:obj2.name];
}];
}
// suite name not used for this one
[_tests insertObject:[TestItem testWithName:kAllTestsName fromSuite:self.detailItem] atIndex:0];
}
- (void)viewDidLoad {
[super viewDidLoad];
// Do any additional setup after loading the view, typically from a nib.
[self configureView];
}
- (void)didReceiveMemoryWarning {
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
}
#pragma mark - Tableview
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
return 1;
}
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
return _tests.count;
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
static NSString *kCellId = @"testCellIdentifier";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:kCellId forIndexPath:indexPath];
if (cell == nil) {
cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:kCellId];
}
TestItem *test = _tests[indexPath.row];
cell.textLabel.text = [NSString stringWithFormat:@"%@/%@", test.suite, test.name];
NSString *image = nil;
switch (test.state) {
case TestStateIdle:
image = nil;
break;
case TestStatePassed:
image = @"test_passed";
break;
case TestStateInProgress:
image = @"test_inprogress";
break;
case TestStateFailed:
image = @"test_failed";
break;
}
if (image) {
image = [[NSBundle mainBundle] pathForResource:image ofType:@"png"];
cell.imageView.image = [UIImage imageWithContentsOfFile:image];
} else {
[cell.imageView setImage:nil];
}
return cell;
}
- (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath {
return NO;
}
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
[tableView deselectRowAtIndexPath:indexPath animated:FALSE];
if (indexPath.row == 0) {
// we should run all tests
NSMutableArray *paths = [[NSMutableArray alloc] init];
for (int i = 1; i < _tests.count; i++) {
[paths addObject:[NSIndexPath indexPathForRow:i inSection:0]];
}
[self launchTest:paths];
} else {
[self launchTest:@[ indexPath ]];
}
}
- (void)updateItem:(NSArray *)paths withAnimation:(BOOL)animate {
[self.tableView reloadRowsAtIndexPaths:paths
withRowAnimation:animate ? UITableViewRowAnimationFade : UITableViewRowAnimationNone];
}
- (void)launchTest:(NSArray *)paths {
if (in_progress) {
LOGE(@"Test already in progress");
return;
}
in_progress = TRUE;
for (NSIndexPath *index in paths) {
TestItem *test = _tests[index.row];
test.state = TestStateInProgress;
}
[self updateItem:paths withAnimation:FALSE];
dispatch_queue_t queue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0);
dispatch_async(queue, ^{
for (NSIndexPath *index in paths) {
TestItem *test = _tests[index.row];
LOGI(@"Should launch test %@", test);
NSString *testSuite = test.suite;
if ([test.suite isEqualToString:@"All"]) {
testSuite = nil;
}
NSString *testName = test.name;
if ([test.name isEqualToString:kAllTestsName]) {
testName = nil;
}
BOOL fail = NO;
@try {
fail = bc_tester_run_tests([testSuite UTF8String], [testName UTF8String], NULL);
} @catch (NSException *e) {
fail = YES;
}
if (fail) {
LOGW(@"Test Failed!");
test.state = TestStateFailed;
} else {
LOGI(@"Test Passed!");
test.state = TestStatePassed;
}
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.5 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
[self.tableView scrollToRowAtIndexPath:index atScrollPosition:UITableViewScrollPositionMiddle animated:YES];
[self updateItem:paths withAnimation:TRUE];
});
}
in_progress = FALSE;
});
}
#pragma mark - Split view
- (void)splitViewController:(UISplitViewController *)splitController
willHideViewController:(UIViewController *)viewController
withBarButtonItem:(UIBarButtonItem *)barButtonItem
forPopoverController:(UIPopoverController *)popoverController {
barButtonItem.title = NSLocalizedString(@"Master", @"Master");
[self.navigationItem setLeftBarButtonItem:barButtonItem animated:YES];
self.masterPopoverController = popoverController;
}
- (void)splitViewController:(UISplitViewController *)splitController
willShowViewController:(UIViewController *)viewController
invalidatingBarButtonItem:(UIBarButtonItem *)barButtonItem {
// Called when the view is shown again in the split view, invalidating the button and popover controller.
[self.navigationItem setLeftBarButtonItem:nil animated:YES];
self.masterPopoverController = nil;
}
@end

View file

@ -1,69 +0,0 @@
<?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>CFBundleIcons</key>
<dict/>
<key>CFBundleIcons~ipad</key>
<dict/>
<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.0</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>NSCameraUsageDescription</key>
<string>Make video calls</string>
<key>NSMicrophoneUsageDescription</key>
<string>Make Audio calls</string>
<key>UIMainStoryboardFile</key>
<string>Main_iPhone</string>
<key>UIMainStoryboardFile~ipad</key>
<string>Main_iPad</string>
<key>UIRequiredDeviceCapabilities</key>
<array>
<string>armv7</string>
</array>
<key>UIRequiresFullScreen</key>
<true/>
<key>UIStatusBarTintParameters</key>
<dict>
<key>UINavigationBar</key>
<dict>
<key>Style</key>
<string>UIBarStyleDefault</string>
<key>Translucent</key>
<false/>
</dict>
</dict>
<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

@ -1,16 +0,0 @@
//
// Prefix header
//
// The contents of this file are implicitly included at the beginning of every source file.
//
#import <Availability.h>
#ifndef __IPHONE_5_0
#warning "This project uses features only available in iOS SDK 5.0 and later."
#endif
#ifdef __OBJC__
#import <UIKit/UIKit.h>
#import <Foundation/Foundation.h>
#endif

View file

@ -1,28 +0,0 @@
/*
* Copyright (c) 2010-2019 Belledonne Communications SARL.
*
* This file is part of linphone-iphone
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#import <UIKit/UIKit.h>
@class DetailTableView;
@interface MasterView : UITableViewController
@property(strong, nonatomic) DetailTableView *detailViewController;
@end

View file

@ -1,161 +0,0 @@
/*
* Copyright (c) 2010-2019 Belledonne Communications SARL.
*
* This file is part of linphone-iphone
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#import "MasterView.h"
#import "DetailTableView.h"
#import "Log.h"
#include "TargetConditionals.h"
#include "linphonetester/liblinphone_tester.h"
#include "mediastreamer2/msutils.h"
@interface MasterView () {
NSMutableArray *_objects;
NSString *bundlePath;
NSString *writablePath;
}
@end
@implementation MasterView
- (void)awakeFromNib {
if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPad) {
self.clearsSelectionOnViewWillAppear = NO;
self.preferredContentSize = CGSizeMake(320.0, 600.0);
}
[super awakeFromNib];
}
- (void)viewDidLoad {
[super viewDidLoad];
// Do any additional setup after loading the view, typically from a nib.
self.detailViewController =
(DetailTableView *)[[self.splitViewController.viewControllers lastObject] topViewController];
liblinphone_tester_init(NULL);
[Log enableLogs:ORTP_DEBUG];
liblinphone_tester_keep_accounts(TRUE);
bundlePath = [NSString stringWithFormat:@"%@/liblinphone_tester/", [[NSBundle mainBundle] bundlePath]];
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES);
writablePath = [paths objectAtIndex:0];
// bc_tester_init(tester_logs_handler, ORTP_MESSAGE, ORTP_ERROR, "rcfiles");
// liblinphone_tester_add_suites();
bc_tester_set_resource_dir_prefix([bundlePath UTF8String]);
bc_tester_set_writable_dir_prefix([writablePath UTF8String]);
LOGI(@"Bundle path: %@", bundlePath);
LOGI(@"Writable path: %@", writablePath);
//liblinphonetester_ipv6 = true;
int count = bc_tester_nb_suites();
_objects = [[NSMutableArray alloc] initWithCapacity:count + 1];
for (int i = 0; i < count; i++) {
const char *suite = bc_tester_suite_name(i);
[_objects addObject:[NSString stringWithUTF8String:suite]];
}
[_objects sortUsingSelector:@selector(localizedCaseInsensitiveCompare:)];
[_objects insertObject:@"All" atIndex:0];
}
- (void)dealloc {
liblinphone_tester_clear_accounts();
}
- (void)displayLogs {
LOGI(@"Should display logs");
[self.navigationController performSegueWithIdentifier:@"viewLogs" sender:self];
}
- (void)didReceiveMemoryWarning {
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
}
#pragma mark - Table View
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
return 1;
}
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
return _objects.count;
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"Cell" forIndexPath:indexPath];
NSString *suite = _objects[indexPath.row];
cell.textLabel.text = suite;
return cell;
}
- (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath {
// Return NO if you do not want the specified item to be editable.
return NO;
}
- (void)tableView:(UITableView *)tableView
commitEditingStyle:(UITableViewCellEditingStyle)editingStyle
forRowAtIndexPath:(NSIndexPath *)indexPath {
if (editingStyle == UITableViewCellEditingStyleDelete) {
[_objects removeObjectAtIndex:indexPath.row];
[tableView deleteRowsAtIndexPaths:@[ indexPath ] withRowAnimation:UITableViewRowAnimationFade];
} else if (editingStyle == UITableViewCellEditingStyleInsert) {
// Create a new instance of the appropriate class, insert it into the array, and add a new row to the table
// view.
}
}
/*
// Override to support rearranging the table view.
- (void)tableView:(UITableView *)tableView moveRowAtIndexPath:(NSIndexPath *)fromIndexPath toIndexPath:(NSIndexPath
*)toIndexPath
{
}
*/
/*
// Override to support conditional rearranging of the table view.
- (BOOL)tableView:(UITableView *)tableView canMoveRowAtIndexPath:(NSIndexPath *)indexPath
{
// Return NO if you do not want the item to be re-orderable.
return YES;
}
*/
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPad) {
NSString *object = _objects[indexPath.row];
self.detailViewController.detailItem = object;
}
}
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
if ([[segue identifier] isEqualToString:@"showDetail"]) {
NSIndexPath *indexPath = [self.tableView indexPathForSelectedRow];
NSString *object = _objects[indexPath.row];
[[segue destinationViewController] setDetailItem:object];
}
}
@end

View file

@ -1,6 +0,0 @@
{
"info" : {
"version" : 1,
"author" : "xcode"
}
}

View file

@ -1,2 +0,0 @@
/* Localized versions of Info.plist keys */

View file

@ -1,18 +0,0 @@
/* Class = "IBUILabel"; text = "Title"; ObjectID = "6lf-XI-z9S"; */
"6lf-XI-z9S.text" = "Title";
/* Class = "IBUITableViewController"; title = "Master"; ObjectID = "7bK-jq-Zjz"; */
"7bK-jq-Zjz.title" = "Master";
/* Class = "IBUILabel"; text = "Title"; ObjectID = "Arm-wq-HPj"; */
"Arm-wq-HPj.text" = "Title";
/* Class = "IBUIViewController"; title = "Detail"; ObjectID = "JEX-9P-axG"; */
"JEX-9P-axG.title" = "Detail";
/* Class = "IBUINavigationItem"; title = "Master"; ObjectID = "Zdf-7t-Un8"; */
"Zdf-7t-Un8.title" = "Master";
/* Class = "IBUINavigationItem"; title = "Detail"; ObjectID = "mOI-FS-AaM"; */
"mOI-FS-AaM.title" = "Detail";

View file

@ -1,30 +0,0 @@
/* Class = "IBUILabel"; text = "Title"; ObjectID = "2pz-XF-uhl"; */
"2pz-XF-uhl.text" = "Title";
/* Class = "IBUIViewController"; title = "Detail"; ObjectID = "Ah7-4n-0Wa"; */
"Ah7-4n-0Wa.title" = "Detail";
/* Class = "IBUILabel"; text = "Title"; ObjectID = "PRJ-ig-cCG"; */
"PRJ-ig-cCG.text" = "Title";
/* Class = "IBUIButton"; normalTitle = "Logs"; ObjectID = "V3v-ch-Eo9"; */
"V3v-ch-Eo9.normalTitle" = "Logs";
/* Class = "IBUIButton"; normalTitle = "Logs"; ObjectID = "W17-XV-pa2"; */
"W17-XV-pa2.normalTitle" = "Logs";
/* Class = "IBUINavigationItem"; title = "Tests"; ObjectID = "cra-N8-TIN"; */
"cra-N8-TIN.title" = "Tests";
/* Class = "IBUIButton"; normalTitle = "Clear"; ObjectID = "hhf-hV-LBt"; */
"hhf-hV-LBt.normalTitle" = "Clear";
/* Class = "IBUIViewController"; title = "Logs"; ObjectID = "iOM-9A-Idi"; */
"iOM-9A-Idi.title" = "Logs";
/* Class = "IBUITableViewController"; title = "Master"; ObjectID = "pGg-6v-bdr"; */
"pGg-6v-bdr.title" = "Master";
/* Class = "IBUINavigationItem"; title = "List of Categories"; ObjectID = "tQt-TN-PWz"; */
"tQt-TN-PWz.title" = "List of Categories";

View file

@ -1,2 +0,0 @@
/* Localized versions of Info.plist keys */

View file

@ -1,18 +0,0 @@
/* Class = "UILabel"; text = "Title"; ObjectID = "6lf-XI-z9S"; */
"6lf-XI-z9S.text" = "Title";
/* Class = "UITableViewController"; title = "Master"; ObjectID = "7bK-jq-Zjz"; */
"7bK-jq-Zjz.title" = "Master";
/* Class = "UILabel"; text = "Title"; ObjectID = "Arm-wq-HPj"; */
"Arm-wq-HPj.text" = "Title";
/* Class = "UIViewController"; title = "Detail"; ObjectID = "JEX-9P-axG"; */
"JEX-9P-axG.title" = "Detail";
/* Class = "UINavigationItem"; title = "Master"; ObjectID = "Zdf-7t-Un8"; */
"Zdf-7t-Un8.title" = "Master";
/* Class = "UINavigationItem"; title = "Detail"; ObjectID = "mOI-FS-AaM"; */
"mOI-FS-AaM.title" = "Detail";

View file

@ -1,18 +0,0 @@
/* Class = "UILabel"; text = "Title"; ObjectID = "2pz-XF-uhl"; */
"2pz-XF-uhl.text" = "Title";
/* Class = "UIViewController"; title = "Detail"; ObjectID = "Ah7-4n-0Wa"; */
"Ah7-4n-0Wa.title" = "Detail";
/* Class = "UILabel"; text = "Title"; ObjectID = "PRJ-ig-cCG"; */
"PRJ-ig-cCG.text" = "Title";
/* Class = "UINavigationItem"; title = "Tests"; ObjectID = "cra-N8-TIN"; */
"cra-N8-TIN.title" = "Tests";
/* Class = "UITableViewController"; title = "Master"; ObjectID = "pGg-6v-bdr"; */
"pGg-6v-bdr.title" = "Master";
/* Class = "UINavigationItem"; title = "List of Categories"; ObjectID = "tQt-TN-PWz"; */
"tQt-TN-PWz.title" = "List of Categories";

View file

@ -1,61 +0,0 @@
/*
* Copyright (c) 2010-2019 Belledonne Communications SARL.
*
* This file is part of linphone-iphone
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#import <UIKit/UIKit.h>
#import "AppDelegate.h"
#import "Log.h"
#import <os/log.h>
#include "linphonetester/liblinphone_tester.h"
#ifdef DEBUG
// Dump exception
void uncaughtExceptionHandler(NSException *exception) {
NSLog(@"Crash: %@", exception);
NSLog(@"Stack Trace: %@", [exception callStackSymbols]);
// Internal error reporting
};
#endif
int main(int argc, char *argv[]) {
#ifdef DEBUG
NSSetUncaughtExceptionHandler(&uncaughtExceptionHandler);
#endif
int i;
for(i = 1; i < argc; ++i) {
if (strcmp(argv[i], "--verbose") == 0) {
linphone_core_set_log_level(ORTP_MESSAGE);
} else if (strcmp(argv[i],"--log-file")==0){
#if TARGET_OS_SIMULATOR
char *xmlFile = bc_tester_file("LibLinphoneIOS.xml");
char *args[] = {"--xml-file", xmlFile};
bc_tester_parse_args(2, args, 0);
char *logFile = bc_tester_file("LibLinphoneIOS.txt");
liblinphone_tester_set_log_file(logFile);
#endif
} else if (strcmp(argv[i],"--no-ipv6")==0){
liblinphonetester_ipv6 = FALSE;
}
}
@autoreleasepool {
return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

40
Podfile
View file

@ -29,20 +29,6 @@ def crashlythics
end
end
target 'liblinphoneTester' do
# Uncomment the next line if you're using Swift or would like to use dynamic frameworks
use_frameworks!
# Pods for liblinphoneTester
basic_pods
target 'liblinphoneTesterTests' do
inherit! :search_paths
# Pods for testing
end
end
target 'linphone' do
# Uncomment the next line if you're using Swift or would like to use dynamic frameworks
use_frameworks!
@ -62,32 +48,6 @@ target 'linphoneExtension' do
end
=begin
target 'latestCallsWidget' do
# Uncomment the next line if you're using Swift or would like to use dynamic frameworks
use_frameworks!
# Pods for latestCallsWidget
end
target 'latestChatroomsWidget' do
# Uncomment the next line if you're using Swift or would like to use dynamic frameworks
use_frameworks!
# Pods for latestChatroomsWidget
end
target 'richNotifications' do
# Uncomment the next line if you're using Swift or would like to use dynamic frameworks
use_frameworks!
# Pods for richNotifications
end
=end
post_install do |installer|
# Get the version of linphone-sdk
installer.pod_targets.each do |target|

View file

@ -1,26 +0,0 @@
//
// DTObjectBlockExecutor.h
// DTFoundation
//
// Created by Oliver Drobnik on 12.02.13.
// Copyright (c) 2013 Cocoanetics. All rights reserved.
//
/**
This class is used by [NSObject addDeallocBlock:] to execute blocks on dealloc
*/
@interface DTObjectBlockExecutor : NSObject
/**
Convenience method to create a block executor with a deallocation block
@param block The block to execute when the created receiver is being deallocated
*/
+ (id)blockExecutorWithDeallocBlock:(void (^)())block;
/**
Block to execute when dealloc of the receiver is called
*/
@property(nonatomic, copy) void (^deallocBlock)();
@end

View file

@ -1,26 +0,0 @@
//
// DTObjectBlockExecutor.m
// DTFoundation
//
// Created by Oliver Drobnik on 12.02.13.
// Copyright (c) 2013 Cocoanetics. All rights reserved.
//
#import "DTObjectBlockExecutor.h"
@implementation DTObjectBlockExecutor
+ (id)blockExecutorWithDeallocBlock:(void (^)())block {
DTObjectBlockExecutor *executor = [[DTObjectBlockExecutor alloc] init];
executor.deallocBlock = block; // copy
return executor;
}
- (void)dealloc {
if (_deallocBlock) {
_deallocBlock();
_deallocBlock = nil;
}
}
@end

View file

@ -1,22 +0,0 @@
<?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>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>

View file

@ -1,10 +0,0 @@
//
// Prefix header
//
// The contents of this file are implicitly included at the beginning of every source file.
//
#ifdef __OBJC__
#import <UIKit/UIKit.h>
#import <Foundation/Foundation.h>
#endif

View file

@ -1,377 +0,0 @@
//
// LinphoneTester_Tests.m
// LinphoneTester Tests
//
// Created by guillaume on 10/09/2014.
//
//
#import <XCTest/XCTest.h>
#include "linphone/linphonecore.h"
#include "linphonetester/liblinphone_tester.h"
#import "NSObject+DTRuntime.h"
#import "Utils.h"
#import "Log.h"
extern bool_t liblinphonetester_ipv6;
@interface LinphoneTesterBase : XCTestCase
@end
@implementation LinphoneTesterBase
+ (NSString *)safetyTestString:(NSString *)testString {
NSCharacterSet *charactersToRemove = [[NSCharacterSet alphanumericCharacterSet] invertedSet];
return [[testString componentsSeparatedByCharactersInSet:charactersToRemove] componentsJoinedByString:@"_"];
}
void dummy_logger(const char *domain, OrtpLogLevel lev, const char *fmt, va_list args) {
}
+ (void)initialize {
}
+ (void)testForSuite:(NSString *)sSuite {
LOGI(@"[message] Launching tests from suite %@", sSuite);
const char *suite = sSuite.UTF8String;
bc_tester_register_suite_by_name(suite);
int test_count = bc_tester_nb_tests(suite);
for (int k = 0; k < test_count; k++) {
const char *test = bc_tester_test_name(suite, k);
if (test) {
NSString *sTest = [NSString stringWithUTF8String:test];
// prepend "test_" so that it gets found by introspection
NSString *safesTest = [LinphoneTesterBase safetyTestString:sTest];
NSString *safesSuite = [LinphoneTesterBase safetyTestString:sSuite];
// ordering tests
NSString *safesIndex = nil;
if (k < 10) {
safesIndex = [NSString stringWithFormat:@"00%d",k];
} else if (k <100) {
safesIndex = [NSString stringWithFormat:@"0%d",k];
} else if (k <1000) {
safesIndex = [NSString stringWithFormat:@"%d",k];
}
NSString *selectorName = [NSString stringWithFormat:@"test%@_%@__%@", safesIndex, safesSuite, safesTest];
[self addInstanceMethodWithSelectorName:selectorName
block:^(LinphoneTesterBase *myself) {
[myself testForSuiteTest:sSuite andTest:sTest];
}];
}
}
}
- (void)testForSuiteTest:(NSString *)suite andTest:(NSString *)test {
LOGI(@"[message] Launching test %@ from suite %@", test, suite);
XCTAssertFalse(bc_tester_run_tests(suite.UTF8String, test.UTF8String, NULL), @"Suite '%@' / Test '%@' failed",
suite, test);
}
@end
@interface SetupTests : LinphoneTesterBase
@end
@implementation SetupTests
+ (void)initialize {
[self testForSuite:@"Setup"];
}
@end
@interface TunnelTests : LinphoneTesterBase
@end
@implementation TunnelTests
+ (void)initialize {
[self testForSuite:@"Tunnel"];
}
@end
@interface OfferAnswerTests : LinphoneTesterBase
@end
@implementation OfferAnswerTests
+ (void)initialize {
[self testForSuite:@"Offer-answer"];
}
@end
@interface PresenceTests : LinphoneTesterBase
@end
@implementation PresenceTests
+ (void)initialize {
[self testForSuite:@"Presence"];
}
@end
@interface AccountCreatorTests : LinphoneTesterBase
@end
@implementation AccountCreatorTests
+ (void)initialize {
[self testForSuite:@"Account creator"];
}
@end
@interface ConferenceEventTests : LinphoneTesterBase
@end
@implementation ConferenceEventTests
+ (void)initialize {
[self testForSuite:@"Conference event"];
}
@end
@interface LogCollectionTests : LinphoneTesterBase
@end
@implementation LogCollectionTests
+ (void)initialize {
[self testForSuite:@"LogCollection"];
}
@end
@interface PlayerTests : LinphoneTesterBase
@end
@implementation PlayerTests
+ (void)initialize {
[self testForSuite:@"Player"];
}
@end
@interface DTMFTests : LinphoneTesterBase
@end
@implementation DTMFTests
+ (void)initialize {
[self testForSuite:@"DTMF"];
}
@end
/*@interface CpimTests : LinphoneTesterBase
@end
@implementation CpimTests
+ (void)initialize {
[self testForSuite:@"Cpim"];
}
@end*/
@interface MultipartTests : LinphoneTesterBase
@end
@implementation MultipartTests
+ (void)initialize {
[self testForSuite:@"Multipart"];
}
@end
@interface ClonableObjectTests : LinphoneTesterBase
@end
@implementation ClonableObjectTests
+ (void)initialize {
[self testForSuite:@"ClonableObject"];
}
@end
@interface MainDbTests : LinphoneTesterBase
@end
@implementation MainDbTests
+ (void)initialize {
[self testForSuite:@"MainDb"];
}
@end
@interface PropertyContainerTests : LinphoneTesterBase
@end
@implementation PropertyContainerTests
+ (void)initialize {
[self testForSuite:@"PropertyContainer"];
}
@end
@interface ProxyConfigTests : LinphoneTesterBase
@end
@implementation ProxyConfigTests
+ (void)initialize {
[self testForSuite:@"Proxy config"];
}
@end
@interface VCardTests : LinphoneTesterBase
@end
@implementation VCardTests
+ (void)initialize {
[self testForSuite:@"VCard"];
}
@end
@interface VideoCallTests : LinphoneTesterBase
@end
@implementation VideoCallTests
+ (void)initialize {
[self testForSuite:@"Video Call"];
}
@end
@interface AudioBypassTests : LinphoneTesterBase
@end
@implementation AudioBypassTests
+ (void)initialize {
[self testForSuite:@"Audio Bypass"];
}
@end
@interface ContentsTests : LinphoneTesterBase
@end
@implementation ContentsTests
+ (void)initialize {
[self testForSuite:@"Contents"];
}
@end
@interface VideoTests : LinphoneTesterBase
@end
@implementation VideoTests
+ (void)initialize {
[self testForSuite:@"Video"];
}
@end
@interface MulticastCallTests : LinphoneTesterBase
@end
@implementation MulticastCallTests
+ (void)initialize {
[self testForSuite:@"Multicast Call"];
}
@end
@interface StunTests : LinphoneTesterBase
@end
@implementation StunTests
+ (void)initialize {
[self testForSuite:@"Stun"];
}
@end
@interface EventTests : LinphoneTesterBase
@end
@implementation EventTests
+ (void)initialize {
[self testForSuite:@"Event"];
}
@end
@interface MessageTests : LinphoneTesterBase
@end
@implementation MessageTests
+ (void)initialize {
[self testForSuite:@"Message"];
}
@end
@interface RemoteProvisioningTests : LinphoneTesterBase
@end
@implementation RemoteProvisioningTests
+ (void)initialize {
[self testForSuite:@"RemoteProvisioning"];
}
@end
@interface QualityReportingTests : LinphoneTesterBase
@end
@implementation QualityReportingTests
+ (void)initialize {
[self testForSuite:@"QualityReporting"];
}
@end
@interface RegisterTests : LinphoneTesterBase
@end
@implementation RegisterTests
+ (void)initialize {
[self testForSuite:@"Register"];
}
@end
@interface GroupChatTests : LinphoneTesterBase
@end
@implementation GroupChatTests
+ (void)initialize {
[self testForSuite:@"Group Chat"];
}
@end
@interface FlexisipTests : LinphoneTesterBase
@end
@implementation FlexisipTests
+ (void)initialize {
[self testForSuite:@"Flexisip"];
}
@end
@interface MultiCallTests : LinphoneTesterBase
@end
@implementation MultiCallTests
+ (void)initialize {
[self testForSuite:@"Multi call"];
}
@end
@interface SingleCallTests : LinphoneTesterBase
@end
@implementation SingleCallTests
+ (void)initialize {
[self testForSuite:@"Single Call"];
}
@end
@interface PresenceUsingServerTests : LinphoneTesterBase
@end
@implementation PresenceUsingServerTests
+ (void)initialize {
[self testForSuite:@"Presence using server"];
}
@end
@interface CallRecoveryTests : LinphoneTesterBase
@end
@implementation CallRecoveryTests
+ (void)initialize {
[self testForSuite:@"Call recovery"];
}
@end
@interface CallWithICETests : LinphoneTesterBase
@end
@implementation CallWithICETests
+ (void)initialize {
[self testForSuite:@"Call with ICE"];
}
@end

View file

@ -1,58 +0,0 @@
//
// NSObject+DTRuntime.h
// DTFoundation
//
// Created by Oliver Drobnik on 4/25/12.
// Copyright (c) 2012 Cocoanetics. All rights reserved.
//
/**
Methods to dynamically modify objects at runtime
*/
@interface NSObject (DTRuntime)
/**-------------------------------------------------------------------------------------
@name Blocks
---------------------------------------------------------------------------------------
*/
/**
Adds a block to be executed as soon as the receiver's memory is deallocated
@param block The block to execute when the receiver is being deallocated
*/
- (void)addDeallocBlock:(void (^)())block;
/**
Adds a new instance method to a class. All instances of this class will have this method.
The block captures `self` in the calling context. To allow access to the instance from within the block it is passed as
parameter to the block.
@param selectorName The name of the method.
@param block The block to execute for the instance method, a pointer to the instance is passed as the only parameter.
@returns `YES` if the operation was successful
*/
+ (BOOL)addInstanceMethodWithSelectorName:(NSString *)selectorName block:(void (^)(id))block;
/**-------------------------------------------------------------------------------------
@name Method Swizzling
---------------------------------------------------------------------------------------
*/
/**
Exchanges two method implementations. After the call methods to the first selector will now go to the second one and
vice versa.
@param selector The first method
@param otherSelector The second method
*/
+ (void)swizzleMethod:(SEL)selector withMethod:(SEL)otherSelector;
/**
Exchanges two class method implementations. After the call methods to the first selector will now go to the second one
and vice versa.
@param selector The first method
@param otherSelector The second method
*/
+ (void)swizzleClassMethod:(SEL)selector withMethod:(SEL)otherSelector;
@end

View file

@ -1,94 +0,0 @@
//
// NSObject_DTRuntime.h
// DTFoundation
//
// Created by Oliver Drobnik on 4/25/12.
// Copyright (c) 2012 Cocoanetics. All rights reserved.
//
#import <objc/runtime.h>
#import "DTObjectBlockExecutor.h"
@implementation NSObject (DTRuntime)
static char DTRuntimeDeallocBlocks;
#pragma mark - Blocks
- (void)addDeallocBlock:(void (^)())block {
// don't accept NULL block
NSParameterAssert(block);
NSMutableArray *deallocBlocks = objc_getAssociatedObject(self, &DTRuntimeDeallocBlocks);
// add array of dealloc blocks if not existing yet
if (!deallocBlocks) {
deallocBlocks = [[NSMutableArray alloc] init];
objc_setAssociatedObject(self, &DTRuntimeDeallocBlocks, deallocBlocks, OBJC_ASSOCIATION_RETAIN);
}
DTObjectBlockExecutor *executor = [DTObjectBlockExecutor blockExecutorWithDeallocBlock:block];
[deallocBlocks addObject:executor];
}
+ (BOOL)addInstanceMethodWithSelectorName:(NSString *)selectorName block:(void (^)(id))block {
// don't accept nil name
NSParameterAssert(selectorName);
// don't accept NULL block
NSParameterAssert(block);
// See http://stackoverflow.com/questions/6357663/casting-a-block-to-a-void-for-dynamic-class-method-resolution
#if MAC_OS_X_VERSION_MAX_ALLOWED <= MAC_OS_X_VERSION_10_7
void *impBlockForIMP = (void *)objc_unretainedPointer(block);
#else
id impBlockForIMP = block;
#endif
IMP myIMP = imp_implementationWithBlock(impBlockForIMP);
SEL selector = NSSelectorFromString(selectorName);
return class_addMethod(self, selector, myIMP, "v@:");
}
#pragma mark - Method Swizzling
+ (void)swizzleMethod:(SEL)selector withMethod:(SEL)otherSelector {
// my own class is being targetted
Class c = [self class];
// get the methods from the selectors
Method originalMethod = class_getInstanceMethod(c, selector);
Method otherMethod = class_getInstanceMethod(c, otherSelector);
if (class_addMethod(c, selector, method_getImplementation(otherMethod), method_getTypeEncoding(otherMethod))) {
class_replaceMethod(c, otherSelector, method_getImplementation(originalMethod),
method_getTypeEncoding(originalMethod));
} else {
method_exchangeImplementations(originalMethod, otherMethod);
}
}
+ (void)swizzleClassMethod:(SEL)selector withMethod:(SEL)otherSelector {
// my own class is being targetted
Class c = [self class];
// get the methods from the selectors
Method originalMethod = class_getClassMethod(c, selector);
Method otherMethod = class_getClassMethod(c, otherSelector);
// if (class_addMethod(c, selector, method_getImplementation(otherMethod), method_getTypeEncoding(otherMethod)))
// {
// class_replaceMethod(c, otherSelector, method_getImplementation(originalMethod),
// method_getTypeEncoding(originalMethod));
// }
// else
// {
method_exchangeImplementations(originalMethod, otherMethod);
// }
}
@end

View file

@ -1,2 +0,0 @@
/* Localized versions of Info.plist keys */

View file

@ -1,2 +0,0 @@
/* Localized versions of Info.plist keys */

View file

@ -1,153 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="14113" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="M4Y-Lb-cyx">
<device id="retina4_7" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14088"/>
<capability name="Constraints to layout margins" minToolsVersion="6.0"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
<!--Today View Controller-->
<scene sceneID="cwh-vc-ff4">
<objects>
<viewController id="M4Y-Lb-cyx" customClass="TodayViewController" sceneMemberID="viewController">
<view key="view" contentMode="scaleToFill" simulatedAppContext="notificationCenter" id="S3S-Oj-5AN">
<rect key="frame" x="0.0" y="0.0" width="320" height="37"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<stackView opaque="NO" contentMode="scaleToFill" distribution="equalSpacing" translatesAutoresizingMaskIntoConstraints="NO" id="acy-Dv-HTU">
<rect key="frame" x="16" y="-25" width="288" height="87.5"/>
<subviews>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="10" translatesAutoresizingMaskIntoConstraints="NO" id="ndj-Mq-Hl7">
<rect key="frame" x="0.0" y="0.0" width="60" height="87.5"/>
<subviews>
<button opaque="NO" contentMode="scaleAspectFit" contentHorizontalAlignment="center" contentVerticalAlignment="center" showsTouchWhenHighlighted="YES" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Wm5-Qb-p3S">
<rect key="frame" x="0.0" y="0.0" width="60" height="60.5"/>
<constraints>
<constraint firstAttribute="height" constant="60" id="0Ak-Qk-GO3"/>
<constraint firstAttribute="width" constant="60" id="ZqS-ba-Lu5"/>
</constraints>
<state key="normal" image="avatar.png"/>
<connections>
<action selector="firstButtonTapped" destination="M4Y-Lb-cyx" eventType="touchUpInside" id="hiI-LE-Zgn"/>
</connections>
</button>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text=" " textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="ZCh-k6-wlC">
<rect key="frame" x="0.0" y="70.5" width="60" height="17"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<constraints>
<constraint firstItem="ZCh-k6-wlC" firstAttribute="centerX" secondItem="ndj-Mq-Hl7" secondAttribute="centerX" id="7gN-E9-QSN"/>
</constraints>
</stackView>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="10" translatesAutoresizingMaskIntoConstraints="NO" id="aDd-1O-GG5">
<rect key="frame" x="76" y="0.0" width="60" height="87.5"/>
<subviews>
<button opaque="NO" contentMode="scaleAspectFit" contentHorizontalAlignment="center" contentVerticalAlignment="center" showsTouchWhenHighlighted="YES" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="YV6-7A-P4J">
<rect key="frame" x="0.0" y="0.0" width="60" height="60"/>
<constraints>
<constraint firstAttribute="height" constant="60" id="7Mf-cY-51s"/>
<constraint firstAttribute="width" relation="greaterThanOrEqual" constant="60" id="b1f-XQ-h9r"/>
<constraint firstAttribute="width" constant="60" id="pF3-4V-DIz"/>
</constraints>
<state key="normal" image="avatar.png"/>
<connections>
<action selector="secondButtonTapped" destination="M4Y-Lb-cyx" eventType="touchUpInside" id="VD4-JL-D57"/>
</connections>
</button>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text=" " textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="vzp-zG-86G">
<rect key="frame" x="0.0" y="70" width="60" height="17.5"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<constraints>
<constraint firstItem="vzp-zG-86G" firstAttribute="centerX" secondItem="aDd-1O-GG5" secondAttribute="centerX" id="Reb-Z7-yZx"/>
</constraints>
</stackView>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="10" translatesAutoresizingMaskIntoConstraints="NO" id="Jda-ED-Hck">
<rect key="frame" x="152" y="0.0" width="60" height="87.5"/>
<subviews>
<button opaque="NO" contentMode="scaleAspectFit" contentHorizontalAlignment="center" contentVerticalAlignment="center" showsTouchWhenHighlighted="YES" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="R1m-4P-62J">
<rect key="frame" x="0.0" y="0.0" width="60" height="60"/>
<constraints>
<constraint firstAttribute="height" constant="60" id="Jwm-Hh-flO"/>
<constraint firstAttribute="width" constant="60" id="Lv0-kT-oOL"/>
</constraints>
<state key="normal" image="avatar.png"/>
<connections>
<action selector="thirdButtonTapped" destination="M4Y-Lb-cyx" eventType="touchUpInside" id="A6r-gZ-0Be"/>
</connections>
</button>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text=" " textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="1km-2d-H8g">
<rect key="frame" x="0.0" y="70" width="60" height="17.5"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<constraints>
<constraint firstItem="1km-2d-H8g" firstAttribute="centerX" secondItem="Jda-ED-Hck" secondAttribute="centerX" id="Jaw-30-wJW"/>
</constraints>
</stackView>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="10" translatesAutoresizingMaskIntoConstraints="NO" id="Vem-dd-m97">
<rect key="frame" x="228" y="0.0" width="60" height="87.5"/>
<subviews>
<button opaque="NO" contentMode="scaleAspectFit" contentHorizontalAlignment="center" contentVerticalAlignment="center" showsTouchWhenHighlighted="YES" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="EgK-EE-9vt">
<rect key="frame" x="0.0" y="0.0" width="60" height="60"/>
<constraints>
<constraint firstAttribute="width" constant="60" id="T6s-2z-6yf"/>
<constraint firstAttribute="height" constant="60" id="yoB-Mx-9iw"/>
</constraints>
<state key="normal" image="avatar.png"/>
<connections>
<action selector="fourthButtonTapped" destination="M4Y-Lb-cyx" eventType="touchUpInside" id="MfV-kR-GEH"/>
</connections>
</button>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text=" " textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Z4D-W4-T9E">
<rect key="frame" x="0.0" y="70" width="60" height="17.5"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<constraints>
<constraint firstItem="Z4D-W4-T9E" firstAttribute="centerX" secondItem="Vem-dd-m97" secondAttribute="centerX" id="TU4-tO-i4b"/>
</constraints>
</stackView>
</subviews>
</stackView>
</subviews>
<constraints>
<constraint firstItem="acy-Dv-HTU" firstAttribute="centerX" secondItem="S3S-Oj-5AN" secondAttribute="centerX" id="Thu-fq-hKU"/>
<constraint firstItem="acy-Dv-HTU" firstAttribute="centerY" secondItem="S3S-Oj-5AN" secondAttribute="centerY" id="Wku-rc-Ij6"/>
<constraint firstItem="acy-Dv-HTU" firstAttribute="leading" secondItem="S3S-Oj-5AN" secondAttribute="leadingMargin" id="fWT-EJ-zhi"/>
</constraints>
<viewLayoutGuide key="safeArea" id="ssy-KU-ocm"/>
</view>
<extendedEdge key="edgesForExtendedLayout"/>
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
<size key="freeformSize" width="320" height="37"/>
<connections>
<outletCollection property="stackViews" destination="ndj-Mq-Hl7" id="NTd-tl-hho"/>
<outletCollection property="stackViews" destination="aDd-1O-GG5" id="y3m-I8-kYi"/>
<outletCollection property="stackViews" destination="Jda-ED-Hck" id="VR1-hK-wc3"/>
<outletCollection property="stackViews" destination="Vem-dd-m97" id="9Eh-UN-U3f"/>
</connections>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="vXp-U4-Rya" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
</scene>
</scenes>
<resources>
<image name="avatar.png" width="259" height="259"/>
</resources>
</document>

View file

@ -1,31 +0,0 @@
<?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>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleDisplayName</key>
<string>Linphone - Latest Calls</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>XPC!</string>
<key>CFBundleShortVersionString</key>
<string>4.1</string>
<key>CFBundleVersion</key>
<string>27</string>
<key>NSExtension</key>
<dict>
<key>NSExtensionMainStoryboard</key>
<string>MainInterface</string>
<key>NSExtensionPointIdentifier</key>
<string>com.apple.widget-extension</string>
</dict>
</dict>
</plist>

View file

@ -1,32 +0,0 @@
/*
* Copyright (c) 2010-2019 Belledonne Communications SARL.
*
* This file is part of linphone-iphone
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#import <UIKit/UIKit.h>
@interface TodayViewController : UIViewController
@property (strong, nonatomic) IBOutletCollection(UIStackView) NSArray *stackViews;
@property (strong, nonatomic) NSMutableArray *imgs;
@property (strong, nonatomic) NSMutableArray *logIds;
@property (strong, nonatomic) NSMutableArray *displayNames;
- (IBAction)firstButtonTapped;
- (IBAction)secondButtonTapped;
- (IBAction)thirdButtonTapped;
- (IBAction)fourthButtonTapped;
@end

View file

@ -1,121 +0,0 @@
/*
* Copyright (c) 2010-2019 Belledonne Communications SARL.
*
* This file is part of linphone-iphone
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#import "TodayViewController.h"
#import <NotificationCenter/NotificationCenter.h>
@interface TodayViewController () <NCWidgetProviding>
@end
@implementation TodayViewController
- (void)loadData {
NSUserDefaults *mySharedDefaults = [[NSUserDefaults alloc] initWithSuiteName: @"group.belledonne-communications.linphone.widget"];
[_imgs removeAllObjects];
[_logIds removeAllObjects];
[_displayNames removeAllObjects];
NSMutableArray *logs = [NSMutableArray arrayWithArray:[mySharedDefaults objectForKey:@"logs"]];
for (NSDictionary *dict in logs) {
[_logIds addObject:[dict objectForKey:@"id"]];
[_displayNames addObject:[dict objectForKey:@"display"]];
[_imgs addObject:[dict objectForKey:@"img"]?:[NSNull null]];
}
}
- (void)draw {
int i = 0;
for (i = 0 ; i < 4 && i < _logIds.count ; i++) {
UIStackView *stack = _stackViews[i];
UIButton *button = stack.subviews[0];
UILabel *name = stack.subviews[1];
if (_imgs[i] != [NSNull null]) {
[button setImage:[UIImage imageWithData:_imgs[i]] forState:UIControlStateNormal];
}
[stack setAlpha:1];
button.enabled = YES;
[name setText:_displayNames[i]];
}
while (i < 4) {
UIStackView *stack = _stackViews[i];
UIButton *button = stack.subviews[0];
[stack setAlpha:0];
button.enabled = NO;
i++;
}
}
- (void)viewDidLoad {
[super viewDidLoad];
// Do any additional setup after loading the view from its nib.
for (UIStackView *stack in _stackViews) {
UIButton *button = stack.subviews[0];
// making rounded image
UIImageView *imageView = button.imageView;
imageView.layer.cornerRadius = imageView.frame.size.height / 2;
imageView.clipsToBounds = YES;
}
_logIds = [NSMutableArray array];
_imgs = [NSMutableArray array];
_displayNames = [NSMutableArray array];
}
- (void)didReceiveMemoryWarning {
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
[_imgs removeAllObjects];
}
- (void)widgetPerformUpdateWithCompletionHandler:(void (^)(NCUpdateResult))completionHandler {
// Perform any setup necessary in order to update the view.
// If an error is encountered, use NCUpdateResultFailed
// If there's no update required, use NCUpdateResultNoData
// If there's an update, use NCUpdateResultNewData
[self loadData];
[self draw];
completionHandler(NCUpdateResultNewData);
}
- (void)launchAppWithURL:(NSURL *) url {
[self.extensionContext openURL:url
completionHandler:nil];
}
- (void)launchOnHistoryDetailsWithId:(NSString *)logId {
[self launchAppWithURL:[NSURL URLWithString:[@"linphone-widget://call_log/show?" stringByAppendingString:logId]]];
}
- (IBAction)firstButtonTapped {
[self launchOnHistoryDetailsWithId:_logIds[0]];
}
- (IBAction)secondButtonTapped {
[self launchOnHistoryDetailsWithId:_logIds[1]];
}
- (IBAction)thirdButtonTapped {
[self launchOnHistoryDetailsWithId:_logIds[2]];
}
- (IBAction)fourthButtonTapped {
[self launchOnHistoryDetailsWithId:_logIds[3]];
}
@end

View file

@ -1,10 +0,0 @@
<?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>com.apple.security.application-groups</key>
<array>
<string>group.belledonne-communications.linphone.widget</string>
</array>
</dict>
</plist>

View file

@ -1,152 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="14113" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="M4Y-Lb-cyx">
<device id="retina4_7" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14088"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
<!--Today View Controller-->
<scene sceneID="cwh-vc-ff4">
<objects>
<viewController id="M4Y-Lb-cyx" customClass="TodayViewController" sceneMemberID="viewController">
<view key="view" contentMode="scaleToFill" simulatedAppContext="notificationCenter" id="S3S-Oj-5AN">
<rect key="frame" x="0.0" y="0.0" width="320" height="37"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<stackView opaque="NO" contentMode="scaleToFill" distribution="equalSpacing" translatesAutoresizingMaskIntoConstraints="NO" id="kvZ-RU-0JV">
<rect key="frame" x="16" y="-26" width="288" height="87.5"/>
<subviews>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="10" translatesAutoresizingMaskIntoConstraints="NO" id="P4U-hP-N9F">
<rect key="frame" x="0.0" y="0.0" width="60" height="87.5"/>
<subviews>
<button opaque="NO" contentMode="scaleAspectFit" contentHorizontalAlignment="center" contentVerticalAlignment="center" showsTouchWhenHighlighted="YES" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="dGY-Wo-tng">
<rect key="frame" x="0.0" y="0.0" width="60" height="60.5"/>
<constraints>
<constraint firstAttribute="width" constant="60" id="a43-Du-y1b"/>
<constraint firstAttribute="height" constant="60" id="gNd-AG-oLn"/>
</constraints>
<state key="normal" image="avatar.png"/>
<connections>
<action selector="firstButtonTapped" destination="M4Y-Lb-cyx" eventType="touchUpInside" id="n6M-cY-cWU"/>
</connections>
</button>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text=" " textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="fpJ-Wl-BT1">
<rect key="frame" x="0.0" y="70.5" width="60" height="17"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<constraints>
<constraint firstItem="fpJ-Wl-BT1" firstAttribute="centerX" secondItem="P4U-hP-N9F" secondAttribute="centerX" id="3Zz-Mm-hxc"/>
</constraints>
</stackView>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="10" translatesAutoresizingMaskIntoConstraints="NO" id="79U-UR-Bp2">
<rect key="frame" x="76" y="0.0" width="60" height="87.5"/>
<subviews>
<button opaque="NO" contentMode="scaleAspectFit" contentHorizontalAlignment="center" contentVerticalAlignment="center" showsTouchWhenHighlighted="YES" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="aiZ-1q-Ssd">
<rect key="frame" x="0.0" y="0.0" width="60" height="60"/>
<constraints>
<constraint firstAttribute="width" relation="greaterThanOrEqual" constant="60" id="0Me-vh-jt4"/>
<constraint firstAttribute="height" constant="60" id="9hj-Pa-s8F"/>
<constraint firstAttribute="width" constant="60" id="iil-bF-24j"/>
</constraints>
<state key="normal" image="avatar.png"/>
<connections>
<action selector="secondButtonTapped" destination="M4Y-Lb-cyx" eventType="touchUpInside" id="e09-4G-NJf"/>
</connections>
</button>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text=" " textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="fEo-fa-uyD">
<rect key="frame" x="0.0" y="70" width="60" height="17.5"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<constraints>
<constraint firstItem="fEo-fa-uyD" firstAttribute="centerX" secondItem="79U-UR-Bp2" secondAttribute="centerX" id="FPk-ST-xe3"/>
</constraints>
</stackView>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="10" translatesAutoresizingMaskIntoConstraints="NO" id="Xgm-go-u3S">
<rect key="frame" x="152" y="0.0" width="60" height="87.5"/>
<subviews>
<button opaque="NO" contentMode="scaleAspectFit" contentHorizontalAlignment="center" contentVerticalAlignment="center" showsTouchWhenHighlighted="YES" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="VgA-lq-CQL">
<rect key="frame" x="0.0" y="0.0" width="60" height="60"/>
<constraints>
<constraint firstAttribute="width" constant="60" id="TEZ-z7-Yce"/>
<constraint firstAttribute="height" constant="60" id="rtD-OM-bmH"/>
</constraints>
<state key="normal" image="avatar.png"/>
<connections>
<action selector="thirdButtonTapped" destination="M4Y-Lb-cyx" eventType="touchUpInside" id="OtO-nr-X1J"/>
</connections>
</button>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text=" " textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="zM6-aO-Pes">
<rect key="frame" x="0.0" y="70" width="60" height="17.5"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<constraints>
<constraint firstItem="zM6-aO-Pes" firstAttribute="centerX" secondItem="Xgm-go-u3S" secondAttribute="centerX" id="lGV-8K-Ol0"/>
</constraints>
</stackView>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="10" translatesAutoresizingMaskIntoConstraints="NO" id="nHe-ID-vxE">
<rect key="frame" x="228" y="0.0" width="60" height="87.5"/>
<subviews>
<button opaque="NO" contentMode="scaleAspectFit" contentHorizontalAlignment="center" contentVerticalAlignment="center" showsTouchWhenHighlighted="YES" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="7je-G1-IfQ">
<rect key="frame" x="0.0" y="0.0" width="60" height="60"/>
<constraints>
<constraint firstAttribute="width" constant="60" id="Pm8-lw-PB4"/>
<constraint firstAttribute="height" constant="60" id="SYf-Yl-EDf"/>
</constraints>
<state key="normal" image="avatar.png"/>
<connections>
<action selector="fourthButtonTapped" destination="M4Y-Lb-cyx" eventType="touchUpInside" id="a2u-BT-Fkp"/>
</connections>
</button>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text=" " textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="bpY-VL-FDz">
<rect key="frame" x="0.0" y="70" width="60" height="17.5"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<constraints>
<constraint firstItem="bpY-VL-FDz" firstAttribute="centerX" secondItem="nHe-ID-vxE" secondAttribute="centerX" id="PD7-gj-AXr"/>
</constraints>
</stackView>
</subviews>
</stackView>
</subviews>
<constraints>
<constraint firstItem="kvZ-RU-0JV" firstAttribute="centerY" secondItem="S3S-Oj-5AN" secondAttribute="centerY" id="1dD-eI-ohO"/>
<constraint firstItem="kvZ-RU-0JV" firstAttribute="leading" secondItem="S3S-Oj-5AN" secondAttribute="leading" constant="16" id="9XT-er-59s"/>
<constraint firstItem="kvZ-RU-0JV" firstAttribute="centerX" secondItem="S3S-Oj-5AN" secondAttribute="centerX" id="l30-a1-mDN"/>
</constraints>
<viewLayoutGuide key="safeArea" id="ssy-KU-ocm"/>
</view>
<extendedEdge key="edgesForExtendedLayout"/>
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
<size key="freeformSize" width="320" height="37"/>
<connections>
<outletCollection property="stackViews" destination="P4U-hP-N9F" id="3f1-th-6ZO"/>
<outletCollection property="stackViews" destination="79U-UR-Bp2" id="ix2-7S-Rim"/>
<outletCollection property="stackViews" destination="Xgm-go-u3S" id="VYM-Ld-joW"/>
<outletCollection property="stackViews" destination="nHe-ID-vxE" id="iGd-Ix-Pj6"/>
</connections>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="vXp-U4-Rya" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
</scene>
</scenes>
<resources>
<image name="avatar.png" width="259" height="259"/>
</resources>
</document>

View file

@ -1,31 +0,0 @@
<?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>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleDisplayName</key>
<string>Linphone - Latest Chatrooms</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>XPC!</string>
<key>CFBundleShortVersionString</key>
<string>4.1</string>
<key>CFBundleVersion</key>
<string>27</string>
<key>NSExtension</key>
<dict>
<key>NSExtensionMainStoryboard</key>
<string>MainInterface</string>
<key>NSExtensionPointIdentifier</key>
<string>com.apple.widget-extension</string>
</dict>
</dict>
</plist>

View file

@ -1,34 +0,0 @@
/*
* Copyright (c) 2010-2019 Belledonne Communications SARL.
*
* This file is part of linphone-iphone
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#import <UIKit/UIKit.h>
@interface TodayViewController : UIViewController
@property (strong, nonatomic) IBOutletCollection(UIStackView) NSArray *stackViews;
@property (strong, nonatomic) NSMutableArray *addresses;
@property (strong, nonatomic) NSMutableArray *localAddress;
@property (strong, nonatomic) NSMutableArray *displayNames;
@property (strong, nonatomic) NSMutableArray *isConf;
@property (strong, nonatomic) NSMutableArray *imgs;
- (IBAction)firstButtonTapped;
- (IBAction)secondButtonTapped;
- (IBAction)thirdButtonTapped;
- (IBAction)fourthButtonTapped;
@end

View file

@ -1,131 +0,0 @@
/*
* Copyright (c) 2010-2019 Belledonne Communications SARL.
*
* This file is part of linphone-iphone
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#import "TodayViewController.h"
#import <NotificationCenter/NotificationCenter.h>
@interface TodayViewController () <NCWidgetProviding>
@end
@implementation TodayViewController
- (void)loadData {
NSUserDefaults *mySharedDefaults = [[NSUserDefaults alloc] initWithSuiteName: @"group.belledonne-communications.linphone.widget"];
[_imgs removeAllObjects];
[_addresses removeAllObjects];
[_localAddress removeAllObjects];
[_displayNames removeAllObjects];
[_isConf removeAllObjects];
NSMutableArray *chatrooms = [NSMutableArray arrayWithArray:[mySharedDefaults objectForKey:@"chatrooms"]];
for (NSDictionary *dict in chatrooms) {
[_addresses addObject:[dict objectForKey:@"peer"]];
[_localAddress addObject:[dict objectForKey:@"local"]];
[_displayNames addObject:[dict objectForKey:@"display"]];
[_isConf addObject:(NSNumber *)[dict objectForKey:@"nbParticipants"]];
[_imgs addObject:[dict objectForKey:@"img"]?:[NSNull null]];
}
}
- (void)draw {
int i = 0;
for (i = 0 ; i < 4 && i < _addresses.count ; i++) {
UIStackView *stack = _stackViews[i];
UIButton *button = stack.subviews[0];
UILabel *name = stack.subviews[1];
if (_imgs[i] != [NSNull null]) {
[button setImage:[UIImage imageWithData:_imgs[i]] forState:UIControlStateNormal];
} else if (((NSNumber *)_isConf[i]).boolValue) {
[button setImage:[UIImage imageNamed:@"chat_group_avatar.png"] forState:UIControlStateNormal];
}
[stack setAlpha:1];
button.enabled = YES;
[name setText:_displayNames[i]];
}
while (i < 4) {
UIStackView *stack = _stackViews[i];
UIButton *button = stack.subviews[0];
[stack setAlpha:0];
button.enabled = NO;
i++;
}
}
- (void)viewDidLoad {
[super viewDidLoad];
// Do any additional setup after loading the view from its nib.
for (UIStackView *stack in _stackViews) {
UIButton *button = stack.subviews[0];
// making rounded image
UIImageView *imageView = button.imageView;
imageView.layer.cornerRadius = imageView.frame.size.height / 2;
imageView.clipsToBounds = YES;
}
_addresses = [NSMutableArray array];
_localAddress = [NSMutableArray array];
_displayNames = [NSMutableArray array];
_imgs = [NSMutableArray array];
_isConf = [NSMutableArray array];
}
- (void)didReceiveMemoryWarning {
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
[_imgs removeAllObjects];
}
- (void)widgetPerformUpdateWithCompletionHandler:(void (^)(NCUpdateResult))completionHandler {
// Perform any setup necessary in order to update the view.
// If an error is encountered, use NCUpdateResultFailed
// If there's no update required, use NCUpdateResultNoData
// If there's an update, use NCUpdateResultNewData
[self loadData];
[self draw];
completionHandler(NCUpdateResultNewData);
}
- (void)launchAppWithURL:(NSURL *) url {
[self.extensionContext openURL:url
completionHandler:nil];
}
- (void)launchOnChatConversationViewWithPeerAddress:(NSString *)peerAddress andLocalAddress:(NSString *)localAddress {
[self launchAppWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"linphone-widget://chatroom/show?peer=%@&local=%@", peerAddress, localAddress]]];
}
- (IBAction)firstButtonTapped {
[self launchOnChatConversationViewWithPeerAddress:_addresses[0] andLocalAddress:_localAddress[0]];
}
- (IBAction)secondButtonTapped {
[self launchOnChatConversationViewWithPeerAddress:_addresses[1] andLocalAddress:_localAddress[1]];
}
- (IBAction)thirdButtonTapped {
[self launchOnChatConversationViewWithPeerAddress:_addresses[2] andLocalAddress:_localAddress[2]];
}
- (IBAction)fourthButtonTapped {
[self launchOnChatConversationViewWithPeerAddress:_addresses[3] andLocalAddress:_localAddress[3]];
}
@end

View file

@ -1,10 +0,0 @@
<?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>com.apple.security.application-groups</key>
<array>
<string>group.belledonne-communications.linphone.widget</string>
</array>
</dict>
</plist>

File diff suppressed because it is too large Load diff

View file

@ -1,135 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="14113" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="X9Y-jO-gVr">
<device id="retina4_7" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14088"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
<!--Notification View Controller-->
<scene sceneID="ciY-6l-Mki">
<objects>
<tableViewController id="X9Y-jO-gVr" customClass="NotificationViewController" sceneMemberID="viewController">
<tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" showsHorizontalScrollIndicator="NO" dataMode="prototypes" style="plain" separatorStyle="none" allowsSelection="NO" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="28" sectionFooterHeight="28" id="xjB-Tn-AYr">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<prototypes>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" reuseIdentifier="notificationCell" id="4dO-Sq-LtB" customClass="NotificationTableViewCell">
<rect key="frame" x="0.0" y="28" width="375" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="4dO-Sq-LtB" id="Q3t-C0-U1O">
<rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" alignment="center" translatesAutoresizingMaskIntoConstraints="NO" id="OXj-8D-5BS">
<rect key="frame" x="60" y="10" width="310" height="32"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="WZa-ow-o0L">
<rect key="frame" x="0.0" y="0.0" width="310" height="17"/>
<constraints>
<constraint firstAttribute="height" constant="17" id="tvJ-aj-CIf"/>
</constraints>
<fontDescription key="fontDescription" type="system" pointSize="12"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<textView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" text="Lorem ipsum " textAlignment="natural" translatesAutoresizingMaskIntoConstraints="NO" id="3tK-2u-Ixe">
<rect key="frame" x="0.0" y="17" width="310" height="1.5"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<textInputTraits key="textInputTraits" autocapitalizationType="sentences"/>
</textView>
<stackView opaque="NO" contentMode="scaleToFill" spacing="5" translatesAutoresizingMaskIntoConstraints="NO" id="rnc-rL-KN8">
<rect key="frame" x="0.0" y="18.5" width="310" height="13.5"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="gv1-l8-gh3">
<rect key="frame" x="0.0" y="0.0" width="292" height="13.5"/>
<fontDescription key="fontDescription" type="system" pointSize="11"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="VYP-sN-Q5F">
<rect key="frame" x="297" y="0.0" width="13" height="13.5"/>
<constraints>
<constraint firstAttribute="height" constant="13" id="Drj-Lw-Eis"/>
<constraint firstAttribute="width" constant="13" id="NvK-gG-A0n"/>
</constraints>
</imageView>
</subviews>
<constraints>
<constraint firstAttribute="trailing" secondItem="VYP-sN-Q5F" secondAttribute="trailing" id="6ov-Ze-XHU"/>
</constraints>
</stackView>
</subviews>
<constraints>
<constraint firstItem="WZa-ow-o0L" firstAttribute="leading" secondItem="OXj-8D-5BS" secondAttribute="leading" id="7wZ-7m-XoH"/>
<constraint firstItem="3tK-2u-Ixe" firstAttribute="leading" secondItem="OXj-8D-5BS" secondAttribute="leading" id="A4k-hw-bfV"/>
<constraint firstItem="3tK-2u-Ixe" firstAttribute="top" secondItem="WZa-ow-o0L" secondAttribute="bottom" id="XWZ-K9-hVC"/>
<constraint firstItem="WZa-ow-o0L" firstAttribute="top" secondItem="OXj-8D-5BS" secondAttribute="top" id="dSr-F5-pKr"/>
<constraint firstAttribute="bottom" secondItem="rnc-rL-KN8" secondAttribute="bottom" id="o3L-83-aYX"/>
<constraint firstAttribute="trailing" secondItem="rnc-rL-KN8" secondAttribute="trailing" id="xIZ-Pw-t6a"/>
</constraints>
</stackView>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="SKQ-W1-Lmw">
<rect key="frame" x="10" y="10" width="40" height="40"/>
<constraints>
<constraint firstAttribute="height" constant="40" id="d6N-Hv-RS0"/>
<constraint firstAttribute="width" constant="40" id="kWJ-Qu-esd"/>
</constraints>
</imageView>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="color_A.png" translatesAutoresizingMaskIntoConstraints="NO" id="Wh2-bk-96C" userLabel="BottomBar">
<rect key="frame" x="0.0" y="43" width="375" height="1"/>
<constraints>
<constraint firstAttribute="height" constant="1" id="xx0-Om-qom"/>
</constraints>
</imageView>
<imageView userInteractionEnabled="NO" alpha="0.20000000000000001" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="color_A.png" translatesAutoresizingMaskIntoConstraints="NO" id="FHB-G3-atz">
<rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
</imageView>
</subviews>
<constraints>
<constraint firstItem="OXj-8D-5BS" firstAttribute="top" secondItem="Q3t-C0-U1O" secondAttribute="top" constant="10" id="9no-0X-SIc"/>
<constraint firstItem="SKQ-W1-Lmw" firstAttribute="top" secondItem="Q3t-C0-U1O" secondAttribute="top" constant="10" id="EqG-ZA-H0w"/>
<constraint firstItem="Wh2-bk-96C" firstAttribute="centerX" secondItem="Q3t-C0-U1O" secondAttribute="centerX" id="GiJ-VV-sUL"/>
<constraint firstItem="FHB-G3-atz" firstAttribute="centerX" secondItem="Q3t-C0-U1O" secondAttribute="centerX" id="Il9-x1-er0"/>
<constraint firstItem="FHB-G3-atz" firstAttribute="centerY" secondItem="Q3t-C0-U1O" secondAttribute="centerY" id="M94-ru-dxk"/>
<constraint firstAttribute="trailing" secondItem="OXj-8D-5BS" secondAttribute="trailing" constant="5" id="Oq5-ST-lUC"/>
<constraint firstItem="FHB-G3-atz" firstAttribute="top" secondItem="Q3t-C0-U1O" secondAttribute="top" id="UHW-lR-QSP"/>
<constraint firstItem="SKQ-W1-Lmw" firstAttribute="leading" secondItem="Q3t-C0-U1O" secondAttribute="leading" constant="10" id="ZPR-9n-0E4"/>
<constraint firstItem="FHB-G3-atz" firstAttribute="leading" secondItem="Q3t-C0-U1O" secondAttribute="leading" id="d7N-zS-IjG"/>
<constraint firstItem="OXj-8D-5BS" firstAttribute="leading" secondItem="Q3t-C0-U1O" secondAttribute="leading" constant="60" id="e0Q-na-hor"/>
<constraint firstItem="Wh2-bk-96C" firstAttribute="leading" secondItem="Q3t-C0-U1O" secondAttribute="leading" id="hOW-4m-Ke6"/>
<constraint firstItem="OXj-8D-5BS" firstAttribute="bottom" secondItem="Q3t-C0-U1O" secondAttribute="bottom" constant="-2" id="mVA-WG-D1q"/>
<constraint firstAttribute="bottom" secondItem="Wh2-bk-96C" secondAttribute="bottom" id="scj-em-N61"/>
</constraints>
</tableViewCellContentView>
<connections>
<outlet property="background" destination="FHB-G3-atz" id="x5b-Bw-EFi"/>
<outlet property="bottomBarColor" destination="Wh2-bk-96C" id="wxV-mb-eTf"/>
<outlet property="contactImage" destination="SKQ-W1-Lmw" id="nsD-4b-g0W"/>
<outlet property="imdm" destination="gv1-l8-gh3" id="ceS-Ho-kpi"/>
<outlet property="imdmImage" destination="VYP-sN-Q5F" id="hNY-Ig-KqX"/>
<outlet property="msgText" destination="3tK-2u-Ixe" id="aVq-ra-Sd7"/>
<outlet property="nameDate" destination="WZa-ow-o0L" id="WdA-QI-xv1"/>
</connections>
</tableViewCell>
</prototypes>
<sections/>
<connections>
<outlet property="dataSource" destination="X9Y-jO-gVr" id="TwP-dT-I3s"/>
<outlet property="delegate" destination="X9Y-jO-gVr" id="2OC-kx-QgD"/>
</connections>
</tableView>
</tableViewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="EXl-Zq-25w" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="-263.19999999999999" y="18.440779610194905"/>
</scene>
</scenes>
<resources>
<image name="color_A.png" width="2" height="2"/>
</resources>
</document>

View file

@ -1,40 +0,0 @@
<?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>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleDisplayName</key>
<string>richNotifications</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>XPC!</string>
<key>CFBundleShortVersionString</key>
<string>4.1</string>
<key>CFBundleVersion</key>
<string>27</string>
<key>NSExtension</key>
<dict>
<key>NSExtensionAttributes</key>
<dict>
<key>UNNotificationExtensionCategory</key>
<string>msg_cat</string>
<key>UNNotificationExtensionDefaultContentHidden</key>
<true/>
<key>UNNotificationExtensionInitialContentSizeRatio</key>
<real>1</real>
</dict>
<key>NSExtensionMainStoryboard</key>
<string>MainInterface</string>
<key>NSExtensionPointIdentifier</key>
<string>com.apple.usernotifications.content-extension</string>
</dict>
</dict>
</plist>

View file

@ -1,36 +0,0 @@
/*
* Copyright (c) 2010-2019 Belledonne Communications SARL.
*
* This file is part of linphone-iphone
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#import <UIKit/UIKit.h>
@interface NotificationTableViewCell : UITableViewCell
@property (weak, nonatomic) IBOutlet UIImageView *contactImage;
@property (weak, nonatomic) IBOutlet UILabel *nameDate;
@property (strong, nonatomic) IBOutlet UITextView *msgText;
@property (weak, nonatomic) IBOutlet UILabel *imdm;
@property (weak, nonatomic) IBOutlet UIImageView *background;
@property (weak, nonatomic) IBOutlet UIImageView *bottomBarColor;
@property (weak, nonatomic) IBOutlet UIImageView *imdmImage;
@property BOOL isOutgoing;
@property float width;
@property float height;
- (CGSize)ViewSizeForMessage:(NSString *)chat withWidth:(int)width;
@end

View file

@ -1,106 +0,0 @@
/*
* Copyright (c) 2010-2019 Belledonne Communications SARL.
*
* This file is part of linphone-iphone
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#import "NotificationTableViewCell.h"
@implementation NotificationTableViewCell
- (void)awakeFromNib {
[super awakeFromNib];
// Initialization code
_contactImage.layer.cornerRadius = _contactImage.frame.size.height / 2;
_contactImage.clipsToBounds = YES;
[self.contentView sendSubviewToBack:_background];
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
[super setSelected:selected animated:animated];
// Configure the view for the selected state
}
- (void)layoutSubviews {
[super layoutSubviews];
CGRect bubbleFrame = self.contentView.frame;
int originX;
bubbleFrame.size = CGSizeMake(_width, _height);
originX = (_isOutgoing ? self.frame.size.width - bubbleFrame.size.width - 5 : 5);
bubbleFrame.origin.x = originX;
self.contentView.frame = bubbleFrame;
_msgText.textContainerInset = UIEdgeInsetsZero;
_msgText.textContainer.lineFragmentPadding = 0;
}
#pragma mark - Bubble size computing
- (CGSize)computeBoundingBox:(NSString *)text size:(CGSize)size font:(UIFont *)font {
if (!text || text.length == 0)
return CGSizeMake(0, 0);
return [text boundingRectWithSize:size
options:(NSStringDrawingUsesLineFragmentOrigin |
NSStringDrawingTruncatesLastVisibleLine | NSStringDrawingUsesFontLeading)
attributes:@{
NSFontAttributeName : font
}
context:nil].size;
}
static const CGFloat CELL_MIN_HEIGHT = 60.0f;
static const CGFloat CELL_MIN_WIDTH = 190.0f;
static const CGFloat CELL_MESSAGE_X_MARGIN = 78 + 10.0f;
static const CGFloat CELL_MESSAGE_Y_MARGIN = 52; // 44;
- (CGSize)ViewHeightForMessage:(NSString *)messageText withWidth:(int)width {
static UIFont *messageFont = nil;
if (!messageFont) {
messageFont = _msgText.font;
}
CGSize size;
size = [self computeBoundingBox:messageText
size:CGSizeMake(width - CELL_MESSAGE_X_MARGIN - 4, CGFLOAT_MAX)
font:messageFont];
size.width = MAX(size.width + CELL_MESSAGE_X_MARGIN, CELL_MIN_WIDTH);
size.height = MAX(size.height + CELL_MESSAGE_Y_MARGIN, CELL_MIN_HEIGHT);
return size;
}
- (CGSize)ViewSizeForMessage:(NSString *)chat withWidth:(int)width {
static UIFont *dateFont = nil;
static CGSize dateViewSize;
if (!dateFont) {
dateFont = _nameDate.font;
dateViewSize = _nameDate.frame.size;
dateViewSize.width = CGFLOAT_MAX;
}
CGSize messageSize = [self ViewHeightForMessage:chat withWidth:width];
CGSize dateSize = [self computeBoundingBox:_nameDate.text size:dateViewSize font:dateFont];
messageSize.width = MAX(MAX(messageSize.width, MIN(dateSize.width + CELL_MESSAGE_X_MARGIN, width)), CELL_MIN_WIDTH);
return messageSize;
}
@end

View file

@ -1,24 +0,0 @@
/*
* Copyright (c) 2010-2019 Belledonne Communications SARL.
*
* This file is part of linphone-iphone
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#import <UIKit/UIKit.h>
@interface NotificationViewController : UITableViewController
@end

View file

@ -1,122 +0,0 @@
/*
* Copyright (c) 2010-2019 Belledonne Communications SARL.
*
* This file is part of linphone-iphone
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#import "NotificationViewController.h"
#import "NotificationTableViewCell.h"
#import <UserNotifications/UserNotifications.h>
#import <UserNotificationsUI/UserNotificationsUI.h>
@interface NotificationViewController () <UNNotificationContentExtension>
@end
@implementation NotificationViewController {
@private
NSMutableArray *msgs;
}
- (void)viewDidLoad {
[super viewDidLoad];
self.tableView.scrollEnabled = TRUE;
// Do any required interface initialization here.
}
- (void)didReceiveNotification:(UNNotification *)notification {
// static float initialHeight = -1;
// if (initialHeight < 0)
// initialHeight = self.tableView.frame.size.height;
if (msgs)
[msgs addObject:[((NSArray *)[[[[notification request] content] userInfo] objectForKey:@"msgs"]) lastObject]];
else
msgs = [NSMutableArray arrayWithArray:[[[[notification request] content] userInfo] objectForKey:@"msgs"]];
[self.tableView reloadData];
[self.tableView scrollToRowAtIndexPath:[NSIndexPath indexPathForRow:msgs.count - 1 inSection:0] atScrollPosition:UITableViewScrollPositionBottom animated:YES];
// float height = 0;
// for (int i = 0 ; i < self->msgs.count ; i++) {
// height += [self tableView:self.tableView heightForRowAtIndexPath:[NSIndexPath indexPathForRow:i inSection:0]];
// }
// if (height > initialHeight) {
// CGRect frame = self.tableView.frame;
// frame.size.height = height;
// frame.origin = CGPointMake(0, 0);
// self.tableView.frame = frame;
// self.tableView.bounds = frame;
// self.preferredContentSize = CGSizeMake(self.preferredContentSize.width, height);
// }
}
#pragma mark - UITableViewDataSource Functions
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
return 1;
}
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
return msgs.count;
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
BOOL isOutgoing = ((NSNumber *)[msgs[indexPath.row] objectForKey:@"isOutgoing"]).boolValue;
NSString *display = ((NSString *)[msgs[indexPath.row] objectForKey:@"displayNameDate"]);
NSString *msgText = ((NSString *)[msgs[indexPath.row] objectForKey:@"msg"]);
NSString *imdm = ((NSString *)[msgs[indexPath.row] objectForKey:@"state"]);
NSData *imageData = [msgs[indexPath.row] objectForKey:@"fromImageData"];
NotificationTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"notificationCell" forIndexPath:indexPath];
cell.background.image = cell.bottomBarColor.image = [UIImage imageNamed:isOutgoing ? @"color_A" : @"color_D.png"];
cell.contactImage.image = [UIImage imageWithData:imageData];
cell.nameDate.text = display;
cell.msgText.text = msgText;
cell.isOutgoing = isOutgoing;
CGSize size = [cell ViewSizeForMessage:msgText withWidth:self.view.bounds.size.width - 10];
cell.width = size.width;
cell.height = size.height;
cell.nameDate.textColor = [UIColor colorWithPatternImage:cell.background.image];
cell.msgText.textColor = [UIColor darkGrayColor];
cell.imdm.hidden = cell.imdmImage.hidden = !isOutgoing;
if ([imdm isEqualToString:@"LinphoneChatMessageStateDelivered"] || [imdm isEqualToString:@"LinphoneChatMessageStateDeliveredToUser"]) {
cell.imdm.text = NSLocalizedString(@"Delivered", nil);
cell.imdm.textColor = [UIColor grayColor];
cell.imdmImage.image = [UIImage imageNamed:@"chat_delivered.png"];
} else if ([imdm isEqualToString:@"LinphoneChatMessageStateDisplayed"]) {
cell.imdm.text = NSLocalizedString(@"Read", nil);
cell.imdm.textColor = [UIColor colorWithRed:(24 / 255.0) green:(167 / 255.0) blue:(175 / 255.0) alpha:1.0];
cell.imdmImage.image = [UIImage imageNamed:@"chat_read.png"];
} else if ([imdm isEqualToString:@"LinphoneChatMessageStateNotDelivered"] || [imdm isEqualToString:@"LinphoneChatMessageStateFileTransferError"]) {
cell.imdm.text = NSLocalizedString(@"Error", nil);
cell.imdm.textColor = [UIColor redColor];
cell.imdmImage.image = [UIImage imageNamed:@"chat_error.png"];
} else
cell.imdm.hidden = YES;
return cell;
}
#pragma mark - UITableViewDelegate Functions
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
NotificationTableViewCell *cell = [[NotificationTableViewCell alloc] init];
cell.msgText = [[UITextView alloc] init];
cell.msgText.text = ((NSString *)[msgs[indexPath.row] objectForKey:@"msg"]);
cell.msgText.font = [UIFont systemFontOfSize:17];
return [cell ViewSizeForMessage:cell.msgText.text withWidth:self.view.bounds.size.width - 10].height + 5;
}
@end