Post

Replies

Boosts

Views

Activity

Alternative Ways to Contact Apple Developer Support
I’ve been trying to contact Apple Developer Support regarding my developer account. After submitting the required documents related to the Digital Services Act (DSA), I emailed them to ask which additional documents were needed. However, I’ve been waiting for more than 3 days now without receiving a response. Unfortunately, the only way for me to reach them is via email, as phone support is not available in my country. This delay is causing significant issues for me, and I need to resolve this as soon as possible. Are there any alternative methods to contact Apple Developer Support aside from email? I’d appreciate any advice or assistance.
0
0
150
2w
App Not Appearing in "Available Apps" List in Watch App
I’ve developed an Apple Watch extension for an existing iOS app. When I run the app on the watch via Xcode using the simulator, everything works fine. However, when I try to install it on my iPhone, the Watch app doesn’t show it in the "Available Apps" list, so I can't install it on the watch. The Apple Watch is connected to my iPhone, and I can see other apps available for installation without any issues. I also created a brand new project with watchOS support to troubleshoot, but the same problem occurred. Any ideas on how to resolve this?
0
0
197
Oct ’24
Issue with Xcode 16 - Errors When Splitting Code for Widgets
I’m encountering an issue since I started using Xcode 16. I have a widget in my app, and I'm trying to organize the code by splitting it into different files for better structure. However, when I do this, I get an error: error: Unexpected input file: /Users/******/Desktop/TestApp/TestAppWidget/Provider.Swift (in target 'TestAppWidgetExtension' from project 'TestApp') I want to emphasize that if I keep all the code in one file, everything works fine. I've checked the Target Membership, and it's set up correctly. but I don't understand why this is happening only in Xcode 16. Has anyone else experienced a similar issue or has any ideas on why this is occurring? I would appreciate any help!
3
0
323
Sep ’24
How to Prevent App Intents from Appearing in the Shortcuts App in SwiftUI Interactive Widgets
I'm working on a SwiftUI interactive widget using AppIntent. However, I want to prevent my AppIntents from appearing in the Shortcuts app. Currently, all my AppIntents are showing up in the Shortcuts app, but I only want them to be used within my widget. Is there a way to restrict the visibility of AppIntents so they don't appear in the Shortcuts app? Here is a simplified version of my AppIntent: import AppIntents struct MyWidgetIntent: AppIntent { static var title: LocalizedStringResource = "My Widget Intent" func perform() async throws -> some IntentResult { // Intent logic here } } I've looked into the documentation but haven't found a clear way to achieve this.
1
0
473
Aug ’24
How to Update App Store Metadata via App Store Connect API Using Postman
I need help updating the description, keywords, what's new, and promotional text for my app on the App Store using the App Store Connect API through Postman. I already have my access token. I need to update the data for each language, I changed to PATCH, but what is the url to patch? And what json should I send?
1
0
493
Jul ’24
StoreKit 2: Issue with Subscription Validation in Sandbox
I'm opening this post because I've encountered a perplexing issue in my application utilizing StoreKit 2 with the Sandbox environment for subscription validation. My app makes a server call each time it opens to verify if there's an active subscription. The problem arose after successfully making a purchase in the Sandbox. When I clear history from the Sandbox user and reopen the app, it resends a request to check the subscription, indicating that the user is still subscribed even though the purchases were deleted. Has anyone encountered a similar issue? if I testing it with transaction manager in Xcode it working well. ` func updatePurchasedProducts() async { for await result in Transaction.currentEntitlements { guard case .verified(let transaction) = result else { continue } if transaction.revocationDate == nil { self.purchasedProductIDs.insert(transaction.productID) print("# purchased") } else { self.purchasedProductIDs.remove(transaction.productID) print("# canceled") } } } Thank you very much!
0
0
690
Jan ’24
Issue with SwiftData in Sharing Data Across SwiftUI Project and Custom Keyboard Extension
I'm currently grappling with an issue while incorporating SwiftData into my SwiftUI project, specifically when dealing with a custom keyboard extension. The challenge lies in ensuring that the data I save and import through SwiftData is effectively shared between my main project and the custom keyboard extension. Despite my efforts, it seems like the data isn't being shared as intended. I've reviewed my SwiftData implementation and the interactions between the main project and the extension but haven't been able to pinpoint the root cause. var body: some Scene { WindowGroup { TabView{ ScreenOneView() .tabItem { Label("Main", systemImage: "square.and.pencil") } Text("Setting") .tabItem { Label("Setting", systemImage: "square.and.pencil") } } } .modelContainer(for: CopiedData.self) } } SwiftDataManager: class SwiftDataManager { static let shared = SwiftDataManager() func addItem(context: ModelContext, text: String){ let item = CopiedData(text: text) context.insert(item) } func deleteItem(context: ModelContext, item: CopiedData){ context.delete(item) } } View: struct ScreenOneView: View { @Environment(\.modelContext) private var context @Query private var items: [CopiedData] List{ ForEach(items) { item in HStack{ Text("\(item.text)") Spacer() buttons } } .onDelete(perform: { indexSet in for index in indexSet { vm.delete(context: context, deleteItem: items[index]) } }) } and the code from keyboard extension: class KeyboardViewController: UIInputViewController { override func viewDidLoad() { super.viewDidLoad() setupView() } func setupView(){ let keyboardView = UIHostingController(rootView: KeyboardView().modelContainer(for: CopiedData.self)) addChild(keyboardView) view.addSubview(keyboardView.view) keyboardView.view.translatesAutoresizingMaskIntoConstraints = false NSLayoutConstraint.activate([ keyboardView.view.leadingAnchor.constraint(equalTo: view.leadingAnchor), keyboardView.view.trailingAnchor.constraint(equalTo: view.trailingAnchor), keyboardView.view.topAnchor.constraint(equalTo: view.topAnchor), keyboardView.view.bottomAnchor.constraint(equalTo: view.bottomAnchor) ]) keyboardView.didMove(toParent: self) } keyboardView: struct KeyboardView: View { @Environment(\.modelContext) private var context @Query private var items: [CopiedData] List{ ForEach(items) { item in contextTextCopied(text: "\(item.text)") .padding(.vertical, -6) } .onDelete(perform: { indexSet in }) .listRowBackground(Color.theme.background) } to add and delete data i use only single instance let swiftDataManager = SwiftDataManager.shared
1
0
645
Nov ’23
alerts now showing
i had setup alert but alertResetSetting not showing, i do know why but if change the positon from: .alert(isPresented: $showingIsResetSetting, content: alertResetSetting) .alert(isPresented: $showingIsClearAll, content: alertClearAll) to: .alert(isPresented: $showingIsClearAll, content: alertClearAll) .alert(isPresented: $showingIsResetSetting, content: alertResetSetting) the alertResetSetting will be working but the alertClearAll not... why? @State private var showingPrefixByCountry = false @State private var showingIsResetSetting = false @State private var showingIsClearAll = false var body: some View { VStack{ settingList Spacer() } .padding(.top) .alert(isPresented: $showingIsResetSetting, content: alertResetSetting) .alert(isPresented: $showingIsClearAll, content: alertClearAll) .alert("Select Your Country", isPresented: $showingPrefixByCountry) { showingPrefixByCountryContent() } message: { Text("Prefix") .fontWeight(.light) } Section("Data") { Button { showingIsResetSetting.toggle() } label: { Spacer() Text("Reset Setting") .fontWeight(.semibold) Spacer() } Button { showingIsClearAll.toggle() } label: { Spacer() Text("Clear All (Include history calls)") .foregroundColor(Color.red) .fontWeight(.bold) Spacer() } } private func alertResetSetting() -> Alert { Alert( title: Text("Are you sure you want to reset settings?"), message: Text("This action will reset your settings. Without delete you history calls."), primaryButton: .destructive( Text("Reset"), action: { vm.resetSetting() } ), secondaryButton: .cancel(Text("Cancel")) ) } private func alertClearAll() -> Alert { Alert( title: Text("Are you sure you want to Clear All Data?"), message: Text("This action will reset you setting and delete all history data"), primaryButton: .destructive( Text("Clear All"), action: { vm.clearAll() } ), secondaryButton: .cancel(Text("Cancel")) ) }
0
0
493
Aug ’23
recycling of list cells swiftui on scroll data
In my SwiftUI app, I have a data from an array. While scrolling through the list, the cells are being recycled, which is great. However, I'm puzzled because it seems that the data isn't being refetched as I scroll, which is contrary to what I expected. I want to understand why the data isn't being refetched for recycled cells and if this is expected behavior. class HistoryViewModel: ObservableObject { @Published var filteredContacts: [HistoryData] = [] func updateFilteredContacts() { filteredContacts = HistoryCallDataService().savedEntities if self.searchText.isEmpty { self.filteredContacts = filteredContacts } else { self.filteredContacts = filteredContacts.filter { contact in contact.firstName?.localizedCaseInsensitiveContains(self.searchText) ?? false || contact.lastName?.localizedCaseInsensitiveContains(self.searchText) ?? false || contact.telephone?.localizedCaseInsensitiveContains(self.searchText) ?? false } } } The List: List{ ForEach(vm.filteredContacts.reversed()) { item in HStack{ VStack(alignment: .leading){ Text("\(item.firstName ?? "N/A") \(item.lastName ?? "N/A" )") .fontWeight(.semibold) Text("\(item.telephone ?? "N/A")") .fontWeight(.medium) .padding(.top,1) } Spacer() VStack(alignment: .trailing){ Text("\(item.time ?? "N/A")") .fontWeight(.medium) Text("\(item.callHidden ? "Hidden" : "Normally ")") .foregroundColor(item.callHidden ? Color.theme.red : Color.theme.black) .fontWeight(.bold) .padding(.top,1) } } } } i attach image: https://im.ezgif.com/tmp/ezgif-1-db6ebe2a2e.gif [https://im.ezgif.com/tmp/ezgif-1-db6ebe2a2e.gif)
0
1
806
Aug ’23
Array Not Updating in ViewModel Despite Subscription
I'm facing an issue in my iOS app's architecture involving CoreData, the HistoryCallDataService class, and the HistoryViewModel. I'm hoping someone can help shed light on the problem I'm encountering. Problem Description: I'm working with CoreData and have an array that I'm managing through the HistoryCallDataService class. class HistoryCallDataService { private let container: NSPersistentContainer private let containerName = "CallHistoryData" private let entityName = "HistoryData" @Published var savedEntities: [HistoryData] = [] I'm observing changes in the savedEntities property of the HistoryCallDataService class using the historyDataService.$savedEntities publisher. When the app starts, the array is updated correctly. However, if I add new content, the savedEntities array updates, but the historyArray in the HistoryViewModel does not reflect these changes. import Foundation import Combine class HistoryViewModel: ObservableObject { @Published var searchText:String = "" @Published var historyArray: [HistoryData] = [] private let historyDataService = HistoryCallDataService() private var cancellables = Set<AnyCancellable>() var selectedContact: HistoryData? = nil @Published var filteredContacts: [HistoryData] = [] init(){ addSubscribers() } func addSubscribers(){ historyDataService.$savedEntities .debounce(for: 1.0, scheduler: RunLoop.main) .sink { [weak self] (returnData) in guard let self = self else { return } self.historyArray = returnData self.updateFilteredContacts() } .store(in: &cancellables) } func updateFilteredContacts() { if searchText.isEmpty { filteredContacts = historyArray } else { filteredContacts = historyArray.filter { contact in contact.firstName?.localizedCaseInsensitiveContains(searchText) ?? false || contact.lastName?.localizedCaseInsensitiveContains(searchText) ?? false || contact.telephone?.localizedCaseInsensitiveContains(searchText) ?? false } } } The view: private var contactList: some View{ List{ ForEach(vm.filteredContacts) { item in HStack{ VStack(alignment: .leading){ Text("\(item.firstName ?? "N/A") \(item.lastName ?? "N/A" )") .fontWeight(.semibold) Text("\(item.telephone ?? "N/A")") .fontWeight(.medium) .padding(.top,1) } Spacer() VStack(alignment: .trailing){ Text("\(item.time ?? "N/A")") .fontWeight(.medium) Text("\(item.callHidden ? "Hidden" : "Normally ")") .foregroundColor(item.callHidden ? Color.theme.red : Color.theme.black) .fontWeight(.bold) .padding(.top,1) } } .onTapGesture { vm.selectedContact = item showingCallAlert.toggle() } .listRowBackground(vm.selectedContact?.telephone == item.telephone && showingCallAlert ? Color.theme.gray : nil) } .onDelete(perform: { indexSet in for index in indexSet { let contactToDelete = vm.filteredContacts[index] vm.delete(entity: contactToDelete) } }) } .onChange(of: vm.searchText) { _ in vm.updateFilteredContacts() } .onChange(of: scenePhase) { newPhase in if newPhase == .active { print("Active") vm.updateFilteredContacts() } } .lineLimit(1) .listStyle(.plain) } If anyone has encountered a similar situation or has insights into what might be causing this behavior, I would greatly appreciate your guidance. Thank you in advance for your help!
3
0
742
Aug ’23
Can i use Admob with my app and upload it to appstore?
I want to use Admob in my application - an ad when opening the application only! After many searches, some of which I did not find an answer but i found: As of December 8, 2020, Apple has made it mandatory for developers to release what data is being collected and what it's being used for. If developers don't comply, they won't be able to publish new apps or release updates for current apps. My questions is: According to Apple policies, can Admob be used in the application? and to upload the application, what data does Admob collect and what i need to mark in app store connect?
0
0
964
Aug ’23
serach bar not find all words
I have a problem with the search, it doesn't search for each letter individually, these only if it is word is together, for example: I search Kate it will find but if I type Kae (that still has the letters in it), he won't find it, why?    filteredData = contacts.filter {name in         return  name.firstName.lowercased().contains(searchText.lowercased()) || name.lastName.lowercased().contains(searchText.lowercased()) || name.telephone.removeCharacters(from: CharacterSet.decimalDigits.inverted).lowercased().contains(searchText.lowercased())       } i attach screenshot
5
0
952
Dec ’22
save image to gallery swiftui
it want to save QRCode to galley and i get the image but why it not save?? func saveImageQRCode(from string: String) {     filter.message = Data(string.utf8)     if let outputImage = filter.outputImage {       if context.createCGImage(outputImage, from: outputImage.extent) != nil { //        let ge = UIImage(cgImage: cgimg)         let transform = CGAffineTransform(scaleX: 10, y: 10)         let scaledCIImage = outputImage.transformed(by: transform)         let uiimage = UIImage(ciImage: scaledCIImage)                 let imageData = uiimage.pngData()!         let docDir = try! FileManager.default.url(for: .documentDirectory, in: .userDomainMask, appropriateFor: nil, create: true)         let dataNow = "\(Date.now).png"         let imageURL = docDir.appendingPathComponent(dataNow)         try! imageData.write(to: imageURL)                   _ = UIImage(contentsOfFile: imageURL.path)!         UIImageWriteToSavedPhotosAlbum(uiimage, nil, nil, nil)       }     }   }
1
0
860
Dec ’22
why the view is up when keyboard show?
i do this code: struct TextView: View {       @ObservedObject var service = Service()       @State private var text: String = ""   @FocusState var isInputActive: Bool   var body: some View {     ZStack{                     Color(red: 242 / 255, green: 242 / 255, blue: 247 / 255)         .edgesIgnoringSafeArea(.top)               VStack {         Text("QRCode Text")           .multilineTextAlignment(.center)           .font(.system(size: 30, weight: .heavy, design: .default))           .padding(.top, 16.0)                   TextField("Enter Text", text: $text)           .textFieldStyle(RoundedBorderTextFieldStyle())           .border(Color.white)           .fixedSize(horizontal: false, vertical: true)           .multilineTextAlignment(.center)           .padding()           .frame(width: 350, height: 80)           .background(Rectangle().fill(Color.white).shadow(radius: 20))           .cornerRadius(30)           .frame(height: 100)           .focused($isInputActive)           .toolbar {                     ToolbarItemGroup(placement: .keyboard) {                       Spacer()                       Button("Done") {                         isInputActive = false                       }                     }                   }         Image(uiImage: service.generateQRCode(from: "\(text)"))           .interpolation(.none)           .resizable()           .padding(2.0)           .scaledToFill()           .frame(width: 250, height: 250)                     .fixedSize(horizontal: false, vertical: true)           .multilineTextAlignment(.center)                     .frame(width: 350, height: 350)           .background(Rectangle().fill(Color.white).shadow(radius: 20))           .cornerRadius(30)         Button("Save QRCode") {           print("save")         }         .padding(.vertical, 10.0)         .padding(.horizontal, 100.0)         .background(Color.blue)         .cornerRadius(20)                 .foregroundColor(Color.white)         .frame(height: 100)                   Spacer()       }     }   } } and when i click on textfield and keyboard up, it up all view, why?
0
0
566
Dec ’22