Post

Replies

Boosts

Views

Activity

Reply to Automatically add device frames to screenshots
By device frame I mean the metallic frame with the buttons etc. It is sometimes called "bezel". Please see the attached image. I ended up doing it semi-manually in Figma. I had screenshots exported automatically for all devices and languages by Xcode UI tests. Then I just added the frame to every screenshot manually. @Claude31 I can highly recommend investing some time in making UI test generate screenshots for you so that screenshots capture: any new changes any new language added any new devices you need screenshots for
Oct ’21
Reply to Unable to reach server on WiFi, but always able on cellular
I received an answer from AWS support and the issue has been resolved. It turned out that the problem was related to the nameservers. My domain is hosted on AWS, but my backend is in Google Cloud. While configuring my backend I must have changed the default nameservers on AWS to the ones provided by Google: ns-cloud-c1.googledomains.com. ns-cloud-c2.googledomains.com. ns-cloud-c3.googledomains.com. ns-cloud-c4.googledomains.com. The AWS support advised me to switch back to the default ones provided by AWS, because they were specified by whois lookup: ns-1553.awsdns-02.co.uk ns-857.awsdns-43.net ns-91.awsdns-11.com ns-1160.awsdns-17.org One of the beta testers, who previously experienced connection problems, reported that he was able to use the app on WiFi without any problems. As a side note, I have also been shown a handy tool to inspect how different locations resolve an IP address of a domain: https://www.whatsmydns.net/#NS/apple.com FYI @eskimo and thanks again for your input!
Sep ’21
Reply to Unable to reach server on WiFi, but always able on cellular
Thanks again @eskimo. Indeed, that was pretty easy to do. My ISP-provided DNS Server's address is 192.168.0.1 so I queried that one instead of 192.168.1.1 and I got no answer: ➜ ~ dig @192.168.0.1 -t A example.com ; <<>> DiG 9.10.6 <<>> @192.168.0.1 -t A example.com ; (1 server found) ;; global options: +cmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 22857 ;; flags: qr rd ra ad; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0 ;; QUESTION SECTION: ;example.com. IN A ;; Query time: 10 msec ;; SERVER: 192.168.0.1#53(192.168.0.1) ;; WHEN: Fri Sep 17 12:04:50 CEST 2021 ;; MSG SIZE rcvd: 29 When I used 8.8.8.8 I got the same IP address back that you got. I can successfully obtain the IP address of the domain, on which my backend is hosted. Only the example.com doesn't work for me. Ok, so I know how to query a DNS server for a given hostname, but where do I go from there? I could ask one of the beta testers to run similar queries when they encounter the problem, but how will it help? The only piece of information I will get is that they get no answer from their local DNS server. But the local DNS servers must be provisioned with DNS entries somehow. I'd say the problem is that for some ISPs, they don't provision their DNS servers with a hostname to IP address mapping for my domain. What can I do about that? I used AWS to register the domain about 2 years ago and about 3 months ago I created an A record to route traffic from that domain to an IP address of a load balancer in Google Cloud. TTL is 300 seconds. It is a pretty standard setup so I'd expect it to work without any extra effort. The weird thing is that it works on cellular and on Vodafone WiFi networks so the DNS entry must have been added to some ISP's DNS servers, but apparently not to all of them. Will post an update once I hear back from AWS support.
Sep ’21
Reply to Unable to reach server on WiFi, but always able on cellular
Thanks for the link @eskimo. I just skimmed through that page, ran a tcpdump while sending some requests to example.com and then tried to analyze it with the free tcptrace, but to be honest it is a bit out of area of my expertise. I don't understand the result and I don't really want to invest time into it, because I need to focus on the product. Actually I don't really care what is wrong with my DNS setup—I can always manually switch to 8.8.8.8 or 1.1.1.1, but I don't want this to happen to the users of my app. There is no point in releasing the app if the first thing the users see is "No internet connection". It might actually involve multiple ISPs (I know for sure that two of the beta testers, who reported this problem, use T-Mobile [aka Telekom] in Berlin), Vodafone users seem to have no problems. Will keep collecting more info from the others. Also, I opened an AWS Support case since I host my domain on their Route 53. Let's see if they can assist me with this.
Sep ’21
Reply to Unable to reach server on WiFi, but always able on cellular
Thanks for quick answer @eskimo. I just added a way to send simple HTTP GET requests to: myapp.com api.myapp.com example.com apple.com google.com And already from my iPhone connected to WiFi I was able to observe the following results: myapp.com ✅ api.myapp.com ✅ example.com ❌ apple.com ✅ google.com ✅ Same error: A server with the specified hostname could not be found. for https://example.com. Right now I cannot even open https://example.com on my MacBook Pro connected to WiFi (tried Safari and Google Chrome). My Internet provider is Vodafone and I am based in Berlin. On cellular everything works for all of us. All of my beta testers are based in Berlin. Two of them, for whom the issue manifested itself, use T-Mobile as the Internet provider. I will now distribute this version to others to see which domains they can reach. It appears to me that something is wrong with DNS resolution while on WiFi. I just tried manual DNS Configuration and entered 8.8.8.8, launched browser in incognito mode and voila—I was able to reach https://example.com. Switched back to Automatic and it is unreachable again. I could suggest users to use manual DNS configuration, but I would really like to avoid this option. I don't want to welcome users installing my app with a suggestion that they should modify their DNS configuration. I don't think it is the source code, because I'd say it is pretty standard and I haven't touched DNS or any low level networking stuff. Basically only sending HTTP Requests. Unless there is some setting in Xcode, entitlement, variable in Info.plist, capability, key or something related to signing certificate / profile, it has to be the network and its DNS resolution. IP addresses of the domains apple.com and google.com can be resolved, no matter what DNS server is used. But for my domain, it doesn't seem to be the case. Sometimes it is resolved correctly and sometimes not. Is there a way I can have a DNS entry added to these DNS servers? Why isn't it already there? While waiting for an answer for you, I will start exploring the option of contacting AWS and/or GCD support to try to resolve this.
Sep ’21
Reply to Unable to reach server on WiFi, but always able on cellular
Only folks located in Germany are reporting that. I checked the logs on load balancers and these requests don't even arrive there (just to rule out rate limiting and other security mechanisms on the backend). I just released a new beta version that gathers diagnostic information on device when these HTTP requests fail. After 15 minutes I received a report with the following error description: A server with the specified hostname could not be found. I have no idea what I am doing wrong. A quick search points me in the direction of something behind misconfigured in App Sandbox and its Network Connections. Right now, when I go to Target -> Signing & Capabilities, in the App Sandbox section, the Network part looks as follows: [ ] Incoming Connections (Server) [✓] Outgoing Connections (Client) In the .entitlements file (not sure which ones are relevant): associated domains contain applinks & webcredentials for my website only (not API), but I don't think this is relevant App Sandbox=YES com.apple.security.network.client=1 If one of these users connects to a “what’s my IP address site”, do they see the Wi-Fi or WWAN IP address? I can ask, but since they can access everything, but my app, I'd suspect it is related to my app and not their network. Please let me know if I should ask, because I think the additional info I just provided might have shed some more light on the issue.
Sep ’21
Reply to SwiftUI NavigationLink pops out by itself
Once @basememara mentioned that is may have something to do with the lazy loading I immediately thought about some (but not all) of my NavigationLinks using the following wrapper: Swift struct NavigationLazyViewContent: View: View { let build: () - Content init(_ build: @autoclosure @escaping () - Content) { self.build = build } var body: Content { build() } } NavigationLink(destination: NavigationLazyView(DetailView())) { Text("Click me") } Adopted from this source - https://stackoverflow.com/a/61234030/659389. So I tried wrapping every destination with the aforementioned wrapped and it seems that the navigation stopped popping views off the stack back and forth. The Unable to present. Please file a bug. is still there, but navigation seems to be working fine. Will post an update it the popping horror comes back. EDIT: It still pops back and forth, but I think not so often as before. To be honest I already don't know if it is my fault or apple's that this works like that. In SwiftUI sometimes things just start working differently without any iOS version updates or anything like that. Feels like a live lab.
May ’21
Reply to Sign in with Apple button appearance in dark mode
This works for me: import AuthenticationServices struct SignInWithAppleButton: UIViewRepresentable {   @Environment(\.colorScheme) var colorScheme   func makeUIView(context: Context) -> ASAuthorizationAppleIDButton {           let button = ASAuthorizationAppleIDButton(       authorizationButtonType: .continue,       authorizationButtonStyle: colorScheme == .dark ? .white : .black)           return button   }       func updateUIView(_ uiView: ASAuthorizationAppleIDButton, context: Context) {   } } struct SingInWithAppleButton_Previews: PreviewProvider {   static var previews: some View {     VStack {       SignInWithAppleButton()         .frame(width: 300, height: 40)         .cornerRadius(5)         .shadow(radius: 3, x: 2, y: 2)                       SignInWithAppleButton()         .frame(width: 300, height: 40)         .cornerRadius(5)         .shadow(radius: 3, x: 2, y: 2)         .environment(\.colorScheme, .dark)     }   } }
Feb ’21
Reply to SwiftUI Text.strikethrough() not working
Ok, I figured out what doesn't work. Turns out that whenever Text objects are concatenated and more than a half of total characters that make up these object DON'T have strikethrough() applied, then the strikethrough() from the final concatenated object is removed. Strangely, this bug applies only to the strikethrough modifier and works fine for bold, italic and underline. Filed a bug here: https://feedbackassistant.apple.com/feedback/8916878 See minimal example that reproduces this: import SwiftUI struct TestView: View {   var body: some View {     VStack{       Group {         HStack {           Text("Strikethrough test")             .font(.largeTitle)           Spacer()         }         Group {           VStack { Text("TO TROLL") + Text(" OR NOT TO TROLL?").strikethrough() }           VStack { Text("TO TROLL").strikethrough() + Text(" OR NOT TO TROLL?") }         }         .font(.body)         Divider()       }     }     .padding()   } } struct TestView_Previews: PreviewProvider {   static var previews: some View {     TestView()   } }
Nov ’20