Posts

Sort by:
Post not yet marked as solved
0 Replies
61 Views
How is it possible to add a schema for ar to a usd file using the python tools (or any other way). Following the instructions in: https://developer.apple.com/documentation/arkit/arkit_in_ios/usdz_schemas_for_ar/actions_and_triggers/preliminary_behavior The steps are to have the following declaration: class Preliminary_Behavior "Preliminary_Behavior" ( inherits = </Typed> ) and a usd file #usda 1.0 def Preliminary_Behavior "TapAndFlip" { rel triggers = [ <Tap> ] rel actions = [ <Entry> ] def Preliminary_Trigger "Tap" ( inherits = </TapGestureTrigger> ) { rel affectedObjects = [ </Cube> ] } def Preliminary_Action "Entry" ( inherits = </GroupAction> ) { uniform token type = "parallel" rel actions = [ <Flip> ] } def Preliminary_Action "Flip" ( inherits = </EmphasizeAction> ) { rel affectedObjects = [ </Cube> ] uniform token motionType = "flip" } } def Cube "Cube" { } How do these parts fit together? I saved the usda file, but it didn't have any interactions. Obviously, I have to add that declaration, but how do I do this? is this all in an AR Xcode project? Or can I do this with python tools (I would prefer something very lightweight).
Posted
by
Post not yet marked as solved
1 Replies
69 Views
I have some usdz files saved and I would like to make thumbnails for them in 2D of course. I was checking Creating Quick Look Thumbnails to Preview Files in Your App but it says Augmented reality objects using the USDZ file format (iOS and iPadOS only) I would like to have the same functionality in my visionOS app. How can I do that? I thought about using some api to convert 3d asset into 2d asset, but it would be better If I could do that inside the Swift environment. Basically I wanna do Image(uiImage: "my_usdz_file")
Posted
by
Post not yet marked as solved
0 Replies
54 Views
HI there, I would like for the user to be able to tap on a wall that has been highlighted as scanned (the white outline) and see basic information about the wall (in a pop up view modal) without being taken out of the scan session. As a first step though i'd simply like to be able to tap on the scanned wall whilst still in the session and see in the NSLog, the data about that CapturedRoom.Surface. I'm storing the CapturedRoom on update of the sesssion using the RoomCaptureSessionDelegate and I have added a UITapGestureRecognizer to the room capture view. However i've tried a number of ways (hit testing, raycasting) and i'm unable to target the wall behind the users tap gesture. If anyone can give any advice even if just the principal of how to achieve this.
Posted
by
Post marked as solved
1 Replies
72 Views
I've run into a problem related to navigation links in child Views containing a SwiftData @Query and a predicate. When tapping on a NavigationLinks, the containing View is invalidated pausing the UI. When tapping back, the View is invalidated a second time during which time the View ignores any new taps for navigation leading to a poor user experience. A complete example: import SwiftUI import SwiftData @Model final class Item { var num: Int init(num: Int) { self.num = num } } @main struct TestSwiftDataApp: App { var sharedModelContainer: ModelContainer = { let schema = Schema([Item.self]) let modelConfiguration = ModelConfiguration(schema: schema, isStoredInMemoryOnly: true) let container: ModelContainer do { container = try ModelContainer(for: schema, configurations: [modelConfiguration]) } catch { fatalError("Could not create ModelContainer: \(error)") } // Add some sample data Task { @MainActor in for i in 0...1000 { container.mainContext.insert(Item(num: i)) } } return container }() var body: some Scene { WindowGroup { ContentView() } .modelContainer(sharedModelContainer) } } extension Color { static func random() -> Color { Color(red: .random(in: 0...1), green: .random(in: 0...1), blue: .random(in: 0...1)) } } struct ContentView: View { var body: some View { NavigationStack { SubView() .navigationDestination(for: Item.self) { item in Text("Item at \(item.num)") } } } } struct SubView: View { @Environment(\.modelContext) private var modelContext @Query(filter: #Predicate<Item> { item in item.num < 20 }, sort: \.num) private var items: [Item] var body: some View { let _ = Self._printChanges() List { ForEach(items) { item in NavigationLink(value: item) { Text("Item \(item.num)") }.background(Color.random()) } } } } The background colors of cells will shift every invalidation. In addition there's some debugging in there to show what's happening. When running it, I get SubView: @self, @identity, _modelContext, @128, @144 changed. SubView: @self changed. SubView: @dependencies changed. Then I tap on an item and it invalidates: SubView: @self changed. Tapping back invalidates it again during which time the UI ignores new taps: SubView: @self changed. The odd thing is, this behavior doesn't happen if the NavigationStack is moved to the child View with the NavigationLinks like this: struct ContentView2: View { var body: some View { SubView2() } } struct SubView2: View { @Environment(\.modelContext) private var modelContext @Query(filter: #Predicate<Item> { item in item.num < 20 }, sort: \.num) private var items: [Item] var body: some View { let _ = Self._printChanges() NavigationStack { List { ForEach(items) { item in NavigationLink(value: item) { Text("Item \(item.num)") }.background(Color.random()) } } .navigationDestination(for: Item.self) { item in Text("Item at \(item.num)") } } } } When running this, there's one less change as well and no invalidations on tap or back: SubView: @self, @identity, _modelContext, @128, @144 changed. SubView: @dependencies changed. The problem also doesn't happen if the @Query does not have a filter #Predicate. Unfortunately, the application in question has a deeper hierarchy where views with a @Query with a predicate can navigation to other views with a @Query and predicate, so neither solution seems ideal. Is there some other way to stop the invalidations from happening?
Posted
by
Post marked as solved
4 Replies
80 Views
New to Apple development. Vision Pro is the reason I got a developer license and am learning XCode, SwiftUI .... The Vision Pro tutorials seem to use WIFI or the developer strap to connect the Development environment to the Vision Pro. I have the developer strap, but can't use it on my company computer. I have been learning using the developer tools, but I can't test the apps on my personal Vision Pro. Is there a way to generate an app file on the Mac Book that I can download to the Vision Pro? This would be a file that I could transfer to cloud storage and download using Safari to the Vision Pro. I will eventually get a Vision Pro at work, but till then I want to start developing.
Posted
by
Post not yet marked as solved
0 Replies
140 Views
Hello, I want to use universal links in my application, for which I need to get the TeamID and BundleId, for apple-app-site-association file. Can you please tell me, do I have to buy an Apple Developer Account at the time of development to do this, or can I get it all for free at the time of development?
Posted
by
Post not yet marked as solved
1 Replies
67 Views
I have a Developer account with a Developer Role, although apparently without the stated ability to create my own Sandbox ID. So, our company's Administrator is trying to create one for me. But each time he enters a new icloud.com address to create one, he gets the error, "Your Apple ID or password was entered incorrectly." (The example at the above link uses icloud.com, and that seems the natural place to do this. I'm assuming that since you can't actually create an icloud.com email without an Apple ID, that this sandbox creation process should be ok with the email not existing yet.)
Posted
by
Post not yet marked as solved
0 Replies
60 Views
I built two parts of my app a bit disjointed: my physics component, which controls all SceneReconstruction, HandTracking, and WorldTracking. my spatial GroupActivities component that allows you to see personas of those that join the activity. My problem: When trying to use any DataProvider in a spatial experience, I get the ARKit Session Event: dataProviderStateChanged, which disables all of my providers. My question: Has anyone successfully been able to find a workaround for this? I think it would be amazing to have one user be able to be the "host" for the activity and the scene reconstruction provider still continue to run for them.
Posted
by
Post not yet marked as solved
2 Replies
95 Views
Hi, For 10 days now we've been rejected with no answer. I am afraid Apple will never answer us... and 3 years of development down the drain. My team and our whole families are waiting but as the days go by, it is looking more and more grim for us I am afraid. Is there anything we can do? Our game had a decent rating and audience reception so far. All of our code is built by us over thousands of hours. We have alot of features that competitors do not have, this was even mentioned by several Youtubers and called out as a unique game. Guideline 4.3(a) - Design - Spam We noticed your app shares a similar binary, metadata, and/or concept as apps submitted to the App Store by other developers, with only minor differences. Any advice would be so appreciated ! Thank you, Alex
Posted
by
Post not yet marked as solved
0 Replies
68 Views
I can enroll iOS and macOS devices with success when DEP is not used (OTA). With DEP, I can enroll iOS devices but not macOS devices. In this case, the process fails when the activation profile is received, because the system cannot decrypt the returned payload. Note that I sign the payload using the server certificate (trusted as the anchored certs are defined accordingly) and I encrypt the payload using the device identity certificate. This identity certificate was obtained when the device reached the enrollment URL (used to sign the inbound payload). From the console logs, it seems that the device cannot find the aforementioned certificate using the issuer and serial number, which is surprising because this should be the device identity certificate. I currently use PKCS7 openssl 3 API. I am wondering if I should switch for the CMS functions since it provides a way to define the certificate using it's key identifier rather than the issuer and serial number. I'm also wondering if certificates are missing in the chain. Any help would be greatly appreciated.
Posted
by
Post marked as solved
3 Replies
86 Views
I had some support tickets about dates not showing properly for customers based in the America/Merida timezone. Essentially America/Merida permanently changed to -0500 (CDT) on October 31, 2021, and it appears that the NSTimeZone does not respect this change, and reports times as -0600 (CST). Creating a little test tool with the following code: +(void) run { NSArray<NSString *> * args = [[NSProcessInfo processInfo] arguments]; if ([args count] > 1) { NSString *timezone = args[1]; NSLog(@"custom TZ: %@", timezone); NSTimeZone * tz = [NSTimeZone timeZoneWithName:timezone]; [NSTimeZone setDefaultTimeZone:tz]; } NSDate * now = [NSDate date]; NSLog(@"Testing Dates: (local timezone : %@)", [NSTimeZone localTimeZone]); NSLog(@" (default timezone: %@)", [NSTimeZone defaultTimeZone]); NSLog(@" (is DST : %@)", [[NSTimeZone defaultTimeZone] isDaylightSavingTimeForDate:now] ? @"YES" : @"NO"); NSLog(@" (current cal-tz : %@)", [[NSCalendar currentCalendar] timeZone]); NSLog(@" (current locale : %@)", [[NSLocale currentLocale] localeIdentifier]); NSLog(@"Now: %@", now); } And running with the America/Merida timezone passed in, I'm getting the following output: custom TZ: America/Merida Testing Dates: (local timezone : Local Time Zone (America/New_York (EDT) offset -14400 (Daylight))) (default timezone: America/Merida (CST) offset -21600) (is DST : NO) (current cal-tz : America/Merida (CST) offset -21600) (current locale : en_US) Now: Tue May 14 15:06:14 2024 Running the same code on Linux via the GNUStep implementation of Objective-C, I get the correct output with America/Merida showing up as CDT (ie (is DST : YES)). Are there any good ways to work around this?
Posted
by
Post not yet marked as solved
1 Replies
183 Views
Hello, I have been stumped on this issue for a week and am looking for guidance on how to resolve it. I am aware of Guideline 5.1.1 Legal: Privacy - Data Collection and Storage and have read through it. The core functionality of our app is a Message Chatbot. This is the only feature we have, and we require user registration to limit the number of messages that can be sent on the free tier. However, despite explaining why we need user registration and pointing to a number of very similar apps that have the exact same registration system, we are not able to get approval from the App Reviewers. Their message is: "To resolve this issue, please revise the app to let users freely access the app's features that are not account-based." The problem is that we do not have any other features in our app, so we are stuck. I was wondering if anyone else had similar issues and what they did to fix it? Thank you!
Posted
by
Post not yet marked as solved
1 Replies
71 Views
I am developing a suite of apps/helpers that get built into an installer package for deployment (outside The App Store). We have that release process ± working, except that most of the development team members are not admins/privileged on the team. They don't really need to publish on behalf of the team, and so we don't want to have debug builds also depend on being signed as "Developer ID Application". But that is running into problems… If I select instead "Sign to Run Locally" this results in an error for some of the build products along the lines of: [Build Target] requires a provisioning profile. Enable development signing and select a provisioning profile in the Signing & Capabilities editor. If I select "Apple Development" as the Code Signing Identity it leaves me with basically the same error as "Developer ID Application" does: Provisioning profile [Name of App/Helper] doesn't include signing certificate "Apple Development: [Name of Developer] ([TEAMID])" And finally, if simply set the Debug value for Provisioning Profile to "None" for the problematic products I get errors like: "[Name of app]" requires a provisioning profile. Select a provisioning profile in the Signing & Capabilities editor. I believe perhaps because some of the targets have an entitlements file granting access to various things (their own XPC services, their own shared preferences, as well as Outgoing Network Connections and com.apple.security.smartcard access…). In older versions of Xcode and/or macOS we didn't have trouble like this, local development could be done by basically any team member. Now it seems like maybe all developers need to have release-signing privileges to test/debug even on their own machines? Or is there a combination I'm missing, that would allow anyone on the team (or perhaps not even on the team) to build and debug the code locally, while still limiting who is able to actually sign notarized release builds on behalf of the team?
Posted
by
Post not yet marked as solved
0 Replies
61 Views
Since iOS 12 it has become difficult to detect the end of playback using the system music player. In earlier iOS versions, the now playing item would be set nil and you would receive a notification that the player stopped. In iOS 12 and later, nowPlayingItem still contains the current song and the only notification you get is MPMusicPlayerControllerPlaybackStateDidChangeNotification with the playbackState set to MPMusicPlaybackStatePaused. Pressing pause in my car (or any remote access) generates the same conditions making it difficult to correctly detect the difference. It would be nice if they added a notification that playback was done (similar to the other players). Any suggestions?
Posted
by
Post not yet marked as solved
1 Replies
69 Views
Hi there! I am trying to build a macOS app using Electron. There is a feature on the app that depends on a http server to run locally. This Server was built using Java. Both the compiled server and the Java Runtime Environment were bundled in the build. To start the server I use NodeJS's child_process.spawn, pointing the bundled JRE's executable and the server implementation. The issue I am facing is that the Java Virtual Machine is not starting. It returns the following error message: Error: Port Library failed to initialize: -1 Error: Could not create the Java Virtual Machine. Error: A fatal exception has occurred. Program will exit. Both the JRE and the server are located in Contents directory, in a subdirectory I have created for them. Here are the app's entitlements: <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>com.apple.security.app-sandbox</key> <true/> <key>com.apple.security.application-groups</key> <string>REDACTED</string> <key>com.apple.application-identifier</key> <string>REDACTED</string> <key>com.apple.developer.team-identifier</key> <string>REDACTED</string> <key>com.apple.security.cs.allow-jit</key> <true/> <key>com.apple.security.cs.allow-unsigned-executable-memory</key> <true/> <key>com.apple.security.cs.allow-dyld-environment-variables</key> <true/> <key>com.apple.security.cs.disable-executable-page-protection</key> <true/> <key>com.apple.security.cs.disable-library-validation</key> <true/> <key>com.apple.security.network.client</key> <true/> <key>com.apple.security.network.server</key> <true/> <key>com.apple.security.device.microphone</key> <true/> <key>com.apple.security.device.audio-input</key> <true/> <key>com.apple.security.device.camera</key> <true/> <key>com.apple.security.print</key> <true/> <key>com.apple.security.files.user-selected.read-write</key> <true/> <key>com.apple.security.temporary-exception.files.absolute-path.read-write</key> <true/> </dict> </plist> Here the entitlements inherit: <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>com.apple.security.app-sandbox</key> <true/> <key>com.apple.security.inherit</key> <true/> </dict> </plist> Is there any missing step to allow the spawning of this process?
Posted
by
Post not yet marked as solved
1 Replies
73 Views
Hello, I am trying to get network statistics using Swift on macOS. I am attempting to obtain: total input bytes total output bytes total input packets total output packets The following code works in the app as far as I can tell so far, but... the for-loop is a hack that I'd like to correct by properly iterating over all the interfaces. import Foundation import OSLog struct NetworkStatisticsData { var totalInputBytes: UInt64 = 0 var totalOutputBytes: UInt64 = 0 var totalInputPackets: UInt64 = 0 var totalOutputPackets: UInt64 = 0 } final class NetworkStatistics: Sendable { private let logger = Logger(subsystem: Bundle.main.bundleIdentifier!, category: "SwiftNetworkInformation") func getNetworkStatistics() -> NetworkStatisticsData { var networkStatisticsData = NetworkStatisticsData() for i in 1..<24 { // <- this for-loop should be iterating over a list of interfaces. NET_RT_IFLIST2 ? var keys: [Int32] = [ CTL_NET, PF_LINK, NETLINK_GENERIC, IFMIB_IFDATA, Int32(i), IFDATA_GENERAL ] var mibData: ifmibdata = ifmibdata() var mibDataSize: size_t = MemoryLayout<ifmibdata>.size if sysctl(&keys, u_int(keys.count), &mibData, &mibDataSize, nil, 0) < 0 { logger.error("sysctl error getting mib data: \(String(describing: strerror(errno)))") } networkStatisticsData.totalInputPackets += mibData.ifmd_data.ifi_ipackets networkStatisticsData.totalOutputPackets += mibData.ifmd_data.ifi_opackets networkStatisticsData.totalInputBytes += mibData.ifmd_data.ifi_ibytes networkStatisticsData.totalOutputBytes += mibData.ifmd_data.ifi_obytes } return networkStatisticsData } } Any thoughts on how to iterate over all of the network interfaces (maybe using NET_RT_IFLIST2)? When I run ifconfig in the terminal, there are 24 interfaces, hence the reason for 24 in the for-loop.
Posted
by
Post not yet marked as solved
0 Replies
67 Views
Hi, Recently noticed this issue on Xcode 15.2 When I select a Test Plan, disable a class, enable just 1 test within that class and refresh the test plan the entire class gets enabled again. steps to notice the issue: Select Test Plan 1 Disable a class Enable 1 test within the class Select Test Plan 2 Select Test Plan 1 Disabled class and all the tests inside the class are enabled. Note: For now the workaround for that is disabling each test of the class individually Does anyone have any idea why this is happening? If theres a way to disable a class instead of disabling each test inside the class?
Posted
by
Post not yet marked as solved
1 Replies
65 Views
Hi, we recently noticed an issue when exporting the localization files from one of our projects. So in the exported .xliff file, there is a string that has been varied into the plural forms of zero, one and other. We had translated them into Japanese. But in the .xliff file, the source element of this string in plural ONE is missing, while the target as well as the others plural strings are showing correct. We've also checked in Xcode (15.3), the content of whether the source or target are there for all the plural forms, as you can see below. The same issue (same string) also exists in Korean and Russian, but not in other languages we support (like German, French, Chinese), which is a bit weird to us. Does anyone have any idea why this is happening and how can we fix it?
Posted
by

TestFlight Public Links

Get Started

Pinned Posts

Categories

See all