Posts

Sort by:
Post not yet marked as solved
0 Replies
6 Views
I have a sample iOS app in Xcode that I run in the iOS 17.5 Simulator. It creates a WKWebView and configures a proxy via the ProxyConfiguration API, it works as expected unless the proxy tries to establish mTLS. It seems there is no way to handle the client certificate request when using a proxy. If I navigate to a page that requests mTLS without a proxy configured, it works as expected. Here is a minimal repro: #import "ViewController.h" #import <WebKit/WebKit.h> @import Foundation; @import WebKit; @interface ViewController () <WKNavigationDelegate> @property (nonatomic,strong) WKWebView* webView; @property (nonatomic, strong) WKWebViewConfiguration * webConfig; @end @implementation ViewController - (void)loadView { [super loadView]; nw_protocol_options_t tls_options = nw_tls_create_options(); sec_protocol_options_t sec_options = nw_tls_copy_sec_protocol_options(tls_options); sec_protocol_options_set_challenge_block( sec_options, ^(sec_protocol_metadata_t metadata, sec_protocol_challenge_complete_t challenge_complete) { NSLog(@"Inside of challenge block"); challenge_complete(nil); }, dispatch_get_main_queue()); nw_endpoint_t proxy_endpoint = nw_endpoint_create_host(GetHost(), GetPort()); nw_relay_hop_t relay = nw_relay_hop_create(nil, proxy_endpoint, tls_options); nw_proxy_config_t proxy_config = nw_proxy_config_create_relay(relay, nil); nw_proxy_config_add_match_domain(proxy_config, "api.ipify.org"); self.webConfig = [[WKWebViewConfiguration alloc] init]; self.webConfig.websiteDataStore = [WKWebsiteDataStore nonPersistentDataStore]; self.webConfig.websiteDataStore.proxyConfigurations = @[ proxy_config ]; self.webView = [[WKWebView alloc] initWithFrame:self.view.frame configuration:self.webConfig]; self.webView.navigationDelegate = self; [self.view addSubview:self.webView]; } - (void)viewDidLoad { [super viewDidLoad]; NSLog(@"%s",__func__); NSURL* url = [[NSURL alloc] initWithString:@"https://api.ipify.org"]; NSURLRequest* request = [[NSURLRequest alloc] initWithURL:url]; [self.webView loadRequest:request]; } - (void)webView:(WKWebView *)webView didStartProvisionalNavigation:(WKNavigation *)navigation { NSLog(@"%s",__func__); } - (void)webView:(WKWebView *)webView didFailProvisionalNavigation:(WKNavigation *)navigation withError:(NSError *)error { NSLog(@"%s. Error %@",__func__,error); } - (void)webView:(WKWebView *)webView didReceiveAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge completionHandler:(void (^)(NSURLSessionAuthChallengeDisposition, NSURLCredential *))completionHandler { NSLog(@"%s",__func__); NSLog(@"protection space: %@", challenge.protectionSpace.authenticationMethod); completionHandler(NSURLSessionAuthChallengePerformDefaultHandling, nil); } @end The logs for this code show: -[ViewController viewDidLoad] -[ViewController webView:didStartProvisionalNavigation:] -[ViewController webView:didFailProvisionalNavigation:withError:]. Error Error Domain=NSURLErrorDomain Code=-1206 "The server “api.ipify.org” requires a client certificate." If we don't set up the ProxyConfiguration and navigate to a site that requires mTLS, the logs look like this: -[ViewController viewDidLoad] -[ViewController webView:didReceiveAuthenticationChallenge:completionHandler:] protection space: NSURLAuthenticationMethodServerTrust -[ViewController webView:didReceiveAuthenticationChallenge:completionHandler:] protection space: NSURLAuthenticationMethodClientCertificate -[ViewController webView:didStartProvisionalNavigation:] //... Eventually the request fails but the key difference is that didReceiveAuthenticationChallenge was invoked. When using the ProxyConfiguration neither that function nor the block we set via sec_protocol_options_set_challenge_block were run. I also tried to provide the client identity via sec_protocol_options_set_local_identity to no avail, and I've tried configuring these options too but they had no effect sec_protocol_options_add_tls_application_protocol(sec_options, "h2"); sec_protocol_options_set_max_tls_protocol_version(sec_options, tls_protocol_version_TLSv13); sec_protocol_options_set_peer_authentication_required(sec_options, true); Am I missing something? Or is this a bug in the ProxyConfiguration API?
Posted
by
Post not yet marked as solved
0 Replies
6 Views
Hi there! folks. Hope you are fine We want our two applications to listen to connection and disconnection notifications in the External accessory when we connect a device to USB These application are running in the background and we need to know when the device connects and disconnects from USB. In those cases, we have configured our apps to listen to local notifications as follows: EAAccessoryManager.shared().registerForLocalNotifications() NotificationCenter.default.addObserver(self, selector: #selector(didConnectAccessory(_:)), name: Notification.Name.EAAccessoryDidConnect, object: nil) NotificationCenter.default.addObserver(self, selector: #selector(didDisconnectAccessory(_:)), name: Notification.Name.EAAccessoryDidDisconnect, object: nil) When the apps are running in foreground, everything works correctly. On the other hand, when the apps are running in the background mode and with the external accessory background mode enabled, the disconnection or connection event is not sent to the applications, causing them to not be able to initialize correctly. We attach traces of the two applications running in the background in a connection event through the USB. in The first application the Notification event is received correctly. In The second application the Notification event is NOT received correctly We would like to investigate with you what may be happening. We have opened a case in the feedback assistant (FB13800710) so you can investigate further. We open the case here so that other people can collaborate with us in depth. Thank you so much Looking forward to hearing from your side. All the best! LogsApplication
Posted
by
Post not yet marked as solved
0 Replies
11 Views
One of our apps got hit by the ITMS-91065: Missing Signature issue when we attempted to distribute it to externally via TestFlight. The email said FirebaseCore is missing the signature file within our own framework. After investigation, I realized our recent update to the version of Firebase that has the proper signatures and privacy manifest wasn't enough by itself. Similar to Apple's own instructions on embedding static frameworks since Xcode 15, Firebase instructs us to select the Embed & Sign option. After making the appropriate changes though, we're getting the error in Transporter: Asset validation failed (90085): No architectures in the binary Our setup is as follows: We have an analytics dynamic framework, which depends on Firebase's static framework. The Firebase related frameworks are embedded and signed in our analytics framework. Our app depends on the analytics dynamic framework, which now includes Firebase frameworks within its framework. Since the Firebase frameworks are static, only the Info.plist and the resource bundle with privacy manifest and another Info.plist are included. After searching online, some suggest it's because of the Info.plist included. For example, FirebaseCore.framework, which specifies CFBundleExecutable yet it's not included within the framework itself. I don't expect the executable to get included here though. I opened an issue on Firebase's Github, which has more information. I am not sure how to proceed from here. Is there something I am missing? I would appreciate assistance. Thank you.
Posted
by
Post not yet marked as solved
0 Replies
6 Views
I've created a Full Immersive VisionOS project and added a spacial video player in the ImmersiveView swift file. I have a few buttons on a different VideosView swift file on a floating window and i'd like switch the video playing in ImmersiveView when i click on a button in VideosView file. Video player working great in ImmersiveView: RealityView { content in if let videoEntity = try? await Entity(named: "Video", in: realityKitContentBundle) { guard let url = Bundle.main.url(forResource: "video1", withExtension: "mov") else {fatalError("Video was not found!")} let asset = AVURLAsset(url: url) let playerItem = AVPlayerItem(asset: asset) let player = AVPlayer() videoEntity.components[VideoPlayerComponent.self] = .init(avPlayer: player) content.add(videoEntity) player.replaceCurrentItem(with: playerItem) player.play() }else { print("file not found!") } } Buttons in floating window from VideosView: struct VideosView: View { var body: some View { VStack{ Button(action: {}) { Text("video 1").font(.title) } Button(action: {}) { Text("video 2").font(.title) } Button(action: {}) { Text("video 3").font(.title) } } } } In general how do I control the video player across views and how do I replace the video when each button is selected. Any help/code/links would be greatly appreciated.
Posted
by
Post not yet marked as solved
1 Replies
17 Views
Recently we have started refactoring some code to use Swift concurrency in Xcode 15.3. As we have added some new async methods and Tasks, new runtime warnings have emerged titled "Known Hang" and several are listed. None of the stack traces listed with these warnings are in areas directly modified but some of the same types/methods called are also called from the modified areas. So I can sort of understand why they are coming up...but they had to have been there before we added the Swift concurrency. Example of a tooltip with the warnings: My first query is: Are these warnings only issued when Swift concurrency is added/applied (as they were not there when using closures and mostly just off the main thread to network calls)? The documentation indicates these can all be suppressed by turning off the Thread Performance Checker BUT I would rather just suppress the few places as we refactor our codebase (as it is quite large). In that way, any new ones may be documented and we can decide to fix them now or later. I have tried to follow the instructions and added an environment variable PERFC_SUPPRESSION_FILE (in the Scheme) with a full path to a file formatted similarly to the example in the documentation. class:NSManagedObjectContext method:-[NSManagedObjectContext save:] My second query is: I have verified that the variable is set by reading it from the ProcessInfo. However, regardless of my settings, the runtime warnings are still presented. I could not find any examples or even any mention of others using this environment variable. I am reaching out with any advice or ideas to try. Has anyone successfully tried this or found an issue/alternative? Help me Mr. Wizard!
Posted
by
Post not yet marked as solved
0 Replies
24 Views
I have an app with which users take photos and upload them in batches. It's used often on older devices, in areas with less than ideal network, and for durations of a full workday - so often the device has low power. The current implementation of uploads uses an NSURLSession configured for the foreground, and as a result my users are used to having to keep the app in the foreground while an upload completes. However, these uploads are big and connectivity is often low, so this takes a long time - often users are stuck waiting with the app foregrounded for 15 minutes or so while the upload completes. So, I created a build which uses an NSURLSession configured for the background. In the ideal case, users could start the upload, put the device in their pocket and continue their workday, and the next time they open their device it will be complete. For some users this ideal case has come true. However, for others, the uploads sit in progress for an indeterminate amount of time, making no progress. My suspicion is that this is because the OS is deferring them until a time when network and power is more available. However, my users are using work devices at a work location - reliable power and network might never be available. Being able to background the app and continue working is valuable for these users, but having the upload complete promptly is essential for them. My questions are: Is it true that background configured NSURLSessions will defer network requests when connectivity or power is low, even if discretionary = NO? Is the exact behavior for when requests will be attempted in the background documented? Is there a way to reliably test background configured NSURLSessions in XCode? I've attempted throttling my connection with Charles Proxy, and using my device in Low Power Mode, but I'm unable to reproduce the request stalling behavior my users are experiencing in the wild. Is there a way to create an NSURLSession that will muscle through difficult or inefficient uploads in the background, with the same reliability as a foreground session? If not, what is Apple's recommended approach to situations like mine? I've considered queueing both a background and foreground upload, and cancelling the other once one completes, but this seems disrespectful to the user's resources. Will setting timeoutIntervalForResource to a lower value cause the OS to more aggressively attempt uploads? Or simply to throw an error sooner? I want the OS to give the upload a long time to complete, but I also want it to attempt it right away. Thanks for any information!
Posted
by
Post not yet marked as solved
0 Replies
20 Views
Hello, I've upgraded Xcode to newest 15.4 and now I cannot edit text in the output console (debugger). The Xcode console (output) does not allow editing text and does not allow any text input anymore. I've seen that this may be related to structured logging. I used to mark things in console output by typing some notes for me when debugging. How to do that? How to make Xcode console allow input like add line break to mark items in my log, or add notes?
Posted
by
Post not yet marked as solved
0 Replies
23 Views
I've implemented Apple Archive in the app I'm working on and have implemented lzfse algorithm. The framework is extremely impressive in terms of the speed and compression ratios. I'm using the closure in ArchiveStream.writeDirectoryContents to indicate what the current file is being processed, but there doesn't seem to be a way to pull out progress % on each file. I've seen examples here [Accelerate].(https://developer.apple.com/documentation/accelerate/compressing_and_decompressing_files_with_stream_compression) but these aren't using the Apple Archive Framework... I'd really like to stick with the Apple Archive Framework if possible as it's simple and very fast.
Posted
by
Post not yet marked as solved
0 Replies
21 Views
inapp purchase product has been in review for more than 24 hours, although we have another product that was submited for review after the first one and it has been approved already
Posted
by
Post not yet marked as solved
0 Replies
22 Views
Hi, I am developing Cordova apps/games with in-app purchase products as well as an initial product as non-paid (Free) tier: New users will be able to play freely for a set of games as default at the beginning. Then, if they would like to have more games with different set of attributes or themes, they can add more games with in-app purchases. It is similar to a game called Subway Surfers in App Store I would play in the past. A new player initiates games as Free Tier. After, let us say 3 games, the user is asked if he/she would like to have more games to play with different scenes/themes in different Tiers, in addition to their disposal: Tier 1, Tier 2 and Tier 3. For example Tier 1 adds 3 more games into the Free Tier games so they can play 6 games in the set;Tier 2 add 6 more games and so 9 games they can play and so on. Each individual game in their set is a variant of others in differing Tiers. If they don't wish and play Free Tier games, they may play them too, with limited set of themes but infinite times. If a user chooses a tier, let us say Tier 1, and when they play 6 games, they are asked if they would like advance to Tier 2 or Tier 3. If they choose Tier 2, as they complete the respective games they will be asked for Tier 3. However, if they don't wish to advance, again they can play current Tier games as many times as they wish. It is like non-subscription apps then converted to subscription-based ones. In App Store Connect, I created a number of products for in-app purchases for an app. How I can deliver this Free Tier games in the app and let users try it and allow them to choose in-app purchase products available in AppStore Connect. I would appreciate response and support. Best Lexxyacc
Posted
by
Post not yet marked as solved
0 Replies
30 Views
Hi there -- I'm cleaning up the accessibility in our app and making sure it adheres to Apple's suggested guidelines. For accessibilityHint, apple lists a couple of suggestions in the doc here: https://developer.apple.com/documentation/objectivec/nsobject/1615093-accessibilityhint Notably this one is one that I'm having to change a lot in our app: Don’t include the action type in the hint. For example, don't create hints like “Tap to play the song” or “Tapping plays the song.” However, we have some buttons that do different actions based on a double or triple tap in VoiceOver, so our hint looks something like: "Double tap to do X, Triple Tap to do Y" This violates the accessibilityHint guidelines, but I feel like changing this would mean the customer loses out on valuable information. What does apple suggest we do in this case? Thanks in advance!
Posted
by
Post not yet marked as solved
0 Replies
29 Views
hello, has anyone seen a feature in the Callkit SDK where one can add an audio input (such as from an MP3 file) into an ongoing voice call? e.g. mix a playing audio file into the microphone audio (or, possibly, mix it to one channel like MP3 file gain = 1 (max), mic = 0) so the audio only comes from the MP3 file?
Posted
by
Post not yet marked as solved
0 Replies
32 Views
I'm trying to get the same path you'd get by running getconf DARWIN_USER_CACHE_DIR in the terminal, but via FileManager.default.urls(for: , in:) , but can't really find out how is there a way to do that other than running the shell script via swift?
Posted
by
Post not yet marked as solved
0 Replies
26 Views
This issue is a bit strange. On one machine at work, attempting to use the Xcode 15.0 CarPlay simulator results in devices saying "Accessory Not Supported". The redesigned 15.3 simulator crashes on launch. We have tried 5 different phones with USB C, Lightning to USB C, Lighting to USB A, etc and the same result occurs on all of the above. Taking the same phones and cables to 4 other laptops works fine. The non functioning machine connects to any other USB device just fine. We even tried different partitions, installing Xcode, different macOS versions, etc. There are some suspicious parts of the log on the non working machine: default 09:18:10.075726-0400 mobileactivationd Client certification requested by CarPlay Simulator error 09:18:10.088862-0400 CarPlay Simulator Failed to obtain valid certificates from server: <private> error 09:18:10.103753-0400 CarPlay Simulator Incoming message ID 0xaa04 AuthenticationFailed and error 09:18:09.452387-0400 CarPlaySimulatorDeviceLink RemotePairing.framework is not available. default 09:18:09.452419-0400 CarPlaySimulatorDeviceLink RemotePairing.framework not found. Meanwhile the working machines according to Activity Monitor is loading /Library/Apple/System/Library/PrivateFrameworks/RemotePairing.framework/Versions/A/RemotePairing just fine. The non working machine does have that file on disk, so that's not the issue. The non working machine is a 2019 i9 16" MBP. Working machines include a 2018 i7 13" MBP, 2021 M1 Max 16" MBP, and 2020 M1 13" MBP.
Posted
by
Post not yet marked as solved
2 Replies
45 Views
Gents, dev(il)s, I am looking for a piece of code or principal explanation to realise following: I have a array of struct Item{} Each item has child [Item] in the content view I would like to have a hierarchical displayed tree of my Items and for each Item line I would like to have a button to remove it or add a child item for a selected one I tired List entity, navigation and have no real success. Is anybody there to give me a small guide? Thank you M
Posted
by
Post not yet marked as solved
0 Replies
26 Views
I am attempting to use UITextSelectionDisplayInteraction. It basically works, but I'm unsure how the selection handles are supposed to work. The documentation is minimal and the WWDC video (2023 session 10058) doesn't say much either. As the name suggests, it seems that this interaction only displays the cursor, selection background, and handles. As I change the selection, it updates these views. So if I want the user to be able to drag the selection handles I need to implement that, right? OK, so I add a gesture recognizer to each selection handle. But this doesn't seem to do anything, i.e. the gesture recognizer action never seems to be invoked. Maybe I'm doing something wrong - but I'd like to understand what is supposed to happen. Is adding a pan gesture recognizer to each selection handle the right approach? P.S. I wanted to tag this "WWDC2023-10058", but the per-session tags seem to have disappeared. Is this a forum bug, or deliberate?
Posted
by
Post not yet marked as solved
1 Replies
39 Views
Hi, I am using macOS Sonoma 14.5 and the latest version of Xcode (15.4). Every time I open Xcode, it asks me to install additional components. I accept, but when it finishes, the same dialog appears again. I've done this multiple times. I also uninstalled and reinstalled Xcode, but no luck. Can you please help me?
Posted
by
Post not yet marked as solved
0 Replies
35 Views
Hello fellow developers, We are trying to develop a chatbot application for ios devices using the powers of Oracle Digital Assistant. Main Documentation :- https://docs.oracle.com/en/cloud/paas/digital-assistant/use-chatbot/oracle-ios.html Implementation instructions :- https://blogs.oracle.com/digitalassistant/post/oracle-techexchange-using-the-oracle-ios-sdk-to-integrate-oracle-digital-assistant-in-mobile-applications The point is when we are trying to run the app, we are facing tons of warnings as in below screenshot. Here is the code for the ViewController.swift as below: // // ViewController.swift // ODA_Configure // // Created by Macbook on 15/05/24. // //import UIKit // //class ViewController: UIViewController { // // override func viewDidLoad() { // super.viewDidLoad() // // Do any additional setup after loading the view. // } // // //} // Import the SDK import UIKit import BotClientUISDK public class ViewController: UIViewController { // Declare a global BotsViewController variable in your app view controller class public var chatViewController: BotsViewController? public override func viewDidLoad() { super.viewDidLoad() // Obtain a shared instance of BotsViewController from BotsUIManager chatViewController = BotsUIManager.shared().viewControllerInstance() // Specify the color changes if any in a particular component. Make sure you set all the required colors in BotsProperties before adding the chat view to the view controller. // Add the chatViewController to your navigationController self.navigationController?.pushViewController(chatViewController!, animated: false) // Obtain a shared instance of BotsManager let botsManager = BotsManager.shared() // If you require access to callback methods provided in AuthenticationProvider. Make sure your class conforms to BotsMessageServiceDelegate // botsManager.authenticationTokenProvider = self let baseUrl = "idcs-oda-81e5e7409d52405784089abe830a8820-da12.data.digitalassistant.oci.oraclecloud.com" let channelID = "ff8a2d3f-7d65-4dab-a09a-d8f574ce5b7a" // Initialize a BotsConfiguration object and set feature flags if required. let botsConfiguration = BotsConfiguration(url: baseUrl , channelId: channelID) BotsManager.shared().connect(botsConfiguration: botsConfiguration) // Set the feature flag values if the desired values are different from the default values botsConfiguration.showConnectionStatus = true botsConfiguration.enableSpeechSynthesis = true botsConfiguration.disablePastActions = "none" // Initialize the configuration in botsViewController. Make sure you set all the feature flag values before passing the botsConfiguration to initConfiguration. chatViewController?.initConfiguration(botsConfiguration: botsConfiguration) // If you require access to callback methods provided in BotsMessageServiceDelegate. Make sure your class conforms to BotsMessageServiceDelegate //botsManager.delegate = self // If you require access to callback methods provided in BotsEventListener. Make sure your class conforms to BotsEventListener //botsManager.botsEventListener = self // Initialize and establish connection to the chat server BotsManager.shared().initialize(botsConfiguration: botsConfiguration, completionHandler: { (connectionStatus, error) in if error != nil { print ("Error: \(String(describing: error?.localizedDescription))") } else { print ("Connection Status: \(connectionStatus)") } }) } } After executing this code, we are getting the message as build succeeded , and this is the emulator, which happens to be blank white all the time. Possibly due the warning which I have posted above this seems to be the showstopper in the development. We are developing this for a prestigious client and would request an assistance as soon as possible. P.S :- We are using Xcode 15 with Simulator of version 17.0.
Posted
by
Post not yet marked as solved
2 Replies
70 Views
We have an iOS app built using Capacitor. We are seeing a large increase in app crashes on iOS 17.4 (iPhone). Other OS versions seem to be showing significantly fewer crash numbers. We are unsure what is causing this, as our app did not go through any major releases. I have attached the crash log below. Thanks Exception Type: EXC_CRASH (SIGKILL) Exception Codes: 0x0000000000000000, 0x0000000000000000 Termination Reason: RUNNINGBOARD 0xd00d2bad
Posted
by

TestFlight Public Links

Get Started

Pinned Posts

Categories

See all