{"id":543,"date":"2020-02-29T15:09:59","date_gmt":"2020-02-29T15:09:59","guid":{"rendered":"https:\/\/dev.i-smartcloud.com\/?page_id=543"},"modified":"2020-03-23T09:47:09","modified_gmt":"2020-03-23T09:47:09","slug":"in-a-nutshell-ios","status":"publish","type":"page","link":"https:\/\/dev.i-smartcloud.com\/index.php\/in-a-nutshell-ios\/","title":{"rendered":"In a Nutshell"},"content":{"rendered":"\n<div class=\"wp-block-group\"><div class=\"wp-block-group__inner-container is-layout-flow wp-block-group-is-layout-flow\">\n<p>The iOS Framework is written in Objective-c language, but it can also be used in a Swift code. It contains all the code that a developer will need to connect to any of the supported Cloud Services, and to perform the supported Actions. In a series of articles we will describe this code and we will give example of its usage.<\/p>\n<\/div><\/div>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p> Even though you can import each class that is in the Framework individually, we propose to import the RainbowSDK.h file, as it imports all the classes. <\/p><\/blockquote>\n\n\n\n<p>In order to use the Framework we need to create an instance of the <a href=\"https:\/\/dev.i-smartcloud.com\/index.php\/rainbow-ios\/\">Rainbow<\/a> class. We create a singleton instance of that class by calling the method  &#8220;instance&#8221;:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Rainbow *rainbow = [Rainbow instance];<\/code><\/pre>\n\n\n\n<p>We use that instance to get the list of available Cloud Services. If a user is already connected to a service, that instance will give us an object of that account. Once we have that object we can perform all  supported actions on that Cloud Account. But, before we get there it is important to describe the way that the Rainbow Framework is designed.<\/p>\n\n\n\n<p>The code of the Rainbow SDK can be groupped in five categories:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><strong><a href=\"https:\/\/dev.i-smartcloud.com\/index.php\/api-ios\/\">API<\/a><\/strong>: Code to connect to a Service and create an Account (ServiceItem)<\/li><li><strong><a href=\"https:\/\/dev.i-smartcloud.com\/index.php\/service-ios\/\">Service<\/a><\/strong>: Code that keeps track of the connected accounts (ServiceItems). It is also responsible for refreshing the Access Token<\/li><li><strong><a href=\"https:\/\/dev.i-smartcloud.com\/index.php\/serviceitem-ios\/\">ServiceItem<\/a><\/strong>: This object represents an account. It has all the variables that we need to connect to that account<\/li><li><strong><a href=\"https:\/\/dev.i-smartcloud.com\/index.php\/cloud-manager-ios\/\">Cloud Manager<\/a><\/strong>: This is where the magic takes place. With this code we can perform all supported actions to an account.<\/li><li><strong><a href=\"https:\/\/dev.i-smartcloud.com\/index.php\/transfer-ios\/\">Transfer<\/a><\/strong>: Code that perform all kind of requests. <\/li><\/ul>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p>The code for each of these categories is located in a folder, and we find different files for each Cloud Service. Thus, in the folder &#8220;API&#8221;, we find the files: RIDriveAPI.h(m), RMediaFile.h(m), etc. <\/p><\/blockquote>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p>All classes start with an &#8220;R&#8221;. Thus, we have the RIDriveAPI.h and RIDriveAPI.m files. These two files have the API code for the iDrive Cloud Service.<\/p><\/blockquote>\n\n\n\n<p>The name of each of these categories is a link. Click on it to learn more about it. In the meantime, it is important to state here that  in order to create an instance of a Cloud Manager, we need an instance of a ServiceItem class. All ServiceItems are stored in an  instance of the Service class. The Service class, uses an instance of the API class to create an instance of a ServiceItem.<\/p>\n\n\n\n<p>Even though the above looks cumbersome and difficult to comprehend, it is extremely easy to use. As you can see in the Demo code, the Rainbow SDK takes care of all these steps, and you do not need to worry about anything.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">OSX<\/h2>\n\n\n\n<p>The Rainbow-SDK is tested on iOS. Because  it uses code that is available in both platforms, you shouldn&#8217;t have any issues to use it on an OSX application. Still, if you do have any issue, contact us, and we will work together on that issue.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The iOS Framework is written in Objective-c language, but it can also be used in a Swift code. It contains all the code that a developer will need to connect&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"class_list":["post-543","page","type-page","status-publish","hentry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.6 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>In a Nutshell - Rainbow SDK<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/dev.i-smartcloud.com\/index.php\/in-a-nutshell-ios\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"In a Nutshell - Rainbow SDK\" \/>\n<meta property=\"og:description\" content=\"The iOS Framework is written in Objective-c language, but it can also be used in a Swift code. It contains all the code that a developer will need to connect...\" \/>\n<meta property=\"og:url\" content=\"https:\/\/dev.i-smartcloud.com\/index.php\/in-a-nutshell-ios\/\" \/>\n<meta property=\"og:site_name\" content=\"Rainbow SDK\" \/>\n<meta property=\"article:modified_time\" content=\"2020-03-23T09:47:09+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/dev.i-smartcloud.com\/index.php\/in-a-nutshell-ios\/\",\"url\":\"https:\/\/dev.i-smartcloud.com\/index.php\/in-a-nutshell-ios\/\",\"name\":\"In a Nutshell - Rainbow SDK\",\"isPartOf\":{\"@id\":\"https:\/\/dev.i-smartcloud.com\/#website\"},\"datePublished\":\"2020-02-29T15:09:59+00:00\",\"dateModified\":\"2020-03-23T09:47:09+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/dev.i-smartcloud.com\/index.php\/in-a-nutshell-ios\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/dev.i-smartcloud.com\/index.php\/in-a-nutshell-ios\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/dev.i-smartcloud.com\/index.php\/in-a-nutshell-ios\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/dev.i-smartcloud.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"In a Nutshell\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/dev.i-smartcloud.com\/#website\",\"url\":\"https:\/\/dev.i-smartcloud.com\/\",\"name\":\"Rainbow SDK\",\"description\":\"The Rainbow Cloud Manager at your disposal\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/dev.i-smartcloud.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"In a Nutshell - Rainbow SDK","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/dev.i-smartcloud.com\/index.php\/in-a-nutshell-ios\/","og_locale":"en_US","og_type":"article","og_title":"In a Nutshell - Rainbow SDK","og_description":"The iOS Framework is written in Objective-c language, but it can also be used in a Swift code. It contains all the code that a developer will need to connect...","og_url":"https:\/\/dev.i-smartcloud.com\/index.php\/in-a-nutshell-ios\/","og_site_name":"Rainbow SDK","article_modified_time":"2020-03-23T09:47:09+00:00","twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/dev.i-smartcloud.com\/index.php\/in-a-nutshell-ios\/","url":"https:\/\/dev.i-smartcloud.com\/index.php\/in-a-nutshell-ios\/","name":"In a Nutshell - Rainbow SDK","isPartOf":{"@id":"https:\/\/dev.i-smartcloud.com\/#website"},"datePublished":"2020-02-29T15:09:59+00:00","dateModified":"2020-03-23T09:47:09+00:00","breadcrumb":{"@id":"https:\/\/dev.i-smartcloud.com\/index.php\/in-a-nutshell-ios\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/dev.i-smartcloud.com\/index.php\/in-a-nutshell-ios\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/dev.i-smartcloud.com\/index.php\/in-a-nutshell-ios\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/dev.i-smartcloud.com\/"},{"@type":"ListItem","position":2,"name":"In a Nutshell"}]},{"@type":"WebSite","@id":"https:\/\/dev.i-smartcloud.com\/#website","url":"https:\/\/dev.i-smartcloud.com\/","name":"Rainbow SDK","description":"The Rainbow Cloud Manager at your disposal","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/dev.i-smartcloud.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"}]}},"_links":{"self":[{"href":"https:\/\/dev.i-smartcloud.com\/index.php\/wp-json\/wp\/v2\/pages\/543","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/dev.i-smartcloud.com\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/dev.i-smartcloud.com\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/dev.i-smartcloud.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/dev.i-smartcloud.com\/index.php\/wp-json\/wp\/v2\/comments?post=543"}],"version-history":[{"count":24,"href":"https:\/\/dev.i-smartcloud.com\/index.php\/wp-json\/wp\/v2\/pages\/543\/revisions"}],"predecessor-version":[{"id":858,"href":"https:\/\/dev.i-smartcloud.com\/index.php\/wp-json\/wp\/v2\/pages\/543\/revisions\/858"}],"wp:attachment":[{"href":"https:\/\/dev.i-smartcloud.com\/index.php\/wp-json\/wp\/v2\/media?parent=543"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}