Overview

Post

Replies

Boosts

Views

Activity

Xcode cloud setup not working
I finally signed up for Xcode cloud, but it doesn't work after successful GitHub app installation. 401 in the console for: https://appstoreconnect.apple.com/olympus/v1/providerSwitchRequests I tried multiple things, even wrote to apple. Is it only for payed GitHub users? I have a free private repo. Hope someone has an idea. This is the error message when I give Xcode Cloud access to all repositories: Die Verbindung von Xcode Cloud mit deinem Quellcodeverwaltungsanbieter konnte nicht erstellt werden. Translation: The connection from Xcode Cloud to your source code management provider could not be established.
0
0
14
52m
Problem with new UITabbarController on IOS 18 beta (Bug?)
In my project, I create a UITabbarController using the storyboard. Later, I change the images and title of the individual tabbar items in the code. This works with the new tabbar controller from iOS 18, with one exception: If the iPad switches to a horizontally compact mode and thereby triggers the old tabbar (at the bottom of the screen), the images and titles from the storyboard appear there, not the values ​​changed in the code. Am I doing something wrong or is this a bug?
1
0
35
3h
How to create screen-space meshes selectively in RealityKit AR Mode Using New OrthographicCameraComponent?
I'd like to create meshes in RealityKit ( AR mode on iPad ) in screen-space, i.e. for UI. I noticed a lot of useful new functionality in RealityKit for the next OS versions, including the OrthographicCameraComponent here: https://developer.apple.com/documentation/realitykit/orthographiccameracomponent?changes=_3 I think this would help, but I need AR worldtracking as well as a regular perspective camera to work with the 3D elements. Firstly, can I have a camera attached selectively to a few entities, just for those entities? This could be the orthographic camera. Secondly, can I make it so those entities are always rendered in-front, in screenspace? (They'd need to follow the camera.) If I can't have multiple cameras, what can be done in that case? Is it actually better to use a completely different view / API for layering on-top of RealityKit? I would much rather keep everything in RealityKit, however, for simplicity.
0
0
33
5h
Is the issue of code-theft via decompilation or reverse engineering common for Swift iOS apps? And can I protect a small portion of my code?
I'm a new app developer and I've read through most relevant posts on this topic here and elsewhere. Many of the forum posts here are specific to Objective-C, or old enough to be considered outdated in the fast-moving world of computing. Many of the posts elsewhere are about protecting authentication secrets, which doesn't apply in my case, and a lot are by someone with a product to sell, which I've ignored. My app is 99.9% Swift and I'm not going to store any authentication secrets in the IPA. What I'd like to protect is the core mechanism of my product, which has to be included in the binary and is small (< 10k lines). I want to make it so it's harder to steal the source code than it is to recreate my functionality from scratch, which is difficult even with the app in front of them. From what I gathered, Swift code compiled by Xcode is protected from reverse engineering / decompilation by the following: Symbolization of the app Native builds from Xcode destroys names of variable, functions, etc. Swift code is compiled in such a way that makes stealing harder than Objective-C This should make me feel better, but the threat-level is increasing with the availability of free, commercial-grade decompilers (e.g. Ghidra) and machine learning. The fact that iOS 18 supports a checkm8 (i.e. jailbreakable) device means that decrypting the IPA from memory is still trivial. Questions People talk about stealing authentication secrets via reverse-engineering, but is the same true for mechanisms (i.e. code)? How common is the issue of source-code stealing in iOS apps? Can machine learning be leveraged to make decompilation/reverse engineering easier? Will I get rejected by App Review for obfuscating a small portion of my code?
1
0
53
6h
.searchble Keyboard Incorrectly Showing After Presenting Popup
I have a list view that is accessed by pressing a button from a pervious view, all are which are in a NavigationView from the Main view. For this list view I have applied the .searchable tag to allow users to search through the list. When a user taps on an item in the list a .sheet will present to present a more detailed overview. The issue happens that if a user searches for an item in the list, and taps on the item to present the sheet the keyboard will disappear while the sheet presents but then pop back up despite still editing the search bar on the list view. Currently, my view is roughly set up like this. var body: some View { ThemesListView } .sheet(item: $presentedSheetTheme, onDismiss: { fetchedThemes.nsSortDescriptors = themeListSort.nsSortDescriptorObject }) {themeToPassOn in EditThemeView(themeToEdit: themeToPassOn) } var ThemesListView: some View { List { Button(action: { presentedSheetTheme = theme } } .searchable(text: query, placement: .navigationBarDrawer(displayMode: .always)) } I have tried many things to fix this, even finding this thread (https://forums.developer.apple.com/forums/thread/746826) however none of the solutions were any help. Here is a link (https://imgur.com/a/KKJ27iY) to a video of the issue. This issue seems to be fixed in some iOS versions such as 17.0 and 18.0 Beta 1 however many other versions such as 17.4 or 17.5 still experience this issue meaning I still need to fix it for these versions. Any help would be greatly appreciated, thanks!
0
0
35
7h
Scheme Setting Not Persisting For Associated Target
I have an Xcode 15.4 project with 4 targets (i.e. 2 UI and 2 CLI). Next, I'm looking to set a unique scheme for each target but it keeps changing to one of the previously set schemes. For example, I have the following four targets and I would like to have the associated: Target 1 - > Scheme 1 Target 2 -> Scheme 2 Target 3 -> Scheme 3 Target 4 -> Scheme 4 When the target is selected, shouldn't the corresponding scheme be updated in the Xcode toolbar? Or is there a setting that I'm missing to enable/disable within Xcode that would resolve this issue? Finally, I'm seeing similar behavior in Xcode 16 beta 1.
0
0
47
8h
UITextView with large `textContainerInset` scrolls upwards when selecting text
Whenever a UITextView has a large textContainerInset it starts scrolling upwards rapidly when selecting text. For my use case, I have a custom view that I display in the text view to show the comment you are writing a reply to. To accomplish this, I use the textContainerInset and set the top portion of that inset to a large value. Here is a video showing the issue: https://streamable.com/9z57ok I've also made a very simple sample project to demonstrate and here is the main view controller code: https://gist.github.com/rickharrison/9cf563bcb22130bfafc7d3b5d37c55f2 Is it possible to disable scrolling of the UITextView while the selection UI is shown? Or is there another way I should inset the text to edit? I found another thread with this issue from years ago, but no solution - https://developer.apple.com/forums/thread/129882
0
0
39
8h
IDE generated *varname problem
When Xcode IDE inserts IBOutlet or autocompletes method signatures, it places the * char next to the var name: @property (weak) IBOutlet NSButton *aButton; - (NSString *)someMethod:(NSString *)param1 { } But my convention is put the * char right after the type name: @property (weak) IBOutlet NSButton* aButton; - (NSString*)someMethod:(NSString*)param1 { } Is there anyway to tell Xcode to follow my convention?
0
0
40
9h
Using a scene from Reality Composer Pro in an IOS app?
I am trying to establish a workflow with using Reality Composer Pro to make scenes - I am grey boxing a scene using primitives at the moment. I have set up a cube with a texture material and a simple animation to spin. I am confused as to what I should be loading. I have created what I think is a scene asset in the package for the Reality Composer Project. Here is a code snippet: struct ContentView: View { var body: some View { RealityView { content in do { let scene = try await ModelEntity(named: "HOF") content.add(scene) } catch { print("Error loading scene: \(error.localizedDescription)") } } } } Here is the project layout in Reality Composer Pro:
1
0
49
11h
NavigationBar Back Button Color
I am trying to change the colour of the "Back" from blue to white but having difficulty do so, if anyone can suggest me a better way to do it would be grateful. "import UIKit class AppDelegate: UIResponder, UIApplicationDelegate { var window: UIWindow? func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { let appearance = UINavigationBarAppearance() appearance.configureWithOpaqueBackground() appearance.backgroundColor = UIColor(red: 0.216, green: 0.776, blue: 0.349, alpha: 1) appearance.titleTextAttributes = [.foregroundColor: UIColor.white] appearance.largeTitleTextAttributes = [.foregroundColor: UIColor.white] UINavigationBar.appearance().standardAppearance = appearance UINavigationBar.appearance().scrollEdgeAppearance = appearance UINavigationBar.appearance().tintColor = .white return true } }"
0
0
48
12h
SwiftData crashes on insert (Swift 6, Xcode 16, macOS 15)
I'm trying to insert values into my SwiftData container but it crashes on insert context.insert(fhirObject) and the only error I get from Xcode is: @Transient private var _hkID: _SwiftDataNoType? // original-source-range: /Users/cyril/Documents/GitHub/MyApp/MyApp/HealthKit/FHIR/FHIRModels.swift:35:20-35:20 configured as follows: import SwiftData import SwiftUI @main struct MyApp: App { var container: ModelContainer init() { do { let config = ModelConfiguration(cloudKitDatabase: .private("iCloud.com.author.MyApp")) container = try ModelContainer(for: FHIRObservation.self, configurations: config) UserData.shared = UserData(modelContainer: container) } catch { fatalError("Failed to configure SwiftData container.") } } var body: some Scene { WindowGroup { ContentView() .environmentObject(UserData.shared) } .modelContainer(container) } } My UserData and DataStore are configured as follows: import SwiftUI import SwiftData import os /// `FHIRDataStore` is an actor responsible for updating the SwiftData db as needed on the background thread. private actor FHIRDataStore { let logger = Logger( subsystem: "com.author.MyApp.FHIRDataStore", category: "ModelIO") private let container: ModelContainer init(container: ModelContainer) { self.container = container } func update(newObservations: [FHIRObservationWrapper], deletedObservations: [UUID]) async throws { let context = ModelContext(container) // [FHIRObservationWrapper] -> [FHIRObservation] // let modelUpdates = newObservations.lazy.map { sample in // FHIRObservation(hkID: sample.hkID, fhirID: sample.fhirID, name: sample.name, status: sample.status, code: sample.code, value: sample.value, range: sample.range, lastUpdated: sample.lastUpdated) // } do { try context.transaction { for sample in newObservations { let fhirObject = FHIRObservation(hkID: sample.hkID, fhirID: sample.fhirID, name: sample.name, status: sample.status, code: sample.code, value: sample.value, range: sample.range, lastUpdated: sample.lastUpdated) // App crashes here context.insert(fhirObject) } // for obj in modelUpdates { // // } // try context.delete(model: FHIRObservation.self, where: #Predicate { sample in // deletedObservations.contains(sample.hkID!) // }) // try context.save() logger.debug("Database updated successfully with new and deleted observations.") } } catch { logger.debug("Catch me bro: \(error.localizedDescription)") } } } @MainActor public class UserData: ObservableObject { let userDataLogger = Logger( subsystem: "com.author.MyApp.UserData", category: "Model") public static var shared: UserData! // MARK: - Properties public lazy var healthKitManager = HKManager(withModel: self) let modelContainer: ModelContainer private var store: FHIRDataStore init(modelContainer: ModelContainer) { self.modelContainer = modelContainer self.store = FHIRDataStore(container: modelContainer) } // MARK: - Methods func updateObservations(newObservations: [FHIRObservationWrapper], deletedObservations: [UUID]) { Task { do { try await store.update(newObservations: newObservations, deletedObservations: deletedObservations) userDataLogger.debug("Observations updated successfully.") } catch { userDataLogger.error("Failed to update observations: \(error.localizedDescription)") } } } } My @Model is configured as follows: public struct FHIRObservationWrapper: Sendable { let hkID: UUID let fhirID: String var name: String var status: String var code: FHIRCodeableConcept var value: FHIRLabValueType var range: FHIRLabRange? var lastUpdated: Date? } @Model public final class FHIRObservation { let hkID: UUID? let fhirID: String? @Attribute(.allowsCloudEncryption) var name: String? @Attribute(.allowsCloudEncryption) var status: String? @Attribute(.allowsCloudEncryption) var code: FHIRCodeableConcept? @Attribute(.allowsCloudEncryption) var value: FHIRLabValueType? @Attribute(.allowsCloudEncryption) var range: FHIRLabRange? @Attribute(.allowsCloudEncryption) var lastUpdated: Date? init(hkID: UUID?, fhirID: String?, name: String? = nil, status: String? = nil, code: FHIRCodeableConcept? = nil, value: FHIRLabValueType? = nil, range: FHIRLabRange? = nil, lastUpdated: Date? = nil) { self.hkID = hkID self.fhirID = fhirID self.name = name self.status = status self.code = code self.value = value self.range = range self.lastUpdated = lastUpdated } } Any help would be greatly appreciated!
2
0
64
13h
Mac UI Tests Failing to Detect Out-of-Hierarchy Elements
Overview macOS test application is unable to detect elements beyond a certain length during UI testing after an Xcode(14/15) update. Issue Description We have a test app for both iOS and macOS, sharing the same code except for different UI implementations. During UI tests, the app opens a webpage in WKWebView. This is a long webpage with multiple sections, approximately 200 for the sake of clarity. The app screen can show 4 elements at a time. Our UI tests navigate to each section and perform various tasks. Since upgrading from Xcode 13 to 15, we've encountered an issue specifically on macOS (unsure if it's related to Swift or Xcode). Our Mac UI test i.e. XCUIApplication() is unable to find elements beyond a certain length, which appear to be out of the view hierarchy. When we use app.debugDescription, it only returns 180 sections, missing the last 20. The HTML code of the webpage is consistent, with all sections structured similarly. Troubleshooting Steps Accessibility Inspector: Using Xcode’s Accessibility Inspector yields the same result, detecting only 180 sections. Manual Scrolling: We tried manually scrolling to the missing sections. Although we can see these sections on the screen, app.debugDescription still only reports 180 sections, causing the UI test to fail in recognizing the last 20 sections. Deleting Sections: If we delete the top 20 sections of the webpage, it can then find the 200th element. This suggests we might be hitting some limit or restriction we are not aware of. However, on iOS, the same webpage returns all 200 sections without issue. Additional Information This issue is causing a problem only on the Mac app. In our Cocoa Mac application, we are using NSTabView, if that information helps with the investigation. We are wondering if there are any settings or flags we might have missed? Request for Assistance Any help would be greatly appreciated, as this issue is currently blocking us and it was working fine in the previous version. Question Is there any way we can bring those 20 elements into the hierarchy?
0
0
50
13h
SceneKit or RealityKit for Non-AR Game Development
Hi everyone, I'm choosing a framework for developing a game that doesn't involve augmented reality (AR) and I'm unsure whether to use SceneKit or RealityKit. I would like to hear from Apple engineers on this matter. Which of these frameworks is better suited for creating non-AR games? Additionally, I'd like to know if it's possible to disable AR in RealityKit using the updated RealityView? Thanks in advance for your insights and recommendations!
1
0
81
13h
Retrieving Zip/Postal Code from Subscriptions and In-App Purchases
Hi, I'm currently working on a application on the server-side that is attempting to generate analytics from our application's user's subscription and in-app purchases. One of the pieces of information that we need is the purchaser's zip/postal code for financial reporting. I noticed Google provides this information in their monthly earnings reports, but Apple seems to omit this field. That being said, is possible to obtain a purchaser's postal/zip code through an api, server notifications, or anything?
0
0
39
14h