Post

Replies

Boosts

Views

Activity

Reply to Re-orderable items in a ScrollView?
You can use List with an onMove modifier: struct MyView: View { @State var data = [1, 2, 3, 4, 5] var body: some View { List { ForEach(0..<data.count, id: \.self) { i in Text(String(data[i])) } .onMove { source, destination in data.move(fromOffsets: source, toOffset: destination) } } } } — WindowsMEMZ @ Darock Studio let myEmail = "memz" + "1" + "@" + "darock.top"
Oct ’24
Reply to 不清楚iOS照片的某些权限是否有被开放
1.可以从我的 APP 跳转到 iOS 的照片并且定位到选择的照片/视频吗? (1. Is it able to open Photos app from my app and locate to selected photos/videos?) No, you can't. 2.PHPickerViewController 没有全选的功能,...... 我是可以通过代码自建picker 来调用到这些合集里的内容来全选添加吗 (2. Seems like there's no Select All feature in PHPickerViewController, ... Can I build a picker by myself to allow users select all photos in a group?) Selecting all photos is not allowed for App Store submission according to App Review Guidelines 5.1.2(v): (v) Do not contact people using information collected via a user’s Contacts or Photos, except at the explicit initiative of that user on an individualized basis; do not include a Select All option or default the selection of all contacts. You must provide the user with a clear description of how the message will appear to the recipient before sending it (e.g. What will the message say? Who will appear to be the sender?). However, if you don't plan to distribute your app on App Store, you can request full access to users' photo library and build your self photos picker, which is not suggested. — WindowsMEMZ @ Darock Studio let myEmail = "memz" + "1" + "@" + "darock.top"
Oct ’24
Reply to Testing the content of a `Task` in a non-async method
You can also use a wrapper like this: public func _play(_ soundFileName: String, shouldLoop: Bool) async { await dataSource.play(soundFileName, shouldLoop: shouldLoop) } public func play(_ soundFileName: String, shouldLoop: Bool) { Task { await _play(soundFileName, shouldLoop: shouldLoop) } } Then use play in your code and _play for testing. — WindowsMEMZ @ Darock Studio let myEmail = "memz" + "1" + "@" + "darock.top"
Oct ’24
Reply to Testing the content of a `Task` in a non-async method
You should make your play function async, then use Swift Async to make sure assertion runs after sound played. public func play(_ soundFileName: String, shouldLoop: Bool) async { await dataSource.play(soundFileName, shouldLoop: shouldLoop) } Task { await play("", shouldLoop: false) #expect(mockedAudioPlayerDataSource.invokedPlayCount == 1) } — WindowsMEMZ @ Darock Studio let myEmail = "memz" + "1" + "@" + "darock.top"
Oct ’24
Reply to Apple Store Rejection for Mosawirin App - Need Developer Assistance
Thanks for your details. From the screenshots and the demo video you provided in post 766937, I think this app will be a useful app. In my opinion and experiences, the problem may be the contents in your app. You're using demo contents for app review. That means, when your app has released to App Store, there's no any actual useful contents in your app. I know these contents should be generated by users after your app has released and it's impossible to fill them before releasing, so I think you can try to find some providers before releasing to make new users able to use the app. Also, you can try to add some articles for users and service providers(e.g. "How to take a great photo?"). That can make your app more useful. — WindowsMEMZ @ Darock Studio let myEmail = "memz" + "1" + "@" + "darock.top"
Oct ’24
Reply to Hourly repeating notification.
Create a UNCalendarNotificationTrigger object when you want to schedule the delivery of a local notification at the date and time you specify. You use an NSDateComponents object to specify only the time values that you want the system to use to determine the matching date and time. Listing 1 creates a trigger that delivers its notification every morning at 8:30. The repeating behavior is achieved by specifying true for the repeats parameter when creating the trigger. Listing 1. Creating a trigger that repeats at a specific time var date = DateComponents() date.hour = 8 date.minute = 30 let trigger = UNCalendarNotificationTrigger(dateMatching: date, repeats: true) Have you tried the sample code? Setting the hour and minute properties at the same time may help. — WindowsMEMZ @ Darock Studio let myEmail = "memz" + "1" + "@" + "darock.top"
Oct ’24
Reply to Erreur 34 311
Are you debugging by Xcode or other IDEs? Is your program running on a simulator or a real device? From the error message you provide, it shows dskFulErr : full disk. Check if the disk of your Mac or the device you're debugging on is full. — WindowsMEMZ @ Darock Studio let myEmail = "memz" + "1" + "@" + "darock.top"
Oct ’24