31 Xcode Tips & Tricks - 2023

  Переглядів 37,308

Sean Allen

Sean Allen

День тому

Head to squarespace.com/seanallen to save 10% off your first purchase of a website or domain using code SEANALLEN.
I run through 31 tips and tricks for Xcode to improve your productivity and efficiency. Without a doubt, you will learn something new about Xcode today 😀.
This video was created in Xcode 14.
Show Build Times Command:
defaults write com.apple.dt.Xcode ShowBuildOperationDuration -bool YES
iOS Developer Courses
seanallen.teachable.com/
Twitter:
/ seanallen_dev
Hired.com:
hired.com/x/1n01g
Book and learning recommendations that help out the channel if you decide to purchase (Affiliate Links):
Paul Hudson's Hacking With Swift:
gumroad.com/a/762098803
Donny Wals - Combine:
gumroad.com/a/909014131
Mark Moeyken’s SwiftUI Books:
www.bigmountainstudio.com/swiftui-views-book/fzc51
Objc.io Books (Thinking in SwiftUI & Advanced Swift):
gumroad.com/a/656585843
Ray Wenderlich Books:
store.raywenderlich.com/a/208...
#swift #softwaredeveloper #iosdeveloper
Timestamps:
0:00 - Optional Parameters & Shortcuts
0:31 - Multiline Cursor Editing
0:47 - Vertical Selection
1:16 - Code Folding & Line Numbers
1:41 - Spell Check Your Code
2:03 - Refactor - Rename
2:23 - Edit All in Scope
2:59 - Slow Animations
3:28 - Record Videos & Animated GIFs
4:01 - 3D App Model (Views)
4:40 - Wireless Device - Run App
5:12 - SwiftUI Preview Variants
6:00 - Curly Brace Auto Indent
6:23 - Fix Indentation
6:47 - See Curly Brace Scope
7:05 - Quickly Adjust Text Size
7:18 - Quick Refactor - Extract Subview
7:58 - Reminders - #warning & #error
8:56 - Problem Solver - Clean & Build
9:20 - Show How Long Your Project Takes to Build
9:51 - Show Build Timeline - Find Issues
10:49 - Single Asset App Icon
11:19 - Test Flight Feedback in Xcode
11:51 - App Uses Non Exempt Encryption
13:11 - Open File or Method Quickly
13:41 - Xcode Theme Customization
14:21 - Document Your Code Quickly
15:12 - Open Apple Documentation
15:52 - Minimap
16:19 - Editor Management (Multiple Editors)
17:19 - Hover Panels

КОМЕНТАРІ: 128
@seanallen
@seanallen Рік тому
My iOS Development Courses - seanallen.teachable.com
@ALL_ONE_SUN
@ALL_ONE_SUN Рік тому
Thanks for posting that educational video! Was at WWDC 2022 and would love to have a salad like there were there today (learned at WWDC that rich people can afford actually nutritious food (part of what causes disparity) that also tastes great…and that made Me realize how much of the food I have eaten in My life has had relatively little taste compared to the much better food that rich people can afford). Had some interviews with Apple after that, but sadly haven’t been hired yet. Actually I had to declare one of the interviews basically over when the interviewer said he hired a C programmer that had never done OOP…for a role doing OOP…and then that same interviewer HORRIBLY used the ee pronunciation of a certain background services utility that is ACTUALLY pronounced dae and has a VASTLY BETTER meaning than the SEVERELY WRONG “dee” pronunciation…I declared that interview was SOOOOOO OVER when he said that.
@ALL_ONE_SUN
@ALL_ONE_SUN Рік тому
By the way, there were some app performance issues when nested a bunch of SwiftUI views. Any recommendation for eliminating the app performance issues SwiftUI caused? (There aren’t any animations, but there are view size relation calcs in those subviews). So far swiftui has sadly inspired to find best programmatic UIKit tool such as snapkit. Felt as though swiftui was such a fcking scam and apple fail.
@ALL_ONE_SUN
@ALL_ONE_SUN Рік тому
WTF is the issue with SwiftUI doing like 50 nested closure calls on a slider move, by the way?
@jenkinsxu6485
@jenkinsxu6485 Рік тому
command+shift+o and command+shift+j is always a good combo
@jonothen2212
@jonothen2212 Рік тому
My jaw dropped brother Thanks a lot
@seanallen
@seanallen Рік тому
Haha, happy to help out with some new knowledge, Jono.
@speedrocketstudios5168
@speedrocketstudios5168 2 місяці тому
My friend this is gold. That vertical select thing caused an audible whoop of joy
@seanallen
@seanallen 2 місяці тому
Happy to help!
@reidbrown7841
@reidbrown7841 Місяць тому
This is fantastic. Thank you
@seanallen
@seanallen Місяць тому
Glad you enjoyed it!
@iamsanketray
@iamsanketray Рік тому
There is a some sense of familiarity when it comes to Sean's Videos. I have been watching your videos even before I started my career 4.5 years back. I still enjoy these videos so much.
@seanallen
@seanallen Рік тому
Thanks for the long-time support, Sanket! Haven't seen you comment in a while. Welcome back :)
@vladislav2587
@vladislav2587 11 місяців тому
Thanks! Last tip is perfect for 13inch laptop.
@seanallen
@seanallen 11 місяців тому
Agreed. Very helpful when you need that extra space.
@sourPollo
@sourPollo Рік тому
I come back to this video time and time again. Thank you Sean!
@KJPKJPKJP
@KJPKJPKJP Рік тому
Pure gold! thx Sean
@seanallen
@seanallen Рік тому
😀
@nuriddinburkhonov5214
@nuriddinburkhonov5214 9 місяців тому
Very educational, thanks!
@seanallen
@seanallen 9 місяців тому
Glad it was helpful!
@pravalikad7740
@pravalikad7740 Рік тому
I know more than half of these shortcuts. I can proudly say I am a senior dev 😀✌🏽
@MarvelousLXVII
@MarvelousLXVII Рік тому
Great video as usual.
@seanallen
@seanallen Рік тому
I appreciate that! Glad you enjoyed it.
@Lordbyronq
@Lordbyronq Рік тому
Thanks Sean! Amazing tips as always. Keep up the fantastic work.
@seanallen
@seanallen Рік тому
Thanks, Byron. Will do!
@norah8201
@norah8201 9 місяців тому
Great, thank you.
@8615283
@8615283 Рік тому
Oh man.this was so great.Thank Sean.
@seanallen
@seanallen Рік тому
Glad you enjoyed it, Mehdi!
@drluismoya
@drluismoya Рік тому
One of the best IDE's tips and tricks I've seen. Thanks for sharing! 🏅
@seanallen
@seanallen Рік тому
Glad you liked it!
@mkbfhd
@mkbfhd Рік тому
So helpful😍thank you so much, sir!
@seanallen
@seanallen Рік тому
Happy to help!
@Hasan-po6ud
@Hasan-po6ud Місяць тому
Thanks
@seanallen
@seanallen Місяць тому
No problem
@denisg1208
@denisg1208 Рік тому
Thanks for going straight to the tips 🙏🏻 see that less often on YT
@seanallen
@seanallen Рік тому
Working on cutting out as much fluff as I can. Thanks for the feedback :)
@hoagy_ytfc
@hoagy_ytfc Рік тому
Yes!
@EpicnessCupStudios
@EpicnessCupStudios Рік тому
Man. That demo recording feature is a game changer.
@seanallen
@seanallen Рік тому
Glad you liked that one :)
@tpiatekarch
@tpiatekarch Рік тому
Excellent tips Sean! Thanks a lot as always!
@seanallen
@seanallen Рік тому
No problem, Tomasz. Glad you got some good tips out of it!
@cryptosid8006
@cryptosid8006 11 місяців тому
Excellent tips here, my fave: 2:23 edit all in scope, very nice.
@seanallen
@seanallen 11 місяців тому
Glad you liked it!
@luisarias7622
@luisarias7622 Рік тому
Aways clear and direct to the point. I hate introductions and bla bla. Great video Sean.
@seanallen
@seanallen Рік тому
Thanks Luis!
@fragrance7768
@fragrance7768 Рік тому
Great video !!!
@seanallen
@seanallen Рік тому
Thanks!
@af2b
@af2b 7 місяців тому
Hi Sean! hope you good!!! One day I wan't to became like you in iOS Development. Have a good day master =)
@shadowofarman
@shadowofarman Рік тому
Great video as always Sean! I have an extra tip for number 18: You could put a release build compile time error so you can make sure you change or do something before releasing the app: #if !DEBUG error(“change these before release!”) #endif This way the error will only happen when archiving for release, so you can freely test everything you want in debug mode without worrying that you would forget to do it in the end
@seanallen
@seanallen Рік тому
Very good tip!
@IasonOrlandosOx
@IasonOrlandosOx Рік тому
Thanks a lot ! Your approach is gold.
@seanallen
@seanallen Рік тому
Glad you like the approach 👍
@mdabirhossain6100
@mdabirhossain6100 Рік тому
These shortcut is going to boost my productivity lot more than before brother
@seanallen
@seanallen Рік тому
Happy to help!
@mateuszkacperski1211
@mateuszkacperski1211 Рік тому
2:05 is very helpful- thank you 🙏
@seanallen
@seanallen Рік тому
Glad it was helpful, Mateusz!
@f00kwhiteblackracismwarsh07
@f00kwhiteblackracismwarsh07 Рік тому
That’s the beauty of IDE right yay
@vectorShop
@vectorShop Рік тому
really useful, thanks!
@seanallen
@seanallen Рік тому
Happy to help!
@trungnguyenthanh9233
@trungnguyenthanh9233 Рік тому
Thank you
@seanallen
@seanallen Рік тому
No problem, Trung 👍
@trevormills
@trevormills Рік тому
Awesome video with some great tips - thanks Sean
@seanallen
@seanallen Рік тому
No problem, Trevor. Glad you enjoyed it!
@blinkpo4
@blinkpo4 Рік тому
Very helpful. Thanks!!!! ❤
@seanallen
@seanallen Рік тому
Happy to help!
@logicito
@logicito Рік тому
Such a great video, thank you
@seanallen
@seanallen Рік тому
Glad you enjoyed it!
@awais.fayyaz
@awais.fayyaz Рік тому
Thanks for the tips, Sean.
@seanallen
@seanallen Рік тому
Any time!
@toastrecon
@toastrecon Рік тому
Awesome, thanks, Sean!
@seanallen
@seanallen Рік тому
No problem, David!
@sourPollo
@sourPollo Рік тому
All this time I thought I had to have my phone plugged in in order to run the code on device. Thanks!!!! 🔥
@seanallen
@seanallen Рік тому
Glad you got a good tip from the video, Jeff 😀
@sergioudalov361
@sergioudalov361 Рік тому
cmnd+ctrl+e best! )
@LeaTamola
@LeaTamola Рік тому
Excellent video Sean
@seanallen
@seanallen Рік тому
Thanks Lea!
@david-holmes
@david-holmes Рік тому
Thanks!
@seanallen
@seanallen Рік тому
I appreciate the generous support, David 😀
@NexusUA
@NexusUA Рік тому
wow, was very useful for me, thanks!
@seanallen
@seanallen Рік тому
Glad it was helpful for you, Pavel.
@martinseal1987
@martinseal1987 Рік тому
great video
@seanallen
@seanallen Рік тому
Thanks!
@etaosin
@etaosin Рік тому
10th I'm using since 2017 :) But thx for this material. I will be back here to use as much these functions as I can.
@seanallen
@seanallen Рік тому
Blowing out your views like that is SO helpful.
@thomasjay2694
@thomasjay2694 Рік тому
Nice video. I am used to appcode (RIP) so I found this video quite interesting. Unfortunately Xcode is nowhere close to the refactoring capabilities of appcode and in general code editing isn’t xcodes strong suite. They should have spend more time on configuration instead of fancy animation. I am really hoping for a major overhaul at wwdc so Xcode won’t be the last ide without ai code sense.
@tbg6nb
@tbg6nb Рік тому
8:50 we can get an error without the preprocessor command. Just write any text like "hello" on an empty line and it will say something like "Cannot find 'hello' in scope"
@andrewiglinski148
@andrewiglinski148 10 місяців тому
Ah dude this is honestly my biggest struggle with Swift and Apple dev stuff in general. I'm a f---ing boss with Vim and I'm ok going back to vscode when I need to for Jupyter stuff or the occasional debug sesh... but X-code is such a huge change. It's super powerful and I admire the people that are super good with it, but it's been a struggle for this vim-bro.
@phongle1772
@phongle1772 7 місяців тому
Got to learn to do both. An IDE is just a tool to help you finish a task. You should have the skills to complete it regardless of the tool. There’s a lot of documentation.
@lowell_
@lowell_ Рік тому
Wireless connection to a device.. didn't know about that one, thanks!
@bytesizedscreencasts
@bytesizedscreencasts Рік тому
Do not work 80% of the time.
@ALL_ONE_SUN
@ALL_ONE_SUN Рік тому
If extract every subview into an external view, does that prevent entire view from being redrawn when slider in that view’s param was changed?
@soywil
@soywil Рік тому
What Xcode is this, folding ribbon is different on mine. Nice tips thanks!
@slippydouglas
@slippydouglas Рік тому
Another Single Asset App Icon tip: Xcode will take an use an SVG without issues. I shows a warning and I think I had to do some trickery of initially giving it a PNG then swapping it out in the filesystem with an SVG, but it builds and generates a PNG for device without issue.
@russellarcher9771
@russellarcher9771 Рік тому
One weird thing I noticed re Extract Subview is that the option only shows up if the preview canvas is open!
@seanallen
@seanallen Рік тому
Yes, this is true. I forgot to mention that.
@seangseang6872
@seangseang6872 Рік тому
Hello, Can you show me how to create the number pad in UiKit?
@LebenWerden
@LebenWerden 24 дні тому
If I execute print, I want the print output currently in the console to be cleared, and the new print output to appear there. It's annoying to click on the trash can icon every time. I haven't found anything in the settings.
@JackWill.
@JackWill. Рік тому
How do i make it so the side panels are larger in text? its so small. :/
@ingongoyama3995
@ingongoyama3995 Рік тому
Settings is now called Behaviors
@CierraLynnise
@CierraLynnise Рік тому
I just downloaded Xcode on my Mac (Ventura) but when it asks me to type in my password after reading the lil policy agreement thingy, it keeps rejecting my password thought it’s correct. What could I be doing wrong or how can I bypass it?
@Countrymusichitz
@Countrymusichitz Рік тому
I need a link to download Xcode for windows please
@heyjaywilson
@heyjaywilson Рік тому
🤯🤯🤯🤯
@seanallen
@seanallen Рік тому
Lot of good stuff in here... tough to remember them all tho, lol.
@aleksandertesenkov1421
@aleksandertesenkov1421 6 місяців тому
Great tips. Unfortunately, not all of them works for me. The tip 17 “Extract subview” at 7:23 doesn’t work for me. I use Xcode 15.0.1. Right-click brings the popup with multiple different functions grouped in sections. The multiple extract functions are under the “Refactor”, but it is no “Extract into Subview”. Am I do something wrong or Apple removed this function in XCode 15?
@MarkVolkmann
@MarkVolkmann Рік тому
Excellent video as always! There's one thing I can't get to work though. From 17:07 to 17:19 you demonstrate option clicking a file in the Navigator and then hovering over the existing split panes to decide where it should go. That does not work for me. When I option click the file it immediately goes to a seemingly random split pane. Is there some setting I need to change to enable the behavior in the video?
@seanallen
@seanallen Рік тому
hmmmm... i'm not sure. It's always worked that way with default settings for me. Do you have more than 2 editors open? If you only have 2 open, it will automatically open up in the secondary window. This feature only works with 2+ editors open.
@MarkVolkmann
@MarkVolkmann Рік тому
@@seanallen Yes, I have two editors open when I option-click a file in the Navigator. But it still just immediately places the file in one of the open editors. After you option-click a file do you need to hold anything down while hovering over the open editors?
@seanallen
@seanallen Рік тому
To clarity, you need MORE than 2 editors open. So I should have said 3+. Apologies for the confusion.
@MarkVolkmann
@MarkVolkmann Рік тому
@@seanallen I tried again with 3 editors open and I get the same behavior. The file that I option click in the Navigator goes to an arbitrary editor and doesn't wait for me to hover over one and click.
@MarkVolkmann
@MarkVolkmann Рік тому
I figured this out! You need to option-shift-click the file, not just option-click it. This works regardless of the number of editors open, even if it's only one.
@erikkamalov363
@erikkamalov363 Рік тому
What is the monitor model))?
@seanallen
@seanallen Рік тому
LG 34 inch curved ultra wide. It's a few years old now.
@d.k008
@d.k008 Рік тому
❗️Pls add subtitles with translation to your videos, Thank you very much!!!
@ALL_ONE_SUN
@ALL_ONE_SUN Рік тому
“Click that weird button” (because apple has GUI design “issues”)
@davidlintin
@davidlintin Рік тому
Dude the way you have your indents in your models gives me anxiety 😅
@seanallen
@seanallen Рік тому
Code organization/style is always a subjective thing :)
@kirow-hw5mu
@kirow-hw5mu Рік тому
I'm AppCode user and because it will be sunset next year I'm trying to get used with Xcode. But its like a nightmare... All Xcode users that I have worked with making a lot of grammar mistakes. In the video there was section about Spell Check. I tried and it much worse than AppCode propose. In AppCode we can fix or add to dictionary with Alt+Enter shortcut, not touching mouse (and it will actually apply rename in all places needed). In Xcode - CMD+: and then we need to interact with this badly designed popup to pick change and it will correct only one place. Very bad user experience... Quick Refactor - Extract View - Not quick at all. Extract, rename, add property, change init signature. disgusting Hope next year there will be some improvements for refactoring otherwise I will need to change language or suffer in Xcode. Also Copilot would be useful - save a lot of time for boilerplate code.
@gofudgeyourselves9024
@gofudgeyourselves9024 Рік тому
Pat cummins
@ALL_ONE_SUN
@ALL_ONE_SUN Рік тому
LOL…warning list…worked hard to make an app that has had less than 150 US DOLLARS in profits in a month…as if there was any reason worth having a warnings list that was ONLY those manually specified
@Ni7ram
@Ni7ram Рік тому
hey sean! i love your videos! but you talk too fast, and in a monotonous (although high energy, which is appreciated!) way. its makes it difficult to absorb
@slippydouglas
@slippydouglas Рік тому
Also regarding indentation, ⌘] will indent the selected lines and ⌘[ will outdent. I use these all the time because the same keyboard shortcuts work across many text/code editors, and because I’ve never been a big fan of auto-indent (maintain indent when pressing return: yes, decide the indent for me based on context: no thank you).
@Gadolizm
@Gadolizm Рік тому
great 😍
@ZoeSummers1701A
@ZoeSummers1701A 11 місяців тому
I wish Xcode had a) Regions and b) Allman bracing and not that vile K&R crap.
24 Xcode Tips in 15 Minutes
15:30
Paul Hudson
Переглядів 72 тис.
You might not need useEffect() ...
21:45
Academind
Переглядів 133 тис.
Swift API Calls for Beginners (Networking) - Async Await & JSON
25:35
Apple Debugging L9 - Instruments Time Profiler
26:54
AppleProgramming
Переглядів 14 тис.
Your App Will Get Rejected | New Privacy Rules - 2024
11:26
Sean Allen
Переглядів 30 тис.
Xcode Configurations and Flags
21:25
Stewart Lynch
Переглядів 11 тис.
Setting up M2 MacBook Air For Programming
16:28
Andres Vidoza
Переглядів 1 млн
5 SwiftUI Features You (Probably) Didn't Know!
7:59
Flo writes Code
Переглядів 4 тис.
Why You Shouldn't Nest Your Code
8:30
CodeAesthetic
Переглядів 2,5 млн
🔴 6 GAME CHANGING Xcode Tips, Tricks & Shortcuts
6:53
AppStuff
Переглядів 1,8 тис.
SwiftUI Tooltips with TipKit (Popover & Inline Tips)
16:17
Sean Allen
Переглядів 11 тис.
Вы поможете украсть ваш iPhone
0:56
Romancev768
Переглядів 405 тис.
🤯Самая КРУТАЯ Функция #shorts
0:58
YOLODROID
Переглядів 3,3 млн