How to create widgets for existing iOS app | iOS 14 Widgets tutorial in Hindi

Sdílet
Vložit
  • čas přidán 2. 10. 2020
  • This widgets tutorial in Hindi covers ios 14 widgets introduction and how to create widgets for the existing iOS app. In this swiftui widgets tutorial in Hindi we will see how we can use existing iOS code for our widgets extension. The data of the widget is fetched from an API but the good thing is we are using the existing iOS app code for the same for re-usability purpose
    Medium link blog post on widgets: / ios-14-widgets-not-ren...
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    ✅ Subscribe to the channel and stay ahead of everyone by following the right way for writing clean code in swift. 🔥🔥🔥🔥🔥
    🔗Click on the link to subscribe: czcams.com/users/codecat?sub...
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    -----------------------------------------------------------------------------------------------------------------------
    📥 Download the source code from
    Github: github.com/codecat15/CZcams-...
    Google Drive: drive.google.com/file/d/11BLJ...
    -----------------------------------------------------------------------------------------------------------------------
    🎶 Royalty-free Music: www.bensound.com
    ############################################
    Connect with me on social media
    📧: codecat15@gmail.com
    Instagram: / codecat15
    🐦: / codecat15
    Facebook: / code.cat.792
    Github: github.com/codecat15
    ###########################################
    #swiftUIWidgetsiOS14 #swiftWidgetTutorialHindi #widgetsTutorialHindi

Komentáře • 93

  • @CodeCat15
    @CodeCat15  Před 3 lety +3

    In this tutorial we will understand what are widgets and how to create widgets for your existing iOS app, since we will be working with an existing app we will try to re-use the code from our iOS app into our widget extension for re-usability. I hope this video will provide you all the steps you need to start your widget development for your iOS app, if you have any questions then please feel free to ask them as comments or email and do share and subscribe the channel with your iOS group

    • @CodeCat15
      @CodeCat15  Před 3 lety

      @@mhmudsalah2594 I responded to this question in the earlier comment, do check that out

  • @dhamodharanbalachandran6029
    @dhamodharanbalachandran6029 Před 3 měsíci +1

    Very nice explanation! step by step explanation is good. Thank you!

  • @LevelUp3646
    @LevelUp3646 Před 2 lety

    Love your lectures, sir

  • @sachinmore9516
    @sachinmore9516 Před 3 lety

    It's really great. Please create a Deep Link video soon. i am waiting for that.

  • @poojaraghuwanshi1914
    @poojaraghuwanshi1914 Před rokem +1

    Nice Explanation Thankyou for covering this important video in Hindi

  • @aird1893
    @aird1893 Před rokem

    Hey - very well explained, can you also show tap on some uielement on widget via deep link? or if you have some example already then please share

  • @pratikgupta7373
    @pratikgupta7373 Před 3 lety +1

    Hii Thanks for the Awesome Tutorial

    • @CodeCat15
      @CodeCat15  Před 3 lety

      Hey Pratik, thanks man just sharing what I have learned and implemented in widgets so far with the community, please do ask questions on this topic and do share this tutorial with your iOS friends on facebook or whats app and do ask them to subscribe for latest updates on swift programming :)

  • @hirenm3926
    @hirenm3926 Před 8 měsíci

    Hi Ravi, Awesome and very helpful video !
    can you please create a video tutorial , how to use "share extension" (ios 13.0 or later ) to share image from iPhone's photo gallery to our app 's specific screen (and further to chat - we can omit this part)
    Thank you.

  • @NamitaMaheshwarinim
    @NamitaMaheshwarinim Před 3 lety +2

    Such a useful tutorial u made .. please take me to the link where you explain further part mentioned in this view :
    force reload and rest of the things.

    • @CodeCat15
      @CodeCat15  Před 3 lety

      I have not explained force reloads but they are fairly simple to do, but should only be done when it's needed and not all the time.
      You can refer to this documentation link for how you should plan your widget reloads with best practice: developer.apple.com/documentation/widgetkit/keeping-a-widget-up-to-date

  • @sumitrathore8446
    @sumitrathore8446 Před 3 lety

    Could you please create a video on deeplinking , Profiler and Instrumental ?
    And
    How to create custom framework?

  • @ssaai
    @ssaai Před 3 lety +2

    👏🏻👏🏻👏🏻👏🏻👏🏻👏🏻 nice

    • @CodeCat15
      @CodeCat15  Před 3 lety +1

      Do feel free to ask questions on this topic sai and do share this with your iOS group

  • @PriyankaGhosh-dq6ig
    @PriyankaGhosh-dq6ig Před 11 měsíci

    Thanks for the video. Can we add or remove widget dynamically? It can be done using live activity in ActivityKit. But it's supports from ios 16.1. Is there any way to add / remove widget on a button click from application that supports from ios 14?

  • @TheDreadeddevil
    @TheDreadeddevil Před 3 lety +1

    Hi Code Cat, great quality video, and thanks for doing this, could you please let me know how can I create a widget for an app which displays images in a table view cell. Is there any way to recreate a table view cell onto a widget?

    • @CodeCat15
      @CodeCat15  Před 3 lety +1

      yes its possible to show the images on the widgets, and here's how I would approach it. If your API supports pagination (top and skip) then just bring top 10 records from it, you don't want to bring the entire data set as widgets have limited UI and scrolling is not possible in widgets.
      The image URL can then be loaded by the image view using the image from URL function, since widgets do not support scrolling you don't need to worry about lazy loading them but it will be a good idea to include lazy loading images else it's fine.
      Let me know if that answers your question if not then feel free to ask more and do share this video with your iOS group to show how easy it is to use the existing codebase to build widgets for your application

  • @mohdzakir8180
    @mohdzakir8180 Před rokem

    Hi sir
    How can we navigate an specific View Controller on click of widgets?
    Please help for this

  • @1ongole1
    @1ongole1 Před 3 lety +2

    Hi Ravi, It was really very good session on iOS 14 Widgets. It was very clear and your explanation is too good. I am eagerly waiting for next part of iOS 14 widgets (Deeplink and Link) in UIKit application.

    • @CodeCat15
      @CodeCat15  Před 3 lety +1

      Hey Monish, welcome to the channel. Glad that this video was helpful to you. I will be making a video on the pending topics very soon. Do share the video with your iOS group and show them how easy it is to create a widget with their existing codebase

    • @arshadshaik2578
      @arshadshaik2578 Před 8 měsíci

      Hi Rav, when will you upload video ?
      how to link widgets in swift project ?

  • @technicalbanda9691
    @technicalbanda9691 Před rokem

    Hii sir can I show websocket data on widget? Ex - some trading widget like reliance share and it's price and this value is always fluctuate till websocket didn't disconnect. Please reply me..🙂

  • @mansimadan639
    @mansimadan639 Před 6 měsíci +1

    Hey!!! Any video on interactive widgets specially with toggle. Thanks

    • @CodeCat15
      @CodeCat15  Před 6 měsíci

      As shown in the WWDC video you cannot have widgets that interact with the user. Which means you cannot have UI components like toggle in your widget

    • @mansimadan639
      @mansimadan639 Před 6 měsíci

      @@CodeCat15 i was reading about it and it says we can have button and toggle as an interactive components

  • @poojaraghuwanshi1914
    @poojaraghuwanshi1914 Před rokem +1

    ssl panning ,jail broken , xcode cloud, security management , Reactive @code cat these topic can you cover

    • @CodeCat15
      @CodeCat15  Před rokem

      SSL pinning and security management are few topics in the list, are you looking for something specific for jail broken and Xcode cloud?

  • @vinayakkoti257
    @vinayakkoti257 Před 3 lety +1

    Can you please make a video on how to release app to AppStore with Apple guidelines , and what all certificates we need , and what is provisioning profile, what are .cer ? Please

    • @CodeCat15
      @CodeCat15  Před 3 lety

      I don't have my app store account so I would have to buy one to actually make a video, however I am working on getting an account of my friend and see if they are comfortable with me using that for this video, till now many have just said NO let's see

    • @vinayakkoti257
      @vinayakkoti257 Před 3 lety +1

      @@CodeCat15 Sure Thanks for the response

  • @aarohan2199
    @aarohan2199 Před 3 lety +2

    Great teaching Sir 💯👍
    Sir, I wanted to make my career in IOS development but I'm having 2 yrs of gap now. Can you please guide & help me??

    • @CodeCat15
      @CodeCat15  Před 3 lety +2

      in programming, gap does not matter, if you can code you get the job. companies won't reject you as long as you code right and your technical skills are to the point for all the basic concepts. Yes, they will surely ask you why the gap and as long as you have a good reason for it I think you will do okay because companies value talent and good developers.
      Since the gap is of 2 years some company may not pay you as per the market standards example: if prior to the gap you had 4 years of experience so they may give you salary as per the market standard for a 4-year exp dev or they may just say you lack some skills and after 6 months we can raise your salary if you perform well, salary is a different gamble and different companies have different measuring mathematics on how they arrive at the figure they pay to their employees.
      Just focus on your end result which is getting a job and don't worry about the gap be honest with the company and even if you fail in some interviews then rather than getting tensed learn from your mistakes or even ask the company where you lacked and just focus on skill development.
      My key advice is do not sign a bond for 3-5 years, bond is very bad and if you get a better opportunity then you are stuck in one place for 3 years, if the bond is for 1 year I don't really mind because in 1 year you come to know about the company culture, process, management, appraisal process etc
      Wishing you all the best and success in your coming days, if this channel helps you in your interview preparations then consider helping your friends who are preparing for job interviews by sharing this channel with them.

  • @girlscanplayvideogamestoo4746

    and also, do you know if I can refresh the data from the widget when the app receives a push notification and the app is killed/closed?

    • @CodeCat15
      @CodeCat15  Před 3 lety

      yes you can do a force refresh on your widget but I have not tested it with push notifications but I do know that you can force a refresh on the widget, we should avoid force refreshing our widgets all the time as it will consume battery and hence apple designed widgets in such a way that the widget with which the user interacts the most is the one to be given priority.

  • @SachinBhardwajhappymoments

    Waiting for force reload and Deeplink for the widgets

  • @villagerstalent8933
    @villagerstalent8933 Před 3 lety +1

    Sir, can we use widget in objective C project, please reply soon..

    • @CodeCat15
      @CodeCat15  Před 3 lety +1

      I have not tried that, but I think you should be able to add a widget if you are supporting iOS 13 and above. If you can add the widget project in your existing iOS project build it and run it if you see the widget in your simulator you are all set buddy

  • @KimbrellBrad
    @KimbrellBrad Před 3 lety +1

    Excellent coverage of widget creation & essential topics! Thank you!
    When a user opens their home screen on the phone does the widget automatically update at that point or does it just display what was gained in the last update? In other words, does it just use what was gained at the last timeline? Or does it update immediately and then start following the timeline again?

    • @CodeCat15
      @CodeCat15  Před 3 lety

      Hello Brad, welcome to the channel. The widget update is actually determined by the OS and there are various factors that are taken under consideration like how many times does the user interacts with the widget and how many times does the widget appear to the user etc based on those calculations the OS determines the priority of the refresh.
      However we can force refresh the widget if we want to like if an event occurred in the app you can write code to pass that information to the widget.
      If the OS considers the widget less popular then the widget updates based on the timeline that was provided.
      Let me know if I answered your question and if not then please feel free to ask more

  • @vietsublyrics104
    @vietsublyrics104 Před 2 lety

    Widget getTimeLine not called on second install of app
    1. Add widget.
    2. Uninstall app.
    3. Reinstall app.
    4. Add widget.
    Widget seems to be cached on previous install, please help me to solve it. Thanks a lot!

  • @uni_planner4431
    @uni_planner4431 Před 2 lety

    bro how set widget

  • @shubhamshinde64
    @shubhamshinde64 Před 3 lety +1

    Can we add widgets using UIButton through the ViewController??

    • @CodeCat15
      @CodeCat15  Před 3 lety +1

      Hey Shubham, welcome to the channel as of now you cannot add the widget using a uibutton

    • @shubhamshinde64
      @shubhamshinde64 Před 3 lety +1

      @@CodeCat15 Okk...Thanks

  • @hajraqurban1159
    @hajraqurban1159 Před 9 měsíci

    while adding widget to an existing app widget is not preview or loading in canvas I don't know what's the issue can anyone help

  • @GhumakkadChachu
    @GhumakkadChachu Před 3 lety +1

    I have an timmer app can i used timmer on widget

    • @CodeCat15
      @CodeCat15  Před 3 lety

      I am not very sure about this, but will try it out and let you know soon. Good question btw :)

  • @JunaidKhan-ny8tu
    @JunaidKhan-ny8tu Před 3 lety +1

    will show to my project manager and let c what he decides but I really want to work on it

    • @CodeCat15
      @CodeCat15  Před 3 lety +1

      Api calling in widgets are easy, however if you are working with a database i think there’s a different approach you need to take.

    • @JunaidKhan-ny8tu
      @JunaidKhan-ny8tu Před 3 lety +1

      @@CodeCat15 yeah I need to call api for just display the upcoming appointment with the doctors . Will try on weekend and then will show the manager if he likes it .
      By the way you always provide great content ❤️❤️

    • @CodeCat15
      @CodeCat15  Před 3 lety +1

      Just make sure to re-use the existing code like shown in the video coz then the widget and the main app both will refer the same swift file and you don’t need to maintain two different copies. If you get stuck plz feel free to ask questions 😊

    • @JunaidKhan-ny8tu
      @JunaidKhan-ny8tu Před 3 lety

      @@CodeCat15 Thank you so much for such comprehensive reply :-) Yeah Sure will let you know if stuck somewhere

  • @rajakishan933
    @rajakishan933 Před 3 lety +1

    Is widget supported animation?

    • @CodeCat15
      @CodeCat15  Před 3 lety

      No they don’t only plain data display is supported in widgets

  • @shubhamshinde64
    @shubhamshinde64 Před 3 lety

    Can we add SQLite data to widgets?
    I tried hard but it didn't work out. I don't know where I'm going wrong.
    can you made one more video on widgets with SQLite?

    • @CodeCat15
      @CodeCat15  Před 3 lety +1

      Yes you can fetch data from db and show it on the widget can you share your example code on GitHub add me as collaborator please. Let’s resolve this together

    • @shubhamshinde64
      @shubhamshinde64 Před 3 lety

      @@CodeCat15 Yahh Sure...I will send you to night...!!!

    • @CodeCat15
      @CodeCat15  Před 3 lety +1

      Cool

  • @girlscanplayvideogamestoo4746

    Hello! In the preview I see my widget correct, but when I place on the screen it's empty...

    • @CodeCat15
      @CodeCat15  Před 3 lety

      what are you trying to display on the widget? you cannot display a list view as it's a limitation of the widget, apart from that I think if you can see it in the preview you should be able to view it on the simulator or device, make sure it's iOS 14 and above. Let me know if that helps or if you have resolved the issue would request you to share the solution please :)

    • @girlscanplayvideogamestoo4746
      @girlscanplayvideogamestoo4746 Před 3 lety

      @@CodeCat15 i tried on a simulator iphone 8 with ios 14, can I send you an email with some ss? i am new to swift UI and also widgets

    • @girlscanplayvideogamestoo4746
      @girlscanplayvideogamestoo4746 Před 3 lety +1

      @@CodeCat15 i sent you an email with the subject: widget problem

    • @CodeCat15
      @CodeCat15  Před 3 lety

      Hey there, I responded to the email, let me know if you are still facing issues with the widget

  • @mhmudsalah2594
    @mhmudsalah2594 Před 3 lety +1

    how to upload image as muti part form-data using Viper and URL session ?!

    • @CodeCat15
      @CodeCat15  Před 3 lety +1

      I have a video on that as part of API series given is the link for the same, there I am explaining 3 ways to upload an image on the server. VIPER is an architecture and to be honest it's one of that architecture which I would avoid at any cost unless I really need it, you need to compare as what benefits you are getting to use VIPER as compared to MVVM or MVC
      Upload image: czcams.com/video/qhoL1lp4kiY/video.html

    • @mhmudsalah2594
      @mhmudsalah2594 Před 3 lety +1

      I am tried to return data like your example with multi-part and body contain data and sent to the server but the image did not change.
      thanks a lot.@@CodeCat15

    • @CodeCat15
      @CodeCat15  Před 3 lety +1

      @@mhmudsalah2594 when you say the image did not change what do you mean by that? Are you trying to update an existing image on the server? I also have a gist in case of multi-part form data which adds extra content-type parameters because some API do need that so do try this code as well
      Link: gist.github.com/codecat15/6c1eaa5b7ea48b26b10d907fef68abf2

    • @mhmudsalah2594
      @mhmudsalah2594 Před 3 lety

      @@CodeCat15
      yes .. I tried to update an existing image on the server.

  • @aqkhana2002
    @aqkhana2002 Před 3 lety +1

    confused , you have spend so much time to write code to get data , but you are still using constant value as in "TMSSmallView" you have hard coded value in TWSmallView_Preview ? i am sure i am missing something

    • @CodeCat15
      @CodeCat15  Před 3 lety

      The values are hardcoded in the preview so that we can see how the view looks like when we are designing it via code.
      However when you run the application you will see that a real api is hit and the api data is added on the widget screen.
      What you may try here is download the code and in the preview section type any random string you like, you will see that your random string only appears during design time and when you run the app it hits the api.
      Let me know if that answers your questions Aqeel and if not plz ask more

  • @aird1893
    @aird1893 Před rokem +1

    how can we opt out for Dark Mode for widgets?

    • @CodeCat15
      @CodeCat15  Před rokem +1

      I am unaware of this, would need to check and i think its almost time to make a second video on widgets covering these things

    • @aird1893
      @aird1893 Před rokem +1

      @@CodeCat15 thanks :) I figured out by the way and I can share you if you want,

    • @CodeCat15
      @CodeCat15  Před rokem +1

      I would be happy to know that Ali

    • @aird1893
      @aird1893 Před rokem +1

      @@CodeCat15 just don't use the systems color 😆

    • @aird1893
      @aird1893 Před rokem

      add your own UIColor set with Universal color (i.e. for both light/dark theme)

  • @TheAhmadReza
    @TheAhmadReza Před 3 lety +1

    Nice Video but what language exactly do you speaking!? (70% English 30% Hindi?) please write your video title in Hindi if you want to speak Hindi in the Video. Thanks.

    • @CodeCat15
      @CodeCat15  Před 3 lety +1

      Hey Ahmad, welcome to the channel, the reason why i speak in english and hindi is coz am from Mumbai and it’s called the Mumbai Hindi, unintentionally sometimes I do speak half of the video in English and then in Hindi as how i did here but i see your point and it’s valid and I will try to keep consistency in my videos from now. 😊

    • @TheAhmadReza
      @TheAhmadReza Před 3 lety +1

      @@CodeCat15 Thank you, I'm surprised how humble you are. Thumbs Up 👍

    • @CodeCat15
      @CodeCat15  Před 3 lety +1

      I think feedback is one way where i can improve myself and make myself better so i take all the feedback in much more positive way as its helping me to be better that’s how i look at it

    • @praveenrajput2738
      @praveenrajput2738 Před 3 lety +1

      @@CodeCat15 but I love your explanation in mixed Hindi and English. ❤️

  • @Avinashkumar-ov8xm
    @Avinashkumar-ov8xm Před 3 lety +1

    Sir i have mailed you some topic please check that.

    • @CodeCat15
      @CodeCat15  Před 3 lety

      Maps and animations right? Can you add more details to those like what exactly would you like to see with maps and animations

    • @Avinashkumar-ov8xm
      @Avinashkumar-ov8xm Před 3 lety

      @@CodeCat15 ok sir

    • @Avinashkumar-ov8xm
      @Avinashkumar-ov8xm Před 3 lety +1

      @@CodeCat15
      Google Maps -
      1. Auto fetch current location
      2. Search specific location and fill current location in text field.
      3. Show route from one location to other
      4.Fetch latitude and longitude of current location etc.
      5. User will get a alert "Allow location access to aap" When install application first time.
      Please sir when you got time.
      Add some point from your side which I don't remembering.

    • @CodeCat15
      @CodeCat15  Před 3 lety +1

      Great these are good points, i can add a couple and what about animations?

    • @Avinashkumar-ov8xm
      @Avinashkumar-ov8xm Před 3 lety +1

      @@CodeCat15 sir i don't have more idea about animation. First I will read about animation then I will let you know.

  • @mhayat3761
    @mhayat3761 Před 2 lety

    please sir check your email