Post

Replies

Boosts

Views

Activity

Hiding warnings for programmatically constrained elements from Storyboard
Hey All! This is my first post here, so excuse me if this has been asked before. I'm new to iOS development, but I'm pretty well versed in other languages. In most languages I work in, there's generally a way to mute certain warnings that come about. In Swift, I've seen that if you save something to a specific variable and don't use it, it can be replaced with an _, and it'll be fine, since the underscore is sort of like a ignored variable (non reference-able, etc) Anyways, my question is this: I'm currently building an app with a login screen, and decided to implement both email/password login and a Sign in With Apple login with the help of Firebase Auth for storing authenticated sessions and such. In doing so, I learned that there isn't a storyboard element for the sign in with apple button, and so I had to programmatically add it with a ASAuthorizationAppleIDButton. When doing this, and constraining it, specific elements that appeared on my storyboard were constrained based on this button, and so their constraints were programmatically added to the programmatically added Sign In With Apple Button. However, in the storyboard, I get warnings about these buttons missing vertical positioning, since their vertical positioning is not added as a storyboard constraint, but added programmatically through the Swift file that's tied to the storyboard. How would I mute these warnings, or ignore the vertical positioning warning in my storyboard? I should mention that I'm using UIKit and not SwiftUI for this as well. I'm also using Xcode 12 since my iPhone is on the iOS 14 developer beta. Thanks in advance for anyone who helps!
2
0
846
Jun ’20
Multiple errors, potentially from Firebase pods?
I get multiple builtime errors regarding this, only on occasion, but typically when I close Xcode and reopen it after a while. I'm opening an xcworkspace file (since I have a couple pods installed, like FirebaseAnalytics and FirebaseAuth, to name a few), and I get errors about Lexical or Preprocessor Issue, in regards to pb.h in multiple files. Has anyone else seen issues like this? I'm building for an iPhone 11 Pro on Xcode 12 beta. Specifically, this I sharpening in nanopb-umbrella.h, pb_common.h, pb_decode.h, and consequently because these aren't failing, nanopb is not building, resulting in cct.nanopb.h not finding the module of nanopb. I've tried reopening/closing the project, rebuilding the project and cleaning out the build folder, and doing a pod install, all to no avail. For reference, here are the current pods im using, if it makes a difference: Firebase/Analytics Firebase/Auth BRYXBanner Firebase/Firestore Any help would be appreciated. Thank you in advance!
1
0
3.4k
Jun ’20
Storyboard References Causing Black Screen?
Hey all, I'm relatively new to iOS Development, (been doing it for just under a year now!), and I've learned a lot of new things in this process. I'm currently working on an app for a class I'm taking, and I've sort of felt like I've exhausted all resources possible, but then I remembered about these apple developer forums. I'm reaching out over an issue I'm currently facing when using storyboard references. To my understanding, these storyboard references are used to literally reference other storyboard files, and create less of a complicated mess of a web of segues and connections from view controller to view controller, which is a really nice thing to have. On one screen of my app, I have a button that should trigger a segue to a storyboard reference. I've double checked the name of the storyboard and view controller its supposed to be connected to every time, and it compiles and builds perfectly fine (minus a few warnings, but nothing that I would classify as a compile-time error preventing me from running the app). However, the error still persists. I guess I haven't really even said what the error is, so let me clarify that; the error stems from when I click the button, it seems like it does a transition, and the storyboard picks it up, yet on both a simulator and a physical device, it results in a white navigation bar followed by a black screen where all the other UI elements should be. I have a screen recording, but it seems like I can't upload that or link to something like streamable or YouTube, so that would be problematic. If anyone knows of a workaround to include a video link, that would be awesome. Again, thanks for your help in advance!
0
0
424
Sep ’20
SwiftUI Dark/Light Mode Toggle causes View switch? + Sign in With Apple Certificate Revoke
Hi all - As the title states, I'm hitting a bug on my physical device where if I navigate to a different view using a navigationLink (that's not embedded in a navigationView, since it's a button that initiates the change), and then try and toggle from dark mode to light mode or vice versa, it goes back to the previous view. This is kind of an issue since when I have a screen like Sign in with Apple, my app asks for additional details like their birthday. If they toggle the switch from light to dark on that screen, and then hit sign in with apple again, it assumes they already have an account, so they would have no birthday stored on the database. So I guess this is a two-for-one question: The toggle from light to dark/dark to light causes my app to navigate a view back. Any idea on this? How do you revoke a Sign in With Apple response if the user decides to back out of it? Obviously the user can go into settings and do it but if they did it on accident then I want them to go to the birthday input screen rather than just assume that it's already a fully-filled out account.
0
0
819
May ’21