Posts

Sort by:
Post not yet marked as solved
0 Replies
12 Views
We currently have a shoebox-based architecture but want to transition to a document-based architecture, so UIManagedDocument seems like an obvious choice. However, the UIManagedDocument API seems outdated given the relatively newer NSPersistentContainer API. Also, it’s not clear if UIManagedDocument’s managedObjectContext can be used on the main thread or not. Ideally, I would like to see a persistentContainer property added to UIManagedDocument which could then be used to obtain the view context or a background managed object context. Does anyone have any suggestions on the latest best practices for document-based architectures using CoreData? I’m more interested in Swift implementations, but knowing best practices for SwiftUI and SwiftData would be helpful too.
Posted
by
Post not yet marked as solved
0 Replies
15 Views
The mergeable binaries changes which were working till Xcode 15.2 now started breaking in Xcode 15.3 when uploading to AppStore fails with below error: [ContentDelivery.Uploader] Error Domain=ContentDelivery Code=90680 "Asset validation failed" UserInfo={NSLocalizedFailureReason=Invalid directory. The bundle Payload/MyApp.app/ReexportedBinaries/Pods_MyApp.framework is not contained in a correctly named directory. It should be under Frameworks. NSUnderlyingError=0x600001ec9200 {Error Domain=IrisAPI Code=-19241 "Asset validation failed" Invalid Bundle structure. The "MyApp.app/ReexportedBinaries/Pods_MyApp.framework/Pods_MyApp" binary file is not permitted. Your app cannot contains standalone executable or libraries, other than a valid CFBUndleExecutable of supported bunldes Below are changes in Podfile [Cocoapods based iOS project] specific to Mergeable binaries that were working till Xocde 15.2 and able to upload build to AppStore: post_install do |installer| setup_project(installer) # getMergeableLibraryNames() returns an array containing names of Pods as listed under Pods target which support Mergeable Binaries enable_mergeable_lib(getMergeableLibraryNames(), installer) end def setup_project(installer) installer.pods_project.targets.each do |target| configure_build_settings(target) end end def configure_build_settings(target) target.build_configurations.each do |config| config.build_settings['MERGEABLE_LIBRARY'] = 'YES' end end def enable_mergeable_lib(mergeable, installer) installer.aggregate_targets.each do |aggregate_target| aggregate_target.user_project.targets.each do |target| if target.name == "MyApp" aggregate_target.xcconfigs.each do |config_name, config_file| isRelease = config_name == "Release" updated_config = [getOtherLinkerFlags(mergeable, isRelease)] config_file.other_linker_flags[:simple] = updated_config xcconfig_path = aggregate_target.xcconfig_path(config_name) config_file.save_as(xcconfig_path) end end end end end def getOtherLinkerFlags(mergeable, isRelease) config = "" mergeable.each do |lib| if isRelease config = config + "-Wl,-merge_framework,#{lib} " else config = config + "-Wl,-reexport_framework,#{lib} " end end config = config + "-ObjC $(inherited)" return config end The App target has Create Merged Binary set to Manual As per Xcode 15.3 release notes, there seems some bug fix made by Apple related to Mergeable library but it is not clear what change we have to made in our existing code so as to fix above mentioned issues.
Posted
by
Post not yet marked as solved
0 Replies
14 Views
Hello, It's been more than three weeks that i've been freaking out about this crash that occurs while establishing a BLE connection to a peripheral, scan wifi networks and connect to one of them via BLE. Here is the crash's stacktrace and I hope that I can get some help in order to resolve this ungoing crash : +0x284 mov x2, x22 +0x288 mov x3, x28 +0x28c bl "swift::ConcurrentReadableHashMap<MallocTypeCacheEntry, swift::LazyMutex>::resize(swift::ConcurrentReadableHashMap<MallocTypeCacheEntry, swift::LazyMutex>::IndexStorage, unsigned char, MallocTypeCacheEntry*)" +0x290 mov x23, x0 +0x294 add x0, sp, #0x2c +0x298 mov x1, x23 +0x29c mov x2, x24 +0x2a0 mov x3, x28 +0x2a4 bl "std::__1::pair<MallocTypeCacheEntry*, unsigned int> swift::ConcurrentReadableHashMap<MallocTypeCacheEntry, swift::LazyMutex>::find<unsigned int>(unsigned int const&, swift::ConcurrentReadableHashMap<MallocTypeCacheEntry, swift::LazyMutex>::IndexStorage, unsigned long, MallocTypeCacheEntry*)" +0x2a8 and x26, x1, #0xffffffff +0x2ac cbnz x27, "_swift_allocObject_+0x2bc" +0x2b0 b "_swift_allocObject_+0x2cc" +0x2b4 mov x26, x1 +0x2b8 cbz x27, "_swift_allocObject_+0x2cc" +0x2bc ldr w8, [x27] +0x2c0 mov x22, x27 +0x2c4 cmp w24, w8 +0x2c8 b.lo "_swift_allocObject_+0x358" +0x2cc add x8, x24, x24, lsr #2 +0x2d0 add x9, x24, #0x1 +0x2d4 cmp x8, x9 +0x2d8 csinc x8, x8, x24, hi +0x2dc lsl x8, x8, #3 +0x2e0 add x0, x8, #0x8 +0x2e4 bl "DYLD-STUB$$malloc_good_size" +0x2e8 mov x28, x0 +0x2ec mov w1, #0xb407 +0x2f0 movk w1, #0x5640, lsl #16 +0x2f4 bl "0x1a255c690" +0x2f8 cbz x0, "_swift_allocObject_+0x49c" +0x2fc mov x22, x0 +0x300 mov x8, #0x7fffffff8 +0x304 add x8, x28, x8 +0x308 lsr x8, x8, #3 +0x30c str w8, [x0] +0x310 cbz x27, "_swift_allocObject_+0x34c" +0x314 add x0, x22, #0x8 +0x318 lsl x2, x24, #3 +0x31c mov x1, x25 +0x320 bl "DYLD-STUB$$memcpy" +0x324 mov w0, #0x10 +0x328 mov x1, #0x3c70 +0x32c movk x1, #0xaff9, lsl #16 +0x330 movk x1, #0x80, lsl #32 +0x334 movk x1, #0xa, lsl #48 +0x338 bl "0x1a255c690" +0x33c adrp x8, 403725 ; 0x6290d000 +0x340 ldr x9, [x8, #0xdf8] +0x344 stp x9, x27, [x0] +0x348 str x0, [x8, #0xdf8] +0x34c adrp x8, 403725 ; 0x6290d000 +0x350 add x8, x8, #0xde0 +0x354 stlr x22, [x8] +0x358 add x8, x22, x24, lsl #3 +0x35c ldp x10, x22, [sp, #0x8] +0x360 mov x9, x22 +0x364 bfi x9, x21, #32, #32 +0x368 str x9, [x8, #0x8] +0x36c stlr w10, [x20] +0x370 and x8, x26, #0xffffffff +0x374 and w16, w23, #0x3 +0x378 ldp x26, x25, [sp, #0x18] +0x37c cmp x16, #0x3 +0x380 csel x16, x16, xzr, ls +0x384 adrp x17, 0 ; 0x0 +0x388 add x17, x17, #0x6cc +0x38c ldrsw x16, [x17, x16, lsl #2] +0x390 adr x17, #0x0 +0x394 add x16, x17, x16 +0x398 br x16 +0x39c lsl x8, x8, #2 +0x3a0 lsl x8, x10, x8 +0x3a4 orr x8, x8, x23 +0x3a8 adrp x9, 403725 ; 0x6290d000 +0x3ac add x9, x9, #0xde8 +0x3b0 stlr x8, [x9] +0x3b4 b "_swift_allocObject_+0x3fc" +0x3b8 and x9, x23, #0xfffffffffffffffc +0x3bc tst x23, #0x3 +0x3c0 csel x9, xzr, x9, eq +0x3c4 add x8, x9, x8 +0x3c8 stlrb w10, [x8] +0x3cc b "_swift_allocObject_+0x3fc" +0x3d0 and x9, x23, #0xfffffffffffffffc +0x3d4 tst x23, #0x3 +0x3d8 csel x9, xzr, x9, eq +0x3dc add x8, x9, x8, lsl #1 +0x3e0 stlrh w10, [x8] +0x3e4 b "_swift_allocObject_+0x3fc" +0x3e8 and x9, x23, #0xfffffffffffffffc +0x3ec tst x23, #0x3 +0x3f0 csel x9, xzr, x9, eq +0x3f4 add x8, x9, x8, lsl #2 +0x3f8 stlr w10, [x8] +0x3fc dmb ish +0x400 adrp x8, 403725 ; 0x6290d000 +0x404 ldr w8, [x8, #0xdd8] +0x408 cbnz w8, "_swift_allocObject_+0x438" +0x40c adrp x8, 403725 ; 0x6290d000 +0x410 ldr x23, [x8, #0xdf8] +0x414 cbz x23, "_swift_allocObject_+0x430" +0x418 ldp x20, x0, [x23] +0x41c bl "DYLD-STUB$$free" +0x420 mov x0, x23 +0x424 bl "DYLD-STUB$$free" +0x428 mov x23, x20 +0x42c cbnz x20, "_swift_allocObject_+0x418" +0x430 adrp x8, 403725 ; 0x6290d000 +0x434 str xzr, [x8, #0xdf8] +0x438 adrp x0, 403725 ; 0x6290d000 +0x43c add x0, x0, #0xdf0 +0x440 bl "0x1a255c9f0" +0x444 bfi x22, x21, #32, #32 +0x448 mov x0, x26 +0x44c mov x1, x25 +0x450 mov x2, x22 +0x454 bl "swift::swift_slowAllocTyped(unsigned long, unsigned long, unsigned long long)" +0x458 cbz x19, "_swift_allocObject_+0x470" +0x45c mov x16, x0 +0x460 movk x16, #0x6ae1, lsl #48 +0x464 mov x17, x19 +0x468 pacda x17, x16 +0x46c b "_swift_allocObject_+0x474" +0x470 mov x17, #0x0 +0x474 mov w8, #0x3 +0x478 stp x17, x8, [x0] +0x47c ldp x29, x30, [sp, #0x80] +0x480 ldp x20, x19, [sp, #0x70] +0x484 ldp x22, x21, [sp, #0x60] +0x488 ldp x24, x23, [sp, #0x50] +0x48c ldp x26, x25, [sp, #0x40] +0x490 ldp x28, x27, [sp, #0x30] +0x494 add sp, sp, #0x90 +0x498 retab +0x49c bl "_swift_allocObject_.cold.1"
Posted
by
Post not yet marked as solved
0 Replies
13 Views
Hi, I’m testing out different possibilities for a client that wants to have a loyalty card service where users can register to download and install a wallet pass. This wallet pass should be able to receive push notifications. I have found a library that can generate apple passes but I struggle to find a good direction with the notification / update service. I’m most comfortable with using PHP but any other easy solution is also welcome. What would be a good way to start and test things out? Thank you!
Posted
by
Post not yet marked as solved
2 Replies
30 Views
This app has crashed because it attempted to access privacy-sensitive data without a usage description. The app's Info.plist must contain an NSBluetoothAlwaysUsageDescription key with a string value explaining to the user how the app uses this data. I don't know how to add these permissions when i can't find plist files. It is not when any tutorial or document says it is
Posted
by
Post not yet marked as solved
0 Replies
22 Views
Hello, I have RouteManage, which is a Class and has following Protokolls: NSObject, Codable ,ObservableObject and is an Singleton and I have a RouteTrackingAttributes which has ActivityAttributes I tried to set let attributes = RouteTrackingAttributes() let state = RouteTrackingAttributes.ContentState(routeManager: routeManger) activity = try? Activity.request() the update from singleton. But it dosen't work. It worked only once? thank you for help greeting Fabian
Posted
by
Post not yet marked as solved
0 Replies
20 Views
Hi, Can we install and use a XCode 15.2 on a MacBook Pro 13in 2017. On the Mac, the OS version stop at Ventura 13.6.6 and the installed XCode require Sonoma 14++ to install. But on the doc, this is written that works with macOS Ventura 13.5 or later : https://developer.apple.com/documentation/xcode-release-notes/xcode-15-release-notes Best regards.
Posted
by
Post not yet marked as solved
0 Replies
23 Views
Instruments reveals that the following simple code leaks memory on each delegate invoke: - (void)start { [_urlSession dataTaskWithURL:_url]; } - (void)URLSession:(NSURLSession *)session dataTask:(NSURLSessionDataTask *)dataTask didReceiveData:(NSData *)data { [_data appendData:data]; } I don't have any clue on this leak, it should not happen. What should I do to avoid this?
Posted
by
Post not yet marked as solved
0 Replies
26 Views
I'm looking to make an app using the ScreenTime API and the Managed Settings Framework. I'm experimenting with the FamilyActivityPicker, but when i open it from the simulator i see only categories with no applications. Without being able to select applications, i cannot test properly the app. I can't install it on a real device to test it because i do not have a paid Apple Developer account and therefore can't access the capability if i select my Free Developer Account in order to install it on my iPhone.
Posted
by
Post not yet marked as solved
0 Replies
22 Views
I've encountered a strange issue reading characteristics from a BLE device using CoreBluetooth ONLY ON iPHONE 12 AND iPHONE 12 PRO. The problem is that the BLE device receives a read characteristic request for an errored characteristic id. The BLE Device is using blue kitchen btstack (https://github.com/bluekitchen/btstack). We also filed a bug report on their side here Say i ask for a characteristic discovered with CBUUID "F97A6DA4-B3AA-44B0-8DE7-40D238BE5E02", the device receives a request for a "F97A6DA4-B3AA-44B0-8DE7-40D238BE5E09" id. The exact same swift code is working perfectly on MacOS, reading the right characteristic on the device. I is also perfectly fine, tested on various iOS versions on iPhone 8, SE (1st gen), 11, 13, 15. The only devices affected are the 12 & 12 Pro. I also tried using popular apps like light blue, or nRF Connect for iOS, and the iOS app has the same behavior on iPhone 12 & 12 Pro (that is wrong), but is ok on other iPhone devices. Has anyone encountered such a strange behavior and have any insight on how to solve that ?
Posted
by
Post not yet marked as solved
0 Replies
23 Views
In SwiftUI there is a built-in component for displaying album artworks called Artwork but there is no equivalent for UIKit. My current approach is to use the .url() method to read image's URL and download the image or read it from the disk but the performance is much worse than it was previously with MPMediaItem's artworkImage method. let artworkQueue = DispatchQueue( label: "MusicKit-ArtworkQueue", qos: .default, attributes: .concurrent ) let artworkSemaphore = DispatchSemaphore(value: 5) extension Song { func artworkImage(for size: CGSize, completion: @escaping (UIImage?) -> Void) { artworkQueue.async { artworkSemaphore.wait() defer { artworkSemaphore.signal() } let imageURL = artwork?.url( width: Int(size.width), height: Int(size.height) ) // I hate doing this as it might very well break in the future guard let imageURL, imageURL.scheme == "musicKit" else { return completion(nil) } guard let imageData = try? Data(contentsOf: imageURL), let image = UIImage(data: imageData) else { return completion(nil) } completion(image) } } } I really dislike this approach because it feels hacky but somewhat works. You might ask what's the semaphore for? Well, without it I could notice that MusicKit was choking and after reading too many artworks at once. Can someone from Apple please provide us with an example on how to use MusicKit with UIKit properly? Ideally (IMO) we would have a method defined on Song and other MusicKit structures that returns the image for us, just like MPMediaItem had the .artwork() method. It would make our lives so much easier.
Posted
by
Post not yet marked as solved
2 Replies
53 Views
Hi, I submitted my app, for the first time, the 2024-02-29. the same day I received this message: Hello, Thank you for submitting your app for review. We need additional time to evaluate your submission and Apple Developer Program account. Your submission status will appear as "Rejected" in App Store Connect while we investigate. However, we do not require a revised binary or additional information from you at this time.…… Since that I’ve no news from the app review team and no answer neither online in the appstoreconnect. Does anyone know what can I do? Is there any possibility to know what is going on or what is taking so long ? Thanks in advance. Fabio
Posted
by
Post not yet marked as solved
0 Replies
22 Views
Hello, Can anybody help me with some info about the following situation? We have an app that is published in the store and it is used by the users. We want implement in the app the In App Provisioning flow and we are analyzing all the steps the we need to check. One of the steps is the request for a special entitlement from apple. Let's say that we've checked the following: Request In App Provisioning entitlement Receive the entitlement Create a new provisioning profile with the received entitlement Start the development of In App Provisioning flow in the app At some point a bug is identified in production and we need the develop a hotfix that needs to be published before finishing the In App Provisioning feature. Wil it be possible to publish a new version of the app that doesn't contain the In App Provisioning functionality even though we have received the entitlement from apple? Should we create a new provisioning profile without the entitlement for this new release? Please let me know if you need more info.
Posted
by
Post not yet marked as solved
0 Replies
24 Views
This code works when I run it in the iOS Simulator with iOS 17.0.1: let passcodeInput = springboard.secureTextFields["Passcode field"] _ = passcodeInput.waitForExistence(timeout: 10) passcodeInput.tap() However if I run it on the iOS Simulator with iOS 17.4 I get this error: t = nans Checking existence of `"Passcode field" SecureTextField` t = nans Capturing debug information t = nans Requesting snapshot of accessibility hierarchy for app with pid 66943 t = nans Tap "Passcode field" SecureTextField t = nans Wait for com.apple.springboard to idle t = nans Find the "Passcode field" SecureTextField t = nans Find the "Passcode field" SecureTextField (retry 1) t = nans Find the "Passcode field" SecureTextField (retry 2) t = nans Requesting snapshot of accessibility hierarchy for app with pid 66943 <unknown>:0: error: PRCheckUITests : Failed to tap "Passcode field" SecureTextField: No matches found for Descendants matching type SecureTextField from input {( Application, pid: 66943, label: ' ' )} Did the hardcoded string "Passcode field" change for iOS 17.4? How can I access the passcode field through springboard in a test?
Posted
by
Post not yet marked as solved
0 Replies
26 Views
Dear Apple support, We are working on one of the projects related to BLE, in which our BLE device is acting as a GATT client and our iPhone device (iPhone 13, OS17.3) is acting as a GATT server. Issue being faced: Whenever my BLE device subscribes to the ANCS notifications, and the moment the IOS device starts bombarding with the notifications available in notification center, the BLE device controller's heap memory becomes UNAVAILABLE in runtime for this notifications' queue and eventually making the BLE controller to reset. Thereafter, whenever user tries making a new connection session of BLE, again same thing repeats. Notifications allowed in BLE display : W-SMS, W-CALL, SMS, CALL, none other than this. Issue observed with : IF and ONLY 150 notifications and above available in notification center, otherwise our product works fine with iPhone with less number of notifications. We would like to know how we can curb the number of PRE-EXISTING type notifications available in the notification center flowing towards the BLE device? What best solution can be done at the IOS side, we also have IOS APP team for this project. What kind of APIs does Core Bluetooth framework can provide to the IOS developer in order to overcome this issue. Please suggest possible ways from the IPHONE device only to overcome this. BLE's software CANNOT BE CHANGED under any circumstances as the product is already in production and complaints are coming from end user (from the field). OUR GOAL : ONLY notifications which will be available in run time, i.e. AFTER SUCCESSFUL BLE connection established to be displayed in the BLE's display. We DON'T WANT older notifications to be displayed and flow towards BLE over ANCS. WE MUST make 'notification popup' option as ALLOW to be shared with our BLE device, otherwise SMS,CALL, W-SMS,W-CALL during live connection will not come on the BLE 's display.
Posted
by
Post not yet marked as solved
0 Replies
21 Views
Hi! I am trying to figure out whether there are any ways to get notifications when a macOS user connects to another device via Bluetooth (specifically when a smartphone is paired with a MacBook). I know about IOBluetooth, but it seems like you have to send periodic queries for devices when using this framework, and there is no general way to receive such notifications. I know that IOHIDManager may help to track connection with human interface devices such as keyboards, trackpads, joysticks, etc. But is there any API in IOKit/DriverKit that could help get notifications when a macOS user connects to a smartphone? Maybe I am missing an important part of IOBluetooth, so I would appreciate any help.
Posted
by
Post not yet marked as solved
0 Replies
18 Views
I am developing an AppleWatch applet. There is no IOS side, only the Apple Watch side. I want to evoke SIRI on the Apple Watch, then say "Open my software" or a specific sentence, and then my software will be automatically opened.
Posted
by
Post not yet marked as solved
0 Replies
23 Views
I have a request from a client that would like to create a solution where a central component is the ability to retrieve the users app usage. I can see that there are various api's todo that - one example is the Device Activity API. Another hope from the client is that this should be a web solution and not an app. I haven't quite been able to figure out if this is possible or not. I have three questions: Is it possible to retrieve app usage information through a REST api (or similar) outside an iOS app? Is it possible to use the appleId as a kind of auth solution for a web application Are there any similar APIs for older versions than iOS 15?
Posted
by
Post not yet marked as solved
0 Replies
19 Views
Mac Mail app always displays iCloud mailbox as an "offline server", while other mailboxes work well. Mac Mail app shows iCloud incoming mail server unrelated to iCloud and to my iCloud ID. The outgoing mail server line is empty. The same iCloud mail account works well on the web and on iPhones but does not work with the Mac Mail app. I have tried resetting the account, rebooting, reloading, etc., and also checked all Help articles and forums, but did not find any guidelines on how to correct incoming and outgoing server addresses for Mac Mail app. MasOS: 14.5 Beta (23F5049f)
Posted
by

TestFlight Public Links

Get Started

Pinned Posts

Categories

See all