Apple Developers

RSS for tag

This is a dedicated space for developers to connect, share ideas, collaborate, and ask questions. Introduce yourself, network with other developers, and foster a supportive community.

Learn More

Posts under Apple Developers subtopic

Post

Replies

Boosts

Views

Activity

Scan feature on Iphone 16 or ios18.2
I use the scan feature notes frequently. Steps were: open app click paperclick click scan documents scan save then I share to my email. click mail icon on then I would normally be given a size to choose from small, medium or large it would ask about the subject which I always let blank. With my new phone/updated ios I am given an option to to mail drop or attach document. I have done both and my document size is large. I need to minimize to 25% to fit on computer screen. I spoke to apple support. How do I fix this?
1
0
645
Dec ’24
Stuck using variable in the tex statement
I have two simple tests initially triggered by a title of a game setting: "Highest score Wins" or rule.hasSuffix("wins."). The code in both cases looks for the highest score and in the latter case checks to see if a target score has been achieved. This work fine. But when I display the final results, the first works fine and the latter fails to display the name; defaulting to the No One Wins - which is incorrect. The relevant pieces of the code are: case rule == "Highest score Wins": // Find the highest score let maxScore = scores.max(by: { $0.1 < $1.1 })?.1 ?? 0 let topScorers = scores.filter { $0.1 == maxScore } gameIsDraw = topScorers.count > 1 winner = topScorers.count == 1 ? topScorers.first?.0 : nil // This work and will display the winner name correctly - see below case rule.hasSuffix("wins."): // "Player to reach X wins." let topScorers = scores.filter { $0.1 >= target } if !topScorers.isEmpty { let maxScore = scores.max(by: { $0.1 < $1.1 })?.1 ?? 0 let topScorers = scores.filter { $0.1 == maxScore } gameIsDraw = topScorers.count > 1 winner = topScorers.count == 1 ? topScorers.first?.0 : nil // This works but does not display the name //This is the section that displays the names (winner) if gameIsDraw { Text("The Game is a Draw") .font(.largeTitle) .bold() .foregroundColor(.orange) } else { Text("Game Over!") .font(.largeTitle) .bold() Text("\(winner?.playername ?? "No One") Wins!") .font(.title) .foregroundColor(.green) } I have tried everything, but am losing the will to live
10
0
457
Dec ’24
Fixed MacOS App Windows / Sizing Windows
Hi, i am trying to design an absolutely simple MacOS app whose window cannot be changed or can only be changed to a certain extent. So by grabbing the borders, edges and corners. Unfortunately, it doesn't work at all. The Apple documentation is quite straightforward: https://developer.apple.com/documentation/visionOS/positioning-and-sizing-windows Work with XCode 16.2 on Mac Mini M1 with MacOS 15.2 ... and less developer experience ;-) Does anyone have any ideas? Does it perhaps not comply with the UI guidelines? Greetings, Oliver
1
0
372
Dec ’24
How to learn Xcode as a beginner
Hi All, I am from a non tech background and always felt a need that I am missing on the most interesting skills in today's world. I wish to learn Xcode to build applications and much more. Could any of you kindly suggest how I can learn and engage online. Thank You Govind
1
0
451
Dec ’24
Organisation Developer Account query.
For the enrolment of Apple Developer Program as a organisation it is mandatory to have a website with domain of our organisation. Here my organisation name is A and our brand name is B. We have website and domain for the brand name but we don't have domain name with organisation name A. Will it create any issue for the enrolment of Apple Developer Program as a organisation? Should we buy a new domain similar to our organisation name A?
1
0
341
Dec ’24
Error when copying Home Directory
I am trying to move my home directory to a secondary drive, but I am running into to two issues. When I try to do it via Finder I get the error - The operation can’t be completed because “<my account name>” needs to be downloaded. And when I try to do it via the terminal in recovery mode (after mounting the Data directory), It seems to copy a set of directories within ~/Library/Daemon Containers/. These appear to be snapshots of some sort, which when cp runs, end up taking up the entire drive of the target drive, which is 4 times larger than my base volume. Two questions: Why I am getting the message via finder (and how do I get around it? What is the correct process for moving the home directory to a second drive? Thanks!
0
0
458
Dec ’24
Filter a list of Item objects on a related Product Object passed as a Bindable
I'm currently developing a SwiftUI application that utilizes SwiftData for data management. I am facing a challenge when trying to filter a query. Specifically, I want to filter a list of Item objects to match a Product instance that is passed to my View. error : Instance member 'product' cannot be used on type 'MainItemListEncap'; did you mean to use a value of this type instead The view // // 311.1.1. MainRefToItem.swift // ComparePrice // // Created by Herman VAN CAUWELAERT on 11/12/2024. // import SwiftUI import SwiftData struct MainItemListEncap: View { @Bindable var product: Product @Query( filter: #Predicate { item in item.productGroup == product }, sort: [SortDescriptor(\Item.name)] ) var items: [Item] @Environment(\.modelContext) var modelContext var body: some View { ForEach(items) { item in VStack(alignment: .leading) { Text(item.name) Text(item.description) } } } } the product class. import SwiftData import Foundation @Model final class Product: CustomStringConvertible, CustomDebugStringConvertible { @Attribute(.unique) var productName: String var productDescription: String var outputCurrency: String // Gebruik een `String` als opslag voor `outputSystem` var outputSystemRawValue: String = MeasurementSystem.metric.rawValue // Computed property om `MeasurementSystem` te gebruiken var outputSystem: MeasurementSystem { get { MeasurementSystem(rawValue: outputSystemRawValue) } set { outputSystemRawValue = newValue.rawValue } } // er zijn verschillend item versies voor een product // als er een hoofdproduct gedelete wordt, dan zullen alle onderliggende items ook gedelete worden @Relationship(deleteRule: .cascade, inverse: \Item.productGroup) var refToItems = [Item]() init(productName: String = "", productDescription: String = "what is this product", outputCurrency: String = "EUR", outputSystem: MeasurementSystem = MeasurementSystem.metric) { self.productName = productName self.productDescription = productDescription self.outputCurrency = outputCurrency self.outputSystem = outputSystem } } the item class import Foundation import SwiftData @Model final class Item: CustomStringConvertible, CustomDebugStringConvertible { var timestamp: Date @Attribute(.unique) var name: String var productGroup: Product? var shop: String //TODO: becomes Shop var price: Double var currency: String var quantity: Double var unit: String //TODO: becomes Unit var isShown : Bool var minimumQuantity: String var rateStr: String { conversionRate != nil ? " (rate: \(ValueFormatter.shared.format(conversionRate!)))" : "" } init(timestamp: Date = Date() , name: String , shop: String = "Colruyt" , price:Double = 1.00 , currency: String = "EUR" , quantity: Double = 1.0 , unit: String = "g" , isShown:Bool = true , conversionRate: Decimal? = 1 , minimumQuantity: String = "1" ) { self.timestamp = timestamp self.name = name self.shop = shop self.price = price self.currency = currency self.quantity = quantity self.unit = unit self.isShown = isShown self.conversionRate = conversionRate self.minimumQuantity = minimumQuantity } }
2
0
357
Dec ’24
Rejected After 40 Days with a US LLC for Publishing App on Google Play: Anyone with Similar Experience?
Hi everyone, I’m a developer from Argentina, and I recently attempted to publish my app on Google Play under a US LLC. I submitted all the required documentation and followed the process step-by-step. After 40 days of back-and-forth communication and providing all the requested information, my application was ultimately rejected without a clear explanation. I understand that having a US company and bank account is a requirement for developers like me to operate internationally, but this rejection has left me quite confused about what went wrong. Has anyone else faced a similar situation? If so, how did you resolve it? Any advice or guidance would be greatly appreciated! Thanks in advance!
0
0
251
Dec ’24
Textview/textfield crash by undoManager
Fatal Exception: NSInternalInconsistencyException 0 CoreFoundation 0x2d5ec __exceptionPreprocess 1 libobjc.A.dylib 0x31244 objc_exception_throw 2 Foundation 0x8b58b8 -[NSUndoManager endUndoGrouping] 3 Foundation 0x279154 __NSFirePerformWithOrder 4 CoreFoundation 0x21894 CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION 5 CoreFoundation 0x213e8 __CFRunLoopDoObservers 6 CoreFoundation 0x75cf8 __CFRunLoopRun 7 CoreFoundation 0xc8274 CFRunLoopRunSpecific 8 GraphicsServices 0x14c0 GSEventRunModal 9 UIKitCore 0x3ee77c -[UIApplication _run] 10 UIKitCore 0x14e64 UIApplicationMain 11 Glip 0x70398 main + 13 (main.swift:13) 12 ??? 0x1c060cde8 (Missing)
2
0
847
Dec ’24
Enrollment Issue
“At this rate, I’m starting to get frustrated. I’ve registered for the developer program twice, but they’re still asking me for the registration fee, and my registration is not being approved. Moreover, I haven’t received any response to my emails, and since the information is limited in English, I can’t search for solutions. Could someone please take care of this issue now?”
0
0
374
Dec ’24
Change Dev Account "Enrolled As" Status
I'm a developer that has only produced for a single company. Though my developer account shows me as the account holder, my "Enrolled as" status is "Organization," and the "Entity" field shows the name of that company. I want to build an app for a separate company/organization, but unsure how to proceed. My App Store Connect account shows the original company name beneath my name as the only option in the account ID selector menu, so when I begin the New App process it automatically assumes I'm doing it for that company. Can I change my "Enrolled as" status to something independent of any organization, do I need to create a completely separate account to do this, or how should I proceed? Any help would be appreciated. Thanks.
0
0
388
Dec ’24
NO SOUND
My iPad 7th generation updated to iOS 18.3 I’m getting the loading 5 bar symbol and No sound at all . Tried hard resetting multiple time and nothing works
3
3
420
Dec ’24
App Automatically Logging Out for Some Users
Hello, We’re experiencing an issue in our app where a subset of users are being logged out automatically without any apparent reason. This is impacting both iOS 16 and iOS 17 users (though it’s hard to confirm if it’s platform-specific). Here’s a breakdown of the situation: Symptoms Some users report being logged out of the app randomly, even after remaining active. The issue doesn’t seem to affect all users—just a specific subset. Users are prompted to log in again, and once they do, the app behaves as expected until the issue recurs.
1
0
529
Dec ’24
Turning on setVoiceProcessingEnabled bumps channel count to 5
Hi all, The use of setVoiceProcessingEnabled increases the channel count of my microphone audio from 1 to 5. This has downstream effects, because when I use AVAudioConverter to convert between PCM buffer types the output buffer contains only silence. Here is a reproduction showing the channel growth from 1 to 5: let avAudioEngine: AVAudioEngine = AVAudioEngine() let inputNode = avAudioEngine.inputNode print(inputNode.inputFormat(forBus: 0)) // Prints <AVAudioFormat 0x600002f7ada0: 1 ch, 48000 Hz, Float32> do { try inputNode.setVoiceProcessingEnabled(true) } catch { print("Could not enable voice processing \(error)") return } print(inputNode.inputFormat(forBus: 0)) // Prints <AVAudioFormat 0x600002f7b020: 5 ch, 44100 Hz, Float32, deinterleaved> If it helps, the reason I'm using setVoiceProcessingEnabled because I don't want the mic to pick up output from the speakers. Per wwdc When enabled, extra signal processing is applied on the incoming audio, and any audio that is coming from the device is taken Here is my conversion logic from the input PCM format (which in the case above is 5ch, 44.1kHZ, Float 32, deinterleaved) to the target format PCM16 with a single channel: let outputFormat = AVAudioFormat( commonFormat: .pcmFormatInt16, sampleRate: inputPCMFormat.sampleRate, channels: 1, interleaved: false ) guard let converter = AVAudioConverter( from: inputPCMFormat, to: outputFormat) else { fatalError("Demonstration") } let newLength = AVAudioFrameCount(outputFormat.sampleRate * 2.0) guard let outputBuffer = AVAudioPCMBuffer( pcmFormat: outputFormat, frameCapacity: newLength) else { fatalError("Demonstration") } outputBuffer.frameLength = newLength try! converter.convert(to: outputBuffer, from: inputBuffer) // Use the PCM16 outputBuffer The outputBuffer contains only silence. But if I comment out inputNode.setVoiceProcessingEnabled(true) in the first snippet, the outputBuffer then plays exactly how I would expect it to. So I have two questions: Why does setVoiceProcessingEnabled increase the channel count to 5? How should I convert the resulting format to a single channel PCM16 format? Thank you, Lou
2
0
587
Dec ’24
iPhone 15 Pro’s Screen Turns Black After iOS 18.3 BETA Update
After Updating My iPhone 15 Pro To IOS 18.3 beta, 1 Day Later A Pixel seemed stuck or burnt, and then after 1 Day on 25 Dec The Screen Went Black Or Turned Off But Responded To My Touch, the reason i suppose the screen went black would be a memory glitch happening when i opened the camera from the Lock Screen or a graphica card issue if anyone can help I would appreciate it
0
0
505
Dec ’24
Safari with Prevent Cross-Site Tracking enabled bypasses NEDNSProxyProvider
Hi, I’ve encountered an issue with Safari’s behavior when Prevent Cross-Site Tracking is enabled in iOS, related to DNS filtering via an implemented NEDNSProxyProvider. Here’s a step-by-step breakdown: In Safari, when attempting to query a blocked domain (according to the filtering policy of the NEDNSProxyProvider), the page is blocked as expected. Closing Safari without closing the tab with the blocked domain. Reopening Safari – Expected result: The page remains blocked; Actual result: The page loads and bypasses the NEDNSProxyProvider (no logs are received for this flow). Tapping the refresh button causes the page to be blocked, as the DNS Proxy Provider intercepts the new request. Note: This issue is only reproducible in general tabs in Safari. In private tabs, a fresh DNS query is generated each time, and the blocking behavior works as expected. I also tested Google Chrome, where the domain is blocked consistently. I attempted to filter this issue via Content Filter, but the only connection received by NEFilterDataProvider is for com.apple.Safari.SearchHelper with ssl.gstatic.com. Could you advise on how to handle this behaviour? Would be grateful to hear any ideas
4
0
685
Dec ’24