<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: ochieng seth</title>
    <description>The latest articles on DEV Community by ochieng seth (@coucoseth).</description>
    <link>https://dev.to/coucoseth</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F505310%2F90dc3a81-f563-4dd0-8562-46538fe13fc5.jpeg</url>
      <title>DEV Community: ochieng seth</title>
      <link>https://dev.to/coucoseth</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/coucoseth"/>
    <language>en</language>
    <item>
      <title>Seekbar for tv-os</title>
      <dc:creator>ochieng seth</dc:creator>
      <pubDate>Thu, 28 Mar 2024 06:57:49 +0000</pubDate>
      <link>https://dev.to/coucoseth/seekbar-for-tv-os-5d5p</link>
      <guid>https://dev.to/coucoseth/seekbar-for-tv-os-5d5p</guid>
      <description>&lt;p&gt;Has anyone built a seekbar that works with react native tvos so the remote can skip forward on the slider. I know that there isn't a right and left arrow listener and only select, but if someone has accomplished this, what did you do?&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>reactnative</category>
      <category>android</category>
    </item>
    <item>
      <title>security camera- react native</title>
      <dc:creator>ochieng seth</dc:creator>
      <pubDate>Fri, 28 Apr 2023 07:01:17 +0000</pubDate>
      <link>https://dev.to/coucoseth/security-camera-react-native-357o</link>
      <guid>https://dev.to/coucoseth/security-camera-react-native-357o</guid>
      <description>&lt;p&gt;How can i connect to a security camera with wifi or bluetooth capabilities using react native?&lt;/p&gt;

</description>
      <category>reactnative</category>
      <category>computervision</category>
    </item>
    <item>
      <title>Build a Tv app</title>
      <dc:creator>ochieng seth</dc:creator>
      <pubDate>Mon, 26 Sep 2022 12:56:49 +0000</pubDate>
      <link>https://dev.to/coucoseth/build-a-tv-app-6ig</link>
      <guid>https://dev.to/coucoseth/build-a-tv-app-6ig</guid>
      <description>&lt;p&gt;Using react native.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;create a project with &lt;code&gt;npx react-native init AppName&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;add tv support package for react native with &lt;code&gt;npm i react-native@npm:react-native-tvos&lt;/code&gt;
From this point, your app is ready to go.
Bonus is to use the following library to easily manage navigation and focus. &lt;a href="https://github.com/NoriginMedia/Norigin-Spatial-Navigation"&gt;Norigin-Spatial-Navigation&lt;/a&gt;
&lt;/li&gt;
&lt;/ol&gt;

</description>
      <category>reactnative</category>
      <category>android</category>
      <category>ios</category>
      <category>tv</category>
    </item>
    <item>
      <title>Apache won't start</title>
      <dc:creator>ochieng seth</dc:creator>
      <pubDate>Mon, 18 Jul 2022 09:37:33 +0000</pubDate>
      <link>https://dev.to/coucoseth/apache-wont-start-450e</link>
      <guid>https://dev.to/coucoseth/apache-wont-start-450e</guid>
      <description>&lt;p&gt;This happened on my mac whenever i would try to start apache with&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo /Applications/XAMPP/xamppfiles/xampp startapache
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;the result would be &lt;code&gt;Another web server is already running.&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Solution is to stop the built in apache server of OSX with&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo launchctl unload -w /System/Library/LaunchDaemons/org.apache.httpd.plist
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;br&gt;
 then try to start apache again&lt;/p&gt;

</description>
      <category>apache</category>
      <category>xampp</category>
    </item>
    <item>
      <title>How to bind a function from an ObservableObject in swiftui</title>
      <dc:creator>ochieng seth</dc:creator>
      <pubDate>Wed, 15 Jun 2022 07:08:17 +0000</pubDate>
      <link>https://dev.to/coucoseth/how-to-access-class-in-swiftui-37ld</link>
      <guid>https://dev.to/coucoseth/how-to-access-class-in-swiftui-37ld</guid>
      <description>&lt;p&gt;my class contains a function,&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;class UserModel: ObservableObject {

  func fetchUser(){
    // code
  }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;i call this class in a struct&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;struct UserView: View {
  @StateObject var userModel = UserModel()
  @State var loading: Bool = false

  var body: some View {
    ButtonComponent(loading: $loading)
  }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;I would like to access the class in &lt;code&gt;ButtonComponent&lt;/code&gt; just like i did with the &lt;code&gt;loading&lt;/code&gt; variable by binding it.&lt;br&gt;
The &lt;code&gt;ButtonComponent&lt;/code&gt; is like this..&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;struct ButtonComponent: View {
  @Binding var loading: Bool

  var body: some View {
    Button(action: {loading.toggle()}){
      Text("Submit Button")
    }
  }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Help on how to achieve this is appreciated &lt;/p&gt;

</description>
      <category>swift</category>
      <category>ios</category>
      <category>mobile</category>
    </item>
    <item>
      <title>Error: Multipart: Boundary not found</title>
      <dc:creator>ochieng seth</dc:creator>
      <pubDate>Sat, 02 Apr 2022 10:04:38 +0000</pubDate>
      <link>https://dev.to/coucoseth/error-multipart-boundary-not-found-31am</link>
      <guid>https://dev.to/coucoseth/error-multipart-boundary-not-found-31am</guid>
      <description>&lt;p&gt;I got this when uploading files to my nodejs API from my react and react-native apps and the problem was with my axios version. i was running the latest at the time which is 0.25.0 so i had to downgrade to 0.21.4.&lt;br&gt;
first uninstall axios&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm uninstall axios
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;then install version 0.21.4 or any other version that you have used before that works without getting this error. in my case it was version 0.21.4&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm install axios@0.21.4
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Hope it works for you&lt;/p&gt;

</description>
      <category>axios</category>
      <category>reactnative</category>
      <category>multer</category>
      <category>node</category>
    </item>
    <item>
      <title>security tip for your website</title>
      <dc:creator>ochieng seth</dc:creator>
      <pubDate>Thu, 03 Mar 2022 14:37:40 +0000</pubDate>
      <link>https://dev.to/coucoseth/security-tip-for-your-website-5ehp</link>
      <guid>https://dev.to/coucoseth/security-tip-for-your-website-5ehp</guid>
      <description>&lt;p&gt;Attackers can easily exploit your web app if they know the version of the server you are running and most web servers like nginx transmit this data by default😳. Let's try the following line of code in any terminal to get your domain's server info.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;curl --head yourdomain.com
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;My result looks like so..&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;HTTP/1.1 301 Moved Permanently
Server: nginx/&amp;lt;SERVER_VERSION&amp;gt;(&amp;lt;OPERATING_SYSTEM&amp;gt;)
Date: Thu, 03 Mar 2022 13:46:14 GMT
Content-Type: text/html
Content-Length: 162
Connection: keep-alive
Location: https://jast-tech.com/
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;you might be using apache, no worries i gat you😌&lt;/p&gt;

&lt;p&gt;Our simple task now is to hide the &lt;code&gt;&amp;lt;SERVER_VERSION&amp;gt;&lt;/code&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;FOR NGINX
edit the nginx configuration file
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;nano /etc/nginx/nginx.conf
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Under the #HTTP Options line and before the ## line, add the following&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;server_tokens off;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;save changes with &lt;code&gt;ctrl&lt;/code&gt; + &lt;code&gt;x&lt;/code&gt; and we are done😜&lt;br&gt;
restart your server with &lt;code&gt;sudo systemctl restart nginx&lt;/code&gt; and you can try &lt;code&gt;curl --head yourdomain.com&lt;/code&gt; to get your server version.&lt;/p&gt;

&lt;p&gt;2.FOR APACHE&lt;br&gt;
edit the apache configuration file&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;nano /etc/httpd/httpd.conf
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;change &lt;code&gt;ServerTokens Prod&lt;/code&gt; and &lt;code&gt;ServerSignature Off&lt;/code&gt;&lt;br&gt;
now one more step, look for&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;Location "/server-status"&amp;gt;
    SetHandler server-status
&amp;lt;/Location&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;and change it to&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;Location "/server-status"&amp;gt;
    SetHandler server-status
    Order deny,allow
    Deny from all
&amp;lt;/Location&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;😛We are done, just restart your server with &lt;code&gt;sudo service apache2 restart&lt;/code&gt;&lt;br&gt;
Enjoy. 👋🏿&lt;/p&gt;

</description>
      <category>vps</category>
      <category>cybersecurity</category>
      <category>devops</category>
      <category>devjournal</category>
    </item>
    <item>
      <title>How to run  a react-native app on a real device using terminal</title>
      <dc:creator>ochieng seth</dc:creator>
      <pubDate>Thu, 10 Feb 2022 07:47:06 +0000</pubDate>
      <link>https://dev.to/coucoseth/how-to-run-a-react-native-app-on-a-real-device-using-terminal-nij</link>
      <guid>https://dev.to/coucoseth/how-to-run-a-react-native-app-on-a-real-device-using-terminal-nij</guid>
      <description>&lt;p&gt;👋🏿Jambo folks,&lt;br&gt;
Constantly opening Xcode to build your app on a real device is a pain, open your terminal and lets' dive right in.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 1&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;For whatever weird reason you don't have it yet, install &lt;a href="https://brew.sh/"&gt;homebrew&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;code&gt;/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 2&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;install ios-deploy
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;code&gt;brew install ios-deploy&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;now what you have been waiting for 😛&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;connect your device via usb (of-course) then in terminal,
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;code&gt;ios-deploy -c&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;The result will be&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;&lt;code&gt;Found 7875****************** (D20AP, &amp;lt;iphone version&amp;gt;, iphoneos, arm64, 1543) a.k.a. '&amp;lt;device name&amp;gt;' connected through USB.&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;copy the 7875******************&lt;/li&gt;
&lt;li&gt;now lets build the app with
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;code&gt;npx react-native run-ios --udid 7875******************&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;Hope it helps😊&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>reactnative</category>
      <category>ios</category>
    </item>
    <item>
      <title>openssl/opensslv.h file not found</title>
      <dc:creator>ochieng seth</dc:creator>
      <pubDate>Fri, 03 Dec 2021 15:43:44 +0000</pubDate>
      <link>https://dev.to/coucoseth/opensslopensslvh-file-not-found-2o38</link>
      <guid>https://dev.to/coucoseth/opensslopensslvh-file-not-found-2o38</guid>
      <description>&lt;p&gt;Whenever i initialize a react native project and run it for the first time, i always get the above error and my fix to this is &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;comment out use_flipper!() in your podfile located in ios/ directory
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# use_flipper!()
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;delete this file -&amp;gt; podfile.lock&lt;/li&gt;
&lt;li&gt;delete Pods folder&lt;/li&gt;
&lt;li&gt;run &lt;code&gt;pod install&lt;/code&gt; in terminal after navigating to the ios folder of your project. Then navigate back to the root of your project and try to build again.
Hope this helps&lt;/li&gt;
&lt;/ol&gt;

</description>
      <category>reactnative</category>
      <category>javascript</category>
      <category>ios</category>
    </item>
    <item>
      <title>error: bundling failed: TypeError: Cannot read property 'transformFile' of undefined</title>
      <dc:creator>ochieng seth</dc:creator>
      <pubDate>Wed, 01 Dec 2021 12:40:31 +0000</pubDate>
      <link>https://dev.to/coucoseth/error-bundling-failed-typeerror-cannot-read-property-transformfile-of-undefined-4if</link>
      <guid>https://dev.to/coucoseth/error-bundling-failed-typeerror-cannot-read-property-transformfile-of-undefined-4if</guid>
      <description>&lt;p&gt;I got this error when trying to build my react native app after doing installs of node and npm. My machine was running nodejs v17(currently latest) and this was the issue. &lt;br&gt;
The solution is to uninstall nodejs, then download and install a lower version and for my case i installed nodejs v16.13.0 which solved the error.&lt;br&gt;
Hope this helps you,&lt;br&gt;
Happy coding&lt;/p&gt;

</description>
      <category>reactnative</category>
      <category>javascript</category>
      <category>node</category>
    </item>
    <item>
      <title>No bundle url present.. after building a production build react native</title>
      <dc:creator>ochieng seth</dc:creator>
      <pubDate>Fri, 26 Nov 2021 19:32:30 +0000</pubDate>
      <link>https://dev.to/coucoseth/no-bundle-url-present-after-building-a-production-build-react-native-2mcd</link>
      <guid>https://dev.to/coucoseth/no-bundle-url-present-after-building-a-production-build-react-native-2mcd</guid>
      <description>&lt;p&gt;In your info.plist(cd ios/app name/info.plist), change this code&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;key&amp;gt;NSAppTransportSecurity&amp;lt;/key&amp;gt;
  &amp;lt;dict&amp;gt;
  &amp;lt;key&amp;gt;NSExceptionDomains&amp;lt;/key&amp;gt;
  &amp;lt;dict&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;to this&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;key&amp;gt;NSAppTransportSecurity&amp;lt;/key&amp;gt;
  &amp;lt;dict&amp;gt;
    &amp;lt;key&amp;gt;NSExceptionDomains&amp;lt;/key&amp;gt;
  &amp;lt;dict&amp;gt;
        &amp;lt;key&amp;gt;localhost&amp;lt;/key&amp;gt;
        &amp;lt;dict&amp;gt;
            &amp;lt;key&amp;gt;NSExceptionAllowsInsecureHTTPLoads&amp;lt;/key&amp;gt;
            &amp;lt;true/&amp;gt;
        &amp;lt;/dict&amp;gt;
    &amp;lt;/dict&amp;gt;
  &amp;lt;/dict&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Also you might wanna clean your build, in Xcode you can use shortcut keys.. shift + command + k or click product from top menu then clean build folder in the dropdown&lt;/p&gt;

</description>
      <category>reactnative</category>
      <category>javascript</category>
    </item>
    <item>
      <title>iOS clang: error: linker command failed with exit code 1 (use -v to see invocation)</title>
      <dc:creator>ochieng seth</dc:creator>
      <pubDate>Tue, 23 Nov 2021 08:41:47 +0000</pubDate>
      <link>https://dev.to/coucoseth/ios-clang-error-linker-command-failed-with-exit-code-1-use-v-to-see-invocation-39ph</link>
      <guid>https://dev.to/coucoseth/ios-clang-error-linker-command-failed-with-exit-code-1-use-v-to-see-invocation-39ph</guid>
      <description>&lt;p&gt;Here is what I did after spending 2 days trying to fix this.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Clean the Build
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;code&gt;Menu Bar → Product → Clean&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Delete Derived Data&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Delete Xcode Preferences&lt;br&gt;
in terminal&lt;br&gt;
&lt;br&gt;
&lt;code&gt;defaults delete com.apple.dt.Xcode&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;make sure your build setting are on new build setting instead of legacy build setting.&lt;br&gt;
I can't be sure what worked exactly and what happened in the background, but it worked for me.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

</description>
      <category>reactnative</category>
      <category>ios</category>
      <category>javascript</category>
    </item>
  </channel>
</rss>
