소스 검색

增加scheme跳转

harry 3 년 전
부모
커밋
fb487e4621
2개의 변경된 파일12개의 추가작업 그리고 0개의 파일을 삭제
  1. 4 0
      MusicVideoPlus/AppDelegate.swift
  2. 8 0
      MusicVideoPlus/Info.plist

+ 4 - 0
MusicVideoPlus/AppDelegate.swift

@@ -49,6 +49,10 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
     }
 
     func application(_: UIApplication, open url: URL, options _: [UIApplication.OpenURLOptionsKey: Any] = [:]) -> Bool {
+        if url.scheme == "bfmusic" {
+            BFLog(1, message: "tets")
+            return true
+        }
         return PQSingletoWXApiUtil.shared.handleOpen(url: url)
     }
 

+ 8 - 0
MusicVideoPlus/Info.plist

@@ -34,6 +34,14 @@
 				<string>wx0e8234aac576d1e0</string>
 			</array>
 		</dict>
+		<dict>
+			<key>CFBundleTypeRole</key>
+			<string>Editor</string>
+			<key>CFBundleURLSchemes</key>
+			<array>
+				<string>bfmusic</string>
+			</array>
+		</dict>
 	</array>
 	<key>CFBundleVersion</key>
 	<string>$(CURRENT_PROJECT_VERSION)</string>