Posts

Sort by:
Post not yet marked as solved
0 Replies
29 Views
I am trying to download XCode apps from my Mac to my Apple Vision Pro for testing. I have tried following the instructions by going into Settings->General->Remote Devices on my Apple Vision Pro, but there my Mac does not show up as a possible connection. I have made sure that both devices are connected to the same WiFi network, updated my Mac to Sonoma, and updated my AVP to the latest OS, and everything else that it asks for. I am able to mirror my display from my Mac but downloading apps from XCode does not work. I have also looked to enable Developer Mode by going to Settings -> Privacy & Security -> Enable Developer Mode, but there is no option for enabling developer mode here. I initially thought that it is a Bonjour Protocol compatibility issue since both devices are on university wifi (WPA2-Enterprise), but I also tried connecting both over a WPA2-Normal which also did not work.
Posted
by
Post not yet marked as solved
0 Replies
28 Views
Hello, I am writing as I am seeing a very strange behavior when attempting to run an HKStatisticsCollectionQuery over multiple app starts. Steps: Initially load and launch my app into an iOS simulator (running iOS 17.2) via Xcode (version 15.3). Execute code path which invokes the following method below. Authorize necessary Read permission for the HKQuantityTypeIdentifierStepCount type. Observed that a non-nil HKStatisticsCollection is returned in the initialResultsHandler, with corresponding expected datapoints. These datapoints are in no way stored or retained on the device at all. Stop the app via Xcode. Relaunch the app via Xcode. Execute the same code path as in step 2. Observed (via breakpoints) that even though the query is executed by the HKHealthStore, the initialResultsHandler is never called and no HKStatisticsCollection is ever returned. Input parameters are the same in both instances of the call, and can confirm there is data in the devices HealthKit datastore. I would expect, reading Apple's documentation, that both queries should execute and return the exact same datapoints in an HKStatisticsCollection, but please feel free to correct me if I am misunderstanding something, or if my code is incorrect in some way. func fetchStatisticsCollection(with quantityType: HKQuantityType, predicate: NSPredicate? = nil, options: HKStatisticsOptions, anchorDate: Date? = nil, interval: DateComponents? = nil, initialResultsCompletion: @escaping (Result<HKStatisticsCollection, Error>) -> Void, updateHandler: (Result<HKStatisticsCollection, Error>) -> Void?) { var statisticsQueryAnchorDate: Date = Date() if let anchor = anchorDate { statisticsQueryAnchorDate = anchor } else if let yesterdayAnchor = createStaticsQueryAnchorDateYesterday(){ statisticsQueryAnchorDate = yesterdayAnchor } let dateInterval = interval ?? DateComponents(day: 1) // Create the query let query = HKStatisticsCollectionQuery(quantityType: quantityType, quantitySamplePredicate: predicate, options: options, anchorDate: statisticsQueryAnchorDate, intervalComponents: dateInterval) // Set the results handler query.initialResultsHandler = { query, results, error in if let error = error as? HKError{ // Return wrapped HKError initialResultsCompletion(.failure(HealthKitManagerError.hkError(error: error))) return } guard let statsCollection = results else { // Return custom Empty Results error. initialResultsCompletion(.failure(HealthKitManagerError.emptyResults)) return } initialResultsCompletion(.success(statsCollection)) } if let updateHandler = updateHandler { query.statisticsUpdateHandler = { query, statistics, statisticsCollection, error in if let error = error as? HKError{ // Return custom wrapped HKError. updateHandler(.failure(HealthKitManagerError.hkError(error: error))) return } guard let statsCollection = statisticsCollection else { // Return custom Empty Results error. updateHandler(.failure(HealthKitManagerError.emptyResults)) return } updateHandler(.success(statsCollection)) } } if activeTypeQueries[quantityType.identifier] == nil { healthStore.execute(query) activeTypeQueries[quantityType.identifier] = query healthStore.enableBackgroundDelivery(for: quantityType, frequency: .immediate) { (success, error) in if let error = error { return } if success { print("background enabled") } } } else { print("NOT executing query, we already have one query running for this type") } } Thank you
Posted
by
Post not yet marked as solved
0 Replies
32 Views
I'm working on creating a locker app to lock the selected applications. After locking app, when you try to open the app a screen appears with the below message. Icon Restricted You can not use Facetime because it is restricted OK Button. How to customise this screen, another locker app is able to customise it and on a button click it redirects to their app to unlock it. also is there a way to get locked app names?
Posted
by
Post not yet marked as solved
0 Replies
38 Views
I am trying to present a GroupActivitySharingController using SwiftUI. I am using a NSViewControllerRepresentable: @State var event : Event func makeNSViewController(context: NSViewControllerRepresentableContext<MeetingGroupActivitySharingRepresentableView>) -> GroupActivitySharingController { return try! GroupActivitySharingController(MeetingGroupActivity(event: event)) } func updateNSViewController(_ nsViewController: GroupActivitySharingController , context: NSViewControllerRepresentableContext<MeetingGroupActivitySharingRepresentableView>) { print("Updating VC") } } I present it as following : .sheet(isPresented: $showGroupActivitySharingView) { MeetingGroupActivitySharingRepresentableView(event: observedEvent.event) } It works fine on iOS, however on MacOS, I cannot dismiss the view. I see the following error: dismissViewController:: Error: maybe this view controller was not presented? ( 0 CoreFoundation 0x000000019d75accc __exceptionPreprocess + 176 1 libobjc.A.dylib 0x000000019d242788 objc_exception_throw + 60 2 Foundation 0x000000019e8cbc6c -[NSCalendarDate initWithCoder:] + 0 3 AppKit 0x00000001a145a77c -[NSViewController dismissViewController:] + 224 4 _GroupActivities_AppKit 0x0000000232d65cf0 $s23_GroupActivities_AppKit0A25ActivitySharingControllerC011dismissViewG06resultyAA0aeF6ResultO_tFyyYaYbScMYccfU_TY0_ + 444 5 _GroupActivities_AppKit 0x0000000232d67b65 $s23_GroupActivities_AppKit0A25ActivitySharingControllerC011dismissViewG06resultyAA0aeF6ResultO_tFyyYaYbScMYccfU_TATQ0_ + 1 6 _GroupActivities_AppKit 0x0000000232d68bd9 $sIeghH_ytIeghHr_TRTQ0_ + 1 7 _GroupActivities_AppKit 0x0000000232d68bdd $sIeghH_ytIeghHr_TRTATQ0_ + 1 8 _GroupActivities_AppKit 0x0000000232d66931 $sxIeghHr_xs5Error_pIegHrzo_s8SendableRzs5NeverORs_r0_lTRyt_Tg5TQ0_ + 1 9 _GroupActivities_AppKit 0x0000000232d68ba5 $sxIeghHr_xs5Error_pIegHrzo_s8SendableRzs5NeverORs_r0_lTRyt_Tg5TATQ0_ + 1 10 libswift_Concurrency.dylib 0x0000000263cfb0f9 _ZL23completeTaskWithClosurePN5swift12AsyncContextEPNS_10SwiftErrorE + 1 ) Any idea what is going on?
Posted
by
Post not yet marked as solved
0 Replies
42 Views
Hello everyone! I recently started to think to introduce in my app SplitView for iPads instead of TabView which I currently have. But I would like to keep the TabView for iPhone and compact size class of iPad. I took my inspiration from a lot of Apple apps, like Apple Music or Photos. I was also looking at the Fruta app where similar technique is implemented, but that particular implementation does not fit my needs. The problem I’m having is that every time SplitView changes to TabView or vise versa the whole state of the app resets. I tried everything I could imagine, I couldn’t find a way to overcome this issue. The only thing I was able to fix is to maintain the same tab/list item selection, but everything else resets. Could anybody help me to resolve this issue? Thanks!
Posted
by
Post not yet marked as solved
0 Replies
42 Views
I am working on ScreenCaptureKit sample with SCContentSharingPickerObserver. My Target is SwiftUI based and calling Objective-C class method. I added [MyTarget]-Bridging.h and [MyTarget]-Swift.h I got compile error of unknown class name SCContentSharingPickerObserver in [MyTarget]-Swift.h. But I do not know how to fix this error since [MyTarget]-Swift.h is Xcode generated file. I set macOS target is 14.0, swift language ver is 5 Anyone know how to fix this error or waiting for Xcode update?
Posted
by
Post not yet marked as solved
0 Replies
41 Views
Hello, I have noticed an issue when using my web application via TestFlight on iOS devices. When I try to print through the application, a message "This action will take you outside the app, press OK to continue" appears. This message prevents the user from printing documents from the application. Steps to reproduce the issue: Open my web application via TestFlight on an iOS device. Press the print button in the application. Expected behavior: It is expected that the user can print documents from the web application via TestFlight without any obstacles. Actual behavior: When pressing the print button, a message "This action will take you outside the app, press OK to continue" appears, preventing printing.
Posted
by
Post not yet marked as solved
1 Replies
51 Views
I have an application that is being deployed outside of the AppStore using a PKG installer. Since our application has to be deployed outside the AppStore (for enterprise configuration requirements) we also need to handle updates outside the AppStore. I understand that SMJobBless function is now deprecated which seems to be how much open source software is implementing their privileged helpers namely Firefox. However, since I am already deploying my software using a PKG installer why should I use SMJobBless or the new version SMAppService rather than adding additional functionality to my postinstall script that will set up a LaunchDaemon to handle my automatic updates? The main issues that come to mind for me is that if a user were to delete our application rather than running the uninstall script the LaunchDaemon would still persist. Therefore we will likely need to handle that scenario and either have the LaunchDaemon recognize that and remove itself, or exit and do nothing. Additionally, I would be missing out on the security benefits that a service like SMJobBless provides by only allowing my AuthorizedClient to execute the privileged helper. On the other hand at least my LaunchDaemon would consistently work with older versions of macOS and I wouldn't be locked in to either supporting both SMJobBless and SMAppService or supporting only systems running macOS 13+. What have other people done to handle automatic updates when they can't deploy through the AppStore? Is just creating a LaunchDaemon a common path? How do people typically handle removing the LaunchDaemon if their application is uninstalled?
Posted
by
Post not yet marked as solved
0 Replies
50 Views
Input number always on the bottom for some reason. it's on display flex and before ios 17.4 it worked fine.
Posted
by
Post marked as solved
1 Replies
52 Views
Please run the following UIKit app. It uses a collection view with compositional layout (list layout) and a diffable data source. The collection view has one section with one row. The cell contains a text field that is pinned to its contentView. import UIKit class ViewController: UIViewController { var collectionView: UICollectionView! var dataSource: UICollectionViewDiffableDataSource<String, String>! override func viewDidLoad() { super.viewDidLoad() configureHierarchy() configureDataSource() } func configureHierarchy() { collectionView = .init(frame: .zero, collectionViewLayout: createLayout()) view.addSubview(collectionView) collectionView.frame = view.bounds } func createLayout() -> UICollectionViewLayout { UICollectionViewCompositionalLayout { section, layoutEnvironment in let config = UICollectionLayoutListConfiguration(appearance: .insetGrouped) return NSCollectionLayoutSection.list(using: config, layoutEnvironment: layoutEnvironment) } } func configureDataSource() { let cellRegistration = UICollectionView.CellRegistration<UICollectionViewListCell, String> { cell, indexPath, itemIdentifier in let textField = UITextField() textField.placeholder = "Placeholder" textField.font = .systemFont(ofSize: 100) cell.contentView.addSubview(textField) textField.pinToSuperview() } dataSource = .init(collectionView: collectionView) { collectionView, indexPath, itemIdentifier in collectionView.dequeueConfiguredReusableCell(using: cellRegistration, for: indexPath, item: itemIdentifier) } var snapshot = NSDiffableDataSourceSnapshot<String, String>() snapshot.appendSections(["main"]) snapshot.appendItems(["demo"]) dataSource.apply(snapshot, animatingDifferences: false) } } extension UIView { func pin( to object: CanBePinnedTo, top: CGFloat = 0, bottom: CGFloat = 0, leading: CGFloat = 0, trailing: CGFloat = 0 ) { self.translatesAutoresizingMaskIntoConstraints = false NSLayoutConstraint.activate([ self.topAnchor.constraint(equalTo: object.topAnchor, constant: top), self.bottomAnchor.constraint(equalTo: object.bottomAnchor, constant: bottom), self.leadingAnchor.constraint(equalTo: object.leadingAnchor, constant: leading), self.trailingAnchor.constraint(equalTo: object.trailingAnchor, constant: trailing), ]) } func pinToSuperview( top: CGFloat = 0, bottom: CGFloat = 0, leading: CGFloat = 0, trailing: CGFloat = 0, file: StaticString = #file, line: UInt = #line ) { guard let superview = self.superview else { print(">> \(#function) failed in file: \(String.localFilePath(from: file)), at line: \(line): could not find \(Self.self).superView.") return } self.pin(to: superview, top: top, bottom: bottom, leading: leading, trailing: trailing) } func pinToSuperview(constant c: CGFloat = 0, file: StaticString = #file, line: UInt = #line) { self.pinToSuperview(top: c, bottom: -c, leading: c, trailing: -c, file: file, line: line) } } @MainActor protocol CanBePinnedTo { var topAnchor: NSLayoutYAxisAnchor { get } var bottomAnchor: NSLayoutYAxisAnchor { get } var leadingAnchor: NSLayoutXAxisAnchor { get } var trailingAnchor: NSLayoutXAxisAnchor { get } } extension UIView: CanBePinnedTo { } extension UILayoutGuide: CanBePinnedTo { } extension String { static func localFilePath(from fullFilePath: StaticString = #file) -> Self { URL(fileURLWithPath: "\(fullFilePath)").lastPathComponent } } Unfortunately, as soon as I insert a leading view in the cell: let cellRegistration = UICollectionView.CellRegistration<UICollectionViewListCell, String> { cell, indexPath, itemIdentifier in let contentView = cell.contentView let leadingView = UIView() leadingView.backgroundColor = .systemRed let textField = UITextField() textField.placeholder = "Placeholder" textField.font = .systemFont(ofSize: 100) contentView.addSubview(leadingView) contentView.addSubview(textField) leadingView.translatesAutoresizingMaskIntoConstraints = false textField.translatesAutoresizingMaskIntoConstraints = false NSLayoutConstraint.activate([ leadingView.centerYAnchor.constraint(equalTo: contentView.layoutMarginsGuide.centerYAnchor), leadingView.leadingAnchor.constraint(equalTo: contentView.layoutMarginsGuide.leadingAnchor), leadingView.widthAnchor.constraint(equalTo: contentView.layoutMarginsGuide.heightAnchor), leadingView.heightAnchor.constraint(equalTo: contentView.layoutMarginsGuide.heightAnchor), textField.topAnchor.constraint(equalTo: contentView.topAnchor), textField.bottomAnchor.constraint(equalTo: contentView.bottomAnchor), textField.leadingAnchor.constraint(equalTo: leadingView.trailingAnchor, constant: 16), textField.trailingAnchor.constraint(equalTo: contentView.layoutMarginsGuide.trailingAnchor), textField.heightAnchor.constraint(greaterThanOrEqualToConstant: 44) ]) } the cell does not self-size, and in particular it does not accomodate the text field: What would be the best way to make the cell resize automatically?
Posted
by
Post not yet marked as solved
0 Replies
45 Views
im using the m2 MacBook Air, and for some odd reason, according to this test: https://www.testufo.com google runs at 60 hz while safari runs at 30 hz. I havent found a fix to this, and would like to know one. thanks.
Posted
by
Post not yet marked as solved
0 Replies
53 Views
The man page for getifaddrs states: The ifa_data field references address family specific data. For AF_LINK addresses it contains a pointer to the struct if_data (as defined in include file <net/if.h>) which contains various interface attributes and statistics. For all other address families, it contains a pointer to the struct ifa_data (as defined in include file <net/if.h>) which contains per-address interface statistics. I assume that "AF_LINK address" is the one that has AF_LINK in the p.ifa_addr.sa_family field. However I do not see "struct ifa_data" anywehere. Is this a documentation bug and if so how do I read this documentation right?
Posted
by
Post marked as solved
1 Replies
79 Views
I have a Swift project with some C code in it. The C code creates a byte array with about 600K elements. Compiling under Xcode, the compilation takes a really long time. When I try to run the code, it fails immediately upon startup. When I cut this large array out of the build, everything else works fine. Does anyone know what's going on here, and what I might do about it?
Posted
by
Post not yet marked as solved
0 Replies
63 Views
I have a Catalyst app that I'm adding a sidebar to via UISplitViewController. I have a toolbar on the window with buttons that I want to be enabled or disabled based on the state of the view controller in the split view's secondary column. But it seems to want to check the primary view controller instead. In the Catalyst tutorial Adding a Toolbar, this exact approach is demonstrated. The RecipeDetailViewController has methods for toggleFavorite and editRecipe, and the toolbar items are set up to reference those selectors in the ToolbarDelegate class. In the screenshots in the tutorial, the buttons are shown as enabled based on RecipeDetailViewController.canPerformAction. But when I download and run the complete project on my computer (macOS 14.4.1), the toolbar items are disabled. And if I add the methods to the RecipeListViewController (which is in the primary column of the UISplitViewController, the toolbar items get enabled. Is there a way to make the system ask the correct split view column for canPerformAction? Or is this a bug?
Posted
by
Post marked as solved
1 Replies
61 Views
error: unable to read property list from file: /Users/jayengineer/Workspace/react_projects/Breached/ios/Breached/Info.plist: The operation couldn’t be completed. (XCBUtil.PropertyListConversionError error 2.) (in target 'Breached' from project 'Breached') <?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>CADisableMinimumFrameDurationOnPhone</key> <true/> <key>CFBundleDevelopmentRegion</key> <string>$(DEVELOPMENT_LANGUAGE)</string> <key>CFBundleDisplayName</key> <string>Breached</string> <key>CFBundleExecutable</key> <string>$(EXECUTABLE_NAME)</string> <key>CFBundleIdentifier</key> <string>$(PRODUCT_BUNDLE_IDENTIFIER)</string> <key>CFBundleInfoDictionaryVersion</key> <string>6.0</string> <key>CFBundleName</key> <string>$(PRODUCT_NAME)</string> <key>CFBundlePackageType</key> <string>$(PRODUCT_BUNDLE_PACKAGE_TYPE)</string> <key>CFBundleShortVersionString</key> <string>1.0.4/string> <key>CFBundleSignature</key> <string>????</string> <key>CFBundleURLTypes</key> <array> <dict> <key>CFBundleURLSchemes</key> <array> <string>com.jay754.Breached</string> </array> </dict> </array> <key>CFBundleVersion</key> <string>1</string> <key>LSApplicationCategoryType</key> <string></string> <key>LSRequiresIPhoneOS</key> <true/> <key>NSAppTransportSecurity</key> <dict> <key>NSAllowsArbitraryLoads</key> <false/> <key>NSAllowsLocalNetworking</key> <true/> </dict> <key>UILaunchStoryboardName</key> <string>SplashScreen</string> <key>UIRequiredDeviceCapabilities</key> <array> <string>armv7</string> </array> <key>UIRequiresFullScreen</key> <false/> <key>UIStatusBarStyle</key> <string>UIStatusBarStyleDefault</string> <key>UISupportedInterfaceOrientations</key> <array> <string>UIInterfaceOrientationPortrait</string> <string>UIInterfaceOrientationPortraitUpsideDown</string> </array> <key>UISupportedInterfaceOrientations~ipad</key> <array> <string>UIInterfaceOrientationPortrait</string> <string>UIInterfaceOrientationPortraitUpsideDown</string> <string>UIInterfaceOrientationLandscapeLeft</string> <string>UIInterfaceOrientationLandscapeRight</string> </array> <key>UIUserInterfaceStyle</key> <string>Light</string> <key>UIViewControllerBasedStatusBarAppearance</key> <false/> </dict> </plist>
Posted
by
Post marked as solved
1 Replies
55 Views
Everything works as expected until I add the paging behavior to the scrollView with a non-zero content margin. The paging behavior ends up not being centered on the cards. Here is a simple example: import SwiftUI struct CarouselView: View { var body: some View { ScrollView(.horizontal, showsIndicators: false) { HStack(spacing: 0) { ForEach(0 ..< 5, id: \.self) { _ in RoundedRectangle(cornerRadius: 25) .fill(.ultraThinMaterial) .containerRelativeFrame(.horizontal) .scrollTransition(axis: .horizontal, transition: { content, phase in content .scaleEffect(x: phase.isIdentity ? 1 : 0.8, y: phase.isIdentity ? 1 : 0.8) }) } } .scrollTargetLayout() } .scrollTargetBehavior(.paging) .contentMargins(60) // NOTE: I want to see the sides of the next and previous card .background(Gradient(colors: [.purple, .red])) } } Thanks!
Posted
by
Post not yet marked as solved
0 Replies
58 Views
error: unable to read property list from file: /Users/jayengineer/Workspace/react_projects/Breached/ios/Breached/Info.plist: The operation couldn’t be completed. (XCBUtil.PropertyListConversionError error 2.) (in target 'Breached' from project 'Breached'). Info.plist
Posted
by
Post not yet marked as solved
0 Replies
58 Views
Hi, we have an app that has been in development since Catalina and ever since Sonoma came out we noticed that when executing our pkg installer the application is installed correctly but the postinstall script is not executed. The weird thing is that if I run the pkg for the first time the postinstall does not execute BUT if I run it again then it DOES!! Looking through the logs I found these ones that confirm the execution of the script is being blocked. We haven't changed anything in the way we build the installer so I'm not quite sure how to fix this. 2024-04-25 16:29:51.570662-0300 0x1c62 Error 0x0 308 0 syspolicyd: [com.apple.syspolicy.exec:default] Unable (errno: 2) to read file at <private> for pid: 784 process path: <private> library path: (null) 2024-04-25 16:29:51.570662-0300 0x1c62 Error 0x0 308 0 syspolicyd: [com.apple.syspolicy.exec:default] Terminating process due to Malware rejection: 784, <private> 2024-04-25 16:29:51.570679-0300 0x1d13 Default 0x0 0 0 kernel: (AppleSystemPolicy) ASP: Sleep interrupted, signal 0x100 2024-04-25 16:29:51.570682-0300 0x1d13 Default 0x0 0 0 kernel: (AppleSystemPolicy) ASP: Security policy would not allow process: 784, /private/tmp/PKInstallSandbox.m5Av3O/Scripts/com.mycompany.myapp.pkg.BSOjtt/postinstall The app as well as the installer are both signed, notarized and stapled. Here you can see the script which just simply executes the app. #!/bin/bash echo "Running postinstall" /Applications/myapp.app/Contents/MacOS/myapp --load-system-extension & exit 0 Any help would be much appreciated. Thanks!
Posted
by
Post not yet marked as solved
0 Replies
57 Views
Hey guys, I'm having an issue while trying to enrol myself in apple developer program. When I submit my information, I can only see an error saying "Your enrollment in the Apple Developer Program could not be completed at this time." And this is an infinite loop. How I can get myself enrolled in the program now? Is my region (Pakistan) is blocked for enrollment or I'm doing something wrong?
Posted
by
Post not yet marked as solved
0 Replies
60 Views
Is the timeout for session-level authentication challenge handling documented somewhere? For example, if I get the urlSession(_:didReceive:) callback for server trust authentication, how long do I have to invoke the completion handler (or return from the callback if using Swift Concurrency)? Or is this completely dependent on the server's settings?
Posted
by

TestFlight Public Links

Get Started

Pinned Posts

Categories

See all