summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoel Fischer <joeljfischer@gmail.com>2020-09-02 13:29:39 -0400
committerJoel Fischer <joeljfischer@gmail.com>2020-09-02 13:29:39 -0400
commit39bc78073a2a8c88948a8cc8ddfe0bc29a556f94 (patch)
treed181cfda690e85b6c3d125665f07577664ed776d
parent8ad685f4c4fe97dfcfe26d43602ee07eda0f1c81 (diff)
downloadsdl_ios-testing/issue-1748.tar.gz
Attempt to replicate the issuetesting/issue-1748
-rw-r--r--Example Apps/Example Swift/ConnectionContainerViewController.swift6
-rw-r--r--Example Apps/Example Swift/PresentVC.swift24
-rw-r--r--Example Apps/Example Swift/ProxyManager.swift4
-rw-r--r--SmartDeviceLink-iOS.xcodeproj/project.pbxproj22
-rw-r--r--SmartDeviceLink_Example/PresentVCTest.storyboard52
5 files changed, 105 insertions, 3 deletions
diff --git a/Example Apps/Example Swift/ConnectionContainerViewController.swift b/Example Apps/Example Swift/ConnectionContainerViewController.swift
index 4e6dd3895..b45e2874b 100644
--- a/Example Apps/Example Swift/ConnectionContainerViewController.swift
+++ b/Example Apps/Example Swift/ConnectionContainerViewController.swift
@@ -32,6 +32,12 @@ class ConnectionContainerViewController: UIViewController {
rightSwipe.direction = .right
view.addGestureRecognizer(leftSwipe)
view.addGestureRecognizer(rightSwipe)
+
+ NotificationCenter.default.addObserver(forName: Notification.Name("SDLConnected"), object: nil, queue: .main) { _ in
+ let storyboard = UIStoryboard(name: "PresentVCTest", bundle: nil)
+ let vc = storyboard.instantiateInitialViewController()!
+ self.present(vc, animated: true)
+ }
}
override func didReceiveMemoryWarning() {
diff --git a/Example Apps/Example Swift/PresentVC.swift b/Example Apps/Example Swift/PresentVC.swift
new file mode 100644
index 000000000..c50c34b75
--- /dev/null
+++ b/Example Apps/Example Swift/PresentVC.swift
@@ -0,0 +1,24 @@
+//
+// PresentVC.swift
+// SmartDeviceLink-Example-Swift
+//
+// Created by Joel Fischer on 9/2/20.
+// Copyright © 2020 smartdevicelink. All rights reserved.
+//
+
+import UIKit
+
+class PresentVC: UIViewController {
+ @IBAction func dismissButtonPressed(_ sender: UIBarButtonItem) {
+ dismiss(animated: true)
+ }
+
+ override func viewDidLoad() {
+ print("VIEW DID LOAD")
+ }
+
+ override func viewDidAppear(_ animated: Bool) {
+ print("VIEW DID APPEAR")
+ }
+}
+
diff --git a/Example Apps/Example Swift/ProxyManager.swift b/Example Apps/Example Swift/ProxyManager.swift
index ab6f656d9..4f7c53a2e 100644
--- a/Example Apps/Example Swift/ProxyManager.swift
+++ b/Example Apps/Example Swift/ProxyManager.swift
@@ -250,6 +250,10 @@ private extension ProxyManager {
/// Set the template and create the UI
func showInitialData() {
guard sdlManager.hmiLevel == .full else { return }
+
+ DispatchQueue.main.asyncAfter(deadline: .now() + 3.0) {
+ NotificationCenter.default.post(name: Notification.Name("SDLConnected"), object: nil)
+ }
let setDisplayLayout = SDLSetDisplayLayout(predefinedLayout: .nonMedia)
sdlManager.send(setDisplayLayout)
diff --git a/SmartDeviceLink-iOS.xcodeproj/project.pbxproj b/SmartDeviceLink-iOS.xcodeproj/project.pbxproj
index c96c92035..f6d2f7ed5 100644
--- a/SmartDeviceLink-iOS.xcodeproj/project.pbxproj
+++ b/SmartDeviceLink-iOS.xcodeproj/project.pbxproj
@@ -291,6 +291,8 @@
4A40254224FFDA660080E159 /* SDLTextAndGraphicUpdateOperation.h in Headers */ = {isa = PBXBuildFile; fileRef = 4A40253E24FFDA660080E159 /* SDLTextAndGraphicUpdateOperation.h */; };
4A40254324FFDA660080E159 /* SDLTextAndGraphicUpdateOperation.m in Sources */ = {isa = PBXBuildFile; fileRef = 4A40253F24FFDA660080E159 /* SDLTextAndGraphicUpdateOperation.m */; };
4A40254424FFDA660080E159 /* SDLTextAndGraphicState.h in Headers */ = {isa = PBXBuildFile; fileRef = 4A40254024FFDA660080E159 /* SDLTextAndGraphicState.h */; };
+ 4A40255024FFF8250080E159 /* PresentVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4A40254F24FFF8250080E159 /* PresentVC.swift */; };
+ 4A402551250008E00080E159 /* PresentVCTest.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 4A40254C24FFF7E20080E159 /* PresentVCTest.storyboard */; };
4A457DC324A2933E00386CBA /* SDLLifecycleRPCAdapterSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = 4A457DC224A2933E00386CBA /* SDLLifecycleRPCAdapterSpec.m */; };
4A457DD324A3886700386CBA /* SDLLifecycleSyncPDataHandlerSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = 4A457DD224A3886700386CBA /* SDLLifecycleSyncPDataHandlerSpec.m */; };
4A457DD524A3C16E00386CBA /* SDLLifecycleMobileHMIStateHandlerSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = 4A457DD424A3C16E00386CBA /* SDLLifecycleMobileHMIStateHandlerSpec.m */; };
@@ -2070,6 +2072,8 @@
4A40253E24FFDA660080E159 /* SDLTextAndGraphicUpdateOperation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SDLTextAndGraphicUpdateOperation.h; path = private/SDLTextAndGraphicUpdateOperation.h; sourceTree = "<group>"; };
4A40253F24FFDA660080E159 /* SDLTextAndGraphicUpdateOperation.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = SDLTextAndGraphicUpdateOperation.m; path = private/SDLTextAndGraphicUpdateOperation.m; sourceTree = "<group>"; };
4A40254024FFDA660080E159 /* SDLTextAndGraphicState.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SDLTextAndGraphicState.h; path = private/SDLTextAndGraphicState.h; sourceTree = "<group>"; };
+ 4A40254C24FFF7E20080E159 /* PresentVCTest.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = PresentVCTest.storyboard; sourceTree = "<group>"; };
+ 4A40254F24FFF8250080E159 /* PresentVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = PresentVC.swift; path = "Example Apps/Example Swift/PresentVC.swift"; sourceTree = SOURCE_ROOT; };
4A457DC224A2933E00386CBA /* SDLLifecycleRPCAdapterSpec.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = SDLLifecycleRPCAdapterSpec.m; path = DevAPISpecs/SDLLifecycleRPCAdapterSpec.m; sourceTree = "<group>"; };
4A457DD224A3886700386CBA /* SDLLifecycleSyncPDataHandlerSpec.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = SDLLifecycleSyncPDataHandlerSpec.m; path = DevAPISpecs/SDLLifecycleSyncPDataHandlerSpec.m; sourceTree = "<group>"; };
4A457DD424A3C16E00386CBA /* SDLLifecycleMobileHMIStateHandlerSpec.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = SDLLifecycleMobileHMIStateHandlerSpec.m; path = DevAPISpecs/SDLLifecycleMobileHMIStateHandlerSpec.m; sourceTree = "<group>"; };
@@ -4191,6 +4195,15 @@
name = "Update Operation";
sourceTree = "<group>";
};
+ 4A40254E24FFF8070080E159 /* PresentTest */ = {
+ isa = PBXGroup;
+ children = (
+ 4A40254C24FFF7E20080E159 /* PresentVCTest.storyboard */,
+ 4A40254F24FFF8250080E159 /* PresentVC.swift */,
+ );
+ name = PresentTest;
+ sourceTree = "<group>";
+ };
4A4AD8A12489422F008FC414 /* Utilities */ = {
isa = PBXGroup;
children = (
@@ -6554,9 +6567,7 @@
children = (
5D1FF2F4213047B2000EB9B4 /* LaunchScreen.xib */,
88A0AA5F207CFEA60075132C /* Connection */,
- 5D1FF2E82130479C000EB9B4 /* ConnectionContainerViewController.swift */,
- 5D1FF2EA2130479C000EB9B4 /* ConnectionIAPTableViewController.swift */,
- 5D1FF2E92130479C000EB9B4 /* ConnectionTCPTableViewController.swift */,
+ 4A40254E24FFF8070080E159 /* PresentTest */,
);
name = UI;
sourceTree = "<group>";
@@ -6616,6 +6627,9 @@
isa = PBXGroup;
children = (
88A0AA60207CFEAC0075132C /* Storyboards */,
+ 5D1FF2E82130479C000EB9B4 /* ConnectionContainerViewController.swift */,
+ 5D1FF2EA2130479C000EB9B4 /* ConnectionIAPTableViewController.swift */,
+ 5D1FF2E92130479C000EB9B4 /* ConnectionTCPTableViewController.swift */,
);
name = Connection;
sourceTree = "<group>";
@@ -7630,6 +7644,7 @@
5D1FF2C7213045F2000EB9B4 /* Images.xcassets in Resources */,
5D1FF2F5213047B3000EB9B4 /* LaunchScreen.xib in Resources */,
5D1FF2F2213047AB000EB9B4 /* ConnectionIAPTableViewController.storyboard in Resources */,
+ 4A402551250008E00080E159 /* PresentVCTest.storyboard in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -8743,6 +8758,7 @@
5D1FF2EB2130479C000EB9B4 /* ConnectionContainerViewController.swift in Sources */,
889E7BAF249CEE07002E4BE1 /* SubscribeButtonManager.swift in Sources */,
5D1FF2E021304746000EB9B4 /* MenuManager.swift in Sources */,
+ 4A40255024FFF8250080E159 /* PresentVC.swift in Sources */,
5D1FF2DF21304746000EB9B4 /* PerformInteractionManager.swift in Sources */,
5D1FF2ED2130479C000EB9B4 /* ConnectionIAPTableViewController.swift in Sources */,
5D1FF2DD21304746000EB9B4 /* RPCPermissionsManager.swift in Sources */,
diff --git a/SmartDeviceLink_Example/PresentVCTest.storyboard b/SmartDeviceLink_Example/PresentVCTest.storyboard
new file mode 100644
index 000000000..491069861
--- /dev/null
+++ b/SmartDeviceLink_Example/PresentVCTest.storyboard
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="16097.3" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="ZES-am-620">
+ <device id="retina6_1" orientation="portrait" appearance="light"/>
+ <dependencies>
+ <deployment identifier="iOS"/>
+ <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="16087"/>
+ <capability name="Safe area layout guides" minToolsVersion="9.0"/>
+ <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
+ </dependencies>
+ <scenes>
+ <!--PresentVC-->
+ <scene sceneID="8bk-wd-m3n">
+ <objects>
+ <viewController id="sbd-O7-vpc" customClass="PresentVC" customModule="SDL_Example_Swift" sceneMemberID="viewController">
+ <view key="view" contentMode="scaleToFill" id="5Dk-IB-FK6">
+ <rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
+ <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+ <color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
+ <viewLayoutGuide key="safeArea" id="Y7F-qa-Jnj"/>
+ </view>
+ <navigationItem key="navigationItem" id="AHv-Tq-IUg">
+ <barButtonItem key="rightBarButtonItem" title="Dismiss" id="xDP-13-2AB">
+ <connections>
+ <action selector="dismissButtonPressed:" destination="sbd-O7-vpc" id="7fU-x6-E1C"/>
+ </connections>
+ </barButtonItem>
+ </navigationItem>
+ </viewController>
+ <placeholder placeholderIdentifier="IBFirstResponder" id="dku-ju-NeY" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>
+ </objects>
+ <point key="canvasLocation" x="1044.9275362318842" y="131.91964285714286"/>
+ </scene>
+ <!--Navigation Controller-->
+ <scene sceneID="Qs8-Sr-CHc">
+ <objects>
+ <navigationController automaticallyAdjustsScrollViewInsets="NO" id="ZES-am-620" sceneMemberID="viewController">
+ <toolbarItems/>
+ <navigationBar key="navigationBar" contentMode="scaleToFill" insetsLayoutMarginsFromSafeArea="NO" id="b4r-5f-OsC">
+ <rect key="frame" x="0.0" y="44" width="414" height="44"/>
+ <autoresizingMask key="autoresizingMask"/>
+ </navigationBar>
+ <nil name="viewControllers"/>
+ <connections>
+ <segue destination="sbd-O7-vpc" kind="relationship" relationship="rootViewController" id="egH-xX-LS3"/>
+ </connections>
+ </navigationController>
+ <placeholder placeholderIdentifier="IBFirstResponder" id="zvN-ZQ-pQF" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>
+ </objects>
+ <point key="canvasLocation" x="134.78260869565219" y="131.91964285714286"/>
+ </scene>
+ </scenes>
+</document>