Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -179,12 +179,12 @@ extension PollRequestService {
// Restore a poll action when the app is going to go the foreground
NotificationCenter.default.addObserver(self,
selector: #selector(willEnterForeground),
name: .UIApplicationWillEnterForeground,
name: UIApplication.willEnterForegroundNotification,
object: nil)
// Pause a poll action after the app goes to the background
NotificationCenter.default.addObserver(self,
selector: #selector(didEnterBackground),
name: .UIApplicationDidEnterBackground,
name: UIApplication.didEnterBackgroundNotification,
object: nil)
}

Expand Down
10 changes: 6 additions & 4 deletions Example/BPMobileMessaging.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -563,6 +563,7 @@
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 5.0;
};
name = Debug;
};
Expand Down Expand Up @@ -608,6 +609,7 @@
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
SWIFT_VERSION = 5.0;
VALIDATE_PRODUCT = YES;
};
name = Release;
Expand All @@ -629,7 +631,7 @@
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 5.0;
};
name = Debug;
};
Expand All @@ -650,7 +652,7 @@
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 5.0;
};
name = Release;
};
Expand All @@ -673,7 +675,7 @@
PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 5.0;
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/BPMobileMessaging_Example.app/BPMobileMessaging_Example";
};
name = Debug;
Expand All @@ -693,7 +695,7 @@
PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 5.0;
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/BPMobileMessaging_Example.app/BPMobileMessaging_Example";
};
name = Release;
Expand Down
4 changes: 2 additions & 2 deletions Example/BPMobileMessaging/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
value(for: \AppDelegate.appID)
}

func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {

self.window = UIWindow(frame: UIScreen.main.bounds)
registerDefaultsFromSettingsBundle()
Expand Down Expand Up @@ -75,7 +75,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
}

func openSettings(alert: UIAlertAction!) {
if let url = URL.init(string: UIApplicationOpenSettingsURLString) {
if let url = URL.init(string: UIApplication.openSettingsURLString) {
UIApplication.shared.open(url, options: [:], completionHandler: nil)
}
}
Expand Down
20 changes: 10 additions & 10 deletions Example/BPMobileMessaging/HelpRequestViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class HelpRequestViewController: ViewController, ServiceDependencyProviding {
let backgroundImage = appDelegate.window?.frame.size.height ?? 0 > 568 ? UIImageView(image: #imageLiteral(resourceName: "splash-screen-tall")) : UIImageView(image: #imageLiteral(resourceName: "splash-screen-short"))
backgroundImage.translatesAutoresizingMaskIntoConstraints = false
view.addSubview(backgroundImage)
view.sendSubview(toBack: backgroundImage)
view.sendSubviewToBack(backgroundImage)
NSLayoutConstraint.activate([
backgroundImage.leadingAnchor.constraint(equalTo: view.leadingAnchor),
backgroundImage.trailingAnchor.constraint(equalTo: view.trailingAnchor),
Expand All @@ -56,8 +56,8 @@ class HelpRequestViewController: ViewController, ServiceDependencyProviding {
}

private func setupSubscriptions() {
NotificationCenter.default.addObserver(self, selector: #selector(keyboardWillShow), name: NSNotification.Name.UIKeyboardWillShow, object: nil)
NotificationCenter.default.addObserver(self, selector: #selector(keyboardWillHide), name: NSNotification.Name.UIKeyboardWillHide, object: nil)
NotificationCenter.default.addObserver(self, selector: #selector(keyboardWillShow), name: UIResponder.keyboardWillShowNotification, object: nil)
NotificationCenter.default.addObserver(self, selector: #selector(keyboardWillHide), name: UIResponder.keyboardWillHideNotification, object: nil)
}

override func viewWillAppear(_ animated: Bool) {
Expand All @@ -78,10 +78,10 @@ class HelpRequestViewController: ViewController, ServiceDependencyProviding {
@objc
private func keyboardWillShow(notification: Notification) {
// Get keyboard size and location
guard let keyboardBoundsGlobal = notification.userInfo?[UIKeyboardFrameEndUserInfoKey] as? CGRect,
let duration = notification.userInfo?[UIKeyboardAnimationDurationUserInfoKey] as? NSNumber,
let curveValue = notification.userInfo?[UIKeyboardAnimationCurveUserInfoKey] as? NSNumber,
let curve = UIViewAnimationCurve(rawValue: curveValue.intValue) else {
guard let keyboardBoundsGlobal = notification.userInfo?[UIResponder.keyboardFrameEndUserInfoKey] as? CGRect,
let duration = notification.userInfo?[UIResponder.keyboardAnimationDurationUserInfoKey] as? NSNumber,
let curveValue = notification.userInfo?[UIResponder.keyboardAnimationCurveUserInfoKey] as? NSNumber,
let curve = UIView.AnimationCurve(rawValue: curveValue.intValue) else {
return
}
// Need to translate the bounds to account for rotation.
Expand All @@ -106,9 +106,9 @@ class HelpRequestViewController: ViewController, ServiceDependencyProviding {

@objc
private func keyboardWillHide(notification: Notification) {
guard let duration = notification.userInfo?[UIKeyboardAnimationDurationUserInfoKey] as? NSNumber,
let curveValue = notification.userInfo?[UIKeyboardAnimationCurveUserInfoKey] as? NSNumber,
let curve = UIViewAnimationCurve(rawValue: curveValue.intValue) else {
guard let duration = notification.userInfo?[UIResponder.keyboardAnimationDurationUserInfoKey] as? NSNumber,
let curveValue = notification.userInfo?[UIResponder.keyboardAnimationCurveUserInfoKey] as? NSNumber,
let curve = UIView.AnimationCurve(rawValue: curveValue.intValue) else {
return
}

Expand Down
2 changes: 1 addition & 1 deletion Example/BPMobileMessaging/LinkDetectorTextStorage.swift
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ class LinkDetectorTextStorage: NSTextStorage {
value: UIColor.blue,
range: result.range)
addAttribute(.underlineStyle,
value: NSUnderlineStyle.styleSingle,
value: NSUnderlineStyle.single,
range: result.range)
linkRanges.append(result)
}
Expand Down
2 changes: 1 addition & 1 deletion Example/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ platform :ios, '11.0'
target 'BPMobileMessaging_Example' do
pod 'BPMobileMessaging', :path => '../'
pod 'Firebase/Messaging'
pod 'MessageKit', '~> 3.0.0'
pod 'MessageKit', '~> 3.3.0'

target 'BPMobileMessaging_Tests' do
inherit! :search_paths
Expand Down
72 changes: 38 additions & 34 deletions Example/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,58 +1,62 @@
PODS:
- BPMobileMessaging (0.1.1)
- Firebase/CoreOnly (7.6.0):
- FirebaseCore (= 7.6.0)
- Firebase/Messaging (7.6.0):
- BPMobileMessaging (0.1.3)
- Firebase/CoreOnly (7.9.0):
- FirebaseCore (= 7.9.0)
- Firebase/Messaging (7.9.0):
- Firebase/CoreOnly
- FirebaseMessaging (~> 7.6.0)
- FirebaseCore (7.6.0):
- FirebaseMessaging (~> 7.9.0)
- FirebaseCore (7.9.0):
- FirebaseCoreDiagnostics (~> 7.4)
- GoogleUtilities/Environment (~> 7.0)
- GoogleUtilities/Logger (~> 7.0)
- FirebaseCoreDiagnostics (7.6.0):
- FirebaseCoreDiagnostics (7.9.0):
- GoogleDataTransport (~> 8.0)
- GoogleUtilities/Environment (~> 7.0)
- GoogleUtilities/Logger (~> 7.0)
- nanopb (~> 2.30907.0)
- FirebaseInstallations (7.6.0):
- FirebaseInstallations (7.9.0):
- FirebaseCore (~> 7.0)
- GoogleUtilities/Environment (~> 7.0)
- GoogleUtilities/UserDefaults (~> 7.0)
- PromisesObjC (~> 1.2)
- FirebaseInstanceID (7.6.0):
- FirebaseInstanceID (7.9.0):
- FirebaseCore (~> 7.0)
- FirebaseInstallations (~> 7.0)
- GoogleUtilities/Environment (~> 7.0)
- GoogleUtilities/UserDefaults (~> 7.0)
- FirebaseMessaging (7.6.0):
- FirebaseMessaging (7.9.0):
- FirebaseCore (~> 7.0)
- FirebaseInstanceID (~> 7.0)
- GoogleUtilities/AppDelegateSwizzler (~> 7.0)
- GoogleUtilities/Environment (~> 7.0)
- GoogleUtilities/Reachability (~> 7.0)
- GoogleUtilities/UserDefaults (~> 7.0)
- GoogleDataTransport (8.2.0):
- GoogleDataTransport (8.3.1):
- GoogleUtilities/Environment (~> 7.2)
- nanopb (~> 2.30907.0)
- GoogleUtilities/AppDelegateSwizzler (7.2.2):
- PromisesObjC (~> 1.2)
- GoogleUtilities/AppDelegateSwizzler (7.3.1):
- GoogleUtilities/Environment
- GoogleUtilities/Logger
- GoogleUtilities/Network
- GoogleUtilities/Environment (7.2.2):
- GoogleUtilities/Environment (7.3.1):
- PromisesObjC (~> 1.2)
- GoogleUtilities/Logger (7.2.2):
- GoogleUtilities/Logger (7.3.1):
- GoogleUtilities/Environment
- GoogleUtilities/Network (7.2.2):
- GoogleUtilities/Network (7.3.1):
- GoogleUtilities/Logger
- "GoogleUtilities/NSData+zlib"
- GoogleUtilities/Reachability
- "GoogleUtilities/NSData+zlib (7.2.2)"
- GoogleUtilities/Reachability (7.2.2):
- "GoogleUtilities/NSData+zlib (7.3.1)"
- GoogleUtilities/Reachability (7.3.1):
- GoogleUtilities/Logger
- GoogleUtilities/UserDefaults (7.2.2):
- GoogleUtilities/UserDefaults (7.3.1):
- GoogleUtilities/Logger
- InputBarAccessoryView (4.2.2)
- MessageKit (3.0.0):
- InputBarAccessoryView (~> 4.2.2)
- InputBarAccessoryView (5.1.0):
- InputBarAccessoryView/Core (= 5.1.0)
- InputBarAccessoryView/Core (5.1.0)
- MessageKit (3.3.0):
- InputBarAccessoryView (~> 5.1.0)
- nanopb (2.30907.0):
- nanopb/decode (= 2.30907.0)
- nanopb/encode (= 2.30907.0)
Expand All @@ -63,7 +67,7 @@ PODS:
DEPENDENCIES:
- BPMobileMessaging (from `../`)
- Firebase/Messaging
- MessageKit (~> 3.0.0)
- MessageKit (~> 3.3.0)

SPEC REPOS:
trunk:
Expand All @@ -85,20 +89,20 @@ EXTERNAL SOURCES:
:path: "../"

SPEC CHECKSUMS:
BPMobileMessaging: be76b121a68afd05e9b47de6b1880ff7d3a9888c
Firebase: e1e089d9aac215a52442583f818ab61de3c4581b
FirebaseCore: 0a43b7f1c5b36f3358cd703011ca4c7e0df55870
FirebaseCoreDiagnostics: ee1184d51da3293335b83355aad20f537acc24cf
FirebaseInstallations: 6e4e77396559bc2ae0504823837ed737b1c7e47f
FirebaseInstanceID: cf243611700eddc916b093353adbd4da822cfa63
FirebaseMessaging: 4b9b2850fcfcaac2820097ee3703ba6cfff3df84
GoogleDataTransport: 1024b1a4dfbd7a0e92cb20d7e0a6f1fb66b449a4
GoogleUtilities: 31c5b01f978a70c6cff2afc6272b3f1921614b43
InputBarAccessoryView: 2b937602598e2fab3149f37f51dd7ad795653812
MessageKit: e892a9ca49ebe6d82684d3a93ad84021fa23e2c6
BPMobileMessaging: 9ebe050787009ca3a8736a649bfd1216a9b75260
Firebase: d8bd6bd34b4c7ed57bfdd056c66ff5adcdde53ab
FirebaseCore: 0798738ad1ae0fda67e17c7b9081241c431c6859
FirebaseCoreDiagnostics: 3d36e05da74cb8b7ce30e6594a8f201b982c725c
FirebaseInstallations: 5e777e6640fa060405cc7632447b6c5ca5af4742
FirebaseInstanceID: 53140c03b9f6136f890d7901399f85a4c90ab2d0
FirebaseMessaging: 5f83f200a251c44f647f36cb43e557be09889e8d
GoogleDataTransport: 8b0e733ea77c9218778e5a9e34ba9508b8328939
GoogleUtilities: e1d9ed4e544fc32a93e00e721400cbc3f377200d
InputBarAccessoryView: 19953f486a23e846e9487099f92bbe3456e46ce5
MessageKit: 1f07618183be6d92b648ba7a384aafa097362a00
nanopb: 59221d7f958fb711001e6a449489542d92ae113e
PromisesObjC: 3113f7f76903778cf4a0586bd1ab89329a0b7b97

PODFILE CHECKSUM: 07d1882f6f834b65f71145cb8cf098aa01947d5d
PODFILE CHECKSUM: dbd7d25454bd38270bce5c2266bb51a13c7e2c21

COCOAPODS: 1.10.1
8 changes: 1 addition & 7 deletions Example/Pods/Firebase/CoreOnly/Sources/Firebase.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

25 changes: 22 additions & 3 deletions Example/Pods/Firebase/README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions Example/Pods/FirebaseCore/FirebaseCore/Sources/FIRApp.m

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading