{"id":1762,"date":"2015-08-30T02:00:47","date_gmt":"2015-08-29T18:00:47","guid":{"rendered":"http:\/\/learn-house.idv.tw\/?p=1762"},"modified":"2015-09-05T10:49:32","modified_gmt":"2015-09-05T02:49:32","slug":"alljoyn-build-from-source-ios","status":"publish","type":"post","link":"https:\/\/learn-house.idv.tw\/?p=1762","title":{"rendered":"[Alljoyn] Build from source &#8211; iOS"},"content":{"rendered":"<p>\u7e7c\u4e0a\u4e00\u7bc7build Linux\u4e4b\u5f8c\uff0ciOS\u7684\u90e8\u5206\u4e5f\u662f\u6709\u4e9b\u554f\u984c\uff0c\u4f46\u554f\u984c\u6bd4\u8f03\u4e0d\u5927<\/p>\n<p>\u4e3b\u8981\u662f\u5728Run sample code\u7684project\u6642\uff0c\u88e1\u9762\u6240\u6307\u5411\u7684openssl\u8def\u5f91\u4e0d\u592a\u5c0d<\/p>\n<p>\u53ea\u8981\u6309\u7167\u4f60\u7684build\u5b8c\u5f8c\u7684openssl\u4f4d\u7f6e\u8a2d\u5b9a\u597d\uff0c\u6b63\u5e38\u61c9\u8a72\u90fd\u53ef\u4ee5 run<\/p>\n<p>\u81f3\u65bc\uff0c\u70ba\u4ec0\u9ebc\u6211\u6c92\u6709\u5bebAndroid\u7684\u90e8\u5206\uff0c\u4e3b\u8981\u662f\u56e0\u70baAndroid\u5728Build code\u6c92\u4ec0\u9ebc\u554f\u984c<\/p>\n<p>\u53ea\u8981project import\u9032\u4f86\uff0c\u5c31\u53ef\u4ee5\u5c07\u7a0b\u5f0f\u4f48\u5230\u4f60\u7684\u624b\u6a5f\u4e86\u3002<\/p>\n<p><!--more--><\/p>\n<p>Reference:<a class=\"ext-link\" href=\"https:\/\/allseenalliance.org\/developers\/develop\/building\/ios-osx\"><span class=\"icon\">\u00a0<\/span>https:\/\/allseenalliance.org\/developers\/develop\/building\/ios-osx<\/a><\/p>\n<h2 id=\"setup\">Setup<\/h2>\n<ol>\n<li><a class=\"ext-link\" href=\"https:\/\/allseenalliance.org\/developers\/download\"><span class=\"icon\">\u00a0<\/span>Download<\/a> the following iOS SDKs:<\/li>\n<\/ol>\n<ul>\n<li>Core SDK (release)<\/li>\n<li>Onboarding SDK<\/li>\n<li>Configuration SDK<\/li>\n<li>Notification SDK<\/li>\n<li>Control Panel SDK<\/li>\n<\/ul>\n<ol start=\"2\">\n<li>Extract the downloaded packages and setup the directory structure:<\/li>\n<\/ol>\n<pre class=\"wiki\">mkdir alljoyn-ios\r\nmkdir alljoyn-ios\/core\r\nunzip alljoyn-14.06.00-osx_ios-sdk.zip\r\nmv alljoyn-14.06.00-osx_ios-sdk alljoyn-ios\/core\/alljoyn\r\nunzip alljoyn-config-service-framework-14.06.00-ios-sdk-rel.zip\r\nunzip alljoyn-controlpanel-service-framework-14.06.00-ios-sdk-rel.zip\r\nunzip alljoyn-notification-service-framework-14.06.00-ios-sdk-rel.zip\r\nunzip alljoyn-onboarding-service-framework-14.06.00-ios-sdk-rel.zip\r\n\r\n<\/pre>\n<h2 id=\"set-up-openssl-dependencies\">Set up OpenSSL dependencies<\/h2>\n<pre class=\"wiki\">cd &lt;parent directory of alljoyn-ios&gt;\r\npushd alljoyn-ios\r\ngit clone git:\/\/git.openssl.org\/openssl.git\r\ngit clone https:\/\/github.com\/sqlcipher\/openssl-xcode.git\r\ncp -r openssl-xcode\/openssl.xcodeproj openssl\r\npushd openssl\r\ngit checkout tags\/OpenSSL_1_0_1f #replace this with a newer version as available\r\nsed -ie 's\/\\(ONLY_ACTIVE_ARCH.*\\)YES\/\\1NO\/' openssl.xcodeproj\/project.pbxproj\r\nxcodebuild -configuration Release -sdk iphonesimulator\r\nxcodebuild -configuration Release -sdk iphoneos\r\nxcodebuild -configuration Release\r\nxcodebuild -configuration Debug -sdk iphonesimulator\r\nxcodebuild -configuration Debug -sdk iphoneos\r\nxcodebuild -configuration Debug\r\nlaunchctl setenv OPENSSL_ROOT `pwd`\r\npopd\r\npopd\r\n\r\n<\/pre>\n<h2 id=\"define-environment-variables\">Define environment variables<\/h2>\n<pre class=\"wiki\">cd alljoyn-ios\r\nlaunchctl setenv ALLJOYN_SDK_ROOT `pwd`\r\ncd services\r\nlaunchctl setenv ALLSEEN_BASE_SERVICES_ROOT `pwd`\r\n<\/pre>\n<h2 id=\"RunningTheBasicSample\">Running The Basic Sample<\/h2>\n<p>alljoyn-ios\/core\/alljoyn\/alljoyn_objc\/samples\/iOS\/BasciClient<\/p>\n<pre class=\"wiki\">Project &gt; Build\r\n\u5047\u5982\u6709\u51fa\u73fe\u6709\u95dc\u65bcopenssl\u7684lib\u932f\u8aa4\r\nld: library not found for -lssl\r\n\u76f4\u63a5\u4fee\u6539Library Search Paths\u7684$OPENSSL_ROOT\u8def\u5f91\uff0c\u6307\u5230\u4f60openssl\u5be6\u969b\u7684\u4f4d\u7f6e<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u7e7c\u4e0a\u4e00\u7bc7build Linux\u4e4b\u5f8c\uff0ciOS\u7684\u90e8\u5206\u4e5f\u662f\u6709\u4e9b\u554f\u984c\uff0c\u4f46\u554f\u984c\u6bd4\u8f03\u4e0d\u5927 \u4e3b\u8981\u662f\u5728Run sample c<span class=\"post-excerpt-end\">&hellip;<\/span><\/p>\n<p class=\"more-link\"><a href=\"https:\/\/learn-house.idv.tw\/?p=1762\" class=\"themebutton\">Read More<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[],"class_list":["post-1762","post","type-post","status-publish","format-standard","hentry","category-5"],"_links":{"self":[{"href":"https:\/\/learn-house.idv.tw\/index.php?rest_route=\/wp\/v2\/posts\/1762","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/learn-house.idv.tw\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/learn-house.idv.tw\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/learn-house.idv.tw\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/learn-house.idv.tw\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1762"}],"version-history":[{"count":0,"href":"https:\/\/learn-house.idv.tw\/index.php?rest_route=\/wp\/v2\/posts\/1762\/revisions"}],"wp:attachment":[{"href":"https:\/\/learn-house.idv.tw\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1762"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/learn-house.idv.tw\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1762"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/learn-house.idv.tw\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1762"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}