How To Create A Static Library Or Framework For IOS?

A static library is a package of classes, functions, definitions and resources, which can be packed together and easily shared among projects. This facilitates reuse of code easier as you will have your own set of classes and utility functions.

Here are the steps to create your static library or framework

Step 1 : Create A New ‘Cocoa Touch Static Library’ Project

  • Choose template as Cocoa Touch Static Library.
  • Start with create new project >> iOS >> Framework & Library >> Cocoa Touch Static Library

choose_template_for_project

Note: The name you entered in product field will be the name of your framework.
Example:  ‘MyCompany’ will generate ‘MyCompany.framework’

Step 2: Create The Primary Framework Header (Recommended)

Usually, framework header is imported this way – <MyCompany/MyCompany.h>

  • Create an ‘.h’ file – ‘MyCompany.h
  • If X-Code creates it for you, just delete the ‘.m’ file and import the inner classes used in ‘.h’ file
  • If you import only ‘MyCompany.h’ (#import <MyCompany/MyCompany.h>) then the rest of the files need not be imported
#import <Foundation/Foundation.h>
  • Now, add your new sources
  • Make the header ‘Public’

Public headers are copied to the .framework and can be imported using the framework

  • Select the header in the project explorer, then expand the Utilities pane (Cmd+Option+0) to modify the scope of header.
  • In the ‘Target Membership’ group select the checkbox next to the ‘.h’ file.
  • Then, change the scope of the header from ‘Project’ to ‘Public’.

You might have to uncheck and check the box to get the dropdown list. This will ensure that the header is copied to the correct location in the copy headers phase.

Step 3: Update The Public Headers Location

  • To avoid copying private headers to the framework check that the public headers are copied to a separate directory, e.g. $(PROJECT_NAME)Headers.
  • Select the project in the file explorer >> select the targets >> ‘Build Settings’ tab.
  • Set ‘Public Headers Folder Path’ to ‘$(PROJECT_NAME)Headers’ for all configurations by searching the ‘Public Headers Folder Path’. This folder must be unique if you are working with multiple Frameworks.

headers_xcode

 

 

 

 

Step 4: Setup ‘Build Settings’

"Dead Code Stripping" => No (for all settings)
"Strip Debug Symbols During Copy" => No (for all settings)
"Strip Style" => Non-Global Symbols (for all settings)

Step 5: Make Sure That Framework Is Used As Dependent Target

  • Generate the basic skeleton of the framework in the static library target. Also include a simple post-build script.
  • Select your target in the file navigator and click the ‘Build Phases’ tab
  • Then, click ‘Add Build Phase’ >> ‘Add Run Script’ and paste the following script in the source portion of the run script build phase.
set–e
mkdir -p "${BUILT_PRODUCTS_DIR}/${PRODUCT_NAME}.framework/Versions/A/Headers"
# Link the "Current" version to "A"
/bin/ln -sfh A "${BUILT_PRODUCTS_DIR}/${PRODUCT_NAME}.framework/Versions/Current"
/bin/ln -sfh Versions/Current/Headers "${BUILT_PRODUCTS_DIR}/${PRODUCT_NAME}.framework/Headers"
/bin/ln -sfh "Versions/Current/${PRODUCT_NAME}" "${BUILT_PRODUCTS_DIR}/${PRODUCT_NAME}.framework/${PRODUCT_NAME}"
# The -a ensures that the headers maintain the source modification date so that we don't constantly
# cause propagating rebuilds of files that import these headers.
/bin/cp -a "${TARGET_BUILD_DIR}/${PUBLIC_HEADERS_FOLDER_PATH}/" "${BUILT_PRODUCTS_DIR}/${PRODUCT_NAME}.framework/Versions/A/Headers"
mycompany_xcode
  • Build your project

The build products directory is usually in-
(~/Library/Developer/Xcode/DerivedData/<ProjectName>-<gibberish>/Build/Products/…)

You will find the ‘libMyCompany.a’ static library, a headers folder, and a ‘MyComapny.framework’ folder which contains the basic skeleton of your framework.

build_product_directory

SEE ALSO: How to make Static Framework iOS device independent?

I hope you enjoyed this topic, if you have any questions or comments please share below!

How We Turned A Great Idea Into IOS App – The Inside Story

Sandra M, an Occupational Therapist (OT) in the USA, came-up with the original idea and approached us to put it into iPhone app development as well as iPad app development. Here, the therapists share their expertise through the app thereby mentoring new parents through shared interventions.

The ‘LittleSteps’ iOS app is now in App Store. In a short span of time, hundreds of downloads have been done across the USA, Germany, Australia, India, Philippines, UK, China, Ireland, Portugal, Greece, Israel, South Africa, New Zealand, Chile, Egypt, Germany and Canada.

icon_lS

The ‘LittleSteps’ App is aimed to collaborate and share OT interventions to address developmental delay in the areas of fine motor, gross motor, feeding, sensory integration, visual motor, behavior, language development and social skills for children below 3 yrs. With the free version a user can share interventions applied to other users. However, the paid version allows OT to store customer data in the device itself.

For Occupation Therapists, it provides a platform to share knowledge and take care of certain condition during baby’s growth. For parents, it acts as a companion that makes them knowledgeable on baby care.

Being one of the best iPhone App Development Companies, we came-up with the right solutions that turned Sandra’s idea into a working iOS app. We included numerous functionalities and integrations that made it engaging and simple for the users. We used Orangescrum, the project collaboration tool to keep-up with the development process.

See What Users Are Saying About The App?

  • “Very informative! Great app to download!”
  • “OMG, this is an exceptionally amazing app that has transformed the way we approach raising our babies. A must for all parents”

Here’s What We Did:

  • Designed the application logo, the user interfaces (UI/UX)
  • Developed the app in native language i.e. Objective-C and Cocoa Touch framework
  • Devised the application process and flow from navigation to monetization
  • Introduced the feature of In-app purchase for premium users
  • Introduced push notification feature to share texts instantly
  • Tested the app’s performance with AppFlight SDK
  • Deployed the app to Apple App Store within 9 weeks since the initiation of project

In addition to above mentioned functionalities, we have introduced numerous other features that make it a state-of-the-art application.

So, go ahead; download the app and see how ‘LittleSteps’ can help you and your baby. Feel free to write reviews in iTunes.

ios_mobile

 

 

LS_screenshot

How Do I Implement Localization In IOS Apps?

We know that, all the apps in the Apple App Store are English-speaking, i.e. the menu, information, settings and everything else is in English. However, the apps become almost useless for the consumers from non native English speaking countries. Hence, it becomes essential for the developers to release apps with multiple language support. This is where internationalization and localization comes in handy which facilitates the iOS application developers to support numerous native languages that greatly increase the global user experience.

What Exactly Is Internationalization And Localization?

  • Internationalization and localization means adapting the software product to different languages, regional differences and technical requirements of a targeted market.
  • Internationalization is the process of designing a software application, so that it can be adapted to various languages and regions without engineering changes.
  • Localization is the process of accommodating internationalized software product for a specific region or language by adding locale-specific components and translating text.

Here Is An Example To Help You Grasp The Concept:

Let’s say there is an iPhone/iPad application made for Brazilian client and he needs to localize that product to Portuguese language so that every users of Brazil can use it.

Each and every application must contain some hardcoded strings. We need to pull all of these hardcoded strings into a separate file so that we can localize them.

To do this, create a “.strings” file in the Xcode to contain all of the strings that your project needs. Then the hardcoded strings should be replaced with a function call to look up the appropriate string from the “.strings” file based on the current language.

For example:

To create a “.string” file, follow below mentioned steps

  • Select the Project group in Xcode, and navigate to File >>New >>New File.
  • Choose iOS >>Resource >>Strings File, and click Next, as shown in the below snapshot.
  • Name the new file Localizable.strings, and then click Save.

Note that the “Localizable.strings” is the default filename; iOS looks for when dealing with localized text. If you rename the file, you’ll need to specify the name of the .strings file every time.

The format for the strings file is:

[sourcecode]"KEY" = "CONTENT";[/sourcecode]

For our ‘Account’ text add in:

[sourcecode]"TITLE" = "Account";[/sourcecode]

Now switch to “ViewController.m”, and find the “viewDidLoad” method. Now you can set the text as below:

[sourcecode]self.titleLabel.text = @"Account";[/sourcecode]

We want it to read from our “.strings” file. For this, you need to change the current line to use a macro called “NSLocalizedString” as shown below:

[sourcecode]self.titleLabel.text = NSLocalizedString(@"TITLE", nil);[/sourcecode]

Adding A Portuguese Localization

Steps to add a Portuguese localization are as follows:

  • You need to select “Localizable.strings”, and open the Info pane.
  • You can do this by selecting the 3rd tab in the top toolbar of the View section, and selecting the 1st tab in the top section, as shown in the below screenshot.

To add support for another language execute following steps:

  • You need to simply click on the ‘+’ (Plus) in that ‘Localization’ pane on the right of the view.
  • At first it will create localization for English.
  • If the “Localizable.Strings” deselect after your click then select the “Localizable.Strings” again. After the “Localizable.Strings” selected click the ‘+’ button once again and choose ‘Portuguese(pt)’ from the dropdown.

Now, Xcode has set up some directories containing a separate version of “Localizable.strings” for each language that you selected, behind the scenes. To view this for yourself, go to your project folder in Finder and open it. There you’ll get the following:

  • ‘en.lproj’ and ‘pt.lproj’ contain language-specific versions of files.
  • ‘en’ is the localization code for English, whereas ‘pt’ is for Portuguese.

To change the text for Portuguese, select ‘Localizable.strings (Portuguese)’ and change the text as follows:

[sourcecode]"TITLE" = "Conta";
“Back” = “Voltar”;
etc.
[/sourcecode]

It’s all about how to localize a string. But you also need to localize the UI, as the text length for a button may vary in different languages.

How To Adjust UI Elements:

Let’s discuss about how to localize the button text.

  • For Portuguese let’s say the button text is ‘MODIFICAR’.
  • The problem is that you need your button border to be relatively tight around the text. This isn’t a problem for title label because there is no constraint on its width, but here you’ll need to adjust the size of the button to make it look perfect.
  • If you simply change the text in “viewDidLoad” it will look odd, as the text of that button may or may not fit into it.

So you need to add localization to your “xib” and make the button bigger in Portuguese.

  • Go to “ViewController.xib” and in the info pane on the right of the view, click the ‘+’ button to add a Localization and choose Portuguese.
  • Note you may need to scroll down in the Info pane as it has some Interface Builder content in that side.
  • Now we have copy of “ViewController.xib” in our Portuguese folder (pt.lproj).
  • Select “ViewController.xib (Portuguese)”, and edit the button text in that version to say ‘MODIFICAR’.
  • It will resize the button by default.

Once, all the set up is done perfectly, delete the application from simulator/device and select Project>>Clean to get a fresh build and install. Then build and run your app.

How To Apply Localization For Images:

If you have text in your image you need to localize it.Follow the steps mentioned below.

  • Select the .jpg file and add localization for Portuguese.
  • Check out the project folder.
  • The ‘.jpg’ image file has been added to the English folder (en.lproj) and then copied to the Portuguse folder (pt.lproj).
  • To make a different image for the Portuguese version, you need to overwrite the image in the Portuguese folder.
  • Rebuild and get the final result!

Benefits:

It is better to have localization in your iOS apps to target the global users. The app will display the contents according to the visitor’s language.

  • Same information can be shared across the world.
  • Great user experience.

IPhone 5S And IPad 5 Is Expected To Launch On 29th Of June

Apple’s next big thing is expected to lunch iphone 5s and ipad 5 on 29th of June of this year. Apparently iPhone 5S Smartphone will be entering the consumer market much earlier than what was expected. It is designed as a high-end sibling of the present generation iPhone 5. DigiTimes has revealed that the IPhone 5S will feature a faster processor, based on Apple’s ARM processing cores. They have also claimed that, it will have a higher-resolution camera than its previous models. These features can be disappointing for most users who find the phone’s design to be little boring and outdated compared to other major smart device manufacturers. But the next-generation iPhone 6 is expected to bring a fresh, updated and completely re-designed phone. Rumors have it that its design is inspired form iPad mini tablet.

Never miss an update from us. Join 10,000+ marketers and leaders.

DigiTimes’ sources has also pointed out that deliveries of essential iPhone 5S components are already scheduled to May, which makes sense that the launch date might be true. Resources have also stated that Apple is planning to launch iPad5 along with the iPhone 5S in an event on 29thof June. While unconfirmed from Apple, this date fits well with the earlier humors of the launch, but the inclusion of iPad 5 comes as something of a surprise. And these devices might be running iOS 7.

DigiTimes has released in their website stating-“Components for the next-generation iPhone will start shipping at the end of May with the new smartphone to have a chance of showing up in the third quarter, according to sources from the upstream supply chain.”

The new iPhone will not receive a major upgrade and may just be a slightly enhanced version of iPhone 5 (iPhone 5S), the sources said citing their latest specification data.”

If the event does really take place in June, It will be something of a test to iPhone 5S and iPad-5. This could also be the deciding factor of the company’s future. It will be the first major release from the company since the death of its co-founder Steve Jobs.

Major iphone application development company are also looking forward to the release of the new iPhone as well as the iOS 7. It will facilitate them to develop apps for the new OS with numerous new features and functionalities.

Vuzix’s Smart Glass will Change the Way We Work with Computers

vuzix-smart-glassesWith the advancing technology, computers have been evolving through the years to become more compact to the users. First, there were desktops then they came to the laps and then to the hands, now the next generation computers will be right in front of our eyes in the form of wearable eyeglasses.

There are a lot of companies, who have been developing wearable computers, but they were shipped only for military purposes and never to the public.

Recently Google stunned the technology industry by announcing its plans to sell Google Glass to the public market.

But it turned out that Google isn’t the only one trying to make smart glasses in order to bring computers to a person’s field of vision.

A New-York based technology industry ‘Vuzix’ has unveiled a hands-free smart device that comes with an integrated “virtual display” eyepiece, Wi-Fi and Bluetooth connectivity, a 720p HD camera, and motion sensors.

The Vuzix smart glasses can sync up a smartphone or tablet. It contains a microphone, an earpiece, a camera, and motion and GPS sensors, and it’s capable enough to run any version of the Android operating system.

Bluetooth and Wi-Fi enable it to be linked to a smartphone to project a small display, positioned in the wearer’s vision, which provides a comfortable viewing area equivalent to having a four-inch smartphone display in hands.

The device is ideal for those who need to be connected to the cloud at all times.

The device is expected to start with relatively few features but eventually, it will become more impressive as the Android app developers develop software for it.

The glasses will get data and information from an app installed on a user’s Android device.

This technology will change the way we experience and work with computers and smartphones. It will also bring new possibility for the android application developers to create apps specifically for the Vuzix smart glasses.

KurrentJobs The Awesome iPhone App To Manage Your Job Search

In this era of Industrialization, everyone is planning to build a company of their own and run a successful business.  But they’re going to need skilled employees to get their jobs done.

Job posting websites could really make their search easy, but with all the available job board options, both recruiters and job seekers are getting frustrated in looking for right choices.

Because job seekers can’t find the right choice of companies as per their skills and experience. As well as the recruiters are getting misled by recruiting consultants and end up with the wrong candidates.

Never miss an update from us. Join 10,000+ marketers and leaders.

As a solution to above problem, iPhone developers at Andolasoft have designed a simple and secure iPhone app named “kurrentJobs”. It acts as a social media job portal for both recruiters and job seekers. It allows individuals, startups and established companies to post jobs as per their requirements.

Jobs are categorized on the basis of skills, experience and on type of jobs like Full-time, Part-time and Freelance.

With this app recruiters can post or manage their job posts from anywhere and anytime. The app is secure with the integration of social plug-ins like Facebook and Twitter.

The app has provided links to recruiter sites and also integrated LinkedIn to help job seekers to apply for jobs. This app can access network communications and storage content on your mobile devices for easier use.

The app is FREE to download and install on your iPhone, from the Apple App store.

iTune

Within a short span of time, Andolasoft has now become one of the major mobile app development companies in USA

We’ve achieved success in developing iPhone apps as we use agile methodologies, innovative work environment supported by creative iPhone developers. For more information about our iPhone and iPad apps please visit iPhone application development page.