visioncodekdp
visioncodekdp
Learn with Kdp
10 posts
iOS dev, Android dev, Java programmer, always excited to learn new things. Find my quotes in https://instagram.com/the.unfamous.poet?utm_medium=copy_link
Don't wanna be here? Send us removal request.
visioncodekdp · 1 year ago
Text
Tumblr media
It's my 2 year anniversary on Tumblr 🥳
1 note · View note
visioncodekdp · 1 year ago
Text
Sending the Push Notification using APNS
First Open the project Step 1: Ask permission to allow the notifications
Add the import in App Delegate import UserNotifications
In AppDelegate --> create a method functions() --> Add the logic
func notifications() {
let notificationCenter = UNUserNotificationCenter.current()
        notificationCenter.requestAuthorization(options: [.sound, .badge, .alert]) { s, err in logic }
}
Call this method in App Delegate didFinishLaunchingWithOptions()
Step 2: Open Terminal and go to the path where this apns file is saved
Type the following command which includes How to get deviceId: Xcode --> Windows --> Devices and simulators --> Simulators --> choose the running simulator --> copy the deviceid
xcrun simctl push deviceId bundleId apnsfilename xcrun simctl push DRCT74-GTYB-49BC-B023-C15632C131E com.encrytion.login apn.apns
0 notes
visioncodekdp · 2 years ago
Text
Updating the Git user in current machine
When we are doing projects we might need to switch between users like our friend might use our machine and wanted to push their code to their project. Even at the initial setup of the git project we need to provide our user credentials. So, as we already know Git always have a easy solution  Open Terminal --> Goto the path of specific project --> type git 
If git is already there then we will get git help documentation . If not,  git init --->  git config --global user.email "[email protected]" --> git config --global user.name "keerthidevipriya"
Those are my details. Please replace them with yours dear
14 notes · View notes
visioncodekdp · 3 years ago
Text
Difference between == and === in Swift
== - Compares the value of the variable
=== - Along with value the data type also need to be matched.
7 notes · View notes
visioncodekdp · 3 years ago
Text
Pushing your local project to remote repository in GitHub using Command line
Step 1: Check whether git is installed in your system or not.
How to check 🤔. Is this your question answer is simple.
Open command line/terminal ----> git ----> if after entering git of it won't show any error then you can say git is installed in your system.
Step 2: Open your github account and create a new repository in your github .
Top right corner ----> click on + or add ---> Choose new repository ---> give permissions only which are needed ----> Click create
Wohoo! Done creating a new repository in remote.
Step 3: Now our task is to connect our local repository to remote repository (GitHub repository) . Follow the below series of steps
Open cmd line / terminal ----> Go to your local project path ---> git init ---> git remote add origin https://(repo_name)
Note:: repo_name is accessible from your github repository on choosing thr repository which we have created copy and paste here.
Now you have connected your local project to remote github repository project.
Step 4: Connecting our local branch to remote branch
git branch -M main
If you get any errors do not worry that branch is already existed. Go ahead with the next command
Step5: Pushing our local branch to remote branch
git push -u origin main
This doesn't work then try something like
git push --set-upstream origin master
The one good thing about command line in git is it always suggests you the proper command. That's the specialty of git in command line/terminal.
Tumblr media
That repo link is mine update with your project repo link😅 dear.
It won't end our task now.
Now we need to commit and push our changes in our project right
First Check the changes in your project
git status
git add .
git commit -m "message"
git push
Wohooo🎉 we have done pushing our project to remote
5 notes · View notes
visioncodekdp · 3 years ago
Text
API INTEGRATION IN SWIFT(part 1)
API means Application Programming Interface
It's main purpose is to bring applications together in order to perform a designed function.
It helps us to make repetitive yet complex processes highly reusable with a little bit if code.
Overview of API
Tumblr media
Via theory wise first in order to get the data from API we need to send a request.
So, we prepare a request object.
A Request object contains
• URL
• Header Parameters
• Body Data
In code wise we need to follow several steps to achieve that task of getting the data via API
Tumblr media
So theory wise get to know these things.
We will continue this in the next part🤗
Happy learning!!
5 notes · View notes
visioncodekdp · 3 years ago
Text
Main purpose of Swift
• It is a powerful and intuitive programming language built using a modern approach for iOS.
• It ensures safety, performance and software design patterns.
• The syntax is concise yet expressive.
• The modern features included in it makes developers love it!!
5 notes · View notes
visioncodekdp · 3 years ago
Text
Methods in Swift
What is a method in swift?
Methods are considered as small piece of code that is reusable. They belong to the classes, enums, structs.
Methods use func as a keyword to provide a definition
Structure of method:
Tumblr media
These methods are placed inside the class, struct Or enum.
Swift allows classes to have methods with the same name but there need to be a difference either in
Number of parameters
Datatype of parameters
Order of parameters
Name of parameters
Methods can have a return type as well. Usually that return type is placed at end of the method.
Tumblr media
5 notes · View notes
visioncodekdp · 3 years ago
Text
Changing Theme of Xcode
Tadaaa!! Being new to development editor we always feel excited to change the themes especially people who likes Dark theme
So, today we can learn how to change theme in xcode
Open Xcode ----> Preferences ----> Choose Themes on top -----> Choose available themes on left side ----> select one of them
Tumblr media
You can also add your own customized theme 🤗
It's as simple as that
Happy learning!!
7 notes · View notes
visioncodekdp · 3 years ago
Text
Protocols in Swift
What is a Protocol?
In swift protocol is considered as a major property which we use frequently.
It basically means what are the things we are necessary to be handled. It is considered as a set of rules which are mandatory to define on using the protocol
Ex: consider a Vehicle
If we need to buy a car what are the things we take care first (speed, milage, kms) so these are the necessary things that everyone needs to know.
So, we declare all of them in a protocol
Any vehicle need to satisfy these properties(car/bus/plane)
Structure of Protocol:
Tumblr media
Here every protocol have mandatory rules soo
Any class which conforms to this protocol need to provide definition for this.
In simple words for people who knows Java Programming Language
Protocol is just like an interface in Java
Any class which implements that interface need to provide definition.
7 notes · View notes