Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dev/edit-info #76

Merged
merged 3 commits into from
Jan 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/company-export.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,13 +98,13 @@ jobs:
env:
COMPANY_PROV_UUID: ${{ secrets.COMPANY_PROV_UUID }}
COMPANY_P12_NAME: ${{ secrets.COMPANY_P12_NAME }}
run: |
xcodebuild archive -project ./DarockBili.xcodeproj -scheme 'DarockBili Watch App' -archivePath ./build.xcarchive -IDEPostProgressNotifications=YES CODE_SIGN_IDENTITY=- AD_HOC_CODE_SIGNING_ALLOWED=YES CODE_SIGN_STYLE=Automatic DEVELOPMENT_TEAM=H5SM6ZV38F COMPILER_INDEX_STORE_ENABLE=NO
run: xcodebuild archive -project ./DarockBili.xcodeproj -scheme 'DarockBili Watch App' -archivePath ./build.xcarchive -IDEPostProgressNotifications=YES CODE_SIGN_IDENTITY=- AD_HOC_CODE_SIGNING_ALLOWED=YES CODE_SIGN_STYLE=Automatic DEVELOPMENT_TEAM=H5SM6ZV38F COMPILER_INDEX_STORE_ENABLE=NO -quiet

- name: Export IPA File
run: |
xcodebuild -exportArchive -archivePath ./build.xcarchive -exportPath ./ -exportOptionsPlist ./ExportOptions/ad-hoc.plist -DVTProvisioningIsManaged=YES -DVTSkipCertificateValidityCheck=YES
mv '喵哩喵哩.ipa' DarockBili_Company.ipa
echo "FIN_STATUS=success" >> $GITHUB_ENV

- name: Upload IPA File
uses: actions/upload-artifact@v3
Expand Down
3 changes: 3 additions & 0 deletions DarockBili Watch App/DarockBiliApp.swift
Original file line number Diff line number Diff line change
Expand Up @@ -325,3 +325,6 @@ public func updateBuvid() {
}
}
}



10 changes: 3 additions & 7 deletions DarockBili Watch App/Errors/NetworkFixView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -444,18 +444,14 @@ let errorCodeTextDic = [
-8888: "对不起,服务器开小差了~"
]

public func CheckBApiError(from input: JSON) -> Bool {
public func CheckBApiError(from input: JSON, noTip: Bool = false) -> Bool {
let code = input["code"].int ?? 0
if code == 0 {
return true
}
let msg = errorCodeTextDic[code] ?? (input["message"].string ?? "")
tipWithText(msg, symbol: "xmark.circle.fill")
let headers: HTTPHeaders = [
"User-Agent": "Mozilla/5.0"
]
DarockKit.Network.shared.requestString("https://api.bilibili.com/x/web-interface/zone", headers: headers) { respStr, _ in
DarockKit.Network.shared.requestString("https://api.darock.top/bili/error/upload/\("Code: \(code)|Message: \(msg)|Build: \(Bundle.main.infoDictionary?["CFBundleVersion"] as! String)|IsLoggedIn: \((UserDefaults.standard.string(forKey: "DedeUserID") ?? "") == "" ? "Yes" : "No")|Loc: \(respStr)".base64Encoded().replacingOccurrences(of: "/", with: "{slash}"))") { _, _ in return}
if !noTip {
tipWithText(msg, symbol: "xmark.circle.fill")
}
return false
}
Expand Down
Loading