iOS is the operating system for iPhone.

Posts under iOS tag

200 Posts
Sort by:

Post

Replies

Boosts

Views

Activity

Control Widget SF image cannot stably display
I'm working on the control widget which should display the SF image on the UI, but I have found that it cannot be displayed stably. I have three ExampleControlWidget which is about the type egA egB and egC, it should all be showed but now they only show the text and placeholder. I'm aware of the images should be SF image and I can see them to show perfectly sometimes, but in other time it is just failed. This's really confused me, can anyone help me out? public enum ControlWidgetType: Sendable { case egA case egB case egC public var imageName: String { switch self { case .egA: return "egA" case .egB: return "egB" case .egC: return "egC" } } } struct ExampleControlWidget: ControlWidget { var body: some ControlWidgetConfiguration { AppIntentControlConfiguration( kind: kind, provider: Provider() ) { example in ControlWidgetToggle( example.name, isOn: example.state.isOn, action: ExampleControlWidgetIntent(id: example.id), valueLabel: { isOn in ExampleControlWidgetView( statusText: isOn ? Localization.on.text : Localization.off.text, bundle: bundle, widgetType: .egA //or .egB .egC ) .symbolEffect(.pulse) } ) .disabled(example.state.isDisabled) } .promptsForUserConfiguration() } } public struct ExampleControlWidgetView: View { private let statusText: String private let bundle: Bundle private var widgetType: ControlWidgetType = .egA public init(statusText: String, bundle: Bundle, widgetType: ControlWidgetType) { self.statusText = statusText self.bundle = bundle self.widgetType = widgetType } public var body: some View { Label( statusText, image: .init( name: widgetType.imageName, // the SF Symbol image id bundled in the Widget extension bundle: bundle ) ) } } This is the normal display: These are the display that do not show properly: The results has no rules at all, I have tried to completely uninstall the APP and reinstall but the result is same.
0
0
115
4d
Above Xcode16 operation project, in the project use AVPictureInPictureController opportunities (PIP) function open system blackout
I found that when the development tool above Xcode16 ran my app, I opened the suspended inscription function, and then opened the system camera, the content in the suspended window would not be displayed, and the suspended window would have a black screen. However, this phenomenon does not appear on Xcode15.4 development tools, it is the same code, I do not know why
0
0
207
4d
Automatic Background File Uploads
I have currently created an app which contains an upload button which when clicked upload health data using HealthKit to an AWS S3 bucket. Now I want to implement an automatic file upload mechanism which would mean that the app is installed and opened just once - and then the upload must happen on a schedule (once daily) from the background without ever having to open the app again. I've tried frameworks like NSURLSession and BackgroundTasks but nothing seems to work. Is this use case even possible to implement? Does iOS allow this? The file is just a few KBs in size. For reference, here is the Background Tasks code: import UIKit import BackgroundTasks import HealthKit class AppDelegate: NSObject, UIApplicationDelegate { let backgroundTaskIdentifier = "com.yourapp.healthdata.upload" func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { // Register the background task BGTaskScheduler.shared.register(forTaskWithIdentifier: backgroundTaskIdentifier, using: nil) { task in self.handleHealthDataUpload(task: task as! BGAppRefreshTask) } // Schedule the first upload task scheduleDailyUpload() return true } // Schedule the background task for daily execution func scheduleDailyUpload() { print("[AppDelegate] Scheduling daily background task.") let request = BGAppRefreshTaskRequest(identifier: backgroundTaskIdentifier) request.earliestBeginDate = Date(timeIntervalSinceNow: 24*60*60) do { try BGTaskScheduler.shared.submit(request) print("[AppDelegate] Daily background task scheduled.") } catch { print("[AppDelegate] Could not schedule daily background task: \(error.localizedDescription)") } } // Handle the background task when it's triggered by the system func handleHealthDataUpload(task: BGAppRefreshTask) { print("[AppDelegate] Background task triggered.") // Call your upload function with completion handler HealthStoreManager.shared.fetchAndUploadHealthData { success in if success { print("[AppDelegate] Upload completed successfully.") task.setTaskCompleted(success: true) // Schedule the next day's upload after a successful upload self.scheduleDailyUpload() } else { print("[AppDelegate] Upload failed.") task.setTaskCompleted(success: false) } } // Handle task expiration (e.g., if upload takes too long) task.expirationHandler = { print("[AppDelegate] Background task expired.") task.setTaskCompleted(success: false) } } }
4
0
226
3d
Provisioning Profile Missing In-App Purchase Entitlement (com.apple.developer.in-app-purchase)
Hi everyone!, I would love your help with this please as I have been stuck for days with no solution. Issue: I'm trying to enable In-App Purchases (IAP) in my app, but my provisioning profile does not include the com.apple.developer.in-app-purchase entitlement. When I attempt to build in Xcode, I see the following error: Provisioning profile "iOS Team Provisioning Profile: org.thewhiteowl.mindflow" doesn't include the com.apple.developer.in-app-purchase entitlement. I've already verified my Apple Developer account, and Apple Support confirmed that everything looks correct from their end. Steps Taken So Far: Verified In-App Purchases is Enabled in the Apple Developer Portal under Certificates, Identifiers & Profiles → Identifiers. Accepted All Agreements in App Store Connect → Agreements, Tax, and Banking (everything is marked Active). Created a New Provisioning Profile Manually: . Go to developer.apple.com . Navigate to Certificates, Identifiers & Profiles . Click "+" to register a new provisioning profile . Choose App Store Connect → Click Continue . Select App ID → MindFlow App (PM7JVFLCVC.org.thewhiteowl.mindflow) → Click Continue . Select Certificate → The White Owl LLC (iOS Distribution) (Valid until Feb 22, 2026) → Click Continue . Enter Provisioning Profile Name: "MindFlow Distribution" → Click Generate . Download the profile and inspect the Entitlements section ❌ The In-App Purchase entitlement is missing (com.apple.developer.in-app-purchase does not appear). Additional Troubleshooting: . Tried regenerating the provisioning profile multiple times . Deleted & reinstalled Xcode completely .Ensured App ID is Explicit (not Wildcard) . Tried refreshing App ID capabilities by toggling other entitlements . Checked for misconfigurations in Expo and EAS (using Expo.dev for deployment) Questions: Why is the In-App Purchase entitlement missing from the generated provisioning profile? Is there a way to force the entitlement to appear? Could this be an issue with the Apple Developer Portal, and if so, is there a workaround? Any help or insights would be greatly appreciated! 🚀
0
0
159
5d
Persistent View Failure After Saving Edits in SwiftUI iOS App
Hello Apple Developer Community, I’m facing a recurring issue in my SwiftUI iOS app where a specific view fails to reload correctly after saving edits and navigating back to it. The failure happens consistently post-save, and I’m looking for insights from the community. 🛠 App Overview Purpose A SwiftUI app that manages user-created data, including images, text fields, and completion tracking. Tech Stack: SwiftUI, Swift 5.x MSAL for authentication Azure Cosmos DB (NoSQL) for backend data Azure Blob Storage for images Environment: Xcode 15.x iOS 17 (tested on iOS 18.2 simulator and iPhone 16 Pro) User Context: Users authenticate via MSAL. Data is fetched via Azure Functions, stored in Cosmos DB, and displayed dynamically. 🚨 Issue Description 🔁 Steps to Reproduce Open a SwiftUI view (e.g., a dashboard displaying a user’s saved data). Edit an item (e.g., update a name, upload a new image, modify completion progress). Save changes via an API call (sendDataToBackend). The view navigates back, but the image URL loses its SAS token. Navigate away (e.g., back to the home screen or another tab). Return to the view. ❌ Result The view crashes, displays blank, or fails to load updated data. SwiftUI refreshes text-based data correctly, but AsyncImage does not. Printing the image URL post-save shows that the SAS token (?sv=...) is missing. ❓ Question How can I properly reload AsyncImage after saving, without losing the SAS token? 🛠 What I’ve Tried ✅ Verified JSON Structure Debugged pre- and post-save JSON. Confirmed field names match the Codable model. ✅ Forced SwiftUI to Refresh Tried .id(UUID()) on NavigationStack: NavigationStack { ProjectDashboardView() .id(UUID()) // Forces reinit } Still fails intermittently. ✅ Forced AsyncImage to Reload Tried appending a UUID() to the image URL: AsyncImage(url: URL(string: "\(imageUrl)?cacheBust=\(UUID().uuidString)")) Still fails when URL query parameters (?sv=...) are trimmed. I’d greatly appreciate any insights, code snippets, or debugging suggestions! Let me know if more logs or sample code would help. Thanks in advance!
0
0
150
5d
App Group ID access for files after transfer ios
I have some questions regarding App Group Id's and use of the FileManager during an Appstore iOS transfer. I've read a lot of the topics here that cover app groups and iOS, but it's still unclear exactly what is going to happen during transfer when we try to release an updated version of the app from the new account. We're using this method FileManager.default.containerURL(forSecurityApplicationGroupIdentifier: "group.com.foo.bar") to store files on the device that are important for app launch and user experience. Once we transfer the app and begin the process of creating a new version under the new account will we be able to read the files that are stored using this app group id under the new account? What steps do we need to take in order to handle this and continue being able to access these files? It seems like the app group is not transferred in the process? I've seen some users mention they removed the app group from the original account and created it again under the receiving account (with notes mentioning this is undocumented behavior). These conversations we're centered around Shared user defaults, and that applies as well but I'm more concerned with reading the values from the file system. Thanks!
2
0
271
4d
Atraso na aprovação do aplicativo – 15 dias sem retorno
Submetemos nosso aplicativo Mais Saúde para revisão há 15 dias, e até o momento, não recebemos nenhuma atualização sobre o status da aprovação. Entendemos que o processo pode levar algum tempo, mas gostaríamos de saber se há alguma pendência ou se precisamos fornecer alguma informação adicional para agilizar a análise. Poderiam, por favor, verificar o status da revisão ou nos dar uma previsão de resposta? Agradecemos desde já pela atenção.
0
0
187
6d
BGTaskScheduler crashes on iOS 18.4
I've been seeing a high number of BGTaskScheduler related crashes, all of them coming from iOS 18.4. I've encountered this myself once on launch upon installing my app, but haven't been able to reproduce it since, even after doing multiple relaunches and reinstalls. Crash report attached at the bottom of this post. I am not even able to symbolicate the reports despite having the archive on my MacBook: Does anyone know if this is an iOS 18.4 bug or am I doing something wrong when scheduling the task? Below is my code for scheduling the background task on the view that appears when my app launches: .onChange(of: scenePhase) { newPhase in if newPhase == .active { #if !os(macOS) let request = BGAppRefreshTaskRequest(identifier: "notifications") request.earliestBeginDate = Calendar.current.date(byAdding: .hour, value: 3, to: Date()) do { try BGTaskScheduler.shared.submit(request) Logger.notifications.log("Background task scheduled. Earliest begin date: \(request.earliestBeginDate?.description ?? "nil", privacy: .public)") } catch let error { // print("Scheduling Error \(error.localizedDescription)") Logger.notifications.error("Error scheduling background task: \(error.localizedDescription, privacy: .public)") } #endif ... } 2025-02-23_19-53-50.2294_+0000-876d2b8ec083447af883961da90398f00562f781.crash
11
3
530
4d
Live Caller ID: Multiple userIdentifier values for same device - Expected behavior?
Hello! We're currently testing Live Caller ID implementation and noticed an issue with userIdentifier values in our database. Initially, we expected to have approximately 100 records (one per user), but the database grew to about 10,000 evaluationKey entries. Upon investigation, we discovered that the userIdentifier (extracted from "User-Identifier" header) for the same device remains constant throughout a day but changes after a few days. We store these evaluation keys using a composite key pattern "userIdentifier/configHash". All these entries have the same configHash but different userIdentifier values. This behavior leads to unnecessary database growth as new entries are created for the same users with different userIdentifier values. Could you please clarify: Is this the expected behavior for userIdentifier to change over time? If yes, is there a specific TTL (time-to-live) for userIdentifier? If this is not intended, could this be a potential iOS bug? This information would help us optimize our database storage and implement proper cleanup procedures. Thank you for your assistance!
2
1
196
6d
iPhone 16 Pro boot loop with iOS 18.4 beta
I installed iOS 18.4 on Friday evening, all worked well during Saturday and Sunday, Monday morning the Phone rebooted and appeared to have installed an Update, I didn´t notice, I was about to answer a WhatsApp and the TestFlight beta didn´t start up, a renew of the App was not possible due to TestFlight not being available. So I thought a reboot would help, but I did a reset, since then BOOT LOOP. I brought in recovery mode, updated with the 18.4 ipsw, no change - BOOT LOOP
1
0
253
6d
Recover device enrolled email from any iOS device for an enterprise app?
Is the possibility of programmatically recovering the enrolled email address associated with an iPad. We are currently working on a project that requires us to retrieve this information for our enrolled devices. Could you please provide guidance or documentation on how we can achieve this programmatically? Specifically, we are interested in any APIs or frameworks that Apple provides for this purpose, as well as any necessary permissions or configurations that need to be in place.
0
0
166
1w
18.4 Beta sent iPhone 12 into boot loop
I installed the iOS 18.4 developer beta on my iPhone 12 last night, and it ended up sending my phone into a boot loop—at least that's what it looks like. Phone alternates between totally black screen and the Apple logo screen every 5 seconds or so. The phone isn't responding to force restart, isn't showing up in Finder to try to factory reset, etc. My guess is the update was corrupted in some way? Did this happen to anyone else? Any ideas about what's going on?
2
1
559
1w
Wireless debugging
The charging port of my iPhone may be damaged due to water, and it cannot be charged and transmitted data. It can only be charged wirelessly that does not support data transmission. However, since Xcode supports wireless debugging, I can continue to test my App. However, I recently changed to a new Mac, but there is no connection record with the iPhone in the new Mac, which makes it impossible to debug wirelessly. So I want to know how to realize wireless debugging on such a device without debugging records?
2
0
215
4d