<?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 Azeem Azeez on Medium]]></title>
        <description><![CDATA[Stories by Azeem Azeez on Medium]]></description>
        <link>https://medium.com/@azeemireland?source=rss-6df8f4e968------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*MRZZHs8Z-WtZUkeZ</url>
            <title>Stories by Azeem Azeez on Medium</title>
            <link>https://medium.com/@azeemireland?source=rss-6df8f4e968------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 19 Nov 2026 19:11:49 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@azeemireland/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[Can a Human brain connect to computer ? If so, this could be life-changing for paralysed patients.]]></title>
            <link>https://medium.com/@azeemireland/can-a-human-brain-connect-to-computer-if-so-this-could-be-life-changing-for-paralysed-patients-fb2f5d663f3b?source=rss-6df8f4e968------2</link>
            <guid isPermaLink="false">https://medium.com/p/fb2f5d663f3b</guid>
            <category><![CDATA[neuroscience]]></category>
            <category><![CDATA[neuralink]]></category>
            <category><![CDATA[brain-machine-interfaces]]></category>
            <category><![CDATA[brain-computer-interface]]></category>
            <category><![CDATA[advanced-technology]]></category>
            <dc:creator><![CDATA[Azeem Azeez]]></dc:creator>
            <pubDate>Sat, 20 Apr 2024 02:38:22 GMT</pubDate>
            <atom:updated>2024-04-20T02:45:09.705Z</atom:updated>
            <content:encoded><![CDATA[<h3>Can a Human brain connect to computer?. If so, this could be life-changing for paralysed patients.</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/592/1*v9Do95rWwTQELfGJtNTT1g.png" /></figure><p>Researcher’s say Yes, it can be connected. The world’s future of human machine interface is the Brain-Machine-Interface or BMI. A “Brain-Machine Interface” is a tool that tries to translate neural signals from brain into instructions. These transmitted signals are able to supervise or control the external software or hardware, which includes a computer or robotic system. BMI have a great future in medical science for prevention, detection and its diagnosis.</p><p>The study to control tablet devices using neural signals is led by BrainGate Technology, team of scientists, research engineers and medical practitioners in United States. The University researchers pursuing the research says that the machine involves a small transmitter that links to a person’s brain motor cortex. The advanced era can transmit brain indicators in full broadband fidelity at single-neuron resolution.</p><p>John Simeral of Brown university stated that they demonstrated that this wireless device is functionally equivalent to the stressed systems which have been the advanced and best standard. The indicators are recorded and transmitted with accurately comparable fidelity, which means that they are able to use the identical interpreting algorithms used with wired device. This could assist them to layout algorithms that provide for the seamless, intuitive, dependable recuperation of verbal exchange and mobility for humans with paralysis.</p><p><strong>About Research Study:</strong></p><p>The trial involved two paralysed spinal cord injury victims, aged 35 and 63.They used BrainGate generation to manipulate a tablet. They done similar factor-and-click on accuracy and typing speeds as they may with stressed out systems. This technology is also known as Brain-Controlled interface (BCI) which allows humans with paralysis to manipulate off the shelf tablet gadgets simply via thinking to move cursor moves and clicks. An unmodified Google Nexus tablet was paired with the virtual mouse. Then, the contributors have been requested to perform a fixed of tasks. The duties have been designed to peer how properly the individuals may want to navigate within generally used apps, as well as the transition among the apps. They had been capable to navigate the tablet programs, which includes stream music, e-mail and share video apps all with the assistance of simply deliberating via pointing and clicking a mouse. They even had conversations with friends, shopped on-line and more stuffs.</p><p><strong>Author’s Point of View:</strong></p><p>The impact of BMI not only help in paralysed patients, but also gives us scope to do more research in other medical purposes, it opens door for new research study opportunities in animals about how they think because they can’t communicate with humans vocally. Analyse the threats of wild animals. Even in some case investigations, this technology can contribute major role to resolve the cases. Even though we cannot completely expect positive results, because recording the brain responses may remain inconsistent depend on time and situations.</p><p><strong>Conclusion:</strong></p><p>This brilliant research step forward marks the modern develop within the rapidly developing subject of neural interface technology, which has even attracted the attention of fb and Elon Musk. A wireless chip from Musk’s startup Neuralink has already been tested on a monkey. The implant enabled the animal to play video games!. Hope BrainGate Technology, will make this technology available for public after they complete the studies which gives hopes or could be life-changing for paralysed patients.</p><blockquote><strong>Disclaimer:</strong> This article is published based on referring the available research resources. It may vary in future. According to my current work organisation external blog publishing policies, this content has been reviewed and approved by Principal Technology Architects.</blockquote><p>Let’s connect via,</p><p>LinkedIn: <a href="https://www.linkedin.com/in/mohammed-azeem-azeez-50686850/">https://www.linkedin.com/in/mohammed-azeem-azeez-50686850/</a></p><p>Facebook: <a href="https://www.facebook.com/profile.php?id=61551693677102&amp;mibextid=LQQJ4d">https://www.facebook.com/profile.php?id=61551693677102</a></p><p>Twitter: <a href="https://twitter.com/azeemohd786">https://twitter.com/azeemohd786</a></p><p>Instagram: <a href="https://www.instagram.com/azeemohd786/">https://www.instagram.com/azeemohd786/</a></p><p>Watch my Youtube channel: <a href="https://www.youtube.com/channel/UCursmZEXw28Uq1jQhzBrLzw">https://www.youtube.com/channel/UCursmZEXw28Uq1jQhzBrLzw</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fb2f5d663f3b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Technology Stories: Augmented Reality and Virtual Reality]]></title>
            <link>https://medium.com/@azeemireland/technology-stories-augmented-reality-and-virtual-reality-2494172e8d14?source=rss-6df8f4e968------2</link>
            <guid isPermaLink="false">https://medium.com/p/2494172e8d14</guid>
            <dc:creator><![CDATA[Azeem Azeez]]></dc:creator>
            <pubDate>Sat, 22 Oct 2022 05:28:32 GMT</pubDate>
            <atom:updated>2023-06-22T04:05:25.926Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/900/1*iFvqf_SF9ZeJyd0lifAuBA.jpeg" /></figure><p><strong>Adoption of Technology</strong></p><p>The adoption of Technology started early 1900s with Telephone, TV, 1910s with electricity, air travel and from 1970s to 2000 with radio, fridge, digital camera and many more.</p><p>The evolution of computer started from 1930s, Z1 which is large machinery took an entire room space. Later from 1950s to present the hardware changed from transistor based, integrated circuit bases, microprocessor based to Artificial Intelligence in 5th generation.</p><p>Source: <a href="https://www.insider.com/how-computers-evolved-history-2019-9">https://www.insider.com/how-computers-evolved-history-2019-9</a></p><p>Augmented Reality was launched in 1960s, which used see through HMD to present 3D graphics. Since 1997, AR’s growth and progress have been remarkable.</p><p>The first Virtual Reality “Headset” invention was made by Jaron Lanier, founder of VLP research created EyePhone head-mounted display in 1987.</p><h3>Augmented Reality</h3><p>Augmented Reality (AR) is live view of physical or real environment which is augmented by computer-generated inputs such as graphics, sound or object through specific tool.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/530/1*_y5cUjB4G8xx8jHbo99SbQ.png" /></figure><p>Examples: Mobile/Tablet, Cast AR, Google Cast, Hologens, Sony Smart Eye Glass, etc.</p><p>The benefits of AR is, it has cost effective maintenance, hand free, improved productivity, live expert support, easy to use, etc.</p><h3>Virtual Reality</h3><p>Virtual Reality (VR) is a computer technology that replicates an environment that can be real or imagined, the user’s physical presence can be simulated to allow the user to interact in that environment.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/557/1*ZR8ibzbbgB8ejo1OivTt1A.png" /></figure><p>Example: Sony Playstation VR, Samsung Gear VR, etc.</p><p>The benefits of VR is a virtual simulation of real scenarios, hands-free operation. But on the other hand, some key business points are its cost-effective training, production is expensive and product is slight costly.</p><h3>AR vs VR</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/1*InuLLhRdRWCiDEfBXen38Q.png" /></figure><h3>Augmented Reality vs. Augmented Virtuality</h3><p><strong><em>Augmented Reality</em></strong> is applying computer generated content into a live video or real user environment in real time.</p><p><strong>Keys</strong>: Uses real world setting and user can control the presence in the real world.</p><p><strong><em>Augmented Virtuality</em></strong> is virtual or imposing digital information, experience like viewing a different world.</p><p><strong>Keys</strong>: Completely virtual and the user’s interaction is controlled by the system.</p><h3>Augmented Reality Types</h3><h3>1. Marker Based AR</h3><p>Marker-based augmented reality or <em>Image Recognition</em> uses AR camera to identify the image and apply some visual marker (can be points or draw line/box etc). It can be also used in QR/2D code to produce an outcome only when the marker is identified by AR camera.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/351/1*MWbB2hGAcCuCjdw7nKFoqQ.png" /><figcaption><em>Screenshot of real AR demo</em></figcaption></figure><p>Example: An mobile application with image recognition to find the object and impose a mark to measure its distance.</p><h3>2. Location Based AR</h3><p>Location based augmented reality is placing an object as overlay on physical environment to recognise the location or display technique that overlays digitized information. Its used when location awareness capabilities.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/380/1*oK9h47Ht5erkRUlv-scWxg.jpeg" /><figcaption>Image source:- <a href="https://blog.vakoms.com/everything-you-need-to-knowto-build-location-based-ar-app/">https://blog.vakoms.com/everything-you-need-to-knowto-build-location-based-ar-app/</a></figcaption></figure><p><strong>3. Projection AR</strong></p><p>Projection-based augmented reality means to have 2D or 3D hologram. In other words, the projection artificial light onto real-world surfaces.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/498/1*Uf9YF4NI9IH_ITRcxV2gEQ.jpeg" /><figcaption>Image Source: <a href="https://www.youtube.com/watch?v=qMGVCMucrsc">https://www.youtube.com/watch?v=qMGVCMucrsc</a></figcaption></figure><h3>4. Superimpose AR</h3><p>Superimpose AR imposes 2D or 3D virtual object on the real environment or physical object. Placing a virtual object in live video.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/246/1*kPA4I-AMjrP4HTjQOrjtfA.png" /><figcaption><em>Image screenshot of AR real demo.</em></figcaption></figure><p><strong>AR-VR adoption</strong></p><ul><li>Exploring AR-VR an option for virtual training for students, employees and customers.</li><li>Industries use virtual automotive experience, user can configure the product in immersive experience.</li><li>Some industries use AR-VR for planning and validation with technology assisted process.</li><li>AR-VR plays a major role in the health industry, applications such as body tracking, remote treatment, helps in diagnosis etc.</li></ul><h3>AR-VR Lifecycle</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/834/1*AB8_hoKXySY3n2jP56Wntg.png" /><figcaption><em>Application Development Lifecycle</em></figcaption></figure><p>AR-VR application development Lifecycle have the following phases,</p><p>1. Requirement Phase: Understanding the project requirement, target analysis and its uses.</p><p>2. Design Phase: Design the application, UX/UI entire flow, review, and approve from client.</p><p>3. Development Phase: Coding and development to achieve the target feature including User Interface, back-end services, and functionality. Make sure to follow the coding standards.</p><p>4. Testing Phase: Tester or QA can evaluate the app performance manually or automatically for AR-VR apps. It can be tested using emulator or hardware. Report bugs for fix to development team.</p><p>5. Deployment Phase: Launch or release the app after bug/issue fix to the market/store. Its deployment finalization and documentation process.</p><p>6. Maintenance Phase: The application has to be maintained based on system updates. Based on user feedback/review work on further fixes. Meanwhile if any bug reports, need to fix. Its periodic/intermediate major releases.</p><h3>Augmented Reality Apps</h3><p>There are many applications developed with Augmented Reality concepts. Some of the few top-Augmented Reality apps are below,</p><p><strong>Pokémon GO:</strong> This application developed by Niantic and targeted on portraying augmented Pokémon everywhere in the world. It lets in users to have interaction with different actual people in augmented battles with each other for the collection of Poke.</p><p><strong>Ink Hunter: </strong>Ink Hunter is one of the maximum popular unfastened applications available on each the Google’s Playstore and the Apple’s Appstore. The utility lets in you to area augmented tattoos in your body through your augmented reality camera smartphone, which allows the user to take a photo with that ink/art.</p><p><strong>Google Translate:</strong> Google Translate uses the AR camera to translate the language in the front of the camera into the consumer’s desired preference of language.</p><h3>Virtual Reality Apps</h3><p>There are many applications developed with Virtual Reality concepts. Some of the few top Virtual Reality apps are below:</p><p><strong>YouTube: </strong>YouTube has their own Virtual Reality application that allows the user to watch videos is system, or computer generated virtual world/environment with 360° view.</p><p><strong>Google Cardboard:</strong> This is an must try application that possesses a Google Cardboard Headset. The application comes with in built functions and features like google Earth, Card enables the VR to predict the user’s head position, and many other etc.</p><p><strong>Temple Run 2:</strong> It is one of the top games on both Google’s Playstore and Apple’s Appstore. This game was redesigned to have a virtual environment created for users, allows to select scene and run/escape from the monster chasing them.</p><h3>Conclusion</h3><p>AR/VR Démonstrations &amp; Case Studies:</p><ul><li>There are POC’s and solutions developed and demonstrated for industrial purposes. Some of them are Aero Engine maintenance, Virtual Car experience, Cleaning Robot Design, Chiller Plant Digital Twin, Chiller Plant Hologens training, etc.</li><li>Case studies of Unity 3D: To explore the machine/products 3D view with all part description, demonstration and features. Some other studies like chiller maintenance application for iPad with back-end integration of Unity 3D to access data and other objects.</li></ul><p>Project Support: For iOS AR Application project contract/support reach me out Email: bluemangoglobal@gmail.com; swift4kat@gmail.com</p><p>Connect me via,</p><p>LinkedIn: <a href="https://www.linkedin.com/in/mohammed-azeem-azeez-50686850/">https://www.linkedin.com/in/mohammed-azeem-azeez-50686850/</a></p><p>Twitter: <a href="https://twitter.com/azeemohd786">https://twitter.com/azeemohd786</a></p><p>Instagram : <a href="https://www.instagram.com/azeemohd786/">https://www.instagram.com/azeemohd786/</a></p><p>Youtube: <a href="https://www.youtube.com/channel/UCursmZEXw28Uq1jQhzBrLzw">https://www.youtube.com/channel/UCursmZEXw28Uq1jQhzBrLzw</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2494172e8d14" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Technology Stories : Artificial Intelligence for Metaverse]]></title>
            <link>https://medium.com/@azeemireland/technology-stories-artificial-intelligence-for-metaverse-4f093d779152?source=rss-6df8f4e968------2</link>
            <guid isPermaLink="false">https://medium.com/p/4f093d779152</guid>
            <category><![CDATA[brain-machine-interfaces]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[future-technology]]></category>
            <category><![CDATA[metaverse]]></category>
            <dc:creator><![CDATA[Azeem Azeez]]></dc:creator>
            <pubDate>Wed, 21 Sep 2022 07:27:41 GMT</pubDate>
            <atom:updated>2022-09-21T15:31:36.950Z</atom:updated>
            <content:encoded><![CDATA[<h3>Technology Stories : Artificial Intelligence for Metaverse</h3><p>This article is about the role of Artificial Intelligence in Metaverse. To know about “what is metaverse?” and how does AI supports metaverse evolution.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/900/1*ZXVWuFDqkYD3JL7qisld0A.jpeg" /></figure><h3><strong>What is Metaverse ?</strong></h3><p>The term <em>metaverse</em> arise in 1992 science fiction novel named Snow Crash, where humans can interact with each other and other virtual objects as avatars. (source: wikipedia — <a href="https://en.wikipedia.org/wiki/Metaverse">https://en.wikipedia.org/wiki/Metaverse</a>)</p><p>Metaverse is used to describe combination of virtual reality and mixed reality through headset or even through browser or other media to interact each other in real time. It is used in fitness, education, gaming, real estate and also in retail. There are researches going on to widen its contribution in technology.</p><h3><strong>Role of Artificial Intelligence in Metaverse</strong></h3><p>Artificial Intelligence (AI) has become prevalent technology which is used in various domains. AI is already being used in computer vision helping doctors to perform robotic surgeries, prevents fraud detection, prediction, inventory, gaming, language translation etc.</p><p><strong>Meta</strong></p><p>Facebook, was renamed ‘Meta’ in Oct 2021, sources say that Mark Zuckerberg focuses to invest in building ‘Metaverse’. The vision of building social metaverse will enhance in entertainment, gaming, exercise, work, education, medical field and commerce.</p><p><strong>AI for content creation : Avatars and Entities</strong></p><p>AI enables the creation of real-world objects or human avatars in virtual world with real-life entities. It is evolved to look more realistic closely resembling the humans they represent. This can be made by AI-assisted amination or even by AI-powered video editing platforms.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/999/1*KGDkjk6kqtSgoE1nUy8lSQ.png" /></figure><p><strong>Digital Content</strong></p><p>AI can <strong>provide valuable insights drawn from analyzing customer data</strong>. It can provide a clear idea about your target audiences’ interests and preferences. Some content creation tools were <a href="https://www.jasper.ai/">Jasper</a>, <a href="https://www.hubspot.com/">Hubspot</a> etc.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/1*_xdaQhaBvTjHN5JZD3h_bQ.png" /></figure><p>AI computer vision technology is used to analyze the user’s environment with data from VR devices to adjust the user’s position and motion in metaverse space.</p><p><strong>Digital Merchandise</strong></p><p>AI can separate customer demand preferences and profiles by brands, fashion wear, colours, and sizes at the store or store group level, enabling retailers to design using AI for enhanced experience.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/424/1*Rniw_sTdKXdtmdlqTWi_cg.jpeg" /></figure><p><strong>Digital Humans</strong></p><p>Metaverse also have digital humans which act as avatars of automated assistants or chatbots. It helps the avatars to perform transactions or interacts each other to know the real human needs.</p><p>For example, you may come across in the latest digital platform or applications have chatbot to help or assist you. Apart from metaverse, other example like, MyJio app is having JioCare: Help &amp; support with virtual chatbot for assistance.</p><p><strong>NLP in Metaverse</strong></p><p>AI in Metaverse have strong contribution in globallly speaking multiple language. Natural Language Processing (NLP) can be used for language translation, analysis to make communication between people with metaverse elements to detach constaints on spoken language.</p><p>AI can also help in real time speech-to-text and text-to-speech translation.</p><p><strong>Digital Twins</strong></p><p>A <strong>digital twin</strong> is a virtual representation of an object or system in the digital world of the <strong>Metaverse.</strong> It was orginally developed and Internet-Of-Things(IOT) concept for analyzing real-time performance.</p><p>Uses of Digital Twins in Metaverse: It can be used in manufacturing, automobile, retail, healthcare, smart cities etc.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/300/1*Fp2-M89kEyQCIlz0sxB9AQ.png" /><figcaption>Image Source credit : <a href="https://www.leewayhertz.com/digital-twin-and-metaverse/">https://www.leewayhertz.com/digital-twin-and-metaverse/</a></figcaption></figure><p><strong>AI for BMI</strong></p><p>The world’s future of human machine interface is the Brain-Machine-Interface or BMI. A “Brain-Machine Interface” is a tool that tries to translate neural signals in the brain into commands capable of controlling external software or hardware, such as a computer or robotic arm. The researchers are working towards brain signals and send signals to neurons. BMI have a great future in medical science for its diagnose.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/592/1*f52_SUDi2XeZgvu03EJybQ.jpeg" /></figure><p><strong>Can a Human brain connect to computer ?</strong></p><p>University researchers say ‘Yes’, it was connected. Read more on this topic : <a href="https://www.intelligentliving.co/human-brain-connected-to-computer-wirelessly-first-time/">https://www.intelligentliving.co/human-brain-connected-to-computer-wirelessly-first-time/</a></p><p><strong>Conclusion</strong>: Yet more developments to launch in the AI for <em>metaverse</em>. AI in Metaverse have bright future globally I believe. Shoot your comments below and also if this article is useful for new lads, follow me in below media,</p><p>LinkedIn: <a href="https://www.linkedin.com/in/mohammed-azeem-azeez-50686850/">https://www.linkedin.com/in/mohammed-azeem-azeez-50686850/</a></p><p>Twitter: <a href="https://twitter.com/azeemohd786">https://twitter.com/azeemohd786</a></p><p>Instagram : <a href="https://www.instagram.com/azeemohd786/">https://www.instagram.com/azeemohd786/</a></p><p>Youtube: <a href="https://www.youtube.com/channel/UCursmZEXw28Uq1jQhzBrLzw">https://www.youtube.com/channel/UCursmZEXw28Uq1jQhzBrLzw</a></p><p>Listen via youtube:</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FGgcG9tmiYKk%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DGgcG9tmiYKk&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FGgcG9tmiYKk%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/b36c838d74894ef1b8800f93db25c286/href">https://medium.com/media/b36c838d74894ef1b8800f93db25c286/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4f093d779152" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Delegates VS Notifications VS Observations in iOS]]></title>
            <link>https://medium.com/@azeemireland/delegates-vs-notifications-vs-observations-in-ios-fa312e66c0ff?source=rss-6df8f4e968------2</link>
            <guid isPermaLink="false">https://medium.com/p/fa312e66c0ff</guid>
            <category><![CDATA[swift]]></category>
            <category><![CDATA[ios]]></category>
            <category><![CDATA[mobile-app-development]]></category>
            <category><![CDATA[ios-app-development]]></category>
            <dc:creator><![CDATA[Azeem Azeez]]></dc:creator>
            <pubDate>Sat, 23 Oct 2021 07:06:30 GMT</pubDate>
            <atom:updated>2021-10-23T08:32:42.182Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_B1N1vsdYWEGgjuf0OGkoA.jpeg" /></figure><p>A common confusion that we often experience when developing iOS applications, is how to implement communication or transmission between our controllers. Three common patterns that commonly used throughout iOS applications include:</p><ol><li>Delegation</li><li>Notifications through Notification Center, and</li><li>Key value observing</li></ol><p><strong>What is it about these three patterns?</strong></p><p>The three patterns chosen are all ways for one object to transmit events or data to other controllers. They are ways for objects to “inform” the occurrence of certain events, or more accurately, ways to allow certain events to be heard by others. Most applications have task for data transmission, without communication, controllers cannot integrate into the application.</p><p>The three patterns all provide ways for controllers (or other objects) to communicate between other screens and its useful within an application.</p><p>Watch Full Video in YouTube- <a href="https://youtu.be/7EK-LCgnx1g">https://youtu.be/7EK-LCgnx1g</a></p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2F7EK-LCgnx1g%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D7EK-LCgnx1g&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2F7EK-LCgnx1g%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/c55b18d00fe3ff38aeb20445bd4a03d5/href">https://medium.com/media/c55b18d00fe3ff38aeb20445bd4a03d5/href</a></iframe><p><strong>Delegation</strong></p><p>The basic idea of delegation, is that a controller defines a protocol (a set of method definitions) that describe what a delegate object must do in order to be allowed to respond to a controller’s events. The protocol is a contract where the delegator says “If you want to be my delegate, then you must implement these methods”.</p><p><em>Pros</em></p><ul><li>All events to be heard are clearly defined in the delegate protocol.</li><li>Errors are not repelled as it should be by a delegate.</li><li>Protocol defined within the scope of the controller only.</li><li>Very traceable, and easy to identify flow of control within an application.</li><li>No third party object required to maintain / monitor the communication process.</li></ul><p><em>Cons</em></p><ul><li>Many lines of code required to define: 1. the protocol definition, 2. the delegate property in the controller, and 3. the implementation of the delegate method definitions within the delegate itself.</li><li>Need to be careful to correctly set delegates to nil on object deallocation, failure to do so can cause memory crashes by calling methods on deallocated objects.</li><li>Although possible, it can be difficult and the pattern does not really lend itself to have multiple delegates of the same protocol in a controller (telling multiple objects about the same event)</li></ul><p><strong>Notifications</strong></p><p>In iOS applications there is a concept of a “Notification Center”. The main feature of this pattern is that the sender and recipients (there can be many) do not talk directly, like with delegate pattern. Instead, they both talk to NotificationCenter - the sender calls method postNotification on the NotificationCenter to send a notification, while recipients opt-in for receiving the notifications by calling addObserver on NotificationCenter. They can later opt-out with removeObserver. Important note though is that NotificationCenter does not store notifications for future subscribers - only present subscribers receive the notifications.</p><p><em>Pros</em></p><ul><li>Easy to implement, with not many lines of code.</li><li>Can easily have multiple objects reacting to the same notification being posted.</li><li>Controller can pass in a context (dictionary) object with custom information (userInfo) related to the notification being posted.</li></ul><p><em>Cons</em></p><ul><li>No compile time to checks to ensure that notifications are correctly handled by observers.</li><li>Battery leackage or it uses more memory.</li><li>Required to un-register with the notification center if your previously registered object is deallocated.</li><li>Third party object required to manage the link between controllers and observer objects.</li><li>Notification Names, and UserInfo dictionary keys need to be known by both the observers and the controllers. If these are not defined in a common place, they can very easily become out of sync.</li></ul><p><strong>Observation</strong></p><p>KVO is a traditional <a href="https://en.wikipedia.org/wiki/Observer_pattern">observer</a> pattern built-in any NSObject out of the box. With KVO observers can be notified of any changes of a @property values. It leverages <em>Objective-C runtime</em> for automated notifications dispatch, and because of that for Swift class, you’d need to opt into <em>Objective-C dynamism</em> by inheriting NSObject and marking the var you’re going to observe with modifier dynamic. The observers should also be NSObject descendants because this is enforced by the KVO API.</p><p><em>Pros</em></p><ul><li>Can provide an easy way to sync information between two objects. For example, a model and a view.</li><li>Allows us to respond to state changes inside objects that we did not create, and don’t have access to alter the implementations of (SKD objects).</li><li>Can provide us with the new value and previous value of the property we are observing.</li><li>Can use key paths to observe properties, thus nested objects can be observed.</li></ul><p><em>Cons</em></p><ul><li>The properties we wish to observe, must be defined using strings. Thus no compile time warnings or checking occurs.</li><li>Re-factoring of properties can leave our observation code no longer working.</li><li>Complex “IF” statements required if an object is observing multiple values.</li><li>Need to remove the observer when it is deallocated.</li></ul><p>Simple example is availabe for your reference at GitHub :- <a href="https://github.com/azeemohd786/TransmissionPatternsDemo/tree/master">https://github.com/azeemohd786/TransmissionPatternsDemo/tree/master</a></p><p>Sources used for this article @credit goes to:- <a href="https://shinesolutions.com/2011/06/14/delegation-notification-and-observation/">https://shinesolutions.com/2011/06/14/delegation-notification-and-observation/</a></p><h3>Let’s connect!</h3><p>Connect me via LinkedIn : <a href="https://www.linkedin.com/in/mohammed-azeem-azeez-50686850/">https://www.linkedin.com/in/mohammed-azeem-azeez-50686850/</a></p><p>Connect me via Twitter : <a href="https://twitter.com/azeemohd786">https://twitter.com/azeemohd786</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fa312e66c0ff" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Vuforia Failed : Unity’s Vuforia Re-Initialisation Issue in Native iOS Mobile App.]]></title>
            <link>https://medium.com/@azeemireland/vuforia-failed-unitys-vuforia-re-initialisation-issue-in-native-ios-mobile-app-b28ce88fb22?source=rss-6df8f4e968------2</link>
            <guid isPermaLink="false">https://medium.com/p/b28ce88fb22</guid>
            <category><![CDATA[unity-developers]]></category>
            <category><![CDATA[vuoria-initialisation]]></category>
            <category><![CDATA[vuforia-failed]]></category>
            <category><![CDATA[vuforia-failed-in-ios]]></category>
            <category><![CDATA[vuforia]]></category>
            <dc:creator><![CDATA[Azeem Azeez]]></dc:creator>
            <pubDate>Tue, 11 Aug 2020 16:23:10 GMT</pubDate>
            <atom:updated>2020-08-11T17:40:57.717Z</atom:updated>
            <content:encoded><![CDATA[<h3><strong>Vuforia Failed : Unity’s Vuforia Re-Initialisation Issue in Native iOS Mobile App.</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FL5NmWbArqgHwwMguybuLQ.png" /></figure><p>This topic is based on Unity’s Vuforia Integration in native iOS App. Nowadays, its usual and common issue found in iOS application is either Vuforia failed or re-initialisation issue. Here are some points which i would like to share based on my experience.</p><p>Tests have shown that vuforia breaks or fail its way when you edit code/script while in Play Mode! Then the next time it will say vuforia failed to initialise.</p><p>If you use the vuforia, webcam, play and do NOT edit any code while playing/testing then it won’t break and it all works perfectly.<br>When you edit some script and unity recompiles while in play mode then vuforia / webcam will break and you will need to restart unity as a workaround.</p><blockquote>Initialise Vuforia manually with the VuforiaRuntime-class.<br> UnityEngine.Debug:LogError(Object) Vuforia.VuforiaARController:Start() System.Delegate:DynamicInvoke(Object[]) Vuforia.DelegateHelper:InvokeDelegate(Delegate, Object[]) Vuforia.DelegateHelper:InvokeWithExceptionHandling(Action) Vuforia.VuforiaBehaviour:Start()</blockquote><p>Alternative Suggested changes,</p><p><strong>Step 1:</strong>- <strong>Use Delayed Vuforia Initialisation</strong> option in Vuforia Configuration because there’s only an optional subsection of our game that uses augmented reality, and we didn’t need to present the camera permissions alert immediately. When the user chooses to enter the augmented reality scene, we first prompt for camera permissions. Once camera permissions are granted, the user enters the augmented reality scene. When the user enters that scene, we manually initialize Vuforia with VuforiaRuntime.Instance.InitVuforia();</p><p>However, now the camera permissions dialogue is presented immediately upon app launch, even though Vuforia is not initialized.</p><p><strong>Step:- 2:-</strong> <strong>Write Vuforia Behaviour script:-</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/558/1*xkFwIC9OhavZFmGCGdakgg.png" /></figure><blockquote>// <strong>For example disable Vuforia when its not in use; </strong>VuforiaRuntime.Instance.Deinit ();</blockquote><blockquote>GetComponent&lt;VuforiaBehaviour&gt; ().enabled = false; GetComponent&lt;DefaultInitializationErrorHandler&gt; ().enabled = false;</blockquote><blockquote>// <strong>For example enable Vuforia when its in use; To initialise- </strong>VuforiaRuntime.Instance.InitVuforia ();</blockquote><blockquote>GetComponent&lt;VuforiaBehaviour&gt; ().enabled = true; GetComponent&lt;DefaultInitializationErrorHandler&gt; ().enabled = true;</blockquote><p>Assume in other words, <strong>EACH</strong> time when the Object is in touch with target initialise Vuforia and otherwise disable it.</p><p>Watch video about <strong>Vuforia ‘AR’ Unity Integration in Native iOS</strong> [Xcode 11.3; Unity 2019.2.21f1 &amp; Vuforia 9.1.7]</p><p><strong>Video link:</strong>- <a href="https://www.youtube.com/watch?v=ueWUWInOpNE&amp;t=1s">https://www.youtube.com/watch?v=ueWUWInOpNE&amp;t=1s</a></p><p><strong>For Unity Vuforia integration in native iOS support</strong> reach us swift4kat@gmail.com or visit www.bluemangoglobal.com</p><p><strong>NOTE:- Please go through the below link of Unity Forum regarding why Vuforia shouldn’t be initialised at early stage. </strong><a href="https://forum.unity.com/threads/do-not-run-vufory-when-the-application-starts.498351/">https://forum.unity.com/threads/do-not-run-vufory-when-the-application-starts.498351/</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b28ce88fb22" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Augmented Reality Live Face Detection in iOS]]></title>
            <link>https://medium.com/@azeemireland/augmented-reality-live-face-detection-in-ios-2b84d0c3b132?source=rss-6df8f4e968------2</link>
            <guid isPermaLink="false">https://medium.com/p/2b84d0c3b132</guid>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[face-detection-app]]></category>
            <category><![CDATA[ios]]></category>
            <category><![CDATA[augmented-reality]]></category>
            <dc:creator><![CDATA[Azeem Azeez]]></dc:creator>
            <pubDate>Mon, 09 Mar 2020 07:03:00 GMT</pubDate>
            <atom:updated>2020-03-09T07:03:00.868Z</atom:updated>
            <content:encoded><![CDATA[<p>This article is about how to make Live Face Detection using Augmented Reality technology in iOS.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*efJUGFQqKpCP0l41KQc-Rw.jpeg" /></figure><p>Below video is all about build an Augmented reality Live Face Detection in iOS with Xcode latest version swift 5 language</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FCYu0aWDCyfQ%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DCYu0aWDCyfQ&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FCYu0aWDCyfQ%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/f5186cfdb572b103718191bda664a830/href">https://medium.com/media/f5186cfdb572b103718191bda664a830/href</a></iframe><p>Open a new Xcode project, on your main.storyboard add ARKit SceneKit View and label. Make corresponding IBOutlets as shown in video.</p><p>The source code which is used in View Controller is as follows,</p><pre><strong>import</strong> UIKit<br><strong>import</strong> ARKit</pre><pre><strong>class</strong> ViewController: UIViewController <br>{</pre><pre><strong>@IBOutlet</strong> <strong>weak</strong> <strong>var</strong> statusLabel: UILabel!<br><strong>@IBOutlet</strong> <strong>weak</strong> <strong>var</strong> faceView: ARSCNView!</pre><pre><strong>override</strong> <strong>func</strong> viewDidLoad() {<br><strong>super</strong>.viewDidLoad()<br>faceView.delegate = <strong>self<br>guard</strong> ARFaceTrackingConfiguration.isSupported <strong>else</strong> {<br>statusLabel.text = “AR Face Detection is not supported on this device”<br><strong>return<br></strong>}</pre><pre>}</pre><pre><strong>override</strong> <strong>func</strong> viewWillAppear(<strong>_</strong> animated: Bool) <br>{<br><strong>super</strong>.viewWillAppear(animated)<br><strong>let</strong> configuration = ARFaceTrackingConfiguration()<br>faceView.session.run(configuration)<br>}</pre><pre><strong>override</strong> <strong>func</strong> viewWillDisappear(<strong>_</strong> animated: Bool) <br>{<br><strong>super</strong>.viewWillDisappear(animated)<br>faceView.session.pause()<br>}<br>}</pre><pre><strong>extension</strong> ViewController: ARSCNViewDelegate<br>{<br><strong>func</strong> renderer(<strong>_</strong> renderer: SCNSceneRenderer, nodeFor anchor: ARAnchor) -&gt; SCNNode?<br>{</pre><pre><strong>guard</strong> <strong>let</strong> device = faceView.device <strong>else</strong> {<br><strong>return</strong> <strong>nil<br></strong>}<br><strong>let</strong> faceGeometry = ARSCNFaceGeometry(device: device)<br><strong>let</strong> faceNode = SCNNode(geometry: faceGeometry)<br>faceNode.geometry?.firstMaterial?.fillMode = .lines<br><strong>return</strong> faceNode</pre><pre>}</pre><pre>}</pre><p>That’s all, run the project and check.</p><p>NOTE:- The ARKit supports only from iPhone device 7 onwards.</p><p>Hence, its a very simple and easy method for your basic first AR+iOS App.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2b84d0c3b132" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Unity Integration in Native iOS]]></title>
            <link>https://medium.com/@azeemireland/unity-integration-in-native-ios-b5e2ea501477?source=rss-6df8f4e968------2</link>
            <guid isPermaLink="false">https://medium.com/p/b5e2ea501477</guid>
            <category><![CDATA[objective-c]]></category>
            <category><![CDATA[mobile]]></category>
            <category><![CDATA[swift]]></category>
            <category><![CDATA[ios-app-development]]></category>
            <category><![CDATA[ios]]></category>
            <dc:creator><![CDATA[Azeem Azeez]]></dc:creator>
            <pubDate>Thu, 05 Sep 2019 06:19:55 GMT</pubDate>
            <atom:updated>2019-12-30T00:06:33.911Z</atom:updated>
            <content:encoded><![CDATA[<h3>Unity Integration in Native iOS &amp; APIs</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9cwDqklsTIQ3sjQeij6P7Q.png" /><figcaption>Thanks to <a href="https://undraw.co/">undraw.co</a> for a great illustration</figcaption></figure><p>Unity Integration in native iOS is nothing but integration of two platforms in one build. Suppose, if unity game or any kind of video or animation pre-build in unity platform, such files could be integrated into native iOS Platform. So that we could use the app in both features. It can be used to call API’s in unity from native iOS. Meanlike builds an app which could call the unity screen and stop from our native iOS Buttons.</p><h3><strong>Unity Integration in iOS with Objective C language</strong></h3><p>The video link below is clean build for Unity in Native iOS App with the latest version of Xcode- 10.1 and Unity version 2018.2.18f1. This video is built as per request in Stack Overflow question <a href="https://www.youtube.com/redirect?v=DLkeGz5vCzk&amp;redir_token=RB1Ut_PbAMzMWBGnmEChQnpgrHd8MTU2Nzc1MDM4NkAxNTY3NjYzOTg2&amp;event=video_description&amp;q=https%3A%2F%2Fstackoverflow.com%2Fquestions%2F53953752%2Ferror-building-for-unity-in-native-ios-app">https://stackoverflow.com/questions/5...</a> for Error Building Unity in Native iOS App.</p><p><strong>Watch the full video for in youtube, Objective C</strong>: <a href="https://www.youtube.com/watch?v=DLkeGz5vCzk&amp;t=1675s">https://www.youtube.com/watch?v=DLkeGz5vCzk&amp;t=1675s</a></p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FDLkeGz5vCzk%3Fstart%3D1675%26feature%3Doembed%26start%3D1675&amp;url=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DDLkeGz5vCzk&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FDLkeGz5vCzk%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="640" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/69d0df06b9b49f9d2a9c98ee6d6a6a24/href">https://medium.com/media/69d0df06b9b49f9d2a9c98ee6d6a6a24/href</a></iframe><p>This video mostly is about settings in Xcode which need to be changed manually.</p><p>Source Code: — <a href="https://www.youtube.com/redirect?v=DLkeGz5vCzk&amp;redir_token=RB1Ut_PbAMzMWBGnmEChQnpgrHd8MTU2Nzc1MDM4NkAxNTY3NjYzOTg2&amp;event=video_description&amp;q=https%3A%2F%2Fstackoverflow.com%2Fquestions%2F53953752%2Ferror-building-for-unity-in-native-ios-app">https://stackoverflow.com/questions/5...</a></p><h3><strong>Unity Integration in iOS with Swift language.</strong></h3><p>Unity Integration in Native iOS App with language Swift 4.2. The code used for the below link video is the latest version in March 2019. Video is meant for Intermediate/Expert level who would like to integrate unity game in native iOS.</p><p>Unity Integration in SwiftLanguage video in youtube, Part 1:- <a href="https://www.youtube.com/watch?v=rHBoZ1qRaFU">https://www.youtube.com/watch?v=rHBoZ...</a></p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FrHBoZ1qRaFU%3Ffeature%3Doembed&amp;url=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DrHBoZ1qRaFU&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FrHBoZ1qRaFU%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="640" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/79135b3b7a6ce9264b81ffd1cb54c073/href">https://medium.com/media/79135b3b7a6ce9264b81ffd1cb54c073/href</a></iframe><p><strong>Full Video Unity Integration in Native,</strong> Swift on Blue Mango Global:- <a href="https://www.bluemangoglobal.com/?wix-vod-video-id=71bc195dd089492a9ee33e4eed820363&amp;wix-vod-comp-id=comp-k0q838e910#">https://www.bluemangoglobal.com/?wix-vod-video-id=71bc195dd089492a9ee33e4eed820363&amp;wix-vod-comp-id=comp-k0q838e910#</a></p><p>Source Code in swift:- <a href="https://github.com/azeemohd786/UnitySwift-Native">https://github.com/azeemohd786/UnitySwift-Native</a></p><p>At the end of this video tutorials, you could run the app with buttons to call start unity and stop unity.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jRusVF1FpQjFv8HuljKXnA.png" /></figure><h3><strong>Call Unity API’s in swift language</strong></h3><p>Unity iOS supports limited native to callback functionality or communicate via <em>UnitySendMessage</em>:</p><p>UnitySendMessage(“GameObjectName1”, “MethodName1”, “Message to send”);</p><p>For example, if you have completed integration successfully. First of all, go to your AppDelegate and copy below code in your project.</p><pre><strong>import</strong> UIKit</pre><pre><strong>@UIApplicationMain</strong></pre><pre><strong>class</strong> AppDelegate: UIResponder, UIApplicationDelegate {</pre><pre><strong>var</strong> window: UIWindow?</pre><pre><strong>var</strong> application: UIApplication?</pre><pre><strong>@objc</strong> <strong>var</strong> currentUnityController: UnityAppController!</pre><pre><strong>var</strong> isUnityRunning = <strong>false</strong></pre><pre><strong>func</strong> application(<strong>_</strong> application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: <strong>Any</strong>]?) -&gt; Bool {</pre><pre><em>// Override point for customization after application launch.</em></pre><pre><strong>self</strong>.application = application</pre><pre>unity_init(CommandLine.argc, CommandLine.unsafeArgv)</pre><pre>currentUnityController = UnityAppController()</pre><pre>currentUnityController.application(application, didFinishLaunchingWithOptions: launchOptions)</pre><pre><em>// first call to startUnity will do some init stuff, so just call it here and directly stop it again</em></pre><pre><em>/*startUnity()</em></pre><pre><em>stopUnity()*/</em></pre><pre><strong>return</strong> <strong>true</strong></pre><pre>}</pre><pre><strong>func</strong> applicationWillResignActive(<strong>_</strong> application: UIApplication) {</pre><pre><strong>if</strong> isUnityRunning {</pre><pre>currentUnityController.applicationWillResignActive(application)</pre><pre>}}</pre><pre><strong>func</strong> applicationDidEnterBackground(<strong>_</strong> application: UIApplication) {</pre><pre><strong>if</strong> isUnityRunning {</pre><pre>currentUnityController.applicationDidEnterBackground(application)</pre><pre>}}</pre><pre><strong>func</strong> applicationWillEnterForeground(<strong>_</strong> application: UIApplication) {</pre><pre><strong>if</strong> isUnityRunning {</pre><pre>currentUnityController.applicationWillEnterForeground(application)</pre><pre>}}</pre><pre><strong>func</strong> applicationDidBecomeActive(<strong>_</strong> application: UIApplication) {</pre><pre><strong>if</strong> isUnityRunning {</pre><pre>currentUnityController.applicationDidBecomeActive(application)</pre><pre>}}</pre><pre><strong>func</strong> applicationWillTerminate(<strong>_</strong> application: UIApplication) {</pre><pre>}</pre><pre>         .............................................</pre><pre><em>// Method 1 #azeem Either use menthod 1 </em></pre><pre><strong>func</strong> startUnity() {</pre><pre><strong>if</strong> !isUnityRunning{</pre><pre>isUnityRunning = <strong>true</strong></pre><pre>currentUnityController.applicationDidBecomeActive(application!)</pre><pre>}}</pre><pre><strong>func</strong> stopUnity() {</pre><pre><strong>if</strong> isUnityRunning {</pre><pre>currentUnityController.applicationWillResignActive(application!)</pre><pre>isUnityRunning = <strong>false</strong></pre><pre>}}</pre><pre>                ..................................</pre><pre><em>// Method 2 #azeem OR else  use method2 </em></pre><pre><strong>func</strong> unityWindow() -&gt; UIWindow? {</pre><pre><strong>return</strong> UnityGetMainWindow()</pre><pre>}</pre><pre><strong>func</strong> hideUnityWindow() {</pre><pre>window!.makeKeyAndVisible()</pre><pre>}}<br>            ......................................</pre><p>Then in your unity view controller to be presented.</p><pre><strong>class</strong> UnityVC: UIViewController {</pre><pre><strong>private</strong> <strong>var</strong> isShowUnityWindow = <strong>false</strong></pre><pre><strong>@IBOutlet</strong> <strong>private</strong> <strong>weak</strong> <strong>var</strong> unityViewStart: UIView!</pre><pre><strong>override</strong> <strong>func</strong> viewDidLoad()</pre><pre>{</pre><pre><strong>super</strong>.viewDidLoad()</pre><pre>print(“unity have entered in View Controller”)</pre><pre>callUnity() <em>// try full screen unity on initial mode #azeem</em></pre><pre><em>// isShowUnityWindow = false</em></pre><pre>}</pre><pre><strong>func</strong> callUnity(){</pre><pre><strong>if</strong> <strong>let</strong> unityView = UnityGetGLView() {</pre><pre>unityView.isHidden = <strong>false</strong>;</pre><pre>}</pre><pre><strong>if</strong> <strong>let</strong> appDelegate = UIApplication.shared.delegate <strong>as</strong>? AppDelegate</pre><pre>{</pre><pre>UnitySendMessage(“GameObjectName1”, “MethodName1”, “Message to send”);</pre><pre>appDelegate.startUnity()</pre><pre>NotificationCenter.default.addObserver(<strong>self</strong>, selector: <strong>#selector</strong>(handleUnityReady), name: NSNotification.Name(“UnityReady”), object: <strong>nil</strong>)</pre><pre>}}</pre><pre><strong>@IBAction</strong> <strong>func</strong> stopUnity(<strong>_</strong> sender: UIButton)</pre><pre>{</pre><pre><strong>if</strong> <strong>let</strong> appDelegate = UIApplication.shared.delegate <strong>as</strong>? AppDelegate</pre><pre>{</pre><pre><em>// appDelegate.stopUnity()</em></pre><pre>appDelegate.hideUnityWindow()</pre><pre><strong>if</strong> <strong>let</strong> unityView = UnityGetGLView()</pre><pre>{</pre><pre>unityView.isHidden = <strong>true</strong>;</pre><pre>}}}</pre><pre>/// This is for reference in other way to show unity #azeem</pre><pre><strong>@objc</strong> <strong>func</strong> handleUnityReady() {</pre><pre>showUnitySubView()</pre><pre>}</pre><pre><strong>func</strong> showUnitySubView() {</pre><pre><strong>if</strong> <strong>let</strong> unityView = UnityGetGLView() {</pre><pre><em>// insert subview at index 0 ensures unity view is behind current UI view</em></pre><pre>view?.insertSubview(unityView, at: 0)</pre><pre><em>/* unityView.translatesAutoresizingMaskIntoConstraints = false</em></pre><pre><em>let views = [“view”: unityView]</em></pre><pre><em>let w = NSLayoutConstraint.constraints(withVisualFormat: “|-0-[view]-0-|”, options: [], metrics: nil, views: views)</em></pre><pre><em>let h = NSLayoutConstraint.constraints(withVisualFormat: “V:|-75-[view]-0-|”, options: [], metrics: nil, views: views)</em></pre><pre><em>view.addConstraints(w + h)*/</em></pre><pre>}}}</pre><p>The unity scenes can be changed by button or other call functions like so,</p><pre><em>// start unity with button #azeem</em></pre><pre><strong>@IBAction</strong> <strong>func</strong> startUnity(<strong>_</strong> sender: UIButton)</pre><pre>{</pre><pre><strong>if</strong> <strong>let</strong> unityView = UnityGetGLView()</pre><pre>{</pre><pre>unityView.isHidden = <strong>false</strong>;</pre><pre>}</pre><pre><strong>if</strong> <strong>let</strong> appDelegate = UIApplication.shared.delegate <strong>as</strong>? AppDelegate</pre><pre>{</pre><pre>UnitySendMessage(“GameObjectName2”, “MethodName2”, “Message to send”)</pre><pre>appDelegate.unityWindow()!.frame = CGRect(x: -64, y: 235, width: 500, height: 300)</pre><pre>appDelegate.startUnity()</pre><pre>NotificationCenter.default.addObserver(<strong>self</strong>, selector: <strong>#selector</strong>(handleUnityReady), name: NSNotification.Name(“UnityReady”), object: <strong>nil</strong>)</pre><pre>}}</pre><p>This artice is written and presented for unity integration in native iOS demo purpose. If you have issues to integrate or embedded reach me out at swift4kat@gmail.com.</p><p>Written by <strong>Mohammed Azeem Azeez, B.Engineer, iOS Engineer | Unity Game Integration Expert. </strong>Connect me on <a href="https://www.linkedin.com/in/mohammed-azeem-azeez-50686850/">LinkedIn</a> or check my <a href="https://www.youtube.com/channel/UCursmZEXw28Uq1jQhzBrLzw/featured">Youtube channel</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b5e2ea501477" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>