In my case I simply just had previously denied notifications. Just check the notification settings first.
UNUserNotificationCenter.current().getNotificationSettings(completionHandler:)
Post
Replies
Boosts
Views
Activity
I ended up having to erase and reset my iPad to get the files to open.
@Developer Tools Engineer
It would be a very nice feature to the Swift Package Manager. I don't think any special settings would be needed in my case. Thanks.
@ankur.v you will need macOS 11 to use the camera in a Mac Catalyst app.
Hi, thanks for the tip about the console logs, I found a log saying "Error: Image is not JPEG or HEIF". I did a test and the jpg format works!
It's too bad I can't save a lossless png. My app is for editing screenshots. Tho at least I can save something now! Thanks.
Cameras are now supported in Mac Catalyst on macOS 11!
The official AVCam demo now works fine without changes.
Hi, the "Launch screen interface file base name" or UILaunchStoryboardName in the Info.plist is for a LaunchScreen.storyboard file. It will show before your app is loaded. Tho as soon as your app is loaded, your ContentView will appear, and if you need to "extend" the launch screen, while other things are loading, I recommend replicating your launch screen in a SwiftUI View, then add it to the top of your UI in a ZStack and wrap your launch view in an if statement for a @State var loading: Bool = true. Once your app data is loaded just call: withAnimation { loading = false }
Nice find. I've removed the custom folder icon file now and the package installs smooth now. Thanks.
I was successfully able to copy my metallib resources to my swift package target with swift-tools-version:5.3
I added a folder with different metallib files in my target like this: resources: [.copy("Metal/")]
Then I could access my metallib url via this code:
let metalLibURL: URL = Bundle.module.url(forResource: "MyMetalLib", withExtension: "metallib", subdirectory: "Metal")!
Note that Bundle.module is only available once you have specified your resources in the package manifest.
Then I could access my shader without any problem:
guard let metalDevice: MTLDevice = MTLCreateSystemDefaultDevice() else { return }
guard let metalLib: MTLLibrary = try? metalDevice.makeLibrary(filepath: metalLibURL.path) else { return }
guard let metalShader: MTLFunction = metalLib.makeFunction(name: "myMetalFunc") else { return }
Regarding a future Swift & Metal Package with only .swift & .metal files, and no .metallib resources, there would be no special settings I would need, just access to the MTLFunction shaders.
Anton ⬢ hexagons.net
Hi, it’s now been fixed!
Hi, SwiftUI is very high level and Metal is very low level, so you need some middle ground.
In short you can wrap a MTKView - https://developer.apple.com/documentation/metalkit/mtkview in a UIViewRepresentable - https://developer.apple.com/documentation/swiftui/uiviewrepresentable, tho you need to setup a render pipeline.
I would start by looking through some Metal Sample Code - https://developer.apple.com/metal/sample-code/ to get started.
Hi, the magic of SwiftUI is that the same code for a view on the iPhone will most likely work just fine on macOS.
I would recommend to start by checking out the Form view: https://developer.apple.com/documentation/swiftui/form
Try setting the List row backgrounds to a clear color:
.listRowBackground(Color.clear)
There is no way to programmatically bypass a permissions alert. This would defeat the purpose of it.
Tho you only need to manually tap allow the first time your app is installed.
(Tho you might be able to do this in a UI Test)
ImageCaptureCore seems nice, here’s the docs: https://developer.apple.com/documentation/imagecapturecore
Now if we could do this over WiFi, that would be cool.