<?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>mac Archives - Suhas Tech</title><link>https://suhastech.com/</link><description>I has tech!</description><atom:link rel="self" type="application/rss+xml" href="https://suhastech.com/category/mac/feed/"/>
  <item><title>How to implement Sparkle Update framework in a Sandboxed Mac app</title><link>https://suhastech.com/how-to-implement-sparkle-update-framework-in-a-sandboxed-mac-app/</link><guid isPermaLink="false">http://suhastech.com/?p=2415</guid><pubDate>Wed, 16 May 2018 18:34:30 GMT</pubDate><dc:creator>Suhas</dc:creator><description>&lt;p&gt;.There seems to be a fork of Sparkle which supports Sandboxing. It’s current in beta. The install instructions are slightly confusing.&lt;/p&gt;
&lt;p&gt;Download the latest build from https://github.com/sparkle-project/Sparkle/tree/ui-separation-and-xpc&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Open Terminal and cd into the directory&lt;/p&gt;
&lt;p&gt;run ‘make release’&lt;/p&gt;
&lt;p&gt;That will open up a directory with all the needed files.&lt;/p&gt;
&lt;p&gt;The update signing is more important now in your appcast.&lt;/p&gt;
&lt;p&gt;So, use /bin/generate_keys to generate dsa_pub.pem and dsa_priv.pem&lt;/p&gt;
&lt;p&gt;The official repo should help you do that.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Include 3 files into your project.&lt;/p&gt;
&lt;p&gt;org.sparkle-project.InstallerConnection.xpc&lt;/p&gt;
&lt;p&gt;org.sparkle-project.InstallerStatus.xpc&lt;/p&gt;
&lt;p&gt;org.sparkle-project.InstallerLauncher.xpc&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Now sign them with your Developer ID keys. You just need to do this once. So, I’m not putting them in the build phase.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;./bin/codesign_xpc “Developer ID Application” org.sparkle-project.InstallerConnection.xpc&lt;/p&gt;
&lt;p&gt;./bin/codesign_xpc “Developer ID Application” org.sparkle-project.InstallerStatus.xpc&lt;/p&gt;
&lt;p&gt;./bin/codesign_xpc “Developer ID Application” org.sparkle-project.InstallerLauncher.xpc&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;If your sandboxes app doesn’t have access to the internet from sandboxing, also include&amp;nbsp;org.sparkle-project.Downloader.xpc&lt;/p&gt;
&lt;p&gt;./bin/codesign_xpc “Developer ID Application” org.sparkle-project.Downloader.xpc –entitlements&amp;nbsp;com.apple.security.network.client&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;After including these files in your project. Add a build phase that will copy the above files to the XPC Services folder.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;img loading=&quot;lazy&quot; decoding=&quot;async&quot; class=&quot;aligncenter wp-image-2416 size-full&quot; src=&quot;/wp-content/uploads/2018/05/Screen-Shot-2018-05-17-at-12.00.21-AM.png&quot; alt=&quot;&quot; width=&quot;516&quot; height=&quot;236&quot; srcset=&quot;/wp-content/uploads/2018/05/Screen-Shot-2018-05-17-at-12.00.21-AM.png 516w, /wp-content/uploads/2018/05/Screen-Shot-2018-05-17-at-12.00.21-AM-300x137.png 300w&quot; sizes=&quot;auto, (max-width: 516px) 100vw, 516px&quot;&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;To debug, open the Console.app and search for your app. The debug logs are quite helpful. I got stuck with not having the dsa_pub in the update I was trying to make.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item>
</channel></rss>
