diff --git a/SwiftChat.xcodeproj/project.pbxproj b/SwiftChat.xcodeproj/project.pbxproj index f0e4d06..e5c666b 100644 --- a/SwiftChat.xcodeproj/project.pbxproj +++ b/SwiftChat.xcodeproj/project.pbxproj @@ -40,6 +40,7 @@ /* End PBXContainerItemProxy section */ /* Begin PBXFileReference section */ + 6A7344A52B6AECA500990D7B /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist; path = Info.plist; sourceTree = ""; }; EB545ED72A0AC32A00C8A5BD /* StatusView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = StatusView.swift; sourceTree = ""; }; EB90085C2A02C53100B321C4 /* ControlView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ControlView.swift; sourceTree = ""; }; EB9008682A0578C300B321C4 /* ModelLoader.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ModelLoader.swift; sourceTree = ""; }; @@ -107,6 +108,7 @@ EBE1152D2A02AECC000A0CF4 /* SwiftChat */ = { isa = PBXGroup; children = ( + 6A7344A52B6AECA500990D7B /* Info.plist */, EBE1152E2A02AECC000A0CF4 /* SwiftChatApp.swift */, EB90085C2A02C53100B321C4 /* ControlView.swift */, EBE115302A02AECC000A0CF4 /* ContentView.swift */, @@ -452,6 +454,7 @@ ENABLE_HARDENED_RUNTIME = YES; ENABLE_PREVIEWS = YES; GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = SwiftChat/Info.plist; "INFOPLIST_KEY_UIApplicationSceneManifest_Generation[sdk=iphoneos*]" = YES; "INFOPLIST_KEY_UIApplicationSceneManifest_Generation[sdk=iphonesimulator*]" = YES; "INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents[sdk=iphoneos*]" = YES; @@ -489,6 +492,7 @@ ENABLE_HARDENED_RUNTIME = YES; ENABLE_PREVIEWS = YES; GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = SwiftChat/Info.plist; "INFOPLIST_KEY_UIApplicationSceneManifest_Generation[sdk=iphoneos*]" = YES; "INFOPLIST_KEY_UIApplicationSceneManifest_Generation[sdk=iphonesimulator*]" = YES; "INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents[sdk=iphoneos*]" = YES; diff --git a/SwiftChat/ControlView.swift b/SwiftChat/ControlView.swift index ee7f8ec..c5dc804 100644 --- a/SwiftChat/ControlView.swift +++ b/SwiftChat/ControlView.swift @@ -160,6 +160,6 @@ struct ControlView: View { } private extension UTType { - static let mlpackage = UTType(filenameExtension: "mlpackage", conformingTo: .item)! - static let mlmodelc = UTType(filenameExtension: "mlmodelc", conformingTo: .item)! + static let mlpackage = UTType(importedAs: "com.huggingface.mlpackage") + static let mlmodelc = UTType(importedAs: "com.huggingface.mlmodelc") } diff --git a/SwiftChat/Info.plist b/SwiftChat/Info.plist new file mode 100644 index 0000000..37e81ef --- /dev/null +++ b/SwiftChat/Info.plist @@ -0,0 +1,74 @@ + + + + + CFBundleDocumentTypes + + + CFBundleTypeName + MLPackage File + CFBundleTypeRole + Viewer + LSHandlerRank + Default + LSItemContentTypes + + com.huggingface.mlpackage + + + + CFBundleTypeName + MLModelc File + CFBundleTypeRole + Editor + LSHandlerRank + Default + LSItemContentTypes + + com.huggingface.mlmodelc + + + + UTImportedTypeDeclarations + + + UTTypeConformsTo + + item + + UTTypeDescription + MLPackage File + UTTypeIcons + + UTTypeIdentifier + com.huggingface.mlpackage + UTTypeTagSpecification + + public.filename-extension + + mlpackage + + + + + UTTypeConformsTo + + item + + UTTypeDescription + MLModellc File + UTTypeIcons + + UTTypeIdentifier + com.huggingface.mlmodelc + UTTypeTagSpecification + + public.filename-extension + + mlmodelc + + + + + +