Post

Replies

Boosts

Views

Activity

'Expand macro' menu option does nothing
I somehow broke my Xcode, it does not expand macros anymore. What I have tried: create new project clean the project remove derived data remove contents of ~/Library/org.swift.swiftpm/security What I have not tried: remove Xcode completely and re-install it (will have to re-setup everything, so don't want to resort to it) Xcode version is 16.1. The 'Add File' button has everything grayed-out, so I can't upload a video here, and 'YouTube' website is not a valid URL here for some reason. Has anyone else faced a similar problem?
1
0
82
2w
SwiftUI alert buttons order issue
I am facing a problem with SwiftUI alert API. According to Apple Figma (https://www.figma.com/community/file/1248375255495415511/apple-design-resources-ios-17-and-ipados-17) it is possible to put a button with role "cancel" (the one with fatter text) to the right side of the alert. I can also see this behavior when requesting otp for authentication on apple forums: my iPhone shows an alert with "Accept" button in fatter font and placed to the right. But when I put things into the code, a button with "cancel" role get's pushed to the left. Code below struct ContentView: View { @State private var isAlertPresented = false var body: some View { Button( action: { isAlertPresented = true }, label: { Text("Show alert") } ) .frame(alignment: .center) .alert( "Test alert", isPresented: $isAlertPresented, actions: { Button("Default role", action: { }) Button("Cancel role", role: .cancel, action: { }) }, message: { Text("Test message") } ) } } results in even though the button with "cancel" role is put second in the code, when running it becomes first. Now API docs claim The system may reorder the buttons based on their role and prominence. however, folks at Apple forced button position somehow, and Figma claims what I need should be possible (which our designers use, so their posture is "Apple claims this in Figma, so it's possible, make it happen"). How that can be done exactly? Thanks
1
0
1k
Dec ’23
Is it possible to update managed iPhone's dns settings remotely without user interaction
Setup: An iPhone enrolled into some MDM system An app that provides custom dns settings installed on the aforementioned device using MDM The question is: is there a possibility for MDM admin to push *.mobileconfig file onto the device to update it's dns settings without requiring user interaction Say, the company has received 700 new iPhones, and we need to apply dns settings to all of them. With dns settings API, the admin would need to run the app on every device and enable the settings manually, which would take a lot of time.
2
0
608
Jan ’23
Setup vpn settings for NEPacketTunnelProvider
Hello everybody. I need to implement DNS settings with on/off toggle (so that user would not have to go to the iPhone settings). So far my research have pointed me to the direction of proxy/tunnel. And in the interface of NEPacketTunnelProvider I've discovered that it's settings contain vpnSettings property, just like NEDNSSettingsManager So I've created a sample project (tunnel branch), and I've managed to get the vpn up and running, however I am unable to setup dns settings properly. Invoking NEPacketTunnelProvider.setTunnelNetworkSettings with any kind of config prevents the tunnel from starting. I've used similar settings with my NEDNSSettingsManager , and it worked just fine. My feeling is that I set invalid value into NETunnelProviderProtocol.serverAddress and NETunnelNetworkSettings.tunnelRemoteAddress, but I'm unable to verify that since I possess no access to any kind of infrastructure. I am aware of MDM restrictions, and at this point I need to setup Google dns via packet tunnel with a on/off switch. Thanks.
2
0
886
Jan ’23
Need help with handling flows inside NEDNSProxyProvider
Hello everybody. I'm trying to re-route dns requests manually using DNS Proxy (basically, the same thing DNS settings do out-of-the-box). But the handleNewFlow(:) method just breaks my head. I've managed to find some bits of code to get some understanding of how to work with flows, but still can't comprehend the flow. Can somebody please explain the intended process of working with proxy flows? And is NEDNSProxyProvider even a working solution since dns parsing is discouraged and has been broken recently? Thanks
4
0
998
Jan ’23
Is it possible to route specific DNS requests to the local DNS server with custom NEDNSSettingsManager configuration?
I'm researching the capabilities of NEDNSSettingsManager. I've been able to implement custom dns settings to route my phone's DNS requests onto the servers I need. However, I can't find if there's a mechanism to route specific domains to the local DNS provider. Let's say I'm a business with a local DNS server that resolves my internal resources. I need my corporate iPhones to hit a 3rd-party secure DNS server selected by me. The latter has no idea about domain "my.business.gg". Using NEDNSSettings.matchDomains has the opposite effect. Maybe NEDNSSettingsManager.onDemandRules is the way to go? If so, how would one use it? If not, is it possible to do what I need to do with DNS settings, or should I look into DNS Proxy instead? Please help. Thanks
3
0
1k
Jan ’23
NEProvider creation failed
I am trying to get DNS Proxy app extension up and running. So first off, I've crated a sample project to play around with the API. I've crated an iOS project, put some base code, but when I launch the app, I get NEProvider creation failed, caller does not have the com.apple.developer.networking.networkextension entitlement error. Breakpoints in the extension target don't work, managed to get the info using Console. I have no idea where to put the required entitlement. Please help Here are the logs and the sample project
5
0
1.2k
Jan ’23