Skip to content
This repository has been archived by the owner on May 25, 2022. It is now read-only.

Commit

Permalink
Merge pull request #40 from rbeiter/updates/minor-updates
Browse files Browse the repository at this point in the history
Minor demo updates
  • Loading branch information
rbeiter committed Jun 11, 2018
2 parents 4cf5a7b + 145711d commit 94f8cb5
Show file tree
Hide file tree
Showing 35 changed files with 104 additions and 43 deletions.
54 changes: 54 additions & 0 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
<!-- Check the following before filing an issue -->
> Before filing an issue please check that the issue is not already addressed by the following:
> * [Github Issues](https://github.com/twilio/twilio-chat-demo-ios/issues)
> * [Changelog](https://www.twilio.com/docs/api/chat/changelogs/ios)
### Description

[Description of the issue]

### Steps to Reproduce

1. [Step one]
2. [Step two]
3. [Insert as many steps as needed]

#### Code (optional)

```objective-c
// Sample code that shows how to reproduce the issue
```

#### Expected Behavior

[What you expect to happen]

#### Actual Behavior

[What actually happens]

#### Reproduces how Often

[What percentage of the time does it reproduce?]

#### Logs

Please collect logs as described [here](https://www.twilio.com/docs/api/chat/guides/error-handling-and-diagnostics#logging). Full unedited logs help reproduce and fix issues faster.

*NOTE:* For security and privacy, these logs should not be submitted through the github issue but via Twilio's [support portal](https://support.twilio.com/hc/en-us/requests/new).

### Versions

All relevant version information for issue.

#### Chat iOS SDK

[eg. 1.0.0]

#### iOS Version

[eg. 11.0]

#### Device

[eg. iPhone X]
6 changes: 5 additions & 1 deletion Demo-ObjC.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@
58223AAF1B69571C00F0DF97 /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0900;
LastUpgradeCheck = 0940;
ORGANIZATIONNAME = Twilio;
TargetAttributes = {
58223AB61B69571C00F0DF97 = {
Expand Down Expand Up @@ -272,12 +272,14 @@
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
Expand Down Expand Up @@ -326,12 +328,14 @@
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
Expand Down
2 changes: 1 addition & 1 deletion Demo-ObjC/AppDelegate.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// AppDelegate.h
// Twilio Chat Demo
//
// Copyright (c) 2017 Twilio, Inc. All rights reserved.
// Copyright (c) 2018 Twilio, Inc. All rights reserved.
//

#import <UIKit/UIKit.h>
Expand Down
2 changes: 1 addition & 1 deletion Demo-ObjC/AppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// AppDelegate.m
// Twilio Chat Demo
//
// Copyright (c) 2017 Twilio, Inc. All rights reserved.
// Copyright (c) 2018 Twilio, Inc. All rights reserved.
//

#import "AppDelegate.h"
Expand Down
8 changes: 4 additions & 4 deletions Demo-ObjC/Base.lproj/LaunchScreen.xib
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="11762" systemVersion="15G1212" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" colorMatched="YES">
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="13771" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" colorMatched="YES">
<device id="retina4_7" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="11757"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13772"/>
<capability name="Constraints with non-1.0 multipliers" minToolsVersion="5.1"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
Expand All @@ -16,7 +16,7 @@
<rect key="frame" x="0.0" y="0.0" width="480" height="480"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text=" Copyright (c) 2011-2017 Twilio. All rights reserved." textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumFontSize="9" translatesAutoresizingMaskIntoConstraints="NO" id="8ie-xW-0ye">
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text=" Copyright (c) 2011-2018 Twilio, Inc. All rights reserved." textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumFontSize="9" translatesAutoresizingMaskIntoConstraints="NO" id="8ie-xW-0ye">
<rect key="frame" x="20" y="439.5" width="440" height="21"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
Expand Down
2 changes: 1 addition & 1 deletion Demo-ObjC/ChannelListViewController.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// ChannelListViewController.h
// Twilio Chat Demo
//
// Copyright (c) 2017 Twilio, Inc. All rights reserved.
// Copyright (c) 2018 Twilio, Inc. All rights reserved.
//

#import <UIKit/UIKit.h>
Expand Down
2 changes: 1 addition & 1 deletion Demo-ObjC/ChannelListViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// ChannelListViewController.m
// Twilio Chat Demo
//
// Copyright (c) 2017 Twilio, Inc. All rights reserved.
// Copyright (c) 2018 Twilio, Inc. All rights reserved.
//

#import "ChannelListViewController.h"
Expand Down
2 changes: 1 addition & 1 deletion Demo-ObjC/ChannelTableViewCell.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// ChannelTableViewCell.h
// Twilio Chat Demo
//
// Copyright (c) 2017 Twilio, Inc. All rights reserved.
// Copyright (c) 2018 Twilio, Inc. All rights reserved.
//

#import <UIKit/UIKit.h>
Expand Down
2 changes: 1 addition & 1 deletion Demo-ObjC/ChannelTableViewCell.m
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// ChannelTableViewCell.m
// Twilio Chat Demo
//
// Copyright (c) 2017 Twilio, Inc. All rights reserved.
// Copyright (c) 2018 Twilio, Inc. All rights reserved.
//

#import "ChannelTableViewCell.h"
Expand Down
2 changes: 1 addition & 1 deletion Demo-ObjC/ChannelViewController.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// ChannelViewController.h
// Twilio Chat Demo
//
// Copyright (c) 2017 Twilio, Inc. All rights reserved.
// Copyright (c) 2018 Twilio, Inc. All rights reserved.
//

#import <UIKit/UIKit.h>
Expand Down
8 changes: 5 additions & 3 deletions Demo-ObjC/ChannelViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// ChannelViewController.m
// Twilio Chat Demo
//
// Copyright (c) 2017 Twilio, Inc. All rights reserved.
// Copyright (c) 2018 Twilio, Inc. All rights reserved.
//

#import "ChannelViewController.h"
Expand Down Expand Up @@ -73,7 +73,9 @@ - (void)sharedInit {

- (void)dealloc {
if (self.channel) {
self.channel.delegate = nil;
if (self.channel.delegate == self) {
self.channel.delegate = nil;
}

[[NSNotificationCenter defaultCenter] removeObserver:self];
}
Expand Down Expand Up @@ -447,7 +449,7 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(N

if (cachedImage) {
cachedImage = [DemoHelpers image:cachedImage
scaledToWith:imageMessageCell.messageImageView.frame.size.width];
scaledToWidth:imageMessageCell.messageImageView.frame.size.width];
[imageMessageCell.messageImageView setImage:cachedImage];
} else {
[imageMessageCell showProgress];
Expand Down
2 changes: 1 addition & 1 deletion Demo-ObjC/ChatManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// ChatManager.h
// Twilio Chat Demo
//
// Copyright (c) 2017 Twilio, Inc. All rights reserved.
// Copyright (c) 2018 Twilio, Inc. All rights reserved.
//

#import <UIKit/UIKit.h>
Expand Down
2 changes: 1 addition & 1 deletion Demo-ObjC/ChatManager.m
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// ChatManager.m
// Twilio Chat Demo
//
// Copyright (c) 2017 Twilio, Inc. All rights reserved.
// Copyright (c) 2018 Twilio, Inc. All rights reserved.
//

#import "AppDelegate.h"
Expand Down
4 changes: 2 additions & 2 deletions Demo-ObjC/DemoHelpers.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// DemoHelpers.h
// Twilio Chat Demo
//
// Copyright (c) 2017 Twilio, Inc. All rights reserved.
// Copyright (c) 2018 Twilio, Inc. All rights reserved.
//

#import <UIKit/UIKit.h>
Expand Down Expand Up @@ -165,6 +165,6 @@
@return The scaled (or original) image.
*/
+ (nonnull UIImage *)image:(nonnull UIImage *)image
scaledToWith:(CGFloat)width;
scaledToWidth:(CGFloat)width;

@end
7 changes: 3 additions & 4 deletions Demo-ObjC/DemoHelpers.m
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// DemoHelpers.m
// Twilio Chat Demo
//
// Copyright (c) 2017 Twilio, Inc. All rights reserved.
// Copyright (c) 2018 Twilio, Inc. All rights reserved.
//

#import <QuartzCore/QuartzCore.h>
Expand Down Expand Up @@ -311,7 +311,7 @@ + (void)loadImageForMessage:(TCHMessage *)message
});
}

+ (UIImage *)image:(UIImage *)image scaledToWith:(CGFloat)width {
+ (UIImage *)image:(UIImage *)image scaledToWidth:(CGFloat)width {
if (image.size.width <= width) {
return image;
}
Expand Down Expand Up @@ -565,8 +565,7 @@ + (UIView *)createMessagePopup:(NSString *)message

+ (NSString *)mediaFilenameForMessage:(TCHMessage *)message {
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES);
NSString *cacheDirectory = [paths objectAtIndex:0];
NSString *mediaDirectory = cacheDirectory;
NSString *mediaDirectory = [paths objectAtIndex:0];
return [mediaDirectory stringByAppendingPathComponent:[NSString stringWithFormat:@"%@-%@", message.mediaSid, message.mediaFilename ? message.mediaFilename : @"attachment.dat"]];
}

Expand Down
2 changes: 1 addition & 1 deletion Demo-ObjC/ImageMessageTableViewCell.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// ImageMessageTableViewCell.h
// Twilio Chat Demo
//
// Copyright (c) 2017 Twilio, Inc. All rights reserved.
// Copyright (c) 2018 Twilio, Inc. All rights reserved.
//

#import <UIKit/UIKit.h>
Expand Down
2 changes: 1 addition & 1 deletion Demo-ObjC/ImageMessageTableViewCell.m
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// ImageMessageTableViewCell.m
// Twilio Chat Demo
//
// Copyright (c) 2017 Twilio, Inc. All rights reserved.
// Copyright (c) 2018 Twilio, Inc. All rights reserved.
//

#import "ImageMessageTableViewCell.h"
Expand Down
2 changes: 1 addition & 1 deletion Demo-ObjC/LoginViewController.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// LoginViewController.h
// Twilio Chat Demo
//
// Copyright (c) 2017 Twilio, Inc. All rights reserved.
// Copyright (c) 2018 Twilio, Inc. All rights reserved.
//

#import <UIKit/UIKit.h>
Expand Down
2 changes: 1 addition & 1 deletion Demo-ObjC/LoginViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// LoginViewController.m
// Twilio Chat Demo
//
// Copyright (c) 2017 Twilio, Inc. All rights reserved.
// Copyright (c) 2018 Twilio, Inc. All rights reserved.
//

#import "AppDelegate.h"
Expand Down
2 changes: 1 addition & 1 deletion Demo-ObjC/MemberTypingTableViewCell.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// MemberTypingTableViewCell.h
// Twilio Chat Demo
//
// Copyright (c) 2017 Twilio, Inc. All rights reserved.
// Copyright (c) 2018 Twilio, Inc. All rights reserved.
//

#import <UIKit/UIKit.h>
Expand Down
2 changes: 1 addition & 1 deletion Demo-ObjC/MemberTypingTableViewCell.m
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// MemberTypingTableViewCell.m
// Twilio Chat Demo
//
// Copyright (c) 2017 Twilio, Inc. All rights reserved.
// Copyright (c) 2018 Twilio, Inc. All rights reserved.
//

#import "MemberTypingTableViewCell.h"
Expand Down
2 changes: 1 addition & 1 deletion Demo-ObjC/MessageTableViewCell.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// MessageTableViewCell.h
// Twilio Chat Demo
//
// Copyright (c) 2017 Twilio, Inc. All rights reserved.
// Copyright (c) 2018 Twilio, Inc. All rights reserved.
//

#import <UIKit/UIKit.h>
Expand Down
2 changes: 1 addition & 1 deletion Demo-ObjC/MessageTableViewCell.m
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// MessageTableViewCell.m
// Twilio Chat Demo
//
// Copyright (c) 2017 Twilio, Inc. All rights reserved.
// Copyright (c) 2018 Twilio, Inc. All rights reserved.
//

#import "MessageTableViewCell.h"
Expand Down
2 changes: 1 addition & 1 deletion Demo-ObjC/PublicChannelListViewController.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// PublicChannelListViewController.h
// Twilio Chat Demo
//
// Copyright (c) 2017 Twilio, Inc. All rights reserved.
// Copyright (c) 2018 Twilio, Inc. All rights reserved.
//

#import <UIKit/UIKit.h>
Expand Down
2 changes: 1 addition & 1 deletion Demo-ObjC/PublicChannelListViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// PublicChannelListViewController.m
// Twilio Chat Demo
//
// Copyright (c) 2017 Twilio, Inc. All rights reserved.
// Copyright (c) 2018 Twilio, Inc. All rights reserved.
//

#import "PublicChannelListViewController.h"
Expand Down
2 changes: 1 addition & 1 deletion Demo-ObjC/ReactionView.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// Demo-ObjC
//
// Created by Randy Beiter on 6/26/16.
// Copyright (c) 2017 Twilio, Inc. All rights reserved.
// Copyright (c) 2018 Twilio, Inc. All rights reserved.
//

#import <UIKit/UIKit.h>
Expand Down
2 changes: 1 addition & 1 deletion Demo-ObjC/ReactionView.m
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// Demo-ObjC
//
// Created by Randy Beiter on 6/26/16.
// Copyright (c) 2017 Twilio, Inc. All rights reserved.
// Copyright (c) 2018 Twilio, Inc. All rights reserved.
//

#import <QuartzCore/QuartzCore.h>
Expand Down
2 changes: 1 addition & 1 deletion Demo-ObjC/ReactionsView.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// Demo-ObjC
//
// Created by Randy Beiter on 6/26/16.
// Copyright (c) 2017 Twilio, Inc. All rights reserved.
// Copyright (c) 2018 Twilio, Inc. All rights reserved.
//

#import <UIKit/UIKit.h>
Expand Down
2 changes: 1 addition & 1 deletion Demo-ObjC/ReactionsView.m
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// Demo-ObjC
//
// Created by Randy Beiter on 6/26/16.
// Copyright (c) 2017 Twilio, Inc. All rights reserved.
// Copyright (c) 2018 Twilio, Inc. All rights reserved.
//

#import "ReactionsView.h"
Expand Down
Loading

0 comments on commit 94f8cb5

Please sign in to comment.