Welcome to the Apple Developer Forums

Post your questions, exchange knowledge, and connect with fellow developers and Apple engineers on a variety of software development topics.

For questions about using Apple hardware and services, visit Apple Support Communities

Posts

Sort by:
Post not yet marked as solved
0 Replies
6 Views
If a user has already In-App paid for my app and then deletes it before the subscription runs out and downloads it again, and since my app doesn't keep subscription data in the keychain (which remembers only when the app was downloaded), my app starts the subscribing process. When Apple sees the subscription request, will Apple tell the user that it's already been paid for? I don't see this behavior in the sandbox.
Posted
by
Post not yet marked as solved
0 Replies
16 Views
The app I'm working on has crashed on iPad iOS 16.2 on launch. I symbolicated the crash logs but can't understand what's going on and what caused this. Please help. crashlog 1.txt crashlog 2.txt
Posted
by
Post not yet marked as solved
0 Replies
12 Views
We have a MacCatalyst app which contains a few WebKit views for some specific forms. On these forms we are unable to facilitate navigation between fields via the keyboard (Tab/Shift Tab) Looking at the developer documentation there is a property on WKPreferences that seems like it would facilitate this functionality tabFocusesLinks This property is only available for MacOS 10.12.3 but it is not available on Catalyst, nor on iOS. https://developer.apple.com/documentation/webkit/wkpreferences/2818595-tabfocuseslinks?language=objc We would like to allow our users to navigate a web form within the WebView via the keyboard and additionally if possible any iOS users who have a bluetooth keyboard or folio keyboard paired to their iPad. Does anyone have a solution to this
Posted
by
Post not yet marked as solved
0 Replies
18 Views
Is it possible to differentiate whether user has no signal from carrier's mobile internet or purposefully has Airplane mode enabled? I want to disable some features inside my app if user has Airplane mode enable. At the same time, I want to keep these same features enabled if the device simply do not have service from carrier at that moment. platform :ios, '11.0' Following block code with Objective C was found in a StackOverFlow post and it is helpfull but it either lack of signal from carrier or airplane mode returns as ConnectionTypeNone. typedef enum { ConnectionTypeUnknown, ConnectionTypeNone, ConnectionType3G, ConnectionTypeWiFi } ConnectionType; + (ConnectionType)connectionType { SCNetworkReachabilityRef reachability = SCNetworkReachabilityCreateWithName(NULL, "8.8.8.8"); SCNetworkReachabilityFlags flags; BOOL success = SCNetworkReachabilityGetFlags(reachability, &flags); CFRelease(reachability); if (!success) { return ConnectionTypeUnknown; } BOOL isReachable = ((flags & kSCNetworkReachabilityFlagsReachable) != 0); BOOL needsConnection = ((flags & kSCNetworkReachabilityFlagsConnectionRequired) != 0); BOOL isNetworkReachable = (isReachable && !needsConnection); if (!isNetworkReachable) { return ConnectionTypeNone; } else if ((flags & kSCNetworkReachabilityFlagsIsWWAN) != 0) { return ConnectionType3G; } else { return ConnectionTypeWiFi; } }
Posted
by
Post not yet marked as solved
0 Replies
16 Views
When trying to transfer my app to another account, I got error saying "Your transfer request could not be completed. Try again.". I have double checked all the transfer criteria, and also tried latest version of Chrome/Firefox/Safari, and clear all the caches, but still no luck. Anyone having similar issue?
Posted
by
Post not yet marked as solved
0 Replies
20 Views
I am using SwiftUI's native image picker and selecting/loading images works great. What I can't figure out is how to call the selected image when uploading the image to firebase. In my UploadPostView, I can't figure out what to call for the image in viewModel.uploadPost(caption: caption, image: <??>))  I've tried calling the selectedImage but I get the error that it is not a UIImage.. I thought I had done the work to convert the data in to a UIImage in my imagepicker. Anyways, I am new to Swift and I feel like I'm missing something obvious so any help is appreciated! UploadPostView   @StateObject var imagePicker = ImagePicker()   @State private var caption = ""   @Environment(\.presentationMode) var mode   @ObservedObject var viewModel = UploadPostViewModel()             var body: some View {       NavigationView {         VStack {                       HStack(alignment: .top, spacing: 16) {             if let user = AuthViewModel.shared.currentUser {               KFImage(URL(string: user.profileImageUrl ?? ""))                 .resizable()                 .scaledToFill()                 .frame(width: 64, height: 64)                 .cornerRadius(10)             }             TextField("Enter your post here", text: $caption, axis: .vertical)               .lineLimit(5...10)           }.padding()                       Spacer()                       if let image = imagePicker.image {             HStack {               ZStack (alignment: .top) {                 image                   .resizable()                   .scaledToFill()                   .frame(width: 100, height: 100)                   .cornerRadius(4)                 Button {                   self.imagePicker.image = nil                 } label: {                   Image(systemName: "xmark")                     .frame(width: 24, height: 24)                     .foregroundColor(.white)                     .padding(4)                     .background(.black)                     .clipShape(Circle())                 }                 .offset(x: 45, y: -15)               }               Spacer()             }             .padding()           }                       HStack (spacing: 24) {             Text("Add to your post")               .foregroundColor(Color(.darkGray))                           Spacer()             PhotosPicker(selection: $imagePicker.imageSelection) {               Image(systemName: "photo")                 .resizable()                 .scaledToFit()                 .frame(width: 24, height: 24)             }.foregroundColor(Color(.darkGray))                           Button {                             } label: {               Image(systemName: "at")                 .resizable()                 .scaledToFit()                 .frame(width: 22, height: 22)             }.foregroundColor(Color(.darkGray))           }           .padding()         }         .onReceive(viewModel.$didUploadPost) { success in           if success {             mode.wrappedValue.dismiss()           }         }         .navigationTitle("Create Post")         .navigationBarTitleDisplayMode(.inline)         .toolbar {           ToolbarItem(placement: .navigationBarLeading) {             Button {             mode.wrappedValue.dismiss()             } label: {             Image(systemName: "xmark")             .resizable()             .scaledToFit()             .frame(width: 18, height: 18)             .foregroundColor(Color(.darkGray))             }           }           ToolbarItem(placement: .navigationBarTrailing) {             Button {               viewModel.uploadPost(caption: caption, image: image))             } label: {               Text("Post")                 .font(.system(size: 18))                 .bold()             }           }         }       }     }   } UploadPostViewModel   @Published var didUploadPost = false   @Published var didDeletePost = false   let service = PostService()       func uploadPost(caption :String, image: UIImage?) {     service.uploadPost(caption: caption, image: image) { success in       if success {         //dismiss screen         self.didUploadPost = true       } else {         // show error message to user..                 }     }   } } ImagePicker class ImagePicker: ObservableObject {       @Published var image: UIImage?   @Published var imageSelection: PhotosPickerItem? {     didSet {       if let imageSelection {         Task {           try await loadTransferable(from: imageSelection)         }       }     }   }       func loadTransferable(from imageSelection: PhotosPickerItem?) async throws {     do {       if let data = try await imageSelection?.loadTransferable(type: Data.self) {         if let uiImage = UIImage(data: data) {           self.image = uiImage         }       }     } catch {       print(error.localizedDescription)       image = nil     }   } }
Posted
by
Post not yet marked as solved
0 Replies
18 Views
I need to make some edits to my app. I don't have the app on my computer so I want to download it from my developer account. I can't seem to find any information on how to do that. Could someone please explain where to go to download my code and edit it. Thank You, Colby
Posted
by
Post not yet marked as solved
0 Replies
20 Views
In my app, I need to set up an animation that will run on repeat until I perform an action on it. I want both an image to change, and text change along with it. I am trying now the suggested key frame animations, but it is only showing the last change and no repeats. I have done some searches and looking at the documentation, but I'm definitely still missing something. It was my understanding that the animateKeyframesWithDuration is measured in seconds, while relative start and relative duration are 0 - 1 in value, so I set each to be 0.2, as there are 5, and 0.2 is exactly a fifth. What am I doing wrong? All of the NSLogs fire, but none of the events actually change, other than the final one. [UIView animateKeyframesWithDuration:70 delay:0 options:UIViewKeyframeAnimationOptionRepeat animations:^{ [UIView addKeyframeWithRelativeStartTime:0 relativeDuration:0.2 animations:^{ NSLog(@"a1"); self.eventsText.text = nil; theImageView.image = [UIImage imageNamed:@"welcome.png"]; }]; [UIView addKeyframeWithRelativeStartTime:0.2 relativeDuration:0.2 animations:^{ NSLog(@"a12"); theImageView.image = [UIImage imageNamed:@"pleasepray.png"]; self.eventsText.text = @"Test2"; }]; [UIView addKeyframeWithRelativeStartTime:0.4 relativeDuration:0.2 animations:^{ NSLog(@"a13"); theImageView.image = [UIImage imageNamed:@"comingevents.png"]; self.eventsText.text = @"Test3"; }]; [UIView addKeyframeWithRelativeStartTime:0.6 relativeDuration:0.2 animations:^{ NSLog(@"a14"); theImageView.image = [UIImage imageNamed:@"birthdays.png"]; self.eventsText.text = nil; }]; [UIView addKeyframeWithRelativeStartTime:0.8 relativeDuration:0.2 animations:^{ NSLog(@"a14"); theImageView.image = [UIImage imageNamed:@"ournumbers.png"]; self.eventsText.text = @"Test4"; }]; } completion:nil];
Posted
by
Post not yet marked as solved
0 Replies
14 Views
I was doing the 12th chapter in Bjarne's 2nd edition of "Programming: Principles and Practices using C++" in which i have to install Fltk and alo use many other header files in the project. I successfully installed Fltk and build it but i don't know how to link the Fltk file and other necessary file in a single project. I have tried a lot of things but nothing is working. The code i wanna run is this: #include "Simple_window.h" #include "Graph.h" int main() {   using namespace Graph_lib;      Point tl {100,100};      Simple_window win {tl,600,400,"Canvas"};         Polygon poly;      poly.add(Point{300,200});   poly.add(Point{350,100});   poly.add(Point{400,200});      poly.set_color(Color::red);      win.attach (poly);      win.wait_for_button(); } This is my project and the files i have tried to link and failed: And this is what i am getting as the error, even after lot of searching on the internet, i can't figure out how to solve this issue: pls tell me what i am doing wrong, i am very new to Xcode. Also if there is another way to make the program without Xcode, then that will help too. Even though i got the same error while making the program using Make.
Posted
by
Post not yet marked as solved
0 Replies
18 Views
Hi! I have a question about ARWorldmaps and their limits. I am planning to make a scan of a rather big area. I started playing with the ARWorldmap sample from AR Foundation (Unity) and managed to create my maps, save them and reload them (with content placed). However this only works well with small maps. When the map gets to big, I can still load the map but the relocalization does not work (or only after a LOT of time and running around). Does anybody have an idea on how to improve this? Are there any fix limits on how big a map can be? Maybe something like telling the app, to only use a certain part of the map as localization points? I already tried, dividing it into multiple maps, which improves the relocalization speed but obviously means, that the relocalization has to be repeated multiple times. Any help is appreciated! :)
Posted
by
Post not yet marked as solved
0 Replies
19 Views
The release of this feature has created disruption in the onboarding process for new installations of our M-Pesa App in iOS devices. Because when using our app for the first time, we use a plain text HTTP session with header enrichment containing the mobile number of the customer to later send a token as some sort of 2FA. Because of this feature, and the HTTP sessions being upgraded to HTTPS, we fail to enrich the header, therefore the flow gets stuck. Althought we working on an alternative OTP solution, we would like to know if there are no specifc device setting that can whitelist this activation URL from this HTTPS upgrade feature?
Posted
by
Post not yet marked as solved
1 Replies
23 Views
Hello, I've run across the iOS Distribution Managed Certificate a few times in our enterprise account, but I've never been able to find concrete documentation or wwdc videos relating to how to actually build an enterprise app using cloud certificates (which as far as I can tell is the iOS Distribution Managed certificate that mysteriously appeared in many people's enterprise accounts a few years ago). Background: our normal enterprise cert is expiring this week and unfortunately, a separate team in the organization generated a 2nd cert already for their app, so we are unable to generate a cert early to overlap the expiration time and avoid downtime. We are attempting to work with them, but logistical challenges might cause us to miss the expiration date - cloud cert would be a great solve here if possible. Any resources would be greatly appreciated! I have found this page, but the details are very limited and it seems tat there is some specific detail that is left out since it says the organizer will simply sign with cloud certificate automatically - perhaps a local cert purge is required to get this to work? https://developer.apple.com/help/account/create-certificates/cloud-managed-certificates/
Posted
by
Post not yet marked as solved
0 Replies
23 Views
Hey, I am trying to configure per-app VPN based on OpenVPN using MDM and want to clarify what is the expected behavior in this case. My goal is to force a specific app to use the tunnel for ALL connections. For my lab tests I use Google Chrome app. What I have achieved till now is that the per-app VPN profile is successfully deployed, the connection is being established on-demand and my local website (which is not available without VPN) opens in Chrome. However, even though I see VPN icon in status bar using Chrome, it looks like the browser bypasses the tunnel. My VPN network does not have Internet access, so my expectation was that with VPN turned-on I will be able to open only internal websites and all others public resources won't be available. But it looks like the VPN does not block any connection and only makes internal resources being available in addition to the resources available without VPN tunnel. So the question is whether my understanding of the per-app VPN on iOS is wrong and the behavior I see is expected or my goal is achievable but I misconfigured something. Thanks!
Posted
by
Post not yet marked as solved
0 Replies
18 Views
Hi, ALL, I'm developing a software using C++/wxWidgets and I hit an interesting wall. Everytime I try to run it from inside Xcode I am experiencing a crash. However, when I try to run it from the Terminal, it executes OK. When I open the Debug Console in its output I see: 2023-01-26 08:47:02.755426-0600 dbhandler[55285:3097440] dynamic_cast error 1: Both of the following type_info's should have public visibility. At least one of them is hidden. 8wxWindow, 12DatabaseType. "DatabaseType" is a class I made in order to display the dialog and it is located in one of the dylib's my program uses. It does have public visibility, though. My question is - how do I make Xcode run my program successfully, so that I will be able to debug it on Mac? I am running OSX High Sierra 10.13.6 with Xcode 9.4.1. (Trying to find the cause I see that this error is found when the programs are running from Terminal. That is not the case here). Thank you.
Posted
by
Post not yet marked as solved
0 Replies
34 Views
Sometimes when I tapped on select count item controller opens from the top left corner Why this happens, I don't know is there anyone who can help? public func show(selectedItemPreview: ItemPreview, onRemoveItem: @escaping () -> Void) {     let model = ItemCountModel()     model.itemPreview = selectedItemPreview     model.parentViewControllerName = "CartView"     let module = ItemCountView(model)     module.modalPresentationStyle = .overFullScreen     module.modalTransitionStyle = .coverVertical     module.onRemoveItem = { onRemoveItem() }     Utils.shared.controller?.present(module, animated: false, completion: nil)   }
Posted
by
Post not yet marked as solved
1 Replies
25 Views
I have tried several times to restart all the devices or turn off turn on developer mode, but continuing getting "waiting for first unlock" in Xcode. The Xcode version is 14.2 with ios 16.0. I tried to work with the older version of iOS 15 and Xcode13, but it failed with "new watch new ios version at 16.0". Does anyone know how can I get this working? Thanks
Posted
by
Post not yet marked as solved
0 Replies
25 Views
Hi. I’m running into a possible issue where I’m setting https Proxy configuration for my PacketTunnelProvider network extension. The proxy is a simple test squid proxy, with authentication. Requests using curl work correctly. On iOS the traffic seems to be correctly routed to the proxy (through the vpn) but when I programmatically add a username/password + authenticationRequired, in order to authenticate with the proxy (Under https://developer.apple.com/documentation/networkextension/neproxyserver). the credentials don’t seem to be sent at all. The proxy sends a 407 response, and on my iOS device I get a “Proxy Authentication Required” dialog (with the correct proxy ip/port). Is this expected? Should the proxy be set up in some way in order for this to work? Thanks
Posted
by
Post not yet marked as solved
0 Replies
22 Views
Why doesn't it have a way to see what the request was? You can see what extension it was for (the identifier property), but you can't tell whether it was for an installation, uninstallation, or properties request. Why is that?
Posted
by
Post not yet marked as solved
0 Replies
19 Views
I want to present image with his custom modifiers in swiftui with iOS 15 but it does not, what is wrong in this code ? @available(iOS 15, *) func setupLabel() -> AttributedString { var title = AttributedString(text ?? "") var container = AttributeContainer() container.foregroundColor = .red let imageAttachment = NSTextAttachment() imageAttachment.image = UIImage(named: "star") imageAttachment.bounds = CGRect(x: 0, y: 0, width: 20, height: 20) container.attachment = imageAttachment title.mergeAttributes(container) return title } foregroundColor works but image doesn't display.
Posted
by

Pinned Posts

Categories

See all