SlideShare une entreprise Scribd logo
1  sur  41
Télécharger pour lire hors ligne
Building & Maintaining
a Family of Applications
   Code Reuse on a Platform that Supports
        One Binary per Application
Jessica Kahn
  Tapulous
Why is code reuse
  important?
14 apps – soon to be 17.
  Five client engineers.
 Two server engineers.
I Know What You’re
    Thinking…
“I don’t have 14 apps in
    the App Store.”
“My couple of apps
aren’t really like one
   another at all.”
Oh, so you don’t…

• Use categories or subclasses to extend
  classes like NSString, UIViewController, or
  UIWebView?
• Collect analytical data?
• Display advertisements?
• Use Facebook Connect or another
  third-party library?
Of course you do!
What’s the basic methodology you need to apply?
Use a framework…
Psych!
Embed a loadable
   bundle…
j/k!
Tap Tap Revenge 2 Born
by Emergency C-Section
 You can’t hide “a baby” inside of an application.
         We learned this the hard way.
Static library it is.
Drawbacks
• Code size contributed to each product
• No self-containment of resources
• Must update every app to take advantage
  of a new version of your library
• If you don’t have the source, you have to
  trust its source
Plusses


• Supported on the iPhone
The Basics
• Create a static library project
• Embed this project into your application
  project
• Include the library’s resources in your
  application’s Copy Resources phase
• Set up the proper dependencies and
  linkages
Demo
One Size Fits Most
What to do when apps require slightly different
       versions of your static libraries.
Why is this needed?
Cosmetic Reasons
Cosmetic Reasons
Different Feature Sets
Different Feature Sets
Modified Behavior
Modified Behavior
Tactics for Customization

• Look up values in the app’s plist(s) and/or
  strings file(s) at runtime
• Override library methods with app-
  supplied subclasses or categories
• Override library resources in the app
  project
• Compile the library in an app-
  specific way
Demo
Gotchas & Hints
• Remove the default version of a resource
  from your project, to be sure to override
  with an app-specific one.
• Add all_load in OTHER_LDFLAGS for
  your application target, to ensure static
  library categories are loaded and linked
  properly.
• Use Xcode project templates.
Demo
Source Control
Using Subversion to maintain a stable base for
   some projects, while developing on the
          bleeding edge for others.
• svn:externals let you place your application
  adjacent to all its dependencies, no matter
  where they really live in the repository

• Trunk is the oft-unstable bleeding edge
• Tags are untouchable
• Branches lie somewhere in between
Demo
Bonus Points!
Build and Unit Test Automation
Builds

• Script your own, or…
• Use a continuous integration package:
 • BuildBot, Cruise Control & Hudson
• Both require knowledge of xcodebuild
Unit Tests

• ocunit built into the OS X & iPhone
    developer tools, supported on the
    Simulator since SDK 2.2
•   http://developer.apple.com/tools/unittest.html

•   Combine with continuous integration
In Summary…
• Most developers with more than one
  project can do more to reuse their code

• Spending some time up front saves time in
  the long run; teach Xcode, svn, and other
  tools to do the heavy lifting for you

• Development, support, and maintenance
  costs lowered through “economies of
  scale” and bug compatibility
Q &A

Contenu connexe

En vedette

Environmental Treaties, Laws and Policies
Environmental Treaties, Laws and PoliciesEnvironmental Treaties, Laws and Policies
Environmental Treaties, Laws and PoliciesGenevieve Garcia
 
Theories of gender_inequalities
Theories of gender_inequalitiesTheories of gender_inequalities
Theories of gender_inequalitiesRoss Clark
 
Community health problems
Community health problemsCommunity health problems
Community health problemsMariyah Ayoniv
 
Introduction to Environmental Health
Introduction to Environmental HealthIntroduction to Environmental Health
Introduction to Environmental Healthguestd2ccbb
 
06 professional ethics & code of ethics
06 professional ethics & code of ethics06 professional ethics & code of ethics
06 professional ethics & code of ethicsNimantha Perera
 
Ethical issues in organizational behavior
Ethical issues in organizational behaviorEthical issues in organizational behavior
Ethical issues in organizational behaviorccrumly
 
Concept of health and disease
Concept of health and diseaseConcept of health and disease
Concept of health and diseaseNc Das
 
The Six Components of Health
The Six Components of HealthThe Six Components of Health
The Six Components of HealthChristie Rickert
 

En vedette (11)

State of the Philippine Environment
State of the Philippine EnvironmentState of the Philippine Environment
State of the Philippine Environment
 
Environmental Treaties, Laws and Policies
Environmental Treaties, Laws and PoliciesEnvironmental Treaties, Laws and Policies
Environmental Treaties, Laws and Policies
 
Theories of gender_inequalities
Theories of gender_inequalitiesTheories of gender_inequalities
Theories of gender_inequalities
 
Community health problems
Community health problemsCommunity health problems
Community health problems
 
Introduction to Environmental Health
Introduction to Environmental HealthIntroduction to Environmental Health
Introduction to Environmental Health
 
06 professional ethics & code of ethics
06 professional ethics & code of ethics06 professional ethics & code of ethics
06 professional ethics & code of ethics
 
Ethical issues in organizational behavior
Ethical issues in organizational behaviorEthical issues in organizational behavior
Ethical issues in organizational behavior
 
Moral values and ethics.
Moral values and ethics.Moral values and ethics.
Moral values and ethics.
 
Concept of health and disease
Concept of health and diseaseConcept of health and disease
Concept of health and disease
 
The Six Components of Health
The Six Components of HealthThe Six Components of Health
The Six Components of Health
 
Concept of health and disease
Concept of health and diseaseConcept of health and disease
Concept of health and disease
 

Plus de John Wilker

Cranking Floating Point Performance Up To 11
Cranking Floating Point Performance Up To 11Cranking Floating Point Performance Up To 11
Cranking Floating Point Performance Up To 11John Wilker
 
Introtoduction to cocos2d
Introtoduction to  cocos2dIntrotoduction to  cocos2d
Introtoduction to cocos2dJohn Wilker
 
Getting Started with OpenGL ES
Getting Started with OpenGL ESGetting Started with OpenGL ES
Getting Started with OpenGL ESJohn Wilker
 
User Input in a multi-touch, accelerometer, location aware world.
User Input in a multi-touch, accelerometer, location aware world.User Input in a multi-touch, accelerometer, location aware world.
User Input in a multi-touch, accelerometer, location aware world.John Wilker
 
Physics Solutions for Innovative Game Design
Physics Solutions for Innovative Game DesignPhysics Solutions for Innovative Game Design
Physics Solutions for Innovative Game DesignJohn Wilker
 
Getting Oriented with MapKit: Everything you need to get started with the new...
Getting Oriented with MapKit: Everything you need to get started with the new...Getting Oriented with MapKit: Everything you need to get started with the new...
Getting Oriented with MapKit: Everything you need to get started with the new...John Wilker
 
Getting Started with iPhone Game Development
Getting Started with iPhone Game DevelopmentGetting Started with iPhone Game Development
Getting Started with iPhone Game DevelopmentJohn Wilker
 
Internationalizing Your Apps
Internationalizing Your AppsInternationalizing Your Apps
Internationalizing Your AppsJohn Wilker
 
Optimizing Data Caching for iPhone Application Responsiveness
Optimizing Data Caching for iPhone Application ResponsivenessOptimizing Data Caching for iPhone Application Responsiveness
Optimizing Data Caching for iPhone Application ResponsivenessJohn Wilker
 
I Phone On Rails
I Phone On RailsI Phone On Rails
I Phone On RailsJohn Wilker
 
Integrating Push Notifications in your iPhone application with iLime
Integrating Push Notifications in your iPhone application with iLimeIntegrating Push Notifications in your iPhone application with iLime
Integrating Push Notifications in your iPhone application with iLimeJohn Wilker
 
Starting Core Animation
Starting Core AnimationStarting Core Animation
Starting Core AnimationJohn Wilker
 
P2P Multiplayer Gaming
P2P Multiplayer GamingP2P Multiplayer Gaming
P2P Multiplayer GamingJohn Wilker
 
Using Concurrency To Improve Responsiveness
Using Concurrency To Improve ResponsivenessUsing Concurrency To Improve Responsiveness
Using Concurrency To Improve ResponsivenessJohn Wilker
 
Leaving Interface Builder Behind
Leaving Interface Builder BehindLeaving Interface Builder Behind
Leaving Interface Builder BehindJohn Wilker
 
Mobile WebKit Development and jQTouch
Mobile WebKit Development and jQTouchMobile WebKit Development and jQTouch
Mobile WebKit Development and jQTouchJohn Wilker
 
Accelerometer and OpenGL
Accelerometer and OpenGLAccelerometer and OpenGL
Accelerometer and OpenGLJohn Wilker
 
Deep Geek Diving into the iPhone OS and Framework
Deep Geek Diving into the iPhone OS and FrameworkDeep Geek Diving into the iPhone OS and Framework
Deep Geek Diving into the iPhone OS and FrameworkJohn Wilker
 
NSNotificationCenter vs. AppDelegate
NSNotificationCenter vs. AppDelegateNSNotificationCenter vs. AppDelegate
NSNotificationCenter vs. AppDelegateJohn Wilker
 

Plus de John Wilker (20)

Cranking Floating Point Performance Up To 11
Cranking Floating Point Performance Up To 11Cranking Floating Point Performance Up To 11
Cranking Floating Point Performance Up To 11
 
Introtoduction to cocos2d
Introtoduction to  cocos2dIntrotoduction to  cocos2d
Introtoduction to cocos2d
 
Getting Started with OpenGL ES
Getting Started with OpenGL ESGetting Started with OpenGL ES
Getting Started with OpenGL ES
 
User Input in a multi-touch, accelerometer, location aware world.
User Input in a multi-touch, accelerometer, location aware world.User Input in a multi-touch, accelerometer, location aware world.
User Input in a multi-touch, accelerometer, location aware world.
 
Physics Solutions for Innovative Game Design
Physics Solutions for Innovative Game DesignPhysics Solutions for Innovative Game Design
Physics Solutions for Innovative Game Design
 
Getting Oriented with MapKit: Everything you need to get started with the new...
Getting Oriented with MapKit: Everything you need to get started with the new...Getting Oriented with MapKit: Everything you need to get started with the new...
Getting Oriented with MapKit: Everything you need to get started with the new...
 
Getting Started with iPhone Game Development
Getting Started with iPhone Game DevelopmentGetting Started with iPhone Game Development
Getting Started with iPhone Game Development
 
Internationalizing Your Apps
Internationalizing Your AppsInternationalizing Your Apps
Internationalizing Your Apps
 
Optimizing Data Caching for iPhone Application Responsiveness
Optimizing Data Caching for iPhone Application ResponsivenessOptimizing Data Caching for iPhone Application Responsiveness
Optimizing Data Caching for iPhone Application Responsiveness
 
I Phone On Rails
I Phone On RailsI Phone On Rails
I Phone On Rails
 
Integrating Push Notifications in your iPhone application with iLime
Integrating Push Notifications in your iPhone application with iLimeIntegrating Push Notifications in your iPhone application with iLime
Integrating Push Notifications in your iPhone application with iLime
 
Starting Core Animation
Starting Core AnimationStarting Core Animation
Starting Core Animation
 
P2P Multiplayer Gaming
P2P Multiplayer GamingP2P Multiplayer Gaming
P2P Multiplayer Gaming
 
Using Concurrency To Improve Responsiveness
Using Concurrency To Improve ResponsivenessUsing Concurrency To Improve Responsiveness
Using Concurrency To Improve Responsiveness
 
Leaving Interface Builder Behind
Leaving Interface Builder BehindLeaving Interface Builder Behind
Leaving Interface Builder Behind
 
Mobile WebKit Development and jQTouch
Mobile WebKit Development and jQTouchMobile WebKit Development and jQTouch
Mobile WebKit Development and jQTouch
 
Accelerometer and OpenGL
Accelerometer and OpenGLAccelerometer and OpenGL
Accelerometer and OpenGL
 
Deep Geek Diving into the iPhone OS and Framework
Deep Geek Diving into the iPhone OS and FrameworkDeep Geek Diving into the iPhone OS and Framework
Deep Geek Diving into the iPhone OS and Framework
 
NSNotificationCenter vs. AppDelegate
NSNotificationCenter vs. AppDelegateNSNotificationCenter vs. AppDelegate
NSNotificationCenter vs. AppDelegate
 
Using SQLite
Using SQLiteUsing SQLite
Using SQLite
 

Dernier

Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodJuan lago vázquez
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024The Digital Insurer
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDropbox
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Victor Rentea
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWERMadyBayot
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...apidays
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesrafiqahmad00786416
 
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKSpring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKJago de Vreede
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024The Digital Insurer
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamUiPathCommunity
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfOverkill Security
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdfSandro Moreira
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MIND CTI
 

Dernier (20)

Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKSpring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 

Building & Maintaining a Family of Applications

  • 1. Building & Maintaining a Family of Applications Code Reuse on a Platform that Supports One Binary per Application
  • 2. Jessica Kahn Tapulous
  • 3. Why is code reuse important?
  • 4.
  • 5. 14 apps – soon to be 17. Five client engineers. Two server engineers.
  • 6. I Know What You’re Thinking…
  • 7. “I don’t have 14 apps in the App Store.”
  • 8. “My couple of apps aren’t really like one another at all.”
  • 9. Oh, so you don’t… • Use categories or subclasses to extend classes like NSString, UIViewController, or UIWebView? • Collect analytical data? • Display advertisements? • Use Facebook Connect or another third-party library?
  • 10. Of course you do! What’s the basic methodology you need to apply?
  • 13. Embed a loadable bundle…
  • 14. j/k!
  • 15. Tap Tap Revenge 2 Born by Emergency C-Section You can’t hide “a baby” inside of an application. We learned this the hard way.
  • 17. Drawbacks • Code size contributed to each product • No self-containment of resources • Must update every app to take advantage of a new version of your library • If you don’t have the source, you have to trust its source
  • 19. The Basics • Create a static library project • Embed this project into your application project • Include the library’s resources in your application’s Copy Resources phase • Set up the proper dependencies and linkages
  • 20. Demo
  • 21. One Size Fits Most What to do when apps require slightly different versions of your static libraries.
  • 22. Why is this needed?
  • 29. Tactics for Customization • Look up values in the app’s plist(s) and/or strings file(s) at runtime • Override library methods with app- supplied subclasses or categories • Override library resources in the app project • Compile the library in an app- specific way
  • 30. Demo
  • 31. Gotchas & Hints • Remove the default version of a resource from your project, to be sure to override with an app-specific one. • Add all_load in OTHER_LDFLAGS for your application target, to ensure static library categories are loaded and linked properly. • Use Xcode project templates.
  • 32. Demo
  • 33. Source Control Using Subversion to maintain a stable base for some projects, while developing on the bleeding edge for others.
  • 34. • svn:externals let you place your application adjacent to all its dependencies, no matter where they really live in the repository • Trunk is the oft-unstable bleeding edge • Tags are untouchable • Branches lie somewhere in between
  • 35. Demo
  • 36. Bonus Points! Build and Unit Test Automation
  • 37. Builds • Script your own, or… • Use a continuous integration package: • BuildBot, Cruise Control & Hudson • Both require knowledge of xcodebuild
  • 38. Unit Tests • ocunit built into the OS X & iPhone developer tools, supported on the Simulator since SDK 2.2 • http://developer.apple.com/tools/unittest.html • Combine with continuous integration
  • 40. • Most developers with more than one project can do more to reuse their code • Spending some time up front saves time in the long run; teach Xcode, svn, and other tools to do the heavy lifting for you • Development, support, and maintenance costs lowered through “economies of scale” and bug compatibility
  • 41. Q &A