Skip to content

Commit ddd6914

Browse files
author
jonny cau
committed
commit app
commit app
1 parent 179c061 commit ddd6914

File tree

13 files changed

+96
-60
lines changed

13 files changed

+96
-60
lines changed
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="16097" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
3+
<device id="retina6_1" orientation="portrait" appearance="light"/>
4+
<dependencies>
5+
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="16087"/>
6+
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
7+
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
8+
</dependencies>
9+
<scenes>
10+
<!--View Controller-->
11+
<scene sceneID="EHf-IW-A2E">
12+
<objects>
13+
<viewController id="01J-lp-oVM" sceneMemberID="viewController">
14+
<view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
15+
<rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
16+
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
17+
<subviews>
18+
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="DCB App for External" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="AoT-5H-2Ch">
19+
<rect key="frame" x="69.5" y="431" width="275" height="34"/>
20+
<fontDescription key="fontDescription" type="boldSystem" pointSize="28"/>
21+
<nil key="textColor"/>
22+
<nil key="highlightedColor"/>
23+
</label>
24+
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="DocomoDigital Italy S.p.A" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="hc7-as-W24">
25+
<rect key="frame" x="110" y="841" width="194" height="21"/>
26+
<fontDescription key="fontDescription" type="system" pointSize="17"/>
27+
<nil key="textColor"/>
28+
<nil key="highlightedColor"/>
29+
</label>
30+
</subviews>
31+
<color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
32+
<constraints>
33+
<constraint firstItem="hc7-as-W24" firstAttribute="bottom" secondItem="6Tk-OE-BBY" secondAttribute="bottom" id="5Ue-tg-VQ4"/>
34+
<constraint firstItem="AoT-5H-2Ch" firstAttribute="centerX" secondItem="Ze5-6b-2t3" secondAttribute="centerX" id="FGQ-ND-YcC"/>
35+
<constraint firstItem="AoT-5H-2Ch" firstAttribute="centerY" secondItem="Ze5-6b-2t3" secondAttribute="centerY" id="fLr-LA-eYv"/>
36+
<constraint firstItem="hc7-as-W24" firstAttribute="centerX" secondItem="Ze5-6b-2t3" secondAttribute="centerX" id="gxh-t2-3hD"/>
37+
</constraints>
38+
<viewLayoutGuide key="safeArea" id="6Tk-OE-BBY"/>
39+
</view>
40+
</viewController>
41+
<placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
42+
</objects>
43+
<point key="canvasLocation" x="53" y="375"/>
44+
</scene>
45+
</scenes>
46+
</document>
File renamed without changes.

Application for DCB/ViewController.swift renamed to Application Test/ViewController.swift

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -12,23 +12,21 @@ import UIKit
1212

1313
class ViewController: UIViewController {
1414
@IBOutlet var logTextView: UITextView!
15-
15+
1616
override func viewDidLoad() {
1717
super.viewDidLoad()
18-
18+
1919
setupLogging()
20-
20+
2121
DCBUserManager(client: Credential.dcbClient, loggingIsEnabled: Credential.logging).checkFlowDCB(isActive: false) { date in
2222
if let _ = DCBUserManager.dcbUser {
2323
print("User Docomo Digital")
2424
if let date = date {
2525
print("User is subscribed in date \(date)")
26-
}
27-
else {
26+
} else {
2827
print("User expired, not subscribed. User must pay again to access the product")
2928
}
30-
}
31-
else {
29+
} else {
3230
print("Normal user discover the app from AppStore")
3331
}
3432
}
@@ -42,9 +40,9 @@ extension Notification.Name {
4240
extension ViewController {
4341
func setupLogging() {
4442
NotificationCenter.default.addObserver(self, selector: #selector(loggingData(_:)), name: .dcbLogging, object: nil)
45-
43+
4644
logTextView.insertText("DCB FLOW\n")
47-
45+
4846
let _: DCBUserManagerCheckCompletion = { date in
4947
guard let date = date else {
5048
self.logTextView.insertText("\n\nDCB FLOW FINISHED WITHOUT EXPIRATION TIME")
@@ -53,12 +51,12 @@ extension ViewController {
5351
self.logTextView.insertText("DCB FLOW FINISHED WITHOUT EXPIRATION TIME WITH DATE: \(date)")
5452
}
5553
}
56-
54+
5755
@objc func loggingData(_ notification: Notification) {
5856
guard let userInfo = notification.userInfo,
5957
let message = userInfo["message"] as? String
60-
else { return }
61-
58+
else { return }
59+
6260
DispatchQueue.main.async {
6361
self.logTextView.insertText(message)
6462
}

Application for DCB/Base.lproj/LaunchScreen.storyboard

Lines changed: 0 additions & 25 deletions
This file was deleted.

Cartfile.resolved

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
binary "https://docomodigital.github.io/DcbSdk/ios/carthage-dcbapi-ios-sdk.json" "3.6.4"
2+
binary "https://docomodigital.github.io/DcbSdk/ios/carthage-newton-ios-sdk.json" "3.3.2"

DCBApplication.xcodeproj/project.pbxproj

Lines changed: 38 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -7,20 +7,23 @@
77
objects = {
88

99
/* Begin PBXBuildFile section */
10-
511BDAFA243372E9005F1BE5 /* DCBApiExt.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 511BDAF9243372E9005F1BE5 /* DCBApiExt.framework */; };
1110
511BDAFC24337343005F1BE5 /* Credential.swift in Sources */ = {isa = PBXBuildFile; fileRef = 511BDAFB24337343005F1BE5 /* Credential.swift */; };
11+
5192A234247BDA04000A25BE /* DCBApiExt.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5192A232247BDA04000A25BE /* DCBApiExt.framework */; };
12+
5192A236247BDA04000A25BE /* Newton.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5192A233247BDA04000A25BE /* Newton.framework */; };
13+
5192A23A247BF56A000A25BE /* Default-568h@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 5192A239247BF56A000A25BE /* Default-568h@2x.png */; };
1214
519BC42B241FB563009658BD /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 519BC42A241FB563009658BD /* AppDelegate.swift */; };
1315
519BC42D241FB563009658BD /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 519BC42C241FB563009658BD /* SceneDelegate.swift */; };
1416
519BC42F241FB563009658BD /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 519BC42E241FB563009658BD /* ViewController.swift */; };
1517
519BC432241FB563009658BD /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 519BC430241FB563009658BD /* Main.storyboard */; };
1618
519BC434241FB567009658BD /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 519BC433241FB567009658BD /* Assets.xcassets */; };
1719
519BC437241FB567009658BD /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 519BC435241FB567009658BD /* LaunchScreen.storyboard */; };
18-
519BC43D241FBFA6009658BD /* Newton.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B4368C11213931310056732A /* Newton.framework */; };
1920
/* End PBXBuildFile section */
2021

2122
/* Begin PBXFileReference section */
22-
511BDAF9243372E9005F1BE5 /* DCBApiExt.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = DCBApiExt.framework; path = Carthage/Build/iOS/DCBApiExt.framework; sourceTree = "<group>"; };
2323
511BDAFB24337343005F1BE5 /* Credential.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Credential.swift; sourceTree = "<group>"; };
24+
5192A232247BDA04000A25BE /* DCBApiExt.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = DCBApiExt.framework; path = Carthage/Build/iOS/DCBApiExt.framework; sourceTree = "<group>"; };
25+
5192A233247BDA04000A25BE /* Newton.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Newton.framework; path = Carthage/Build/iOS/Newton.framework; sourceTree = "<group>"; };
26+
5192A239247BF56A000A25BE /* Default-568h@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "Default-568h@2x.png"; path = "../Default-568h@2x.png"; sourceTree = "<group>"; };
2427
519BC428241FB563009658BD /* Application for DCB.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Application for DCB.app"; sourceTree = BUILT_PRODUCTS_DIR; };
2528
519BC42A241FB563009658BD /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
2629
519BC42C241FB563009658BD /* SceneDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SceneDelegate.swift; sourceTree = "<group>"; };
@@ -29,23 +32,22 @@
2932
519BC433241FB567009658BD /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
3033
519BC436241FB567009658BD /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
3134
519BC438241FB567009658BD /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
32-
B4368C11213931310056732A /* Newton.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Newton.framework; path = Carthage/Build/iOS/Newton.framework; sourceTree = "<group>"; };
3335
/* End PBXFileReference section */
3436

3537
/* Begin PBXFrameworksBuildPhase section */
3638
519BC425241FB563009658BD /* Frameworks */ = {
3739
isa = PBXFrameworksBuildPhase;
3840
buildActionMask = 2147483647;
3941
files = (
40-
519BC43D241FBFA6009658BD /* Newton.framework in Frameworks */,
41-
511BDAFA243372E9005F1BE5 /* DCBApiExt.framework in Frameworks */,
42+
5192A234247BDA04000A25BE /* DCBApiExt.framework in Frameworks */,
43+
5192A236247BDA04000A25BE /* Newton.framework in Frameworks */,
4244
);
4345
runOnlyForDeploymentPostprocessing = 0;
4446
};
4547
/* End PBXFrameworksBuildPhase section */
4648

4749
/* Begin PBXGroup section */
48-
519BC429241FB563009658BD /* Application for DCB */ = {
50+
519BC429241FB563009658BD /* Application Test */ = {
4951
isa = PBXGroup;
5052
children = (
5153
519BC42A241FB563009658BD /* AppDelegate.swift */,
@@ -54,33 +56,26 @@
5456
519BC42E241FB563009658BD /* ViewController.swift */,
5557
519BC430241FB563009658BD /* Main.storyboard */,
5658
519BC433241FB567009658BD /* Assets.xcassets */,
59+
5192A239247BF56A000A25BE /* Default-568h@2x.png */,
5760
519BC435241FB567009658BD /* LaunchScreen.storyboard */,
5861
519BC438241FB567009658BD /* Info.plist */,
5962
);
60-
path = "Application for DCB";
63+
path = "Application Test";
6164
sourceTree = "<group>";
6265
};
6366
8B3382EE1F90992500478B06 /* Frameworks */ = {
6467
isa = PBXGroup;
6568
children = (
66-
8B3382EF1F90993100478B06 /* iOS */,
69+
5192A232247BDA04000A25BE /* DCBApiExt.framework */,
70+
5192A233247BDA04000A25BE /* Newton.framework */,
6771
);
6872
name = Frameworks;
6973
sourceTree = "<group>";
7074
};
71-
8B3382EF1F90993100478B06 /* iOS */ = {
72-
isa = PBXGroup;
73-
children = (
74-
B4368C11213931310056732A /* Newton.framework */,
75-
511BDAF9243372E9005F1BE5 /* DCBApiExt.framework */,
76-
);
77-
name = iOS;
78-
sourceTree = "<group>";
79-
};
8075
8B5BEA901F0CFC8800CF5209 = {
8176
isa = PBXGroup;
8277
children = (
83-
519BC429241FB563009658BD /* Application for DCB */,
78+
519BC429241FB563009658BD /* Application Test */,
8479
8B3382EE1F90992500478B06 /* Frameworks */,
8580
8B5BEA9B1F0CFC8800CF5209 /* Products */,
8681
);
@@ -105,6 +100,7 @@
105100
519BC425241FB563009658BD /* Frameworks */,
106101
519BC426241FB563009658BD /* Resources */,
107102
519BC43C241FB6F1009658BD /* carthage-copy */,
103+
5192A23B247BF64B000A25BE /* SwiftFormat */,
108104
);
109105
buildRules = (
110106
);
@@ -156,6 +152,7 @@
156152
buildActionMask = 2147483647;
157153
files = (
158154
519BC437241FB567009658BD /* LaunchScreen.storyboard in Resources */,
155+
5192A23A247BF56A000A25BE /* Default-568h@2x.png in Resources */,
159156
519BC434241FB567009658BD /* Assets.xcassets in Resources */,
160157
519BC432241FB563009658BD /* Main.storyboard in Resources */,
161158
);
@@ -164,6 +161,24 @@
164161
/* End PBXResourcesBuildPhase section */
165162

166163
/* Begin PBXShellScriptBuildPhase section */
164+
5192A23B247BF64B000A25BE /* SwiftFormat */ = {
165+
isa = PBXShellScriptBuildPhase;
166+
buildActionMask = 2147483647;
167+
files = (
168+
);
169+
inputFileListPaths = (
170+
);
171+
inputPaths = (
172+
);
173+
name = SwiftFormat;
174+
outputFileListPaths = (
175+
);
176+
outputPaths = (
177+
);
178+
runOnlyForDeploymentPostprocessing = 0;
179+
shellPath = /bin/sh;
180+
shellScript = "if which swiftformat >/dev/null; then\n swiftformat . --swiftversion 5.2.4\nelse\n echo \"warning: SwiftFormat not installed, download from https://github.com/nicklockwood/SwiftFormat\"\nfi\n";
181+
};
167182
519BC43C241FB6F1009658BD /* carthage-copy */ = {
168183
isa = PBXShellScriptBuildPhase;
169184
buildActionMask = 2147483647;
@@ -234,8 +249,8 @@
234249
"$(PROJECT_DIR)/Carthage/Build/iOS",
235250
);
236251
GCC_C_LANGUAGE_STANDARD = gnu11;
237-
INFOPLIST_FILE = "Application for DCB/Info.plist";
238-
IPHONEOS_DEPLOYMENT_TARGET = 13.2;
252+
INFOPLIST_FILE = "Application Test/Info.plist";
253+
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
239254
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
240255
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
241256
MTL_FAST_MATH = YES;
@@ -260,8 +275,8 @@
260275
"$(PROJECT_DIR)/Carthage/Build/iOS",
261276
);
262277
GCC_C_LANGUAGE_STANDARD = gnu11;
263-
INFOPLIST_FILE = "Application for DCB/Info.plist";
264-
IPHONEOS_DEPLOYMENT_TARGET = 13.2;
278+
INFOPLIST_FILE = "Application Test/Info.plist";
279+
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
265280
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
266281
MTL_FAST_MATH = YES;
267282
PRODUCT_BUNDLE_IDENTIFIER = "com.docomodigital.Application-for-DCB";

Default-568h@2x.png

18.2 KB
Loading

0 commit comments

Comments
 (0)