I have a couple of NSTextFields values bound with corresponding string properties of my view controller class.
The NSTextFields have the content type set to Username and Password respectively.
When running, the user is asked to select the password and the values are apparently put in the text fields. But the bound properties are not set (they are empty strings). If I use stringValue directly from the text field the values are there.
The bound value is set to continuously update value.
I can work around this issue using stringValue, but I asume that autofill should also work with bindings on macOS.
Post
Replies
Boosts
Views
Activity
I'm working on an applications that provides a service. The items for the services menu are hard coded in the Info.plist file under the NSService key.
Everything works as expected except that I would like to change the titles of the menu items if a certain condition changes in my application.
Is there a way/API to achieve this?
I'm working on an app that implements a custom VPN with NEPacketTunnelProvider. The app is used to connect to industrial facilities, so security is an important issue.
During an audit it was mentioned that while connected to the VPN, a user could create a static route (in the Terminal) and deviate traffic for a specific IP (inside the VPN's target network) to another interface outside the VPN.
I need a way to solve this issue. I can think of:
Checking the routing tables before starting the VPN for a route that has one of my known IPs. If I find one alert the user.
Forcing the all the traffic through the VPN. By default I was seeing this behavior, but apparently manually created routes take precedence.
In macOS versions previous to Big Sur there was an option to set the network service order, but now apparently it doesn't apply to VPN interfaces. I was thinking on somehow forcing the VPN to be on top of all other interfaces.
I have done some research about how to do the first solution, but it would need to call sysctl() and inet_ntop() but they need to be executed as root, and I guess they are not App Store friendly.
I don't know how to implement the other two solutions by code, specially in a way compatible with iOS/iPadOS and macOS, and be App Store friendly.
I will appreciate any help, comments and suggestions on how to solve this issue.
Thanks.
I'm working on a project that will add a window with a SwiftUI's NavigationView. The window will still be a NSWindow with a NSHostingController inside a Storyboard file.
The issue is that the NavigationView is not showing the navigationTitle as expected for the new style of the sidebars.
To show my problem I have a link to a sample project. It has two targets with exactly the same SwiftUI views, but one is using Storyboards and NSHostingController, and the other is a full SwiftUI view. The idea is to have the NSHostingController view look and behave as the SwiftUI one. See image:
Any help with this will be appreciated.
I'm developing and application that will use ReplayKit's Broadcast API to stream the screen of a iOS device. For that I'll need to create the Client App and the Broadcaster App.
The WWDC videos about ReplayKit mention WWDC 2016 session 601 "Go Live with ReplayKit" but I can't find it.
Can someone point me to that video or to its transcript?.
Also, any other resource about the Broadcast API will be appreciated. Most of the samples and documentation that I've found on the web are for just streaming of the app's own screen.
Thank you.
I'm working on a project that will use iOS (and macOS) full screen broadcasting. For this I'm doing my research into ReplayKit and working on a proof of concept app.
I'm able to broadcast the screen to Mobcrush but the view of RPBroadcastActivityViewController looks like this:
The obvious problem is that the view looks all wrong with all the icons missing. why?
In my device I have installed Twitch, Mobcrush, and YouTube. I don't know why Twitch doesn't appear here. If I start recording the screen from Control Center then I can stream to Twitch.
I'm using an iPhone 7 with iOS 15.1
Any help will be greatly appreciated.
How can I programmatically select which WindowGroup to open when the my application is launched?
For example:
@main
struct SampleWorkingApp: App
{
var body: some Scene {
WindowGroup(id: "wg1") {
ViewOne()
}
WindowGroup(id: "wg2") {
ViewTwo()
}
}
}
I want to select between wg1 and wg2 depending on a value in UserDefaults.standard.
The following code produces a compile error, but it shows what I want to do.
@AppStorage("showFirstView") private var showFirstView = true
var body: some Scene {
if showFirstView {
WindowGroup(id: "wg1") {
ViewOne()
}
} else {
WindowGroup(id: "wg2") {
ViewTwo()
}
}
}