<?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 erik eldridge on Medium]]></title>
        <description><![CDATA[Stories by erik eldridge on Medium]]></description>
        <link>https://medium.com/@erikeldridge?source=rss-175d34f36b30------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*N294lB7ONj80Qpyb.jpeg</url>
            <title>Stories by erik eldridge on Medium</title>
            <link>https://medium.com/@erikeldridge?source=rss-175d34f36b30------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 17 Nov 2026 05:07:42 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@erikeldridge/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[Building AllJoyn for Android on OS X]]></title>
            <link>https://medium.com/@erikeldridge/building-alljoyn-for-android-on-os-x-63333d086dd6?source=rss-175d34f36b30------2</link>
            <guid isPermaLink="false">https://medium.com/p/63333d086dd6</guid>
            <category><![CDATA[alljoyn]]></category>
            <category><![CDATA[android]]></category>
            <category><![CDATA[os-x]]></category>
            <dc:creator><![CDATA[erik eldridge]]></dc:creator>
            <pubDate>Tue, 19 Jan 2016 03:03:57 GMT</pubDate>
            <atom:updated>2016-01-19T03:03:57.308Z</atom:updated>
            <content:encoded><![CDATA[<h4>Goal</h4><p>Build <a href="https://allseenalliance.org/framework">AllJoyn</a> from source for Android on a mac.</p><p>See <a href="#eb03">[5]</a> for my notes re building from source for iOS. See <a href="#1fb4">[2]</a> if the goal is just to quickstart on Android.</p><h4>Env</h4><ul><li>AllJoyn sha a472ae8</li><li>Android NDK r10e</li><li>Android Studio 1.5.1</li><li>Android min and target versions 16 and 23</li><li>Gradle 1.5.0</li><li>Mac OSX 10.11</li><li>Scons 2.4.1</li></ul><h4>References</h4><ol><li><a href="https://allseenalliance.org/framework/documentation/develop/api-guide/core/java">AllJoyn’s Core API Guide for Java documentation</a></li><li><a href="http://stackoverflow.com/a/33101386">SO answer re “How to setup alljoyn sdk in android?”</a></li><li><a href="https://ask.allseenalliance.org/question/873/error-building-osandroid-cpuarm-bindingscppjava-on-osx/">AllJoyn QA question “Error building OS=android CPU=arm BINDINGS=cpp,java on OSX”</a></li><li><a href="https://allseenalliance.org/framework/documentation/develop/building/android/build-source">AllJoyn’s Build From Source — Android documentation</a></li><li><a href="https://medium.com/@erikeldridge/building-alljoyn-for-ios-7fbfd3feebc">My notes re building AllJoyn for iOS</a></li><li><a href="https://allseenalliance.org/framework/documentation/develop/building/ios-osx/build-source">AllJoyn’s Build From Source — iOS and OS X documentation</a></li></ol><h4>Clone AllJoyn</h4><p>Search through the iOS build documentation (<a href="#5d74">[6]</a>) for “Obtaining the AllJoyn source” and clone the repo:</p><pre>$ git clone https://git.allseenalliance.org/gerrit/core/alljoyn.git</pre><p>I refer to this cloned repo location below as <em>$ALLJOIN_SDK_ROOT</em>.</p><p>Install scons, also described in <a href="#5d74">[6]</a>, if you don’t have it already:</p><pre>$ brew install scons</pre><h4>Install NDK</h4><pre>$ brew install android-ndk</pre><p>Per brew’s output, define <em>ANDROID_HOME</em> and <em>ANDROID_NDK_HOME</em> env vars for convenience below.</p><h4>Build</h4><p>Hack <em>$ALLJOIN_SDK_ROOT/build_core/conf/android/SConscript</em> per msanu’s answer on <a href="#4a89">[3]</a> to use the correct file extension:</p><pre>...<br>if ‘darwin’ == env.subst(‘$PLATFORM’):<br> env[‘SHLIBSUFFIX’] = ‘.so’<br>...</pre><p>Build the alljoyn_java target using the command mentioned in “Building the AllJoyn framework for Android” from <a href="#9040">[4]</a>:</p><pre>$ CLASSPATH=/Applications/Android\ Studio.app/Contents/lib/junit-4.11.jar ANDROID_SDK=$ANDROID_HOME ANDROID_NDK=$ANDROID_NDK_HOME scons BINDINGS=java OS=android CPU=arm CRYPTO=builtin WS=off alljoyn_java</pre><h4>Update Android app</h4><p>As described in <a href="#1fb4">[2]</a>, create a jni directory in your app:</p><pre>$ mkdir -p app/src/main/jniLibs/armabi</pre><p>Copy the built libs in:</p><pre>$ cp $ALLJOYN_SDK_ROOT/build/android/arm/debug/dist/java/jar/alljoyn.jar app/src/main/jniLibs<br>$ cp $ALLJOYN_SDK_ROOT/build/android/arm/debug/dist/java/lib/liballjoyn_java.so app/src/main/jniLibs/armabi</pre><p>Add a gradle dependency:</p><pre>...<br>dependencies {<br>    <strong>...<br>    </strong>compile files(<strong>&#39;src/main/jniLibs/alljoyn.jar&#39;</strong>)<br>}<br>...</pre><p>Statically import the lib when needed:</p><pre>...<br><strong>public class </strong>MainActivity <strong>extends </strong>AppCompatActivity {<br>    <strong>static </strong>{<br>        System.<em>loadLibrary</em>(<strong>&quot;alljoyn_java&quot;</strong>);<br>    }<br>...</pre><h4>Troubleshooting</h4><ul><li>“liballjoyn_java.so’ not found” error when building → See comment above re hacking SConscript</li><li>“npapi.h: No such file or directory” error when building → Skip the js build by making sure the scons call specifies the java build only:<br><em> … scons BINDINGS=java … alljoyn_java</em></li><li>“Invalid value for option CRYPTO: builtin. Valid values are: (‘openssl’,)” when building → Fixed in AllJoyn by 76e1486, ie it’s fixed in master after v15.09a</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=63333d086dd6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Building AllJoyn for iOS on OS X]]></title>
            <link>https://medium.com/@erikeldridge/building-alljoyn-for-ios-7fbfd3feebc?source=rss-175d34f36b30------2</link>
            <guid isPermaLink="false">https://medium.com/p/7fbfd3feebc</guid>
            <category><![CDATA[os-x]]></category>
            <category><![CDATA[ios]]></category>
            <category><![CDATA[alljoyn]]></category>
            <dc:creator><![CDATA[erik eldridge]]></dc:creator>
            <pubDate>Mon, 11 Jan 2016 06:46:38 GMT</pubDate>
            <atom:updated>2016-01-19T03:03:11.974Z</atom:updated>
            <cc:license>http://creativecommons.org/licenses/by/4.0/</cc:license>
            <content:encoded><![CDATA[<h4>Goal</h4><p>Configure a work environment for building iOS apps with <a href="https://allseenalliance.org/framework">AllJoyn</a>.</p><h4>Env</h4><ul><li>Mac OS 10.11</li><li>Xcode 7.1.1</li><li>iOS 9.1</li><li>AllJoyn v15.09a</li><li><a href="https://gist.github.com/dtrotzjr/0410c80faed1033fa312/adf3a735036536001ce20263096cdc9ced9d1f43">openssl-maker sha adf3a73</a></li><li><a href="http://www.openssl.org/">OpenSSL</a> 1.0.2e (fetched via openssl-maker)</li></ul><h4>References</h4><ol><li>AllJoyn’s guide <a href="https://allseenalliance.org/framework/documentation/develop/building/ios-osx">Building iOS/OS X</a></li><li>AllJoyn’s guide <a href="https://allseenalliance.org/framework/documentation/develop/building/ios-osx/build-source">Build From Source — iOS and OS X</a></li><li><a href="https://forums.developer.apple.com/thread/4572">SO answer describing how to link stdlib++.dylib</a></li><li><a href="https://ask.allseenalliance.org/question/2889/making-ios-product-64bit-complaint-using-alljoyn-150400-library-not-found-for-lbundledroutero/?answer=2902#post-id-2902">AllJoyn forum answer re BundledRouter being obsolete</a></li><li><a href="https://jira.allseenalliance.org/browse/ASACORE-2121">AllJoyn bug re x86_64 simulators</a></li><li><a href="https://allseenalliance.org/framework/documentation/develop/api-guide/core/objc">Core API Guide — Objective-C</a></li><li><a href="https://allseenalliance.org/framework/documentation/learn/core/standard-core">AllJoyn’s Standard Core documentation</a></li></ol><h4>Get AllJoyn and openssl-maker</h4><p>I found having all the code in one place, and under source control, simplifies reasoning, so I use git clone to obtain the required projects.</p><p>I was unsuccessful getting things to work with the <a href="https://github.com/sqlcipher/openssl-xcode">openssl-xcode</a> project recommended by <a href="#beaa">[1]</a>, seemingly because of the x86_64 vs i386 simulator issue <a href="#23fc">[5]</a>.</p><pre>$ git clone <a href="https://git.allseenalliance.org/gerrit/core/alljoyn.git">https://git.allseenalliance.org/gerrit/core/alljoyn.git</a><br>…<br>$ git clone <a href="https://gist.github.com/0410c80faed1033fa312.git">https://gist.github.com/0410c80faed1033fa312.git</a><br>…<br>$ mv <a href="https://gist.github.com/0410c80faed1033fa312.git">0410c80faed1033fa312</a> openssl-maker<br>$ ls<br>alljoyn openssl-maker</pre><p>The location of these projects is arbitrary, but going forward, I’ll use ALLJOYN_SDK_ROOT as the path to the alljoyn repo, and OPENSSL_ROOT as the path to the openssl-maker repo.</p><p>Checkout recent, compatible versions:</p><pre>$ cd $ALLJOYN_SDK_ROOT<br>$ git checkout v15.09a<br>$ cd $OPENSSL_ROOT<br>$ git checkout adf3a73</pre><h4>Build OpenSSL for iOS</h4><p>Edit openssl-maker/openssl-maker.sh:</p><pre>VERSION=1.0.2e</pre><p>Use openssl-maker to build OpenSSL for iOS (and OSX):</p><pre>$ cd $OPENSSL_ROOT<br>$ bash openssl-maker.sh<br>...<br>$ ls build/iPhoneOS-i386<br>... libcrypto.a libssl.a ...</pre><h4>Build AllJoyn</h4><p>We need AllJoyn headers and libraries to build our iOS project against.</p><p>The AllJoyn build described by <a href="#55f1">[2]</a> mostly worked for me, but it depends on a specific directory structure to find OpenSSL. Fortunately, it’s easy to create this based on the earlier OpenSSL build:</p><pre>$ cd $OPENSSL_ROOT<br>$ mkdir build/Debug-iphonesimulator<br>$ cp dist/openssl-1.0.2e-iOS/lib/*.a build/Debug-iphonesimulator</pre><p>Open Xcode:</p><pre>$ cd $ALLJOYN_SDK_ROOT<br>$ open alljoyn_objc/alljoyn_darwin.xcodeproj</pre><p>Create a user-defined setting for OPENSSL_ROOT. The AllJoyn build is going to look for libcrypto.a in “$(OPENSSL_ROOT)/build/Debug-iphonesimulator”.</p><p>Build the project using the “alljoyn_ios_core” scheme for the iPhone 5 simulator.</p><p>After the build completes, observe the results:</p><pre>$ cd $ALLJOYN_SDK_ROOT<br>$ ls -R build/darwin/arm/iphonesimulator/debug/dist/cpp/<br>inc lib</pre><pre>build/darwin/arm/iphonesimulator/debug/dist/cpp//inc:<br>alljoyn qcc</pre><pre>build/darwin/arm/iphonesimulator/debug/dist/cpp//inc/alljoyn:<br>AboutData.h AboutObjectDescription.h BusObject.h<br>...</pre><h4>Create iOS project</h4><p>Most the steps in <a href="#58d7">[6]</a> worked for me with a few exceptions defined below.</p><p>Set the language to Objective C when creating the project.</p><p>Per <a href="#11a2">[4]</a>, set Other Linker Flags to “-lalljoyn -lajrouter -lssl -lcrypto”.</p><p>For convenience, create user-defined settings for ALLJOYN_SDK_ROOT and OPENSSL_ROOT.</p><p>I found the following variations of the recommended Header Search Path entries easier to reason about:</p><pre>$(ALLJOYN_SDK_ROOT)/build/darwin/arm/$(PLATFORM_NAME)/$(CONFIGURATION)/dist/cpp/inc</pre><pre>$(ALLJOYN_SDK_ROOT)/build/darwin/arm/$(PLATFORM_NAME)/$(CONFIGURATION)/dist/cpp/inc/alljoyn</pre><p>Likewise with the following to Library Search Path entries:</p><pre>$(ALLJOYN_SDK_ROOT)/build/darwin/arm/$(PLATFORM_NAME)/$(CONFIGURATION)/dist/cpp/lib</pre><pre>$(OPENSSL_ROOT)/dist/openssl-1.0.2e-iOS/lib</pre><p>Per <a href="#b1bc">[3]</a>, find stdlibc++ for the recommended build phase settings as follows:</p><ol><li>Click the + to choose a library</li><li>Click “Add Other …”</li><li>Type cmd + shift + G to open the path navigator and enter “/usr/lib”</li><li>Select stdlibc++</li></ol><p>Per <a href="#23fc">[5]</a>, it appears AllJoyn doesn’t yet support x86_64 simulators, so use an i386 simulator instead by setting “iPhone 5” simulator as the platform.</p><p>At this point, I have a project that links to AllJoyn and OpenSSL, generates and extends an AllJoyn BusObject, and builds and runs in an iPhone 5 simulator.</p><h4>Troubleshooting</h4><ul><li>“Undefined symbols for architecture x86_64” errors when trying to build AllJoyn for iPhone 6s Plus simulator → see note re <a href="#23fc">[5]</a> above</li><li>“BundledRouter.o not found” → <a href="#beaa">[1]</a> mentions linking BundledRouter.o, but Xcode complains about this; <a href="#11a2">[4]</a> indicates this link is no longer necessary</li><li>“can’t exec ‘scons’ (No such file or directory)” error in Xcode when building AllJoyn → per <a href="#55f1">[2]</a>, install scons (`brew install scons`) and then set Xcode’s “build tool” path in the “external build tool configuration” for alljoyn_core_ios scheme to the output from `which scons`, eg /opt/local/bin/scons</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7fbfd3feebc" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>