Posts

Sort by:
Post not yet marked as solved
0 Replies
3 Views
I'm trying to figure out how to debug this issue. I have a fairly simple program that I built using the Hello World sample code as reference. Here is my code: import SwiftUI @main struct Core_USDZ_ViewerApp: App { var body: some Scene { // Main Menu scene // WindowGroup (id: "main-menu"){ CoreUsdzMenu() } // Scene that takes data as an input // for volumetric viewing // WindowGroup (for: URL.self) { $content in CoreUsdzVolume(url: content) } defaultValue: { URL(string: "https://developer.apple.com/augmented-reality/quick-look/models/pancakes/pancakes.usdz")! } .windowStyle(.volumetric) .defaultSize(width: 0.2, height: 0.3, depth: 0.3, in: .meters) // Full surround scene /* ImmersiveSpace { // put our immersive view here } */ } } In the simulator, this launches the main menu scene, but when installed on the Vision Pro using TestFlight it skips the main menu and goes straight to the second WindowGroup. Since the data isn't populated, it uses the defaultValue and just shows pancakes. I'm having trouble logging and debugging this issue, as I don't have access to the hardware myself. I have to push the code to TestFlight and wait for a coworker to test it. Does anyone have ideas of why this could be happening? Any help is appreciated. Logging and debugging tips especially. I'm used to just putting log messages in my code to debug, but maybe there are some breakpoint techniques I should be using here or something. Oh, also, here is my CoreUsdzMenu script: import SwiftUI import RealityKit import UniformTypeIdentifiers struct CoreUsdzMenu: View { @Environment(\.openWindow) private var openWindow @Environment(\.dismissWindow) private var dismissWindow @State var entity: Entity? = nil @State var showFilePicker: Bool = false init() { NSLog("In CoreUsdzMenu") } var body: some View { VStack{ Text("Core USDZ Viewer v1.1") .font(.title) .frame(width: 500.0, height: 100.0) /* usdz list HStack(spacing: 100.0) { Spacer() // Load the UsdzList view into the window! UsdzList() Spacer() }*/ /* button test for window Button { openWindow(value: usdzData[1].url) } label: { Text("open test window") }*/ // A view for displaying the loaded asset. /* RealityView( make: { content in // Add a placeholder entity to parent the entity to. // let placeholderEntity = Entity() placeholderEntity.name = "$__placeholder" if let loadedEntity = self.entity { placeholderEntity.addChild(loadedEntity) } content.add(placeholderEntity) }, update: { content in guard let placeholderEntity = content.entities.first(where: { $0.name == "$__placeholder" }) else { preconditionFailure("Unable to find placeholder entity") } // If there is a loaded entity, remove the old child, // and add the new one. // if let loadedEntity = self.entity { placeholderEntity.children.removeAll() placeholderEntity.addChild(loadedEntity) } } )*/ // A button that displays a file picker for loading a USDZ. // Button( action: { showFilePicker = true }, label: { Text("Load USDZ") } ) .padding() } // can import usdz and realityFile UTT types .fileImporter(isPresented: $showFilePicker, allowedContentTypes: [.usdz, .realityFile]) { result in // Get the URL of the USDZ picked by the user. // Guarded for errors. // guard let url = try? result.get() else { print("Unable to get URL") return } NSLog("In CoreUsdzMenu") // add new .usdz to our data list // for later!~ // use Observables n stuff //usdzData.addUsdz(url) // This task is just an asynchronous block of code. Not linked // to the RealityView explicitly; the update parameter of the // RealityView function responds when this task updates the entity. // Task { // As the app is sandboxed, permission needs to be // requested to access the file, as it's outside of // the sandbox. // if url.startAccessingSecurityScopedResource() { defer { url.stopAccessingSecurityScopedResource() } // Load the USDZ asynchronously. // On load, triggers RealityView's update. // //self.entity = try await Entity(contentsOf: url) // Try using the Volumetric Window to display the // content: // openWindow(value: url) } } } } } Thank you for reading!
Posted
by
Post not yet marked as solved
0 Replies
2 Views
Need help as the the option to "make a version unavailable for download" is broken. 1- Go to the app store and select your app 2- On the left menu scroll down and click on "pricing and availability" 3- Scroll to the bottom to "Edit your last-compatible version for iOS apps" and expand the section 4- Click on the app versions 5- On the new pop-up window un-check the boxes for the versions you need to remove and click done. HERE IT IS BROKEN.
Posted
by
Post not yet marked as solved
0 Replies
4 Views
Hello. See the code below. struct ContentView: View { var body: some View { TabView { VehicleTab() .tabItem({ Label("Vehicles", systemImage: "car.fill")}) .modelContainer(for: Vehicle.self) TransactionsTab() .tabItem { Label("Transactions", systemImage: "dollarsign") } .modelContainer(for: Transaction.self) } } } Using the .modelContainer() in this way seems to be causing some issue. I was under the assumption that this would just create a container for each view. I get the error below in this configuration. If I comment out either one of the .modelContainer() modifiers, it works fine. Query encountered an error: Error Domain=NSCocoaErrorDomain Code=256 "The file “default.store” couldn’t be opened." Are you not able to do what I'm doing? Is there a way to have two separate containers?
Posted
by
Post not yet marked as solved
1 Replies
10 Views
I have reach limit of associations and want to add a new device. Anytime I want to add a new device I get this error message "Your development team has reached the maximum number of registered iPhone devices." I have disabled some of the devices BUT I can't remove them completely. Hence, I still reach the limit of devices. As per as the Apple message saying: "Note: If you remove a registered device from your account, it will continue to count against your device limit. At the start of your new membership year, Account Holders and Admins will be presented with the option to remove listed devices and restore the available device count." I can't wait until the start of the new membership year. How can I remove and add more devices please wihtout having to wait until new membership year? Thank you
Posted
by
Post not yet marked as solved
0 Replies
15 Views
I work on an app that includes a network extension. The app is essentially just to activate the extension, and the extension typically has long-running background sessions. Analyzing/monitoring metrics for the network extension is very important for us. However, in the Xcode Organizer screen, only the app itself is shown in the drop down menu - the associated network extension is not an option. For Xcode Organizer screens like Termination metrics and Battery Usage metrics, does the app's background metrics include the network extension, or just the app itself? If just the app, is there any way to get these metrics for the network extension?
Posted
by
Post not yet marked as solved
0 Replies
11 Views
I've added my iPhone's correct UDID in the "Devices" section in Apple Developer account, and I created a Development Profile. I then downloaded it (as a .mobileprovision file) and am trying to add it to my connected iPhone via XCode. I'm getting this error message: Failed to install one or more provisioning profiles on the device. Please ensure the provisioning profile is configured to this device. If not, please try to regenerate a new profile. I have ensured the provisioning profile is configured to this device and have tried regenerating it. Same result. My iPhone has "Developer Mode" turned on. How do I troubleshoot this further?
Posted
by
Post not yet marked as solved
0 Replies
11 Views
I have AirPort Extreme connected via eth switch to my MacBook And I have certified homekit device that broadcasting Apple IE as specified in the WAC Requirement document. the Airport utility is not able to see my WAC device. What I am missing? In the WAC2 document, in the test scenario, the Airpot utility should see the homekit devices (WAC) BTW: I can see the WAC devices with my iPhone as "SET UP New Device..."
Posted
by
Post not yet marked as solved
0 Replies
20 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
22 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
18 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
18 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
34 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
27 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
25 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
1 Replies
36 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
32 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
26 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
26 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 marked as solved
3 Replies
63 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

TestFlight Public Links

Get Started

Pinned Posts

Categories

See all