Skip to content

Commit

Permalink
Fix iOS 15 styles & add qrcode scanner to existing trains/emus
Browse files Browse the repository at this point in the history
  • Loading branch information
hqy2000 committed Jan 9, 2022
1 parent c7543aa commit ebec589
Show file tree
Hide file tree
Showing 9 changed files with 209 additions and 56 deletions.
20 changes: 10 additions & 10 deletions Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
PODS:
- Alamofire (5.4.3)
- Alamofire (5.5.0)
- AlamofireNetworkActivityIndicator (3.1.0):
- Alamofire (~> 5.1)
- Cache (6.0.0)
- Moya (14.0.0):
- Moya/Core (= 14.0.0)
- Moya/Core (14.0.0):
- Moya (15.0.0):
- Moya/Core (= 15.0.0)
- Moya/Core (15.0.0):
- Alamofire (~> 5.0)
- Sentry (7.1.4):
- Sentry/Core (= 7.1.4)
- Sentry/Core (7.1.4)
- Sentry (7.8.0):
- Sentry/Core (= 7.8.0)
- Sentry/Core (7.8.0)
- SFSafeSymbols (2.1.3)
- SwiftyUserDefaults (5.3.0)

Expand All @@ -32,11 +32,11 @@ SPEC REPOS:
- SwiftyUserDefaults

SPEC CHECKSUMS:
Alamofire: e447a2774a40c996748296fa2c55112fdbbc42f9
Alamofire: 1c4fb5369c3fe93d2857c780d8bbe09f06f97e7c
AlamofireNetworkActivityIndicator: 6564782bd7b9e6c430ae67d9277af01907b01ca4
Cache: 4ca7e00363fca5455f26534e5607634c820ffc2d
Moya: 5b45dacb75adb009f97fde91c204c1e565d31916
Sentry: 1d3eb1a25f8c5333c88dd5603904a6d461cd9fcf
Moya: 138f0573e53411fb3dc17016add0b748dfbd78ee
Sentry: 9b980005a8cd62b4a985ceb431fceb7f17f7615d
SFSafeSymbols: 1c2d431b9e5ed20cd92a4ac303427f780d3354a3
SwiftyUserDefaults: 63f80248cf5bfb3458825d9a78f2eb7e1293a040

Expand Down
40 changes: 22 additions & 18 deletions chinaemu.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
518DFA55255A9F3C00B29703 /* Timetable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 518DFA54255A9F3C00B29703 /* Timetable.swift */; };
518DFA58255A9FEE00B29703 /* CRResponse.swift in Sources */ = {isa = PBXBuildFile; fileRef = 518DFA57255A9FEE00B29703 /* CRResponse.swift */; };
518DFA5B255AEC0000B29703 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 518DFA5A255AEC0000B29703 /* AppDelegate.swift */; };
51D880DD278B7FA100A96834 /* QRView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 51D880DC278B7FA100A96834 /* QRView.swift */; };
51E2087C25678BA5001D91D2 /* StationProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 51E2087B25678BA5001D91D2 /* StationProvider.swift */; };
51E2087F25678BC5001D91D2 /* Station.swift in Sources */ = {isa = PBXBuildFile; fileRef = 51E2087E25678BC5001D91D2 /* Station.swift */; };
51E20883256797EB001D91D2 /* LeftTicket.swift in Sources */ = {isa = PBXBuildFile; fileRef = 51E20882256797EB001D91D2 /* LeftTicket.swift */; };
Expand Down Expand Up @@ -162,6 +163,7 @@
518DFA54255A9F3C00B29703 /* Timetable.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Timetable.swift; sourceTree = "<group>"; };
518DFA57255A9FEE00B29703 /* CRResponse.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CRResponse.swift; sourceTree = "<group>"; };
518DFA5A255AEC0000B29703 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
51D880DC278B7FA100A96834 /* QRView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = QRView.swift; sourceTree = "<group>"; };
51E2087B25678BA5001D91D2 /* StationProvider.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StationProvider.swift; sourceTree = "<group>"; };
51E2087E25678BC5001D91D2 /* Station.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Station.swift; sourceTree = "<group>"; };
51E20882256797EB001D91D2 /* LeftTicket.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LeftTicket.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -309,6 +311,7 @@
518B988625675DC3005FBB54 /* TrainView.swift */,
518B988925675E07005FBB54 /* GeneralView.swift */,
51FAEC5E26BE840100A84AC8 /* SearchListView.swift */,
51D880DC278B7FA100A96834 /* QRView.swift */,
);
path = Helper;
sourceTree = "<group>";
Expand Down Expand Up @@ -684,6 +687,7 @@
510CC5F22560C9F300853E56 /* MultipleEMUsListView.swift in Sources */,
518DFA55255A9F3C00B29703 /* Timetable.swift in Sources */,
518DFA3E25581D7A00B29703 /* AbstractProvider.swift in Sources */,
51D880DD278B7FA100A96834 /* QRView.swift in Sources */,
518DFA52255A97FB00B29703 /* CRRequest.swift in Sources */,
51E2087C25678BA5001D91D2 /* StationProvider.swift in Sources */,
51E208862567D90C001D91D2 /* LeftTicketView.swift in Sources */,
Expand Down Expand Up @@ -906,18 +910,18 @@
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_ENTITLEMENTS = chinaemu/chinaemu.entitlements;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 52;
CURRENT_PROJECT_VERSION = 60;
DEVELOPMENT_ASSET_PATHS = "\"chinaemu/Preview Content\"";
DEVELOPMENT_TEAM = K2P3533G4D;
ENABLE_PREVIEWS = YES;
INFOPLIST_FILE = chinaemu/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 14.1;
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
"IPHONEOS_DEPLOYMENT_TARGET[sdk=macosx*]" = 14.2;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 2.3.0;
MARKETING_VERSION = 2.3.1;
PRODUCT_BUNDLE_IDENTIFIER = moe.railway.ios;
PRODUCT_NAME = "$(TARGET_NAME)";
SUPPORTS_MACCATALYST = YES;
Expand All @@ -935,18 +939,18 @@
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_ENTITLEMENTS = chinaemu/chinaemu.entitlements;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 52;
CURRENT_PROJECT_VERSION = 60;
DEVELOPMENT_ASSET_PATHS = "\"chinaemu/Preview Content\"";
DEVELOPMENT_TEAM = K2P3533G4D;
ENABLE_PREVIEWS = YES;
INFOPLIST_FILE = chinaemu/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 14.1;
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
"IPHONEOS_DEPLOYMENT_TARGET[sdk=macosx*]" = 14.2;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 2.3.0;
MARKETING_VERSION = 2.3.1;
PRODUCT_BUNDLE_IDENTIFIER = moe.railway.ios;
PRODUCT_NAME = "$(TARGET_NAME)";
SUPPORTS_MACCATALYST = YES;
Expand All @@ -963,16 +967,16 @@
ASSETCATALOG_COMPILER_WIDGET_BACKGROUND_COLOR_NAME = WidgetBackground;
CODE_SIGN_ENTITLEMENTS = chinaemuWidgetExtension.entitlements;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 52;
CURRENT_PROJECT_VERSION = 60;
DEVELOPMENT_TEAM = K2P3533G4D;
INFOPLIST_FILE = chinaemuWidget/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 14.1;
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
"@executable_path/../../Frameworks",
);
MARKETING_VERSION = 2.3.0;
MARKETING_VERSION = 2.3.1;
PRODUCT_BUNDLE_IDENTIFIER = moe.railway.ios.chinaemuWidget;
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
Expand All @@ -990,16 +994,16 @@
ASSETCATALOG_COMPILER_WIDGET_BACKGROUND_COLOR_NAME = WidgetBackground;
CODE_SIGN_ENTITLEMENTS = chinaemuWidgetExtension.entitlements;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 52;
CURRENT_PROJECT_VERSION = 60;
DEVELOPMENT_TEAM = K2P3533G4D;
INFOPLIST_FILE = chinaemuWidget/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 14.1;
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
"@executable_path/../../Frameworks",
);
MARKETING_VERSION = 2.3.0;
MARKETING_VERSION = 2.3.1;
PRODUCT_BUNDLE_IDENTIFIER = moe.railway.ios.chinaemuWidget;
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
Expand All @@ -1014,21 +1018,21 @@
buildSettings = {
APPLICATION_EXTENSION_API_ONLY = YES;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 52;
CURRENT_PROJECT_VERSION = 60;
DEFINES_MODULE = YES;
DEVELOPMENT_TEAM = K2P3533G4D;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
INFOPLIST_FILE = chinaemuFramework/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 14.1;
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
"@loader_path/Frameworks",
);
MARKETING_VERSION = 2.3.0;
MARKETING_VERSION = 2.3.1;
PRODUCT_BUNDLE_IDENTIFIER = moe.hqy.chinaemuFramework;
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
SKIP_INSTALL = YES;
Expand All @@ -1044,21 +1048,21 @@
buildSettings = {
APPLICATION_EXTENSION_API_ONLY = YES;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 52;
CURRENT_PROJECT_VERSION = 60;
DEFINES_MODULE = YES;
DEVELOPMENT_TEAM = K2P3533G4D;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
INFOPLIST_FILE = chinaemuFramework/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 14.1;
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
"@loader_path/Frameworks",
);
MARKETING_VERSION = 2.3.0;
MARKETING_VERSION = 2.3.1;
PRODUCT_BUNDLE_IDENTIFIER = moe.hqy.chinaemuFramework;
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
SKIP_INSTALL = YES;
Expand Down
28 changes: 28 additions & 0 deletions chinaemu/Assets.xcassets/AppIcon.appiconset/Contents.json
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,13 @@
"scale" : "3x",
"size" : "29x29"
},
{
"idiom" : "watch",
"role" : "notificationCenter",
"scale" : "2x",
"size" : "33x33",
"subtype" : "45mm"
},
{
"filename" : "80.png",
"idiom" : "watch",
Expand All @@ -196,6 +203,13 @@
"size" : "44x44",
"subtype" : "40mm"
},
{
"idiom" : "watch",
"role" : "appLauncher",
"scale" : "2x",
"size" : "46x46",
"subtype" : "41mm"
},
{
"filename" : "100.png",
"idiom" : "watch",
Expand All @@ -204,6 +218,13 @@
"size" : "50x50",
"subtype" : "44mm"
},
{
"idiom" : "watch",
"role" : "appLauncher",
"scale" : "2x",
"size" : "51x51",
"subtype" : "45mm"
},
{
"filename" : "172.png",
"idiom" : "watch",
Expand All @@ -228,6 +249,13 @@
"size" : "108x108",
"subtype" : "44mm"
},
{
"idiom" : "watch",
"role" : "quickLook",
"scale" : "2x",
"size" : "117x117",
"subtype" : "45mm"
},
{
"filename" : "1024.png",
"idiom" : "watch-marketing",
Expand Down
2 changes: 1 addition & 1 deletion chinaemu/ContentView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ struct ContentView: View {
Image(systemName: "info")
Text("更多")
}
}.navigationTitle("动车组交路查询")
}.navigationTitle("交路查询")

}
.navigationViewStyle(StackNavigationViewStyle())
Expand Down
7 changes: 4 additions & 3 deletions chinaemu/View/Helper/LeftTicketView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,9 @@ struct LeftTicketView: View {
}

var body: some View {
HStack {
Image(emu?.image ?? "").resizable().scaledToFit().frame(width: 30, alignment: /*@START_MENU_TOKEN@*/.center/*@END_MENU_TOKEN@*/)
HStack(spacing: 0) {
Image(emu?.image ?? "").resizable().scaledToFit().frame(width: 20, alignment: .leading)
Spacer(minLength: 3)
VStack(alignment: .leading) {
Text(leftTicket.trainNo)
.font(.system(.title3, design: .monospaced))
Expand Down Expand Up @@ -99,7 +100,7 @@ struct LeftTicketView_Previews: PreviewProvider {
static var previews: some View {
List {
LeftTicketView(LeftTicket(departureTime: "12:00", departureStation: "南京南", arrivalTime: "12:59", arrivalStation: "上海虹桥", trainNo: "G1245", softSeat: "--", hardSeat: "--", softSleeper: "--", hardSleeper: "--", specialClass: "--", businessClass: "0", firstClass: "10", secondClass: "324", noSeat: "12"), EMU(emu: "CRH2A2001325", train: "G123", date: "2020-12-21"))
LeftTicketView(LeftTicket(departureTime: "06:00", departureStation: "南京fh 南", arrivalTime: "12:59", arrivalStation: "上海 虹桥", trainNo: "Z1245", softSeat: "--", hardSeat: "--", softSleeper: "--", hardSleeper: "--", specialClass: "--", businessClass: "0", firstClass: "10", secondClass: "324", noSeat: "12"))
LeftTicketView(LeftTicket(departureTime: "06:00", departureStation: "南京南", arrivalTime: "12:59", arrivalStation: "上海 虹桥", trainNo: "Z1245", softSeat: "--", hardSeat: "--", softSleeper: "--", hardSleeper: "--", specialClass: "--", businessClass: "0", firstClass: "10", secondClass: "324", noSeat: "12"))
}

}
Expand Down
Loading

0 comments on commit ebec589

Please sign in to comment.