I have built an iOS app using flutter. The app (debug and release build) works fine on real devices. But when trying to run integration tests on this app using appium on an emulator, the app keepas crashing randomly with these error logs:
https://docs.google.com/document/d/1Z1f7hudmpHUATnFvoSZeAAoi8-NyVn6P9BFHNOZkzyA/edit?tab=t.0
Any help would be appreciated
General
RSS for tagDelve into the world of built-in app and system services available to developers. Discuss leveraging these services to enhance your app's functionality and user experience.
Post
Replies
Boosts
Views
Activity
I have a Vision OS APP with memory requirement greater than 5120MB, is there any solution other than optimizing resources, dynamic loading and sub-scenarios?
My Question:
1. I would like to know what is the maximum running memory of the APP under Vision OS?
2. Is it possible to modify the maximum running memory of an APP?
3. Does Vision OS provide an interface for jumping between apps?
Our app monitors device usage and applies a shield when the set time limit is reached. Multiple DeviceActivitySchedules can be present, each with different time limits. To display notifications at 50% of the total limit for each DeviceActivitySchedule, we set a warning time at half of the total time. However, we occasionally receive premature event callbacks.
For example, consider a schedule from 13:00 to 13:30 with a single event threshold at 10 minutes and a warning time of 5 minutes. The 'eventDidReachThreshold' callback is delivered prematurely, along with the 'eventWillReachThresholdWarning' callback, at 13:10.
Additionally, in some cases, when one DeviceActivitySchedule ends and the next begins immediately, DeviceActivityEvents registered for the new DeviceActivitySchedule are delivered prematurely along with the schedule start callback.
For example, consider there are two DeviceActivitySchedules from 12:00 to 13:00 and from 13:00 to 14:00, each with a limit of 10 minutes and a warning time of 5 minutes. When the first schedule ends and the next begins at 13:00, the 'eventDidReachThreshold' callbacks for the events registered in the second schedule are delivered prematurely, along with the 'intervalDidStart' callback.
Hi,
I'm implementing InSendMessageIntent handling in our app. I can handle InSendMessageIntent through extension, but handling also includes business logic like authorisation status and some heavy operation which I can't expose from the main target.
I tried to handle it in-app, but func application(_ application: UIApplication, handlerFor intent: INIntent) -> Any? didn't trigger. At the first glance the configuration looks correct - the InSendMessageIntent is added under INIntentsSupported and UIApplicationSupportsMultipleScenes is set to YES in info.plist.
After that reply with message button disappeared from the incoming Voip callKit screen.
So I had a question - Is this intent possible to be handled in-app?
A Mac Catalyst App Creates an AppKit Bundle Plugin in which @available does not work。
In AppKit Bundle Plugin, there is not watchOS and iOS version can not be higher than 28, but the log has been output.
if (@available(watchOS 18.0, *)) {
NSLog(@"bundle is available watchOS");
}
if (@available(iOS 28.0, *)) {
NSLog(@"bundle is available iOS");
}
demo link: https://pan.baidu.com/s/1s_5qmsL6Bh-df3A1PfD0OA
Extracted code: 5ndj
I have encountered a bug for Apple log in when user's iOS version is 15 or below. After completing the user email and password correctly, the it will trigger two factor authentication pop up with the code on screen. However, it will not display the screen to let user enter the two factor pass code and have a error saying the identity is wrong. I have tried to reboot the phone and log in Apple ID again. Both methods are not working. Looking for a solution here.
Hi all,
For context, the Family Controls entitlement request (for the Personal Device Management category/individual use case) includes the question:
Will your app share device or usage data beyond the individual for the individual use case, or Family Sharing for the parent/guardian use case, including through means such as screenshots, screen recordings, or server logging?
I'm looking for clarification on how to interpret this. I originally answered Yes and was rejected, then later answered No and was accepted.
Ideally, I would like my screen time management app to allow users to opt-in to social features. One simple example is opting into a leaderboard with your friends for who has the lowest screen time.
If the user installed this app for themself and chooses to share this basic data with their friends, it sounds like an ethical and unproblematic feature but I suppose storing that data would fall under "server logging"?
If anyone has any experience with this, I would appreciate a more explicit description of the requirement above. Is what I described allowed?
Thanks for reading!
Currently Apple has their own calendar called Birthdays which takes the birthdays from contacts and makes it as a regular calendar event along with the birthday number, they even do this for Hebrew Birthdays. I have tried (unsuccessfully thus far) to take the same concept and create a calendar for reoccurring events on a specific date in the Hebrew Calendar. An example of this would be Yahrtzeits, which is observed on the Hebrew date each year after a person dies. I want to add it to the system calendars like how Apple does it this way it can be used with any app not just my own. Currently there isn't a way to specify the calendar (like Calendar(identifier: .hebrew) or even make a custom EKRecurrenceRule, also from some of the debugging of the Birthdays calendar, it seems that the date saved is the Gregorian date and that theres some internal calculations happening. Is there a way to add reoccurring Hebrew Events or do I need to reinvent the wheel?
Hi everyone,
I'm experiencing crashes that consistently occur on iOS 18 devices, which seem to share a common root cause. I'm hoping for some guidance. Here are the details of the crashes as received from Xcode Organizer:
Crash Trace 1:
0 CoreFoundation 0x0000000192c50e54 CF_IS_OBJC + 76 (CFRuntime.c:461)
1 CoreFoundation 0x0000000192c4dd3c CFRelease + 60 (CFRuntime.c:1202)
2 CoreFoundation 0x0000000192d015e0 _signalEventSync + 252 (CFStream.c:636)
3 CoreFoundation 0x0000000192d53050 ___signalEventQueue_block_invoke + 28 (CFStream.c:646)
4 libdispatch.dylib 0x000000019a93c370 _dispatch_call_block_and_release + 32 (init.c:1549)
5 libdispatch.dylib 0x000000019a93e0d0 _dispatch_client_callout + 20 (object.m:576)
6 libdispatch.dylib 0x000000019a9456d8 _dispatch_lane_serial_drain + 744 (queue.c:3934)
7 libdispatch.dylib 0x000000019a9461e0 _dispatch_lane_invoke + 380 (queue.c:4025)
8 libdispatch.dylib 0x000000019a951258 _dispatch_root_queue_drain_deferred_wlh + 288 (queue.c:7193)
9 libdispatch.dylib 0x000000019a950aa4 _dispatch_workloop_worker_thread + 540 (queue.c:6787)
10 libsystem_pthread.dylib 0x000000021a00fc7c _pthread_wqthread + 288 (pthread.c:2696)
11 libsystem_pthread.dylib 0x000000021a00c488 start_wqthread + 8 (:-1)
Crash Trace 2:
0 libobjc.A.dylib 0x0000000186f33c20 objc_msgSend + 32
1 CoreFoundation 0x0000000189cb14b8 _inputStreamCallbackFunc + 36 (CFObject.m:1952)
2 CoreFoundation 0x0000000189cb0aa8 _signalEventSync + 216 (CFStream.c:626)
3 CoreFoundation 0x0000000189d01e30 ___signalEventQueue_block_invoke + 28 (CFStream.c:646)
4 libdispatch.dylib 0x0000000191948370 _dispatch_call_block_and_release + 32 (init.c:1549)
5 libdispatch.dylib 0x000000019194a0d0 _dispatch_client_callout + 20 (object.m:576)
6 libdispatch.dylib 0x00000001919516d8 _dispatch_lane_serial_drain + 744 (queue.c:3934)
7 libdispatch.dylib 0x00000001919521e0 _dispatch_lane_invoke + 380 (queue.c:4025)
8 libdispatch.dylib 0x000000019195d258 _dispatch_root_queue_drain_deferred_wlh + 288 (queue.c:7193)
9 libdispatch.dylib 0x000000019195caa4 _dispatch_workloop_worker_thread + 540 (queue.c:6787)
10 libsystem_pthread.dylib 0x000000021214bc7c _pthread_wqthread + 288 (pthread.c:2696)
11 libsystem_pthread.dylib 0x0000000212148488 start_wqthread + 8
Crash Trace 3:
0 libobjc.A.dylib 0x00000001941d9ce8 objc_loadWeakRetained + 156 (NSObject.mm:525)
1 CoreFoundation 0x0000000196d0a0f4 _outputStreamCallbackFunc + 36 (CFObject.m:1960)
2 CoreFoundation 0x0000000196d09724 _signalEventSync + 216 (CFStream.c:626)
3 CoreFoundation 0x0000000196d07948 ___signalEventQueue_block_invoke + 28 (CFStream.c:646)
4 libdispatch.dylib 0x000000019e9de248 _dispatch_call_block_and_release + 32 (init.c:1549)
5 libdispatch.dylib 0x000000019e9dffa8 _dispatch_client_callout + 20 (object.m:576)
6 libdispatch.dylib 0x000000019e9e75cc _dispatch_lane_serial_drain + 768 (queue.c:3934)
7 libdispatch.dylib 0x000000019e9e8124 _dispatch_lane_invoke + 380 (queue.c:4025)
8 libdispatch.dylib 0x000000019e9f338c _dispatch_root_queue_drain_deferred_wlh + 288 (queue.c:7193)
9 libdispatch.dylib 0x000000019e9f2bd8 _dispatch_workloop_worker_thread + 540 (queue.c:6787)
10 libsystem_pthread.dylib 0x00000002220f3680 _pthread_wqthread + 288 (pthread.c:2696)
11 libsystem_pthread.dylib 0x00000002220f1474 start_wqthread + 8
Notable Points:
All crashes occur only on iOS 18 and newer versions.
The crashes are independent of the Xcode version used to build the app (tested with both Xcode 15.4 and 16).
All crash traces occur in CoreFoundation and seem to have nothing related to our app codebase.
I've attempted to profile the app using Instruments to identify any zombie objects, but the crashes do not manifest on my own devices.
I've referred to discussions, including this forum thread, but have not yet found a solution.
Questions:
Has anyone else encountered similar issues on iOS 18?
Are there specific aspects of iOS 18 that might contribute to these CoreFoundation and libobjc-related crashes?
Would appreciate any suggestions for further diagnostics or potential workarounds.
Thank you for your help!
The application was initially written in Swift, and we released an update where the app was rewritten in Flutter. Currently, we are adding a widget natively written in SwiftUI to the Home screen. The widget updates are managed by BGTaskScheduler. In BGTaskScheduler, an API request is made to fetch the latest data. The data is then processed to calculate an average value, which is subsequently sent to UserDefaults. The widget displays data fetched from UserDefaults. The minimum update interval is set to 30 minutes.
When testing the widget updates through a build in Xcode, the widget updates as expected at the specified interval. However, when this build was provided to users via TestFlight, the widget does not update for them. Could this issue be related to TestFlight’s resource limitations? Is there any guarantee that releasing this version will ensure the widget updates correctly for users?
Hi,
In my app, I have an option to remove a contact from a contact group (using the Contacts framework), and it's been working fine till recently users of the macOS version reported that it's not working. I have been using the CNSaveRequest removeMember(contact, from: group) API. The same API works fine on iOS. I'm not sure when it started but it seems to be affecting macOS14.6 as well as 15.1.
I was able to reproduce it in a small test project as well, and have the same experience (the API works on iOS but not on macOS), so it definitely seems like a problem with the framework. Can someone confirm this, and/or suggest a workaround?
Here's the code I run to test it out ...a simple SwiftUI view that has 4 buttons:
Create contact and group
Add contact to group
Remove contact from group
(optional) cleanup by deleting contact and group
It's the 3rd step that seems to fail on macOS, but works fine on iOS.
Here's the code to test it out:
struct ContentView: View {
let contactsModel = ContactsStoreModel()
var body: some View {
VStack (alignment: .center, spacing: 15){
Button ("1. Add Contact And Group") {
print("add contact button pressed")
contactsModel.addTestContact()
if let _ = contactsModel.createdContact {
print("created contact success")
}
}
Button ("2. Add Contact To Group") {
print("add to group button pressed")
contactsModel.addContactToGroup()
}
Button ("3. Remove Contact From Group") {
print("remove from group button pressed")
contactsModel.removeContactFromGroup()
}
Button ("4. Delete Contact and Group") {
print("remove from group button pressed")
contactsModel.deleteContactAndGroup()
}
}
.padding()
}
}
#Preview {
ContentView()
}
@available(iOS 13.0, *)
@objc final class ContactsStoreModel: NSObject, ObservableObject {
let contactStore = CNContactStore()
var createdContact : CNContact?
var createdGroup : CNGroup?
public func addTestContact() {
let storeContainer = contactStore.defaultContainerIdentifier()
let contact = CNMutableContact()
contact.givenName = "Testing"
contact.familyName = "User"
contact.phoneNumbers = [CNLabeledValue(label: "Cell", value: CNPhoneNumber(stringValue: "1234567890"))]
let group = CNMutableGroup()
group.name = "Testing Group"
print("create contact id = \(contact.identifier)")
print("create group id = \(group.identifier)")
do {
let saveRequest = CNSaveRequest()
saveRequest.transactionAuthor = "TestApp"
saveRequest.add(contact, toContainerWithIdentifier: storeContainer)
saveRequest.add(group, toContainerWithIdentifier: storeContainer)
try contactStore.execute(saveRequest)
createdContact = contact
createdGroup = group
} catch {
print("error in store execute = \(error)")
}
}
public func addContactToGroup() {
if let contact = createdContact, let group = createdGroup {
do {
let saveRequest = CNSaveRequest()
saveRequest.transactionAuthor = "TestApp"
saveRequest.addMember(contact, to: group)
try contactStore.execute(saveRequest)
}
catch {
print("error in store execute = \(error)")
}
}
}
public func removeContactFromGroup() {
if let contact = createdContact, let group = createdGroup {
do {
let saveRequest = CNSaveRequest()
saveRequest.transactionAuthor = "TestApp"
saveRequest.removeMember(contact, from: group)
try contactStore.execute(saveRequest)
}
catch {
print("error in store execute = \(error)")
}
}
}
public func addGroupAndContact() {
let storeContainer = contactStore.defaultContainerIdentifier()
let group = CNMutableGroup()
group.name = "Test Group"
print("create group id = \(group.identifier)")
if let contact = createdContact {
do {
let saveRequest = CNSaveRequest()
saveRequest.transactionAuthor = "TestApp"
saveRequest.add(group, toContainerWithIdentifier: storeContainer)
saveRequest.addMember(contact, to: group)
try contactStore.execute(saveRequest)
createdGroup = group
} catch {
print("error in store execute = \(error)")
}
}
}
public func deleteContactAndGroup() {
if let contact = createdContact, let group = createdGroup {
do {
let mutableGroup = group.mutableCopy() as! CNMutableGroup
let mutableContact = contact.mutableCopy() as! CNMutableContact
let saveRequest = CNSaveRequest()
saveRequest.transactionAuthor = "TestApp"
saveRequest.delete(mutableContact)
saveRequest.delete(mutableGroup)
try contactStore.execute(saveRequest)
}
catch {
print("error in deleting store execute = \(error)")
}
}
}
}
I'm working with the Screen Time API in iOS and have successfully implemented the following:
Granted Screen Time Permission: The app asks for and obtains Screen Time permissions without any issues.
Blocked Specific Apps: Using FamilyActivitySelection, I can block access to certain apps.
Monitoring Device Activity: With DeviceActivityCenter().startMonitoring(), I’m able to successfully start monitoring.
DeviceActivityCenter().startMonitoring(.myActivity, during: schedule)
Now, I’m wondering if there’s a way to detect exactly which app the user opens, so I can fire an API from my own app based on that event.
Is this kind of real-time app usage detection possible with the Screen Time API? If so, how might it be implemented?
This message only to know your feeling on my project. Not to discuss what is feasible or not. Just on the interest of the functionality.
I use 5 Focus profiles, Do Not Disturb, Holiday, Work, Personal and Sleep. I find that the native solutions for changing modes are not powerful enough.
I'd like an app to configure automatically when each Focus profile should be activated.
Eg :
-Holiday : when holiday is found in my calendar
-Work : when I'm not on holiday, when we are not on the weekend, and after 7ham but before 7pm.
Personal : when I'm not on holiday when we are on the weekend of after 7pm
-Dot Not Disturb: When I'm not in holiday, only on the working week when I have an event in my agenda with the status accepted".
These are just some examples. the idea is that everything will be configurable. (my app is almost finished.)
What do you think?
We are experiencing an infrequent issue with the handoff between our Siri intent, our iOS app, and our CarPlay extension. Siri correctly understands the request, and the
handler(for intent: INIntent)
method is called. In the final step, we respond using:
INStartCallIntentResponse(code: .continueInApp, userActivity: userActivity)
with an instance of NSUserActivity initialized as:
NSUserActivity(activityType: "our.unique.StartCallIntent")
This "our.unique.StartCallIntent" type is included in the app’s NSUserActivityTypes attribute within the Info.plist.
The callback is handled in the main view of the app through:
view.onContinueUserActivity("our.unique.StartCallIntent", perform: handleSiriIntent)
Additionally, we handle the callback in the CarPlay extension using:
func scene(_: UIScene, continue userActivity: NSUserActivity)
This is necessary because when Siri is invoked while CarPlay is active, the CarPlay extension should receive the callback.
Most of the time, both callbacks are triggered as expected. However, on rare occasions, the handoff fails, and neither onContinueUserActivity nor scene(_: UIScene, continue userActivity:) receives a callback from the Siri intent.
Is this a known issue? If so, are there any guidelines or best practices for ensuring that our Siri intent handoff consistently triggers the callbacks?
The background asset keys (BAEssentiaMaxInstallSize/BAMaxInstallSize) referenced in the app's Info.plist will be displayed to users on the App Store, as outlined in the WWDC video and supported by Apple’s documentation.
Could you please clarify where exactly on the App Store's product page these values will be visible?
Is the size displayed on the App Store a sum of the app bundle size and the size specified in these keys within the Info.plist?
In my iOS app, I know that adding words to kMDItemKeywords in the Info.plist allows them to appear in Spotlight search. However, I want specific keywords to make my app appear in the App Library search.
Where should I add these keywords to enable this functionality?
The app gets stuck after login on an iOS 18 device. It works in Xcode, but the simulator shows the following console error: IntegrationApp(769,0x1f0094c00) malloc: xzm: failed to initialize deferred reclamation buffer (46).
I am really hoping somebody can help. I in the process of having our app relaunched with CarPlay and a few other features. However, after nearly 4 weeks I've still not had confirmation of Carplay being accepted. I've submitted several times without any response. When I've contacted Apple Support I simply get a generic reply (see below)
Hello Gareth,
CarPlay apps are editorially selected, you will be contacted if your app is selected to proceed.
If you have already submitted your request to have your app support CarPlay, there is no actions needed. Estimates and status updates are not available.
Please let us know if you have any questions or need further assistance.
WWDC videos suggest that existing apps should continue using the old SiriKit domains, such as INPlayMediaIntent. But what about new apps for playing audio? Should we implement Siri functionality for audio playback using the old SiriKit domains, or should we create our own AppEntities and trigger them via custom AudioPlaybackIntent implementations?
Interactive widgets require an AppIntent and don’t support the old INPlayMediaIntent. To achieve the same functionality as the Music app widgets, it seems logical to adopt the new AudioPlaybackIntent. However, I can't find any information about this in the documentation.
I keep getting this crash and I have no idea what is causing it. This is the stack trace:
2024-11-16_00-45-54.7074_+0100-8d446e9a50eb0be6cc826ff71526731dcb4430bc.crash
Any help would be appreciated.
Thank you