Objective-C: How to create a structure?

I am new to Objective-C but have a lot of experience with Java and .NET.

I am trying to add EGOPhotoViewer to my iOS 5 project in Xcode 4.2.1. But I get a lot of releases, dealloc, save, etc. When compiling their code, since I use automatic reference counting (I think!).

How can I create a class library, framework, or what it called in Objective-C for my code, which I can add to my project?

EDIT: I made an approach from JeremyP by inserting code with a new purpose. I compiled at the beginning, but after a while I get this compilation error:

Undefined symbols for architecture i386: "_OBJC_METACLASS_$_EGOPhotoViewController", referenced from: _OBJC_METACLASS_$_PhotoViewController in PhotoViewController.o "_OBJC_CLASS_$_EGOPhotoViewController", referenced from: _OBJC_CLASS_$_PhotoViewController in PhotoViewController.o ld: symbol(s) not found for architecture i386 clang: error: linker command failed with exit code 1 (use -v to see invocation) 

Does anyone know why?

+1
ios objective-c
source share
4 answers

You cannot create frameworks for iOS. However, you can create static libraries using the beryllium technique. You can also add a static library to an existing project using File / New / New Target... Obviously, after creating the target, you can change the setting of automatic reference counting of Objective-C to "no" for your new target.

I thought it was possible to turn ARC on and off at the source file level, but I cannot figure out how to do this.

+1
source share

For your purpose, the regular static library described in beryllium will work fine.

Just for unauthorized connections and for spreading the word, this document describes how to create versions, documented frameworks using Xcode, GIT, and DoxyGen.

Creating version 1.23 version

The main goal of creating such structures is their redistribution. I personally find it very unpleasant to manually include the libraries and headers that I receive from third parties, especially if the libraries are delivered in separate versions for the simulator and the device. This guide is intended for classic middleware developers. I wrote this so that people like these people from Google Analytics will finally provide something worthy of their brand.

This document provides a step-by-step explanation for downloading screenshots.

+9
source share

Open Xcode → File → Create → New Project → Structure and Library → Next → Enter a name, select a folder → Create

This will be a library called yourApp.a . You can find it in the Derived Data folder .

+3
source share

I have created frameworks in several cases using the following method:

http://db-in.com/blog/2011/07/universal-framework-iphone-ios-2-0/

0
source share

All Articles