-
-
Notifications
You must be signed in to change notification settings - Fork 476
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
46 changed files
with
1,232 additions
and
114 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# Uncomment the next line to define a global platform for your project | ||
platform :ios, '14.0' | ||
|
||
# Comment the next line if you don't want to use dynamic frameworks | ||
use_frameworks! | ||
|
||
def commonPods | ||
# Pods for common | ||
pod 'Moya', '~> 15.0' | ||
end | ||
|
||
target 'PushDeer' do | ||
commonPods | ||
# Pods for PushDeer | ||
|
||
end | ||
|
||
target 'PushDeerClip' do | ||
commonPods | ||
# Pods for PushDeerClip | ||
|
||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
PODS: | ||
- Alamofire (5.5.0) | ||
- Moya (15.0.0): | ||
- Moya/Core (= 15.0.0) | ||
- Moya/Core (15.0.0): | ||
- Alamofire (~> 5.0) | ||
|
||
DEPENDENCIES: | ||
- Moya (~> 15.0) | ||
|
||
SPEC REPOS: | ||
trunk: | ||
- Alamofire | ||
- Moya | ||
|
||
SPEC CHECKSUMS: | ||
Alamofire: 1c4fb5369c3fe93d2857c780d8bbe09f06f97e7c | ||
Moya: 138f0573e53411fb3dc17016add0b748dfbd78ee | ||
|
||
PODFILE CHECKSUM: 71abdebce610eefe1a0299d0a0bd00a463b0a79c | ||
|
||
COCOAPODS: 1.11.2 |
Large diffs are not rendered by default.
Oops, something went wrong.
10 changes: 10 additions & 0 deletions
10
ios/PushDeer-iOS/PushDeer.xcworkspace/contents.xcworkspacedata
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
8 changes: 8 additions & 0 deletions
8
ios/PushDeer-iOS/PushDeer.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
<plist version="1.0"> | ||
<dict> | ||
<key>IDEDidComputeMac32BitWarning</key> | ||
<true/> | ||
</dict> | ||
</plist> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
// | ||
// AppDelegate.swift | ||
// PushDeer | ||
// | ||
// Created by HeXiaoTian on 2021/12/31. | ||
// | ||
|
||
import UIKit | ||
import UserNotifications | ||
|
||
class AppDelegate: NSObject, UIApplicationDelegate, UNUserNotificationCenterDelegate { | ||
|
||
static var deviceToken: String = "" | ||
|
||
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey : Any]? = nil) -> Bool { | ||
|
||
let center = UNUserNotificationCenter.current() | ||
center.delegate = self | ||
center.requestAuthorization(options: [.badge, .sound, .alert]) { granted, error in | ||
print("注册通知结果: \(granted) - \(String(describing: error))") | ||
} | ||
application.registerForRemoteNotifications() | ||
|
||
Task { | ||
// APP启动后要先调一个无用接口, 用于触发国行手机的网络授权弹框, 未授权前调的接口会直接失败. (提前触发网络授权弹窗) | ||
let result = try await HttpRequest.fake() | ||
AppState.shared.token = result.token | ||
HttpRequest.getDevices() | ||
} | ||
|
||
return true | ||
} | ||
|
||
func application(_ application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data) { | ||
let deviceTokenString = deviceToken.reduce("", {$0 + String(format: "%02X", $1)}) | ||
print("deviceToken: ", deviceTokenString) | ||
AppDelegate.deviceToken = deviceTokenString; | ||
} | ||
|
||
func userNotificationCenter(_ center: UNUserNotificationCenter, willPresent notification: UNNotification) async -> UNNotificationPresentationOptions { | ||
print("willPresent:", notification.request.content.userInfo) | ||
return [.sound, .list, .banner] | ||
} | ||
|
||
func userNotificationCenter(_ center: UNUserNotificationCenter, didReceive response: UNNotificationResponse) async { | ||
print("didReceive:", response.notification.request.content.userInfo) | ||
} | ||
|
||
} |
216 changes: 120 additions & 96 deletions
216
ios/PushDeer-iOS/PushDeer/Assets.xcassets/AppIcon.appiconset/Contents.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,98 +1,122 @@ | ||
{ | ||
"images" : [ | ||
{ | ||
"idiom" : "iphone", | ||
"scale" : "2x", | ||
"size" : "20x20" | ||
}, | ||
{ | ||
"idiom" : "iphone", | ||
"scale" : "3x", | ||
"size" : "20x20" | ||
}, | ||
{ | ||
"idiom" : "iphone", | ||
"scale" : "2x", | ||
"size" : "29x29" | ||
}, | ||
{ | ||
"idiom" : "iphone", | ||
"scale" : "3x", | ||
"size" : "29x29" | ||
}, | ||
{ | ||
"idiom" : "iphone", | ||
"scale" : "2x", | ||
"size" : "40x40" | ||
}, | ||
{ | ||
"idiom" : "iphone", | ||
"scale" : "3x", | ||
"size" : "40x40" | ||
}, | ||
{ | ||
"idiom" : "iphone", | ||
"scale" : "2x", | ||
"size" : "60x60" | ||
}, | ||
{ | ||
"idiom" : "iphone", | ||
"scale" : "3x", | ||
"size" : "60x60" | ||
}, | ||
{ | ||
"idiom" : "ipad", | ||
"scale" : "1x", | ||
"size" : "20x20" | ||
}, | ||
{ | ||
"idiom" : "ipad", | ||
"scale" : "2x", | ||
"size" : "20x20" | ||
}, | ||
{ | ||
"idiom" : "ipad", | ||
"scale" : "1x", | ||
"size" : "29x29" | ||
}, | ||
{ | ||
"idiom" : "ipad", | ||
"scale" : "2x", | ||
"size" : "29x29" | ||
}, | ||
{ | ||
"idiom" : "ipad", | ||
"scale" : "1x", | ||
"size" : "40x40" | ||
}, | ||
{ | ||
"idiom" : "ipad", | ||
"scale" : "2x", | ||
"size" : "40x40" | ||
}, | ||
{ | ||
"idiom" : "ipad", | ||
"scale" : "1x", | ||
"size" : "76x76" | ||
}, | ||
{ | ||
"idiom" : "ipad", | ||
"scale" : "2x", | ||
"size" : "76x76" | ||
}, | ||
{ | ||
"idiom" : "ipad", | ||
"scale" : "2x", | ||
"size" : "83.5x83.5" | ||
}, | ||
{ | ||
"idiom" : "ios-marketing", | ||
"scale" : "1x", | ||
"size" : "1024x1024" | ||
"images": [ | ||
{ | ||
"size": "20x20", | ||
"idiom": "iphone", | ||
"filename": "icon-20@2x.png", | ||
"scale": "2x" | ||
}, | ||
{ | ||
"size": "20x20", | ||
"idiom": "iphone", | ||
"filename": "icon-20@3x.png", | ||
"scale": "3x" | ||
}, | ||
{ | ||
"size": "29x29", | ||
"idiom": "iphone", | ||
"filename": "icon-29.png", | ||
"scale": "1x" | ||
}, | ||
{ | ||
"size": "29x29", | ||
"idiom": "iphone", | ||
"filename": "icon-29@2x.png", | ||
"scale": "2x" | ||
}, | ||
{ | ||
"size": "29x29", | ||
"idiom": "iphone", | ||
"filename": "icon-29@3x.png", | ||
"scale": "3x" | ||
}, | ||
{ | ||
"size": "40x40", | ||
"idiom": "iphone", | ||
"filename": "icon-40@2x.png", | ||
"scale": "2x" | ||
}, | ||
{ | ||
"size": "40x40", | ||
"idiom": "iphone", | ||
"filename": "icon-40@3x.png", | ||
"scale": "3x" | ||
}, | ||
{ | ||
"size": "60x60", | ||
"idiom": "iphone", | ||
"filename": "icon-60@2x.png", | ||
"scale": "2x" | ||
}, | ||
{ | ||
"size": "60x60", | ||
"idiom": "iphone", | ||
"filename": "icon-60@3x.png", | ||
"scale": "3x" | ||
}, | ||
{ | ||
"size": "20x20", | ||
"idiom": "ipad", | ||
"filename": "icon-20-ipad.png", | ||
"scale": "1x" | ||
}, | ||
{ | ||
"size": "20x20", | ||
"idiom": "ipad", | ||
"filename": "icon-20@2x-ipad.png", | ||
"scale": "2x" | ||
}, | ||
{ | ||
"size": "29x29", | ||
"idiom": "ipad", | ||
"filename": "icon-29-ipad.png", | ||
"scale": "1x" | ||
}, | ||
{ | ||
"size": "29x29", | ||
"idiom": "ipad", | ||
"filename": "icon-29@2x-ipad.png", | ||
"scale": "2x" | ||
}, | ||
{ | ||
"size": "40x40", | ||
"idiom": "ipad", | ||
"filename": "icon-40.png", | ||
"scale": "1x" | ||
}, | ||
{ | ||
"size": "40x40", | ||
"idiom": "ipad", | ||
"filename": "icon-40@2x.png", | ||
"scale": "2x" | ||
}, | ||
{ | ||
"size": "76x76", | ||
"idiom": "ipad", | ||
"filename": "icon-76.png", | ||
"scale": "1x" | ||
}, | ||
{ | ||
"size": "76x76", | ||
"idiom": "ipad", | ||
"filename": "icon-76@2x.png", | ||
"scale": "2x" | ||
}, | ||
{ | ||
"size": "83.5x83.5", | ||
"idiom": "ipad", | ||
"filename": "icon-83.5@2x.png", | ||
"scale": "2x" | ||
}, | ||
{ | ||
"size": "1024x1024", | ||
"idiom": "ios-marketing", | ||
"filename": "icon-1024.png", | ||
"scale": "1x" | ||
} | ||
], | ||
"info": { | ||
"version": 1, | ||
"author": "icon.wuruihong.com" | ||
} | ||
], | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
} | ||
} | ||
} |
Binary file added
BIN
+49.7 KB
ios/PushDeer-iOS/PushDeer/Assets.xcassets/AppIcon.appiconset/icon-1024.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+641 Bytes
ios/PushDeer-iOS/PushDeer/Assets.xcassets/AppIcon.appiconset/icon-20-ipad.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+1.48 KB
ios/PushDeer-iOS/PushDeer/Assets.xcassets/AppIcon.appiconset/icon-20@2x-ipad.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+1.48 KB
ios/PushDeer-iOS/PushDeer/Assets.xcassets/AppIcon.appiconset/icon-20@2x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+2.67 KB
ios/PushDeer-iOS/PushDeer/Assets.xcassets/AppIcon.appiconset/icon-20@3x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+947 Bytes
ios/PushDeer-iOS/PushDeer/Assets.xcassets/AppIcon.appiconset/icon-29-ipad.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+947 Bytes
ios/PushDeer-iOS/PushDeer/Assets.xcassets/AppIcon.appiconset/icon-29.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+2.61 KB
ios/PushDeer-iOS/PushDeer/Assets.xcassets/AppIcon.appiconset/icon-29@2x-ipad.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+2.61 KB
ios/PushDeer-iOS/PushDeer/Assets.xcassets/AppIcon.appiconset/icon-29@2x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+4.35 KB
ios/PushDeer-iOS/PushDeer/Assets.xcassets/AppIcon.appiconset/icon-29@3x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+1.48 KB
ios/PushDeer-iOS/PushDeer/Assets.xcassets/AppIcon.appiconset/icon-40.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+4 KB
ios/PushDeer-iOS/PushDeer/Assets.xcassets/AppIcon.appiconset/icon-40@2x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+6.39 KB
ios/PushDeer-iOS/PushDeer/Assets.xcassets/AppIcon.appiconset/icon-40@3x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+6.39 KB
ios/PushDeer-iOS/PushDeer/Assets.xcassets/AppIcon.appiconset/icon-60@2x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+10.7 KB
ios/PushDeer-iOS/PushDeer/Assets.xcassets/AppIcon.appiconset/icon-60@3x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+3.71 KB
ios/PushDeer-iOS/PushDeer/Assets.xcassets/AppIcon.appiconset/icon-76.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+8.53 KB
ios/PushDeer-iOS/PushDeer/Assets.xcassets/AppIcon.appiconset/icon-76@2x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+9.61 KB
ios/PushDeer-iOS/PushDeer/Assets.xcassets/AppIcon.appiconset/icon-83.5@2x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.