This commit is contained in:
fmodf 2024-07-03 09:36:22 +02:00
parent 01f45af8f3
commit 21ca70d747
8 changed files with 24 additions and 20 deletions

View file

@ -1,7 +1,7 @@
{
"images" : [
{
"filename" : "logo.png",
"filename" : "logo2.png",
"idiom" : "universal",
"platform" : "ios",
"size" : "1024x1024"

Binary file not shown.

Before

Width:  |  Height:  |  Size: 86 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 99 KiB

View file

@ -1,12 +1,15 @@
{
"images" : [
{
"filename" : "ConvLogo.png",
"filename" : "logo2_wo_bg.png",
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
},
"properties" : {
"template-rendering-intent" : "original"
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 74 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 148 KiB

View file

@ -13,23 +13,23 @@ class MediaManager: ObservableObject {
}
private func fetchPhotos() {
// let fetchOptions = PHFetchOptions()
// fetchOptions.sortDescriptors = [NSSortDescriptor(key: "creationDate", ascending: false)]
// let assets = PHAsset.fetchAssets(with: .image, options: fetchOptions)
//
// let manager = PHImageManager.default()
// let option = PHImageRequestOptions()
// option.isSynchronous = true
//
// assets.enumerateObjects { asset, _, _ in
// manager.requestImage(for: asset, targetSize: CGSize(width: 100, height: 100), contentMode: .aspectFit, options: option) { image, _ in
// if let image = image {
// DispatchQueue.main.async {
// self.photos.append(image)
// }
// }
// }
// }
let fetchOptions = PHFetchOptions()
fetchOptions.sortDescriptors = [NSSortDescriptor(key: "creationDate", ascending: false)]
let assets = PHAsset.fetchAssets(with: .image, options: fetchOptions)
let manager = PHImageManager.default()
let option = PHImageRequestOptions()
option.isSynchronous = true
assets.enumerateObjects { asset, _, _ in
manager.requestImage(for: asset, targetSize: CGSize(width: 100, height: 100), contentMode: .aspectFit, options: option) { image, _ in
if let image = image {
DispatchQueue.main.async {
self.photos.append(image)
}
}
}
}
}
private func setupCameraFeed() {

View file

@ -41,9 +41,10 @@ targets:
UILaunchStoryboardName: launchscreen.storyboard
NSAppTransportSecurity:
NSAllowsArbitraryLoads: true
NSPhotoLibraryUsageDescription: Allow app to send photo from gallery in attachments
NSCameraUsageDescription: Allow app to take picture from camera and send it in atachments
# UIViewControllerBasedStatusBarAppearance: NO
# UIStatusBarStyle: UIStatusBarStyleLightContent
# NSCameraUsageDescription: Required for document and facial capture
# NSFaceIDUsageDescription: Required for accessing to account info
# UIUserInterfaceStyle: Light
CFBundleDisplayName: Conversations