<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Manish Ahire on Medium]]></title>
        <description><![CDATA[Stories by Manish Ahire on Medium]]></description>
        <link>https://medium.com/@manishahire?source=rss-a1bdfd420cd8------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*EAw_okzcoZObWm76bs08HQ.jpeg</url>
            <title>Stories by Manish Ahire on Medium</title>
            <link>https://medium.com/@manishahire?source=rss-a1bdfd420cd8------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 22 Nov 2026 13:14:22 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@manishahire/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[SwiftLint Integration with Swift Package Manager]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/@manishahire/swiftlint-integration-with-swift-package-manager-7d10c54fb848?source=rss-a1bdfd420cd8------2"><img src="https://cdn-images-1.medium.com/max/2600/1*8orZyACfZ8pa5o4vDT2ufw.png" width="3780"></a></p><p class="medium-feed-snippet">Learn how to integrate SwiftLint into your iOS project using Swift Package Manager and Xcode plugins. A step-by-step guide for iOS devs.</p><p class="medium-feed-link"><a href="https://medium.com/@manishahire/swiftlint-integration-with-swift-package-manager-7d10c54fb848?source=rss-a1bdfd420cd8------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://medium.com/@manishahire/swiftlint-integration-with-swift-package-manager-7d10c54fb848?source=rss-a1bdfd420cd8------2</link>
            <guid isPermaLink="false">https://medium.com/p/7d10c54fb848</guid>
            <category><![CDATA[swift-package-manager]]></category>
            <category><![CDATA[swiftlint]]></category>
            <category><![CDATA[code-quality]]></category>
            <category><![CDATA[swift]]></category>
            <category><![CDATA[ios-development]]></category>
            <dc:creator><![CDATA[Manish Ahire]]></dc:creator>
            <pubDate>Thu, 11 Sep 2025 08:51:21 GMT</pubDate>
            <atom:updated>2025-09-11T09:02:14.822Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[SwiftUI State Management Beyond @State and @Binding]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/@manishahire/swiftui-state-management-beyond-state-and-binding-451dd047fb73?source=rss-a1bdfd420cd8------2"><img src="https://cdn-images-1.medium.com/max/2600/1*sFG7SjilM6ISpBAf4XT6-w.jpeg" width="4896"></a></p><p class="medium-feed-snippet">Master SwiftUI state management with @ObservedObject, @StateObject, @EnvironmentObject, and @Observable. Go beyond @State and @Binding for&#x2026;</p><p class="medium-feed-link"><a href="https://medium.com/@manishahire/swiftui-state-management-beyond-state-and-binding-451dd047fb73?source=rss-a1bdfd420cd8------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://medium.com/@manishahire/swiftui-state-management-beyond-state-and-binding-451dd047fb73?source=rss-a1bdfd420cd8------2</link>
            <guid isPermaLink="false">https://medium.com/p/451dd047fb73</guid>
            <category><![CDATA[ios]]></category>
            <category><![CDATA[state-management]]></category>
            <category><![CDATA[swiftui]]></category>
            <category><![CDATA[observation]]></category>
            <category><![CDATA[reactive-programming]]></category>
            <dc:creator><![CDATA[Manish Ahire]]></dc:creator>
            <pubDate>Fri, 22 Aug 2025 12:23:55 GMT</pubDate>
            <atom:updated>2025-08-22T12:23:55.121Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[How SwiftUI Changed iOS Development Forever]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/@manishahire/how-swiftui-changed-ios-development-forever-8716ffc4f309?source=rss-a1bdfd420cd8------2"><img src="https://cdn-images-1.medium.com/max/2600/0*UpSclC_HatiG87bs" width="7952"></a></p><p class="medium-feed-snippet">Discover how SwiftUI transformed iOS app development, simplified UI design, and reshaped iOS architecture for developers.</p><p class="medium-feed-link"><a href="https://medium.com/@manishahire/how-swiftui-changed-ios-development-forever-8716ffc4f309?source=rss-a1bdfd420cd8------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://medium.com/@manishahire/how-swiftui-changed-ios-development-forever-8716ffc4f309?source=rss-a1bdfd420cd8------2</link>
            <guid isPermaLink="false">https://medium.com/p/8716ffc4f309</guid>
            <category><![CDATA[swiftui-vs-uikit]]></category>
            <category><![CDATA[swiftui]]></category>
            <category><![CDATA[swift]]></category>
            <category><![CDATA[ios-app-development]]></category>
            <category><![CDATA[ios-architecture]]></category>
            <dc:creator><![CDATA[Manish Ahire]]></dc:creator>
            <pubDate>Thu, 07 Aug 2025 17:03:50 GMT</pubDate>
            <atom:updated>2025-09-12T09:54:36.248Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Get the Current Date and Time in Swift.]]></title>
            <link>https://medium.com/@manishahire/get-the-current-date-and-time-in-swift-560aab282dd9?source=rss-a1bdfd420cd8------2</link>
            <guid isPermaLink="false">https://medium.com/p/560aab282dd9</guid>
            <category><![CDATA[datetime]]></category>
            <category><![CDATA[ios]]></category>
            <category><![CDATA[swift]]></category>
            <dc:creator><![CDATA[Manish Ahire]]></dc:creator>
            <pubDate>Sat, 06 Jul 2024 14:15:48 GMT</pubDate>
            <atom:updated>2024-07-06T14:15:48.993Z</atom:updated>
            <content:encoded><![CDATA[<p>To get the current date and time in Swift, you can use the Date class along with DateFormatter to format the date and time as needed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*-Zh7mbcmSdzD3ssm" /><figcaption>Photo by <a href="https://unsplash.com/@goumbik?utm_source=medium&amp;utm_medium=referral">Lukas Blazek</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><blockquote><strong>Getting the Current Date and Time</strong></blockquote><p>You can use the Date class to get the current date and time.</p><pre>let currentDate = Date()<br>print(currentDate)<br>// 2024-07-06 14:03:20 +0000</pre><blockquote><strong>Formatting the Date and Time</strong></blockquote><p>If you want to format the date and time in the human-readable format, you can use dateStyleand timeStyle properties of DateFormatter class.</p><pre>let currentDate = Date()<br><br>let formatter = DateFormatter()<br>formatter.dateStyle = .medium<br>formatter.timeStyle = .medium<br><br>let formattedDate = formatter.string(from: currentDate)<br>print(&quot;Formatted date and time: \(formattedDate)&quot;)<br>// Formatted date and time: 6 Jul 2024 at 7:36:36 PM</pre><blockquote><strong>Custome Date and Time Format</strong></blockquote><p>If you need a specific date and time format, you can set the dateFormat property of DateFormatter</p><pre>let currentDate = Date()<br><br>let formatter = DateFormatter()<br>formatter.dateFormat = &quot;yyyy-MM-dd HH:mm:ss&quot;<br><br>let formattedDate = formatter.string(from: currentDate)<br>print(&quot;Custom formatted date and time: \(formattedDate)&quot;)<br>// Custom formatted date and time: 2024-07-06 19:40:16</pre><p>That&#39;s It✌️ Happy coding!😄</p><h3>Stay Connected🔔</h3><p>Thank you for reading until the end. Before you go:</p><ul><li>👏 Please consider <strong>clapping</strong> and <strong>following</strong> me!</li><li>🔗 Follow on <a href="https://www.linkedin.com/in/manish-ahire/"><strong>LinkedIn</strong></a><strong> | </strong><a href="https://github.com/ManishAhire"><strong>GitHub</strong></a></li><li>📝 More content at <a href="https://mobodevstuff.com/"><strong>mobodevstuff.com</strong></a></li><li>🎨 Check out my portfolio at <a href="https://manishahire.com/"><strong>manishahire.com</strong></a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=560aab282dd9" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to use Android code in React Native]]></title>
            <link>https://medium.com/@manishahire/how-to-use-android-code-in-react-native-e0c6ce0dd286?source=rss-a1bdfd420cd8------2</link>
            <guid isPermaLink="false">https://medium.com/p/e0c6ce0dd286</guid>
            <category><![CDATA[react-native]]></category>
            <category><![CDATA[android]]></category>
            <category><![CDATA[react-native-development]]></category>
            <category><![CDATA[android-app-development]]></category>
            <dc:creator><![CDATA[Manish Ahire]]></dc:creator>
            <pubDate>Mon, 14 Jan 2019 05:57:57 GMT</pubDate>
            <atom:updated>2024-07-02T12:07:27.706Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*P_uzoy6yTITOxrPobOwplg.png" /></figure><p>When you are developing Hybrid Apps, you must have come up with this situation: How can I use the native code in React Native?</p><p>In the previous tutorial, we learned “<a href="https://medium.com/@ahiremanishb/how-to-use-ios-code-in-react-native-f2d93266bae2">How to use iOS code in React Native</a>”. And now in this tutorial, we learn “How to use Android code in React Native”.</p><p>So let’s see, how to use native code in react native. Here we use Android code in react native. So, we need to create a bridge containing our components (TextView, Image, anything we want).</p><p>We need to work in Android Studio, so let’s open up our project there.</p><h3>Bridge Container View</h3><blockquote>Step 1: Create your activity</blockquote><p>Steps to create activity:-</p><ol><li>Right-click on the “<em>./app/java/com/project_name</em>” directory and click <em>“New” </em>then select<em> “Activity” </em>and then select<em> “Empty Activity”</em>.</li><li>Type <em>“Native UI”</em> in the activity name field and click <em>“Finish”.</em></li></ol><blockquote>Step 2: Add you custom UI in “.XML” file</blockquote><p>Steps to add custom UI:-</p><ol><li>Open “activity_native_ui.xml” from “./app/res/layout”</li><li>Add a simple “TextView” in the XML file.</li><li>Add the following code in the <em>“android.support.constraint.ConstraintLayout” </em>tag :</li></ol><pre>&lt;TextView<br>    android:layout_width=&quot;wrap_content&quot;<br>    android:layout_height=&quot;wrap_content&quot;<br>    android:text=&quot;Manish Ahire&quot;<br>    android:textSize=&quot;40dp&quot;<br>/&gt;</pre><blockquote>Step 3: Create the module</blockquote><p>Steps to create a module:-</p><ol><li>Right-click on the “<em>./app/java/com/project_name</em>” directory and click <em>“New” </em>and then select<em> “Java Class”</em>.</li><li>Type <em>“ReactModule”</em> in the name field and click <em>“OK”</em></li><li>Double-click on the <em>“ReactModule”</em> and replace the code with :</li></ol><pre>package com.your_project_name;<br><br>import android.content.Intent;<br>import com.facebook.react.bridge.ReactApplicationContext;<br>import com.facebook.react.bridge.ReactContextBaseJavaModule;<br>import com.facebook.react.bridge.ReactMethod;<br><br>public class ReactModule extends ReactContextBaseJavaModule {<br>    ReactModule(ReactApplicationContext reactContext) {<br>        super(reactContext);<br>    }<br>    @Override<br>    public void initialize() {<br>        super.initialize();<br>    }<br>    /**<br>     * @return the name of this module. This will be the name used to {@code require()} this module<br>     * from JavaScript.<br>     */<br>    @Override<br>    public String getName() {<br>        return &quot;NativeUI&quot;;<br>    }<br><br>    @ReactMethod<br>    void navigateToExample() {<br>        ReactApplicationContext context = getReactApplicationContext();<br>        Intent intent = new Intent(context, NativeUI.class);<br>        context.startActivity(intent);<br>    }<br>}</pre><blockquote>Step 4: Create the packager</blockquote><p>Steps to create a packager:-</p><ol><li>click on the “<em>./app/java/com/project_name</em>” directory and click <em>“New” </em>and then select<em> “Java Class”</em>.</li><li>Type <em>“ReactNativePackager”</em> in the name field and click <em>“OK”</em></li><li>Double-click on the “<em>ReactNativePackager</em>” and replace the code with :</li></ol><pre>package com.your_project_name;<br>import com.facebook.react.ReactPackage;<br>import com.facebook.react.bridge.NativeModule;<br>import com.facebook.react.bridge.ReactApplicationContext;<br>import com.facebook.react.uimanager.ViewManager;<br>import java.util.ArrayList;<br>import java.util.Collections;<br>import java.util.List;<br>public class ReactNativePackager  implements ReactPackage {<br>    @Override<br>    public List&lt;NativeModule&gt; createNativeModules(ReactApplicationContext reactContext) {<br>        List&lt;NativeModule&gt; modules = new ArrayList&lt;&gt;();<br>        modules.add(new ReactModule(reactContext));<br>        return modules;<br>    }<br>    @Override<br>    public List&lt;ViewManager&gt; createViewManagers(ReactApplicationContext reactContext) {<br>        return Collections.emptyList();<br>    }<br>}</pre><blockquote>Step 5: Add “ReactNativePackager” in “MainApplication.java” file</blockquote><ol><li>Open the <em>“MainApplication.java”</em></li><li>Replace the <em>“getPackages()”</em> method with :</li></ol><pre>@Override<br>protected List&lt;ReactPackage&gt; getPackages() {<br>  return Arrays.&lt;ReactPackage&gt;asList(<br>      new MainReactPackage(),<br>      new ReactNativePackager()<br>  );<br>}</pre><h3>Render The View</h3><p>Now let’s open up your .js file and add <em>“NativeModules”</em> import:</p><pre>import { NativeModules } from &#39;react-native&#39;</pre><p>Then after the imports, let’s get access to the native UI like this:</p><pre>NativeModules.NativeUI.navigateToExample()</pre><p>Save the file and run your project. You should see our view rendered:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/338/1*TUBSc2iN5XFaGvleu3m8nw.png" /></figure><p>Now you can use any native UI in react native.</p><h3>Stay Connected🔔</h3><p>Thank you for reading until the end. Before you go:</p><ul><li>👏 Please consider <strong>clapping</strong> and <strong>following</strong> me!</li><li>🔗 Follow on <a href="https://www.linkedin.com/in/manish-ahire/"><strong>LinkedIn</strong></a><strong> | </strong><a href="https://github.com/ManishAhire"><strong>GitHub</strong></a></li><li>📝 More content at <a href="https://mobodevstuff.com/"><strong>mobodevstuff.com</strong></a></li><li>🎨 Check out my portfolio at <a href="https://manishahire.com/"><strong>manishahire.com</strong></a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e0c6ce0dd286" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to use iOS code in React Native]]></title>
            <link>https://medium.com/@manishahire/how-to-use-ios-code-in-react-native-f2d93266bae2?source=rss-a1bdfd420cd8------2</link>
            <guid isPermaLink="false">https://medium.com/p/f2d93266bae2</guid>
            <category><![CDATA[ios]]></category>
            <category><![CDATA[ios-apps]]></category>
            <category><![CDATA[react-native]]></category>
            <category><![CDATA[swift-3]]></category>
            <dc:creator><![CDATA[Manish Ahire]]></dc:creator>
            <pubDate>Fri, 11 Jan 2019 10:06:56 GMT</pubDate>
            <atom:updated>2024-06-05T06:15:45.103Z</atom:updated>
            <content:encoded><![CDATA[<h3>How to use iOS code in React Native?</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dCoY68EfpmdC0VSjkb-vUw.png" /></figure><p>When you are developing hybrid apps, you must come up with the following situation: How can I use the native code in React Native?</p><p>We can also use the Android Code in React Native. To learn how to use Android Code in React Native, click <a href="https://medium.com/@ahiremanishb/how-to-use-android-code-in-react-native-e0c6ce0dd286">here</a>.</p><p>So let’s see, how to use native code in react native. Here we use swift code in react native. So, we need to create and bridge a UIView which will contain our components (label, image, anything we want). For the demo purpose, I&#39;m using UILabel in React Native.</p><p>Let’s begin opening our iOS project in Xcode👇</p><blockquote><strong>Step 1: Create Swift File</strong></blockquote><p>To create a swift file, go through the following steps:-</p><ol><li>Right-click on the project directory and click <em>“New File”</em>.</li><li>Select <em>“Swift File</em>” then click <em>“Next”</em>.</li><li>Type <em>“LabelView.swift”</em> and then click <em>“Create”.</em></li><li>It will prompt you to create a bridging header when you click <em>“Create”</em>. Go ahead and click on <em>“Create Bridging Header”</em>.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UkA_MZ3af7BOLDGS6p4-zA.png" /></figure><blockquote><strong>Step 2: Configure the Objective-C Bridging Header</strong></blockquote><p>Click on “project_name-Bridging-Header.h” and replace its contents with:</p><pre>#import &quot;React/RCTViewManager.h&quot;</pre><blockquote><strong>Step 3: Write your UI Code in Swift file.</strong></blockquote><p>In <em>“LabelView.swift”</em> I&#39;m creating a native UILabel. You can create your UI:</p><pre>import Foundation<br>import UIKit<br><br>class LabelView: UIView {<br>    override init(frame: CGRect) {<br>        super.init(frame: frame)<br>        let label = UILabel()<br>        self.label.frame = CGRect(x: 0,<br>                                  y: 0,<br>                                  width: self.frame.size.width,<br>                                  height: self.frame.size.height<br>        );<br>        self.label.text = &quot;Native iOS Element (UILabel)&quot;<br>        self.addSubview(label)<br>    }<br>}</pre><blockquote><strong>Step 4: Use your swift class in React Native</strong></blockquote><p>Now, we added the Objective-C file. For that go through the following steps:-</p><ol><li>Right-click on the project directory and click <em>“New File”</em>.</li><li>Select <em>“Cocoa Touch Class”</em> then click <em>“Next”</em>.</li><li>Type <em>“LabelViewModule” in</em> the class field.</li><li>Select “<em>RCTViewManager</em>” in the “<em>subclass of</em>” menu.</li><li>Select the “<em>Objective-C</em>” language. Then click “Next”</li></ol><blockquote><strong>Step 5: Configures .h &amp; .m files</strong></blockquote><p>Click on LabelViewModule.h and replace all of its contents with the following:</p><pre>#import &lt;React/RCTViewManager.h&gt;<br>@interface LabelViewModule : RCTViewManager<br>@end</pre><p>Then click on LabelViewModule.m and replace all of its contents with:</p><pre>#import &quot;LabelViewModule.h&quot;<br>@interface RCT_EXTERN_MODULE(LabelViewManager, RCTViewManager)<br>@end</pre><blockquote><strong>Step 6: Add Manager Swift file</strong></blockquote><p>Create a new Swift file and name it “<em>LabelViewManager.swift</em>”, replace the code with the following:</p><pre>import Foundation<br>@objc(LabelViewManager)<br>class LabelViewManager : RCTViewManager {<br>    override func view() -&gt; UIView! {<br>        return LabelView();<br>    }<br>}</pre><blockquote><strong>Step 7: Render The View</strong></blockquote><p>Now let’s open your .js file and add requireNativeComponent import:</p><pre>import { requireNativeComponent } from &#39;react-native&#39;</pre><p>Then after the imports, let’s get the components:</p><pre>const LabelView = requireNativeComponent(&#39;LabelView&#39;, null);</pre><p>Then render the above component:</p><pre>&lt;LabelView style={{ backgroundColor:&#39;red&#39;, width:&#39;100%&#39;, height:50 }}/&gt;;</pre><p>Save the file and run your project. You should see our view rendered:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/356/1*aM9mD8wALT4ozWwSmTrgzw.png" /></figure><p>Now you can use any native UI in react native.🎉</p><h3>Stay Connected🔔</h3><p>Thank you for reading until the end. Before you go:</p><ul><li>👏 Please consider <strong>clapping</strong> and <strong>following</strong> me!</li><li>🔗 Follow on <a href="https://www.linkedin.com/in/manish-ahire/"><strong>LinkedIn</strong></a><strong> | </strong><a href="https://github.com/ManishAhire"><strong>GitHub</strong></a></li><li>📝 More content at <a href="https://mobodevstuff.com/"><strong>mobodevstuff.com</strong></a></li><li>🎨 Check out my portfolio at <a href="https://manishahire.com/"><strong>manishahire.com</strong></a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f2d93266bae2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[React Native With Firebase  — Part 2]]></title>
            <link>https://medium.com/@manishahire/react-native-with-firebase-part-2-e7e054a72c50?source=rss-a1bdfd420cd8------2</link>
            <guid isPermaLink="false">https://medium.com/p/e7e054a72c50</guid>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[firebase]]></category>
            <category><![CDATA[react-native]]></category>
            <category><![CDATA[authentication]]></category>
            <dc:creator><![CDATA[Manish Ahire]]></dc:creator>
            <pubDate>Tue, 16 Oct 2018 12:42:19 GMT</pubDate>
            <atom:updated>2019-08-29T05:53:08.864Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/472/1*UUs5A-zh4C30AddmzPpPsg.png" /></figure><h3>React Native With Firebase — Part 2</h3><p>Hello Again… In <a href="https://medium.com/@ahiremanishb/react-native-with-firebase-part-1-65f57125d36">Part 1</a>, we set up the firebase backend and the front end. In this section, we create a simple app for user authentication. We already created DemoProject in <a href="https://medium.com/@ahiremanishb/react-native-with-firebase-part-1-65f57125d36">Part 1</a>.</p><p>Firebase provides lots of features like Realtime Database, Hosting, Authentication, Storage, Cloud Messaging, etc. But in this section, we use the Authentication feature. So let&#39;s start…</p><h3>Set up Authentication</h3><ol><li>Go to the Authentication section from the navigation drawer</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1vwN3KFABJb9qwGbd9Ndkw.png" /></figure><p>2. Navigate to the second tap “Sign-in method”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sPGYQsaAhjqTGTGAXNhE5Q.png" /></figure><p>3. Click on “Email/Password” section</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Umr1-p02zkSg7Ui2MaK-oA.png" /></figure><p>4. Then enable the first one switch and click on save button. Now the “Email/Password” option is enabled.</p><p>5. Now click on the “Users” section, You will show the no users are registered. So now we register the user using firebase library.</p><h3>User Registration</h3><p>For user registration, create signup.js file and design the UI according to user expectations Or simply take two TextInput and Login Button.</p><pre>constructor(props) {<br>    super(props);<br>    this.state = {<br>      email: &quot;&quot;,<br>      password: &quot;&quot;<br>    };<br>  }</pre><pre>render() {<br>  return (<br>    &lt;View&gt;<br>      &lt;TextInput<br>        placeholder=&quot;Enter email&quot;<br>        keyboardType=&#39;email-address&#39;<br>        value={this.state.email}<br>        onChangeText={email =&gt; this.setState({email})}<br>      /&gt;</pre><pre>      &lt;TextInput<br>        placeholder=&quot;Enter password”<br>        secureTextEntry={true}<br>        value={this.state.password}<br>        onChangeText={password =&gt; this.setState({password})}<br>      /&gt;</pre><pre>      &lt;TouchableOpacity onPress={this.actionOnSignUpButton}&gt;<br>         &lt;Text&gt;Sign Up&lt;/Text&gt;<br>      &lt;/TouchableOpacity&gt;<br>    &lt;/View&gt;<br>  );<br>}</pre><p>And now we perform the action on the Sign-Up button. Put your code just below the render method</p><pre>actionOnSignUpButton() {</pre><pre>    const { email, password } = this.state;</pre><pre>    try {<br>      firebase.auth().createUserWithEmailAndPassword(email, password).then(data =&gt; {<br>          console.log(&quot;User Data&quot;, data);<br>        })<br>        .catch(error =&gt; {<br>          console.log(error);<br>        });<br>    } catch (error) {<br>      console.log(error.toString());<br>    }<br>}</pre><p>Here, your user is registered successfully, Now to the browser and navigate to the “User” section. One new entry inserted into the user section with the UID.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2qaCrJ7WWwIW3GKtxH-Fzw.png" /></figure><p>That&#39;s it!!! 😊 Use was registered.</p><p>Now using the registered Email and Password, we try to log in the user in the following topic.</p><h3>User Login</h3><p>For user login, create the filelogin.js and the login UI. Or you can use the same sign up UI.</p><pre>constructor(props) {<br>    super(props);<br>    this.state = {<br>      email: &quot;&quot;,<br>      password: &quot;&quot;<br>    };<br>  }</pre><pre>render() {<br>  return (<br>    &lt;View&gt;<br>      &lt;TextInput<br>        placeholder=&quot;Enter email&quot;<br>        keyboardType=&#39;email-address&#39;<br>        value={this.state.email}<br>        onChangeText={email =&gt; this.setState({email})}<br>      /&gt;</pre><pre>&lt;TextInput<br>        placeholder=&quot;Enter password”<br>        secureTextEntry={true}<br>        value={this.state.password}<br>        onChangeText={password =&gt; this.setState({password})}<br>      /&gt;</pre><pre>&lt;TouchableOpacity onPress={this.actionOnLoginButton}&gt;<br>         &lt;Text&gt;Sign Up&lt;/Text&gt;<br>      &lt;/TouchableOpacity&gt;<br>    &lt;/View&gt;<br>  );<br>}</pre><p>UI is done and now perform the login action on a button. Use the below code for user login.</p><pre>actionOnLoginButton() {<br>    const { email, password } = this.state;</pre><pre>     try {<br>      firebase.auth().signInWithEmailAndPassword(email, password).then(data =&gt; {<br>          console.log(&quot;User Data&quot;, data);<br>        })<br>        .catch(error =&gt; {<br>          console.log(error);<br>        });<br>    } catch (error) {<br>      console.log(error);<br>    }<br>  }</pre><p>Now the user is logged in successfully 😊.</p><h3>User Log Out</h3><p>For logout, put the below code on log out button.</p><pre>userLogOut() {<br>    firebase.auth().signOut().then( () =&gt; {<br>        console.log(&#39;User logged out successfully &#39;);<br>    }).catch((error) =&gt; {<br>      console.log(error);<br>    });<br>}</pre><p>Done with Firebase Authentication 😍. If you have any questions regarding Authentication feel free to put your comments.</p><p>Thank you 😊 and Happy Coding 😍</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e7e054a72c50" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[React Native With Firebase — Part 1]]></title>
            <link>https://medium.com/@manishahire/react-native-with-firebase-part-1-65f57125d36?source=rss-a1bdfd420cd8------2</link>
            <guid isPermaLink="false">https://medium.com/p/65f57125d36</guid>
            <category><![CDATA[firebase]]></category>
            <category><![CDATA[react-native]]></category>
            <dc:creator><![CDATA[Manish Ahire]]></dc:creator>
            <pubDate>Mon, 15 Oct 2018 12:45:31 GMT</pubDate>
            <atom:updated>2019-08-29T05:55:41.689Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/472/1*UUs5A-zh4C30AddmzPpPsg.png" /></figure><h3>React Native With Firebase — Part 1</h3><p>Hello All…. I know you are doing something special and now you can add one more hot technology in your technology stack. So let&#39;s play with Firebase using React Native.</p><h3>What is Firebase?</h3><p>Basically, Firebase is a platform (Google’s Product) which allow building web and mobile applications without a server-side programming language.</p><p>Firebase provides a real-time database which allows you to store data as well as sync data among users in real-time. It also provides multiple authentication systems, various APIs, hosting system, cloud messaging, etc.</p><h3>Firebase Initial Setup (Back end set up)</h3><p>For creating project follow the below steps:- <strong><br></strong>1. Visit the <a href="https://console.firebase.google.com/">Firebase Console</a>.</p><p>2. Click the Add project box as shown below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YaMSfc1kgNzbSyRYGixORQ.png" /></figure><p>3. A dialog will appear as shown below</p><ul><li>Enter your new project name and modify the project id and region if necessary</li><li>Accept terms and conditions</li><li>Click Create Project when finished</li><li>Your project will now be created — this can take a few seconds</li><li>Once created click the Continue button</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_RsVNVoOgAzvJNFNz8s0hQ.png" /></figure><p>4. Once created you’ll be redirected to the project homepage as shown below</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1nsoWPnDkRy0aWKqcU7byQ.png" /></figure><p>5. Click the “Add firebase to your web app” link on the home screen (HTML tag like button) and note the config object (as bellow), we will need this later for the front end setup.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4_416LuZNm5_3f9c9sGsyw.png" /></figure><p>And that’s it!!! Now you can use the library within your JavaScript code line any other node module.</p><h3>Front end set up</h3><p>Now we have the backend set up, so we will use the firebase library for that we have to set up the react native project.</p><ol><li>Create React Native Project:- For creating react native project, open our terminal and create the directory where you want to save the project and enter the following command.</li></ol><pre>$ react-native init DemoProject</pre><p>2. Install the Firebase using the following command:-</p><pre>$ npm install --save firebase</pre><p>3. Then, open the project in your favorite IDE.</p><p>4. Whenever using firebase, make sure you import the module</p><p>import * as firebase from “firebase”;</p><p>5. Now we want to initialize the firebase in our application. For that open app.js and copy the config object in “Add Firebase to your web app” screen (Step 5 in back end setup)</p><pre>var config = {</pre><pre>apiKey: &quot;XXXXXXXXXXXXXXXXXXXXX&quot;,</pre><pre>authDomain: &quot;XXXXXXXXXXXXXXXXXXXXX&quot;,</pre><pre>databaseURL: &quot;XXXXXXXXXXXXXXXXXXXXX&quot;,</pre><pre>projectId: &quot;fXXXXXXXXXXXXXXXXXXXXXf&quot;,</pre><pre>storageBucket: &quot;XXXXXXXXXXXXXXXXXXXXX&quot;,</pre><pre>messagingSenderId: &quot;XXXXXXXXXXXXXXXXXXXXX&quot;</pre><pre>};</pre><pre>firebase.initializeApp(config);</pre><p>That’s it for now…😊 In <a href="https://medium.com/@ahiremanishb/react-native-with-firebase-part-2-e7e054a72c50">Part-2</a> we make a simple app for User registration, user log-in and log-out.</p><p>Thank you 😊 and Happy Coding 😍</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=65f57125d36" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Eventbrite and its API’s]]></title>
            <link>https://medium.com/@manishahire/eventbrite-and-its-apis-265485c61076?source=rss-a1bdfd420cd8------2</link>
            <guid isPermaLink="false">https://medium.com/p/265485c61076</guid>
            <category><![CDATA[event-planning]]></category>
            <category><![CDATA[api]]></category>
            <category><![CDATA[eventbrite]]></category>
            <category><![CDATA[events]]></category>
            <dc:creator><![CDATA[Manish Ahire]]></dc:creator>
            <pubDate>Mon, 15 Oct 2018 11:10:29 GMT</pubDate>
            <atom:updated>2019-08-29T05:59:25.939Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rJLXfEbQ6Kp29by6g51hMw.jpeg" /></figure><p>In this section, We covered the basic information like What is Eventbrite? And How to create Eventbrite API’s? And also we see the different API’s and its description. So let&#39;s start.</p><h3>What is Eventbrite?</h3><p>Eventbrite is a U.S.-based event management and ticketing website. The service allows users to browse, create, and promote local events. You can interact with it through an API to pull out the event information you want.</p><h3><strong>How to create Eventbrite API’s?</strong></h3><p>Reading from the Eventbrite developer account, the sample request format is as below:-</p><pre>1. https://www.eventbriteapi.com/v3/users/me/?token=YOUR_TOKEN</pre><pre>2. https://www.eventbriteapi.com/v3/users/me/owned_events/?token=YOUR_TOKEN</pre><p>Replace the YOUR_TOKEN with the token found when you create the project.</p><p>If you want to create API which returns the list of all events, then add the token at the end for URL. <br>For example:-</p><pre>https://www.eventbriteapi.com/v3/events/search/?token=YOUR_TOKEN</pre><h3>List of commonly used API’s:-</h3><h4>1. User Information:-</h4><p>Name:- /users/me/ <br>Description:- Shows information about the current user (you)<br>Endpoint:- <a href="https://www.eventbriteapi.com/v3/users/me/?token=XVUXJ5ZRW5J2DPDL6EJG">https://www.eventbriteapi.com/v3/users/me/?token=</a>YOUR_TOKEN <br>Response:-</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*k6qHgIsyoHFcOWBm2UbULA.png" /></figure><h4>2. Owned Event:-</h4><p><em>Name:-</em> /users/me/owned_events <br><em>Description:-</em> A list of events you’re organizing<br><em>Endpoint:-</em> https://www.eventbriteapi.com/v3/users/me/owned_events/?token=YOUR_TOKEN <br>Response:-</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*o9SvbrgBPzC4197F6YnpNQ.png" /></figure><h4>3. All Events (Public Events):-</h4><p><em>Name:-</em> /events/search/<br><em>Description:-</em> Retrieve a paginated response of public event objects from across Eventbrite’s directory, regardless of which user owns the event.<br><em>Endpoint:-</em> <a href="https://www.eventbriteapi.com/v3/events/search/?token=YOUR_TOKEN">https://www.eventbriteapi.com/v3/events/search/?token=YOUR_TOKEN</a> <br><em>Response:-</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fufOrK67MykEX7DW3drSmA.png" /></figure><h4>4. All events of the current user:-</h4><p><em>Name:-</em> /organizations/:id/events/<br><em>Description:-</em> Returns a paginated response of events, under the key events, of all events the current user has access to in the specified organization.<br><em>Endpoint:- </em><a href="https://www.eventbriteapi.com/v3/organizations/YOUR_ID/events/?token=YOUR_TOKEN">https://www.eventbriteapi.com/v3/organizations/YOUR_ID/events/?token=YOUR_TOKEN</a> <br><em>Response:-</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KfwkTpnRumIR0YfxdimSOQ.png" /></figure><h4>5. Event Details:-</h4><p><em>Name:-</em> /events/:id/<br><em>Description:-</em> Returns an event for the specified event.<br><em>Endpoint:- </em><a href="https://www.eventbriteapi.com/v3/events/YOUR_ID/?token=YOUR_TOKEN">https://www.eventbriteapi.com/v3/events/YOUR_ID/?token=YOUR_TOKEN</a> <br><em>Response:-</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mZCDav6hieW-5VF677owjw.png" /></figure><h4>6. Ticket Details:-</h4><p><em>Name:-</em> /events/:id/ticket_classes/<br><em>Description:-</em> Get the ticket details of a particular event using event id.<br><em>Endpoint:- </em>https://www.eventbriteapi.com/v3/events/EVENT_ID/ticket_classes/?token=YOUR_TOKEN<br><em>Response:-</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XQ1px8f7n2vMjzYX9pxz_w.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=265485c61076" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Basic Operators in Swift]]></title>
            <link>https://medium.com/@manishahire/basic-operators-in-swift-7112151eb055?source=rss-a1bdfd420cd8------2</link>
            <guid isPermaLink="false">https://medium.com/p/7112151eb055</guid>
            <category><![CDATA[ios]]></category>
            <category><![CDATA[operators]]></category>
            <category><![CDATA[logicaloperators]]></category>
            <category><![CDATA[range-operators]]></category>
            <category><![CDATA[arithmetic-operators]]></category>
            <dc:creator><![CDATA[Manish Ahire]]></dc:creator>
            <pubDate>Thu, 31 May 2018 18:01:45 GMT</pubDate>
            <atom:updated>2018-06-03T07:03:44.344Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/750/1*OgeU8HPo8TFF1cZQ-4XjJw.jpeg" /></figure><p>Swift support most standard C operators and improves several capabilities to eliminate common coding errors. The assignment operator (=) does not return a value, to prevent it from being mistakenly used when the equal to operator (==) is intended.</p><p>Swift also provide range operators that are not found in C, such as a..&lt;b and a..b as a shortcut for expressing a range of values.</p><h3><strong>Terminology</strong></h3><p>Operators are unary, binary, or ternary:<br><strong>Unary: </strong>Unary operators operate on a single target (such as -a, !b, c!).<br><strong>Binary: </strong>Binary operators operate on two targets (such as 2 + 3).<br><strong>Ternary: </strong>Ternary operators operate on three targets. Like C, Swift has only one ternary operator, the ternary conditional operator (a ? b : c).</p><h3>Assignment Operator</h3><p>The assignment<em> </em>operator (a = b) initializes or updates the value of a with the value of b:</p><pre>let b = 10<br>var a = 5<br>a = b<br>// a is now equal to 10</pre><pre>let (x, y) = (1, 2)<br>// x is equal to 1, and y is equal to 2</pre><p>Unlike the assignment operator in C and Objective-C, the assignment operator in Swift does not itself return a value</p><pre>if x = y {<br>    // This is not valid, because x = y does not return a value.<br>}</pre><h3><strong>Arithmetic Operators</strong></h3><p>Swift support the four standard arithmetic operators for all numbers type<br>1. Addition (+)<br>2. Subtraction (-)<br>3. Multiplication (*)<br>4. Division (/)</p><pre>1. 1 + 2       // equals 3</pre><pre>2. 5 - 3       // equals 2</pre><pre>3. 2 * 3       // equals 6</pre><pre>4. 10.0 / 2.5  // equals 4.0</pre><p>Unlike the arithmetic operators in C and Objective-C, the Swift arithmetic operators do not allow values to overflow by default (such as a &amp;+ b)</p><h3>Remainder Operators</h3><p>The remainder operator (a % b) works out how many multiples of b will be fit inside a and returns the value that is left over knowns as the remainder.<br>Here’s how the remainder operators works, to calculate 9 % 4, you first work out how many 4s will fit inside 9. You can fit two4s inside 9, and the remainder is 1.</p><pre>9 % 4 // equals 1 </pre><h3>Compound Assignment Operators</h3><p>Like C, Swift provides <em>compound assignment operators</em> that combine assignment (=) with another operation.</p><pre>var a = 1<br>a += 2<br>// a is now equal to 3</pre><h3>Comparison Operators</h3><p>Swift supports all standard C comparison operators:<br>1. Equal to (a == b)<br>2. Not equal to (a != b)<br>3. Greater than (a &gt; b)<br>4. Less than (a &lt; b)<br>5. Greater than or equal to (a &gt;= b)<br>6. Less than or equal to (a &lt;= b)</p><pre>1. == 1    // true because 1 is equal to 1<br>2. != 1    // true because 2 is not equal to 1<br>3. 2 &gt; 1   // true because 2 is greater than 1<br>4. 1 &lt; 2   // true because 1 is less than 2<br>5. 1 &gt;= 1  // true because 1 is greater than or equal to 1<br>6. 2 &lt;= 1  // false because 2 is not less than or equal to 1</pre><p>Tuples are compared from left to right, one value at a time, until the comparison finds two values that are not equal. Those two values are compared and the result of that comparison determines the overall result of the tuple comparison. If all are equal then the tuples themselves are equal.</p><pre>(1, “zebra”) &lt; (2, “apple”)<br>// True, because 1 is less than 2, zebra and apple are not compared.</pre><pre>(3, &quot;apple&quot;) &lt; (3, &quot;bird&quot;)<br>// True, because 3 is equal to 3 and apple is less than bird.</pre><pre>(4, &quot;dog&quot;) &lt; (4, &quot;dog&quot;)<br>// True, because 4 is equal to 4 and dog is equal to dog.</pre><h3>Ternary Conditional Operator</h3><p>It is special operator with three parts, which takes the form question ? answer1 : answer2. <br>The ternary conditional operator is shorthand for the code bellow:</p><pre>if question {<br>   answer1 <br>} else {<br>   answer2<br>}</pre><h3>Nil-Coalescing Operator</h3><p>The nil-coalescing operator (a ?? b) unwraps an optional a if it contains a value, or returns a default value b if a is nil. The expression a is always of an optional type. The expression b must match the type that is stored inside a.</p><p>The nil-coalescing operator is shorthand for the code below:</p><pre>a != nil ? a! : b</pre><p>The example below uses the nil-coalescing operator to choose between a default color name and an optional user-defined color name:</p><pre>let color = “red”<br>let name : String?</pre><pre>var colorName = name ?? color<br>// name is nil, so colorName is set to the default of red</pre><h3>Range Operators</h3><p>Swift includes several <em>range operators</em>, which are shortcuts for expressing a range of values.</p><p><strong>Closed Range Operator:<br></strong>The closed range operator (a...b) defines a range that runs from a to b, and includes the values a and b. The value of a must not be greater than b. <br>The closed range operator is useful when iterating over a range in which you want all of the values to be used, such as with a for-in loop:</p><pre>for index in 1...5 {<br>   print(&quot;\(index)&quot;)<br>}<br>// 1<br>// 2<br>// 3<br>// 4<br>// 5</pre><p><strong>Half-Open Range Operator:<br></strong>The half-open range operator (a..&lt;b) defines a range that runs from a to b, but doesn’t include b. It’s said to be half-open because it contains its first value, but not its final value.</p><pre>let arr = [1, 2, 3, 4]<br>for i in 0..&lt;arr.count {<br>  print(arr[i])<br>}<br>// 1<br>// 2<br>// 3<br>// 4</pre><p><strong>One-Sided Range:<br></strong>The closed range operator has an alternative form for ranges that continue as far as possible in one direction.</p><pre>let names = [A, B, C, D]</pre><pre>for name in names[2...] {<br>   print(name)<br>}</pre><pre>// C<br>// D</pre><pre>for name in names[...2] {<br>  print(name)<br>}</pre><pre>// A<br>// B<br>// C</pre><pre>for name in names[..&lt;2] {<br>  print(name)<br>}</pre><pre>// A<br>// B</pre><pre>let range = ...5<br>range.contains(7)  // false<br>range.contains(5)  // true<br>range.contains(-1) // false</pre><h3>Logical Operators</h3><p>Logical operators modify or combine the Boolean logic values true and false. Swift supports the three standard logical operators found in C-based languages:</p><p>1. Logical NOT (!a)<br>2. Logical AND (a &amp;&amp; b)<br>3. Logical OR (a || b)</p><p><strong>Logical NOT Operator:<br></strong>The <em>logical NOT operator</em> (!a) inverts a Boolean value so that true becomes false, and false becomes true.</p><pre>let flag = false<br>if !flag {<br>  print(&quot;ACCESS DENIED&quot;)<br>}</pre><pre>// Prints ACCESS DENIED</pre><h3>Logical AND Operator</h3><p>The logical AND operator (a &amp;&amp; b) creates logical expressions where both values must be true for the overall expression to also be true.</p><p>If either value is false, the overall expression will also be false. In fact, if the first value is false, the second value won’t even be evaluated, because it can’t possibly make the overall expression equate to true. This is known as <strong><em>short-circuit evaluation</em></strong>.</p><p>This example considers two Bool values and only allows access if both values are true:</p><pre>let a = true<br>let b = false</pre><pre>if a &amp;&amp; b {<br>  print(&quot;Welcome&quot;)<br>} else {<br>  print(&quot;ACCESS DENIED&quot;)<br>}</pre><pre>// Prints ACCESS DENIED</pre><h3>Logical OR Operator</h3><p>You use it to create logical expressions in which only <em>one</em> of the two values has to be true for the overall expression to be true.</p><p>Like the Logical AND operator above, the Logical OR operator uses short-circuit evaluation to consider its expressions. If the left side of a Logical OR expression is true, the right side is not evaluated, because it can’t change the outcome of the overall expression.</p><pre>let a = false<br>let b = true</pre><pre>if a || b {<br>  print(&quot;Welcome&quot;)<br>} else {<br>  print(&quot;ACCESS DENIED&quot;)<br>}</pre><pre>// Prints Welcome</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7112151eb055" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>