Search results for

Swift 6

49,193 results found

Post

Replies

Boosts

Views

Activity

Replace Apple Clang with Vanilla Clang, what can go wrong?
We are developing a cross platform c++ application. We also use some objective-c (no swift) and specific Apple frameworks like AVFoundation, CoreML in the MacOs version of our software. We use Apple Clang as compiler when building for MacOs. As our code is primarily c++ we would like to use the latest and greatest c++ 20 features. So we are looking into using vanilla clang instead, the builds with vanilla clang seem to work fine, however our concern is that we might have overlooked possible issues that could arise. So our question is whether there are specific things we need to address when switching compilers, are there things that we need to be aware of? In the end we just want to know if switching compilers won't cause problems we can't oversee. So we would like to know if others took the same steps and what your thoughts/experiences are regarding this?
1
0
61
1w
EXC_BAD_ACCESS (SIGSEGV) crash observed in NSDateFormatter APIs
(NSString*)getClienttime { NSDate* currentDate = [NSDate date]; NSDateFormatter* dateformatter = [[NSDateFormatter alloc] init]; dateformatter.timeZone = [NSTimeZone timeZoneForSecondsFromGMT:8*3600]; dateformatter.locale= [NSLocale systemLocale]; [dateformatter setDateFormat:@yyyy-MM-dd HH:mm:ss]; return [dateformatter stringFromDate:currentDate]?:@; } the info of crash 1 libicucore.A.dylib icu::UnicodeString::copyFrom(icu::UnicodeString const&, signed char) (in libicucore.A.dylib) + 36 2 libicucore.A.dylib icu::DecimalFormatSymbols::operator=(icu::DecimalFormatSymbols const&) (in libicucore.A.dylib) + 64 3 libicucore.A.dylib icu::DecimalFormatSymbols::operator=(icu::DecimalFormatSymbols const&) (in libicucore.A.dylib) + 64 4 libicucore.A.dylib icu::DecimalFormat::DecimalFormat(icu::DecimalFormat const&) (in libicucore.A.dylib) + 188 5 libicucore.A.dylib icu::DecimalFormat::clone() const (in libicucore.A.dylib) + 48 6 libicucore.A.dylib icu::NumberFormat::createInstance(icu::Locale c
Topic: UI Frameworks SubTopic: UIKit
0
0
87
1w
Swift to RN?
We are currently using Swift to develop our Apple application, and we are considering switching to a cross-platform solution as part of our technical evaluation. Recently, React Native (RN) has been revitalized, and it supports application hot updates, allowing us to update the app without going through the app store release process. Additionally, we have conducted some market research and found that many apps are using RN and leveraging its hot update functionality for app updates. I would like to know whether RN's hot update feature is compliant with Apple's policies and if there is any risk of the app being removed from the App Store. I hope to receive some guidance on this matter. Please do not delete this post—this is just a help-seeking post from an iOS developer without any malicious intent.
1
0
115
1w
Reply to Seeking clarification on macOS URLs with security scope
So, going through lots of details in no particular order: The entitlement com.apple.security.files.bookmarks.app-scope is not necessary and has no effect. Looking at our code, it's not that it’s unnecessary, it's actually that User selected read/write are both accepted as well. If you wanted to create a process that created bookmarks but didn't present open/save panels (for example, as a helper process), then you could use it. But what's confusing is this other, directly-related API where a security-scoped bookmark cannot be created under any circumstances because of the URL itself, some specific way the URL was initially created, and/or manipulated? So, the way to understand this is to invert the question, to Are there URLs which you're ALWAYS allowed to access?. The answer to that is yes. You can poke around to find other examples but they include directories like /Applications/, /Library/, and even /. Two notes on that: The right to access a given directory does NOT mean you have access to all of its subdi
Topic: App & System Services SubTopic: Core OS Tags:
1w
Reply to `onTapGesture` not triggered on `Map` views
I'm also seeing this problem with Swift Charts. This is with the latest Xcode 26 Beta 6 and iOS 26 Beta 8. This issue doesn't affect devices running iOS 18 and 17 from my testing. As such I've made this modifier which may help someone, hopefully I can remove it in the release seed but who knows! extension View { func CustomTapGesture(tapCount:Int = 1, perform action: @escaping () -> Void ) -> some View { modifier(TapGestureModifier(tapCount: tapCount, action: action)) } } struct TapGestureModifier: ViewModifier { var tapCount:Int = 1 var action: (() -> Void) func body(content: Content) -> some View { if #available(iOS 26.0, *) { content.simultaneousGesture(TapGesture(count: tapCount).onEnded { action() }) } else { content.onTapGesture(count: tapCount) { action() } } } } Which can be used like this: Text(Hello World) .CustomTapGesture(tapCount:2) { UIImpactFeedbackGenerator().impactOccurred() } To be clear, this doesn't work as well for iOS 26 users as the standard .onTapGesture b
Topic: UI Frameworks SubTopic: SwiftUI Tags:
1w
Reply to Should SwiftUI view models in Swift 6 be both @Observable and @MainActor?
[quote='855795022, EoinN, /thread/798211?answerId=855795022#855795022, /profile/EoinN'] My question is whether this behaviour was default or not for new Apps [/quote] As of Xcode 26.0b6 (17A5305f), creating a new project from the macOS > App template sets: Approachable Concurrency Default Actor Isolation to MainActor. However, there’s a wrinkle here. The language mode (Swift Language Version) still defaults to Swift 5. I expect that’ll change at some point, but AFAIK there’s been no official announcement about that. Share and Enjoy — Quinn “The Eskimo!” @ Developer Technical Support @ Apple let myEmail = eskimo + 1 + @ + apple.com
Topic: UI Frameworks SubTopic: SwiftUI Tags:
1w
False positive 'Deceptive Website' warning for personal domain
Hi everyone, i'm running into a problem with my personal domain being flagged as 'deceptive website' in safari, and i can't figure out how to fix it Domain: neon0404.space This is just my personal domain - i use it for adguard home, vaultwarden, some test stuff, sometimes small web tools for friends or family Nothing illegal or malicious has ever been hosted there On july 6, i launched a very simple web utility for a friend when he opened it on ios safari, he got the red 'deceptive website warning' I checked this on other different devices - all got the same warning The next day (july 7) i submitted a review request via websitereview.apple.com, but got no reply I did some digging and found that safari safe browsing daemon pulls data from google safe browsing, tencent safe browsing, and some apple's internal lists So, going one-by-one https://transparencyreport.google.com/safe-browsing/search showed up that domain is flagged for something shady Signed up in google search console and saw my domain was
Topic: Safari & Web SubTopic: General Tags:
1
0
708
1w
Verifying TLS 1.3 early_data behavior on iOS 26
Development environment Xcode 26.0 Beta 6 iOS 26 Simulator macOS 15.6.1 To verify TLS 1.3 session resumption behavior in URLSession, I configured URLSessionConfiguration as follows and sent an HTTP GET request: let config = URLSessionConfiguration.ephemeral config.tlsMinimumSupportedProtocolVersion = .TLSv13 config.tlsMaximumSupportedProtocolVersion = .TLSv13 config.httpMaximumConnectionsPerHost = 1 config.httpAdditionalHeaders = [Connection: close] config.enablesEarlyData = true let session = URLSession(configuration: config, delegate: nil, delegateQueue: nil) let url = URL(string: https://www.google.com)! var request = URLRequest(url: url) request.assumesHTTP3Capable = true request.httpMethod = GET let task = session.dataTask(with: request) { data, response, error in if let error = error { print(Error during URLSession data task: (error)) return } if let data = data, let responseString = String(data: data, encoding: .utf8) { print(Received data via URLSession: (responseString)) } else { print(No da
1
0
53
1w
iOS 26 Beta - AppStore.showManageSubscriptions() Shows Empty View Before StoreKit Sheet
Environment iOS Version: iOS 26 Beta 8 Xcode Version: iOS 26 Beta 6 StoreKit: StoreKit 2 Description When calling AppStore.showManageSubscriptions(in:) on iOS 26 beta, I'm experiencing an unusual presentation behavior that wasn't present in earlier versions. An empty/blank view appears first Then the actual StoreKit manage subscriptions sheet appears on top When dismissing the StoreKit sheet, it closes properly But then I have to dismiss the empty view underneath as well This creates a poor user experience showing double sheets. Code Sample @MainActor func showManageSubscriptions() { guard let scene = UIApplication.shared.connectedScenes .first(where: { $0 is UIWindowScene }) as? UIWindowScene else { return } Task { do { try await AppStore.showManageSubscriptions(in: scene) } catch { // Handle error } } } Expected Behavior The StoreKit manage subscriptions sheet should present directly without any intermediate empty view, as it did in previous iOS versions. Actual Behavior An empty view layer appears
3
0
28
1w
Misaligned visionOS Simulator Home Position
Using Xcode v26 Beta 6 on macOS v26 Beta 25a5349a When pressing on the home button of the visionOS simulator, I am not positioned in the middle of the room like would normally be. This occurred when moving a lot in the space to find an element added to an ImmersiveSpace. How to resolve: restart simulator device. See attached the pictures of the visionOSSimulatorCorrectHomePosition and the visionOSSimulatorMisallignedHomePosition.
2
0
849
1w
Reply to PKPassLibrary.requestAutomaticPassPresentationSuppression Behavior
Hi @RamiroDiaz-Latch, You wrote: In most cases, our code snippet works as expected, and the result is .success. However, we are also encountering other results, such as .denied, .alreadyPresenting, and .cancelled or .notSupported, which cause the Wallet to appear for users. [...] As @EtienneVTS mentioned, the API is intended to be used while an approved app is in the foreground. However, this requirement is indeed documented below: Use this method only in apps that must stay in the foreground when operating near NFC or other RF readers. This method prevents the device from automatically displaying the Apple Pay passes when it detects a compatible reader. This suppression occurs only while the app is in the foreground. The system automatically reenables the Apple Pay interface when the app goes to the background. If the app resumes, the system automatically suppresses the Apple Pay interface again. requestAutomaticPassPresentationSuppression(responseHandler:‍) https://developer.apple.com/documentation/passkit/
Topic: App & System Services SubTopic: Wallet Tags:
1w
NSProgressIndicator indeterminate bar does not work in Tahoe Beta 8
We have an app that uses a NSProgressIndicator indeterminate and it no longer animates on Tahoe (currently beta 8). I did a empty swift app using storyboards and added this to the view controller: override func viewDidLoad() { super.viewDidLoad() let progressIndicator=NSProgressIndicator.init(frame: NSMakeRect(0, 300, 400,20)) progressIndicator.style = .bar progressIndicator.isIndeterminate = true progressIndicator.isDisplayedWhenStopped=true self.view.addSubview(progressIndicator) progressIndicator.startAnimation(self) } Works fine in macOS 15, no animation in macOS 26. If I switch to the style to spinner, it animates fine. Filed feedback FB19933934
Topic: UI Frameworks SubTopic: AppKit
0
0
147
1w