{"id":512,"date":"2015-03-10T18:02:52","date_gmt":"2015-03-11T01:02:52","guid":{"rendered":"http:\/\/www.isam.ca\/?p=512"},"modified":"2015-03-10T19:57:13","modified_gmt":"2015-03-11T02:57:13","slug":"building-a-d-isam-framework-for-xcode","status":"publish","type":"post","link":"https:\/\/www.isam.ca\/?p=512","title":{"rendered":"Building a D-ISAM framework for Xcode"},"content":{"rendered":"<p>Note that this post covers the manual process of creating a framework &#8211; please refer to <a href=\"http:\/\/www.isam.ca\/?p=464\">Building D-ISAM in the Xcode IDE<\/a> for the integrated approach.<\/p>\n<p>Before starting please see <a href=\"http:\/\/www.isam.ca\/?p=480\">Update for Constant Chars<\/a>.<\/p>\n<p>To make a D-ISAM framework you must first create a public directory called (for example) <code>Disam72.framework<\/code>, and create a symbolic link in this directory named <code>Disam72<\/code>, which points to your D-ISAM dylib, as installed.<\/p>\n<p>Note that the name of the framework and the name of the dylib pointer are the same. This defines the <code>import<\/code> name of your framework.<\/p>\n<pre>mkdir \/Library\/Disam72.dylib\r\ncp target\/disam72_shared\/lib\/libdisam72.dylib \/Library\/Disam72\r\nln -s \/Library\/Disam72\/libdisam72.dylib \/Library\/Disam72\/Disam72.framework\/Disam72<\/pre>\n<p>You then need to create a Header directory inside <code>Disam72.framework<\/code>, containing your disam header files, together with an \u201cumbrella\u201d header to organise them &#8211; in this example it is named disam_xcode.h<\/p>\n<pre>\/* disam umbrella header *\/\r\n#define ISCONSTCHAR 1\"\r\n#import \"isbase.h\"\r\n#undef ISCONSTCHAR\"<\/pre>\n<p>And finally, create a file called <code>module.map<\/code> in <code>Disam72.framework<\/code><\/p>\n<pre>framework module $DISAM [system] {\r\n  umbrella header \"disam_xcode.h\"\r\n  export *\r\n}<\/pre>\n<p>The above presents a bare minimum of steps needed to create a framework that will import easily into Xcode and Swift.\u00a0 However it leaves out quite a few details that are probably important, and which are generally included automatically when <a href=\"http:\/\/www.isam.ca\/?p=464\">Building D-ISAM in the Xcode IDE<\/a>.<\/p>\n<p>The whole process is documented in <a href=\"http:\/\/developer.apple.com\/library\/mac\/documentation\/MacOSX\/Conceptual\/BPFrameworks\/Concepts\/CreationGuidelines.html\" target=\"_blank\">Guidelines for Creating Frameworks<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Note that this post covers the manual process of creating a framework &#8211; please refer to Building D-ISAM in the Xcode IDE for the integrated approach. Before starting please see Update for Constant Chars. To make a D-ISAM framework you must first create a public directory called (for example) Disam72.framework, and create a symbolic link [&hellip;]<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[3],"tags":[6,5],"_links":{"self":[{"href":"https:\/\/www.isam.ca\/index.php?rest_route=\/wp\/v2\/posts\/512"}],"collection":[{"href":"https:\/\/www.isam.ca\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.isam.ca\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.isam.ca\/index.php?rest_route=\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/www.isam.ca\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=512"}],"version-history":[{"count":5,"href":"https:\/\/www.isam.ca\/index.php?rest_route=\/wp\/v2\/posts\/512\/revisions"}],"predecessor-version":[{"id":540,"href":"https:\/\/www.isam.ca\/index.php?rest_route=\/wp\/v2\/posts\/512\/revisions\/540"}],"wp:attachment":[{"href":"https:\/\/www.isam.ca\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=512"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.isam.ca\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=512"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.isam.ca\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=512"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}