Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnWong committed Jun 26, 2024
1 parent bb6c066 commit 1689a75
Show file tree
Hide file tree
Showing 9 changed files with 300 additions and 241 deletions.
2 changes: 1 addition & 1 deletion BusRider WatchKit Extension/InterfaceController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ class InterfaceController: WKInterfaceController {
NotificationCenter.default.removeObserver(self)
}

func search() {
@IBAction func search() {
if let _ = JWUserDefaultsUtil.cityItem() {
pushController(withName: StoryBoard.Controllers.searchResult, context: nil)
} else {
Expand Down
14 changes: 8 additions & 6 deletions BusRider WatchKit Extension/JWSearchInterfaceController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,10 @@ class JWSearchInterfaceController: WKInterfaceController {
weakSelf.interfaceTable.setNumberOfRows(1, withRowType: Storyboard.RowTypes.errorItem)
let itemRowController = weakSelf.interfaceTable.rowController(at: 0) as! JWSearchControllerRowType
itemRowController.setText(error.localizedDescription)
} else if let result = result {
weakSelf.searchItems = JWSearchListItem(dictionary: result as [AnyHashable: Any])
} else if let result = result,
let content = result["result"] as? [AnyHashable: Any] {

weakSelf.searchItems = JWSearchListItem(dictionary: content)
let totalCount = weakSelf.searchItems?.lineList.count
if totalCount! > 0 {
weakSelf.interfaceTable.setNumberOfRows(totalCount!, withRowType: Storyboard.RowTypes.item)
Expand All @@ -84,10 +86,10 @@ class JWSearchInterfaceController: WKInterfaceController {
}

@IBAction func openInputController() {
if (TARGET_OS_SIMULATOR > 0) {
loadData("2")
return
}
// if (TARGET_OS_SIMULATOR > 0) {
// loadData("2")
// return
// }

var initialPhrases = Array<String>()
let allCollectItems = JWUserDefaultsUtil.allCollectItems()
Expand Down
106 changes: 74 additions & 32 deletions BusRider WatchKit/Assets.xcassets/AppIcon.appiconset/Contents.json
Original file line number Diff line number Diff line change
@@ -1,92 +1,134 @@
{
"images" : [
{
"size" : "24x24",
"idiom" : "watch",
"filename" : "48x48.png",
"scale" : "2x",
"idiom" : "watch",
"role" : "notificationCenter",
"scale" : "2x",
"size" : "24x24",
"subtype" : "38mm"
},
{
"size" : "27.5x27.5",
"idiom" : "watch",
"filename" : "55x55.png",
"scale" : "2x",
"idiom" : "watch",
"role" : "notificationCenter",
"scale" : "2x",
"size" : "27.5x27.5",
"subtype" : "42mm"
},
{
"size" : "29x29",
"idiom" : "watch",
"filename" : "[email protected]",
"idiom" : "watch",
"role" : "companionSettings",
"scale" : "2x"
"scale" : "2x",
"size" : "29x29"
},
{
"size" : "29x29",
"idiom" : "watch",
"filename" : "[email protected]",
"idiom" : "watch",
"role" : "companionSettings",
"scale" : "3x"
"scale" : "3x",
"size" : "29x29"
},
{
"size" : "40x40",
"idiom" : "watch",
"filename" : "80x80.png",
"role" : "notificationCenter",
"scale" : "2x",
"size" : "33x33",
"subtype" : "45mm"
},
{
"filename" : "80x80.png",
"idiom" : "watch",
"role" : "appLauncher",
"scale" : "2x",
"size" : "40x40",
"subtype" : "38mm"
},
{
"size" : "44x44",
"idiom" : "watch",
"filename" : "88x88.png",
"scale" : "2x",
"idiom" : "watch",
"role" : "appLauncher",
"scale" : "2x",
"size" : "44x44",
"subtype" : "40mm"
},
{
"size" : "50x50",
"idiom" : "watch",
"filename" : "[email protected]",
"role" : "appLauncher",
"scale" : "2x",
"size" : "46x46",
"subtype" : "41mm"
},
{
"filename" : "[email protected]",
"idiom" : "watch",
"role" : "appLauncher",
"scale" : "2x",
"size" : "50x50",
"subtype" : "44mm"
},
{
"size" : "86x86",
"idiom" : "watch",
"filename" : "172x172.png",
"role" : "appLauncher",
"scale" : "2x",
"size" : "51x51",
"subtype" : "45mm"
},
{
"idiom" : "watch",
"role" : "appLauncher",
"scale" : "2x",
"size" : "54x54",
"subtype" : "49mm"
},
{
"filename" : "172x172.png",
"idiom" : "watch",
"role" : "quickLook",
"scale" : "2x",
"size" : "86x86",
"subtype" : "38mm"
},
{
"size" : "98x98",
"idiom" : "watch",
"filename" : "196x196.png",
"scale" : "2x",
"idiom" : "watch",
"role" : "quickLook",
"scale" : "2x",
"size" : "98x98",
"subtype" : "42mm"
},
{
"filename" : "[email protected]",
"idiom" : "watch",
"role" : "quickLook",
"scale" : "2x",
"size" : "108x108",
"subtype" : "44mm"
},
{
"idiom" : "watch",
"filename" : "[email protected]",
"role" : "quickLook",
"scale" : "2x",
"size" : "117x117",
"subtype" : "45mm"
},
{
"idiom" : "watch",
"role" : "quickLook",
"subtype" : "44mm"
"scale" : "2x",
"size" : "129x129",
"subtype" : "49mm"
},
{
"size" : "1024x1024",
"idiom" : "watch-marketing",
"filename" : "Icon.png",
"scale" : "1x"
"idiom" : "watch-marketing",
"scale" : "1x",
"size" : "1024x1024"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
"author" : "xcode",
"version" : 1
}
}
}
18 changes: 11 additions & 7 deletions BusRider WatchKit/Base.lproj/Interface.storyboard
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder.WatchKit.Storyboard" version="3.0" toolsVersion="13196" targetRuntime="watchKit" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="AgC-eL-Hgc">
<device id="watch38" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<document type="com.apple.InterfaceBuilder.WatchKit.Storyboard" version="3.0" toolsVersion="32700.99.1234" targetRuntime="watchKit" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="AgC-eL-Hgc">
<device id="watch38"/>
<dependencies>
<deployment identifier="watchOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13173"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBWatchKitPlugin" version="13051"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBWatchKitPlugin" version="22609"/>
</dependencies>
<scenes>
<!--今日公交-->
Expand Down Expand Up @@ -43,7 +40,7 @@
</group>
</items>
</group>
<group width="1" height="1" alignment="left" verticalAlignment="bottom" layout="vertical" id="I3T-gy-PZU">
<group width="1" alignment="left" verticalAlignment="bottom" layout="vertical" id="I3T-gy-PZU">
<items>
<group width="1" alignment="left" hidden="YES" id="bCi-nU-xFF">
<items>
Expand Down Expand Up @@ -478,4 +475,11 @@
<point key="canvasLocation" x="1023" y="345"/>
</scene>
</scenes>
<resources>
<image name="Exchange" width="52" height="52"/>
<image name="Start" width="14" height="14"/>
<image name="Stop" width="14" height="14"/>
<image name="Time" width="14" height="14"/>
<image name="bus" width="128" height="128"/>
</resources>
</document>
13 changes: 0 additions & 13 deletions BusRider.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -156,13 +156,6 @@
remoteGlobalIDString = 52AB79F51A2E1982001904CA;
remoteInfo = Today;
};
52AB7A051A2E1982001904CA /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 52AB79C11A2E193E001904CA /* Project object */;
proxyType = 1;
remoteGlobalIDString = 52AB79F51A2E1982001904CA;
remoteInfo = Today;
};
/* End PBXContainerItemProxy section */

/* Begin PBXCopyFilesBuildPhase section */
Expand Down Expand Up @@ -824,7 +817,6 @@
);
dependencies = (
52AB7A031A2E1982001904CA /* PBXTargetDependency */,
52AB7A061A2E1982001904CA /* PBXTargetDependency */,
525D1D591BFA194700AC93B3 /* PBXTargetDependency */,
);
name = BusRider;
Expand Down Expand Up @@ -1210,11 +1202,6 @@
target = 52AB79F51A2E1982001904CA /* Today */;
targetProxy = 52AB7A021A2E1982001904CA /* PBXContainerItemProxy */;
};
52AB7A061A2E1982001904CA /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = 52AB79F51A2E1982001904CA /* Today */;
targetProxy = 52AB7A051A2E1982001904CA /* PBXContainerItemProxy */;
};
/* End PBXTargetDependency section */

/* Begin PBXVariantGroup section */
Expand Down
10 changes: 8 additions & 2 deletions Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ target :BusRider do
platform :ios, '12.0'
shared_pods
pod 'SVProgressHUD'
pod 'AHKActionSheet'
pod 'AHKActionSheet', :git => '[email protected]:JohnWong/AHKActionSheet.git'
pod 'UIViewAdditions'
pod 'Appirater'
pod 'SGNavigationProgress', :git => '[email protected]:JohnWong/SGNavigationProgress.git'
Expand All @@ -28,4 +28,10 @@ target :'BusRider WatchKit Extension' do
shared_pods
end

inhibit_all_warnings!
post_install do |installer|
installer.pods_project.build_configurations.each do |config|
config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] = "arm64"
end
end

inhibit_all_warnings!
10 changes: 7 additions & 3 deletions Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ PODS:
- UIViewAdditions (1.0.0)

DEPENDENCIES:
- AHKActionSheet
- "AHKActionSheet (from `[email protected]:JohnWong/AHKActionSheet.git`)"
- Appirater
- "CBStoreHouseRefreshControl (from `[email protected]:JohnWong/CBStoreHouseRefreshControl.git`)"
- Crashlytics
Expand All @@ -24,7 +24,6 @@ DEPENDENCIES:

SPEC REPOS:
https://github.com/CocoaPods/Specs.git:
- AHKActionSheet
- Appirater
- Crashlytics
- Fabric
Expand All @@ -33,6 +32,8 @@ SPEC REPOS:
- UIViewAdditions

EXTERNAL SOURCES:
AHKActionSheet:
:git: "[email protected]:JohnWong/AHKActionSheet.git"
CBStoreHouseRefreshControl:
:git: "[email protected]:JohnWong/CBStoreHouseRefreshControl.git"
SGNavigationProgress:
Expand All @@ -41,6 +42,9 @@ EXTERNAL SOURCES:
:git: "[email protected]:JohnWong/STHTTPRequest.git"

CHECKOUT OPTIONS:
AHKActionSheet:
:commit: ef236d73dc4137a4e1782f846c3adae2aca5094e
:git: "[email protected]:JohnWong/AHKActionSheet.git"
CBStoreHouseRefreshControl:
:commit: d3948d5fbe83eb73e98ea4e63c201d8dda6e2696
:git: "[email protected]:JohnWong/CBStoreHouseRefreshControl.git"
Expand All @@ -63,6 +67,6 @@ SPEC CHECKSUMS:
SVProgressHUD: 1428aafac632c1f86f62aa4243ec12008d7a51d6
UIViewAdditions: b35c38dd787949168f56c429cd341a55fbaba917

PODFILE CHECKSUM: 16e2850061d9d603f16bab71105626b6ed6e673d
PODFILE CHECKSUM: 3bf9e7c2a9abf1f84658157c853af4be7ecd3222

COCOAPODS: 1.5.2
10 changes: 7 additions & 3 deletions Pods/Manifest.lock

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

Loading

0 comments on commit 1689a75

Please sign in to comment.