Commit 39e0a526 authored by Eloy Duran's avatar Eloy Duran

Remove EmbedReader example, it doesn't really showcase anything and some small fixes.

parent 291e2e2e
......@@ -2,7 +2,7 @@ PODS:
- AFNetworking (0.7.0):
- JSONKit
- FormatterKit (0.7.0)
- JSONKit (1.5pre)
- JSONKit (1.4)
DEPENDENCIES:
- AFNetworking (~> 0.7.0)
......
......@@ -2,7 +2,7 @@ PODS:
- AFNetworking (0.7.0):
- JSONKit
- FormatterKit (0.7.0)
- JSONKit (1.5pre)
- JSONKit (1.4)
DEPENDENCIES:
- AFNetworking (~> 0.7.0)
......
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "DCFB448E136F7202004B3EE0"
BuildableName = "EmbedReader.app"
BlueprintName = "EmbedReader"
ReferencedContainer = "container:EmbedReader.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.GDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.GDB"
shouldUseLaunchSchemeArgsEnv = "YES"
buildConfiguration = "Debug">
<Testables>
</Testables>
</TestAction>
<LaunchAction
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.GDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.GDB"
displayScaleIsEnabled = "NO"
displayScale = "1.00"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
buildConfiguration = "Debug">
<BuildableProductRunnable>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "DCFB448E136F7202004B3EE0"
BuildableName = "EmbedReader.app"
BlueprintName = "EmbedReader"
ReferencedContainer = "container:EmbedReader.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
displayScaleIsEnabled = "NO"
displayScale = "1.00"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
buildConfiguration = "Release">
<BuildableProductRunnable>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "DCFB448E136F7202004B3EE0"
BuildableName = "EmbedReader.app"
BlueprintName = "EmbedReader"
ReferencedContainer = "container:EmbedReader.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
<?xml version="1.0" encoding="UTF-8" standalone="yes"?><Workspace version="1.0"><FileRef location="group:EmbedReader.xcodeproj"></FileRef><FileRef location="group:Pods/Pods.xcodeproj"></FileRef></Workspace>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleDisplayName</key>
<string>${PRODUCT_NAME}</string>
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
<key>CFBundleIconFile</key>
<string></string>
<key>CFBundleIdentifier</key>
<string>net.sourceforge.zbar.${PRODUCT_NAME:rfc1034identifier}</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>${PRODUCT_NAME}</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1.0</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>NSMainNibFile</key>
<string>MainWindow</string>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
</dict>
</plist>
#import <Availability.h>
#ifndef __IPHONE_3_0
#warning "This project uses features only available in iPhone SDK 3.0 and later."
#endif
#ifdef __OBJC__
# import <UIKit/UIKit.h>
# import <Foundation/Foundation.h>
# import "ZBarSDK.h"
#endif
//
// EmbedReaderAppDelegate.h
// EmbedReader
//
// Created by spadix on 5/2/11.
//
#import <UIKit/UIKit.h>
@class EmbedReaderViewController;
@interface EmbedReaderAppDelegate
: NSObject
< UIApplicationDelegate >
{
}
@property (nonatomic, retain) IBOutlet UIWindow *window;
@property (nonatomic, retain) IBOutlet EmbedReaderViewController *viewController;
@end
//
// EmbedReaderAppDelegate.m
// EmbedReader
//
// Created by spadix on 5/2/11.
//
#import "EmbedReaderAppDelegate.h"
#import "EmbedReaderViewController.h"
@implementation EmbedReaderAppDelegate
@synthesize window=_window;
@synthesize viewController=_viewController;
- (BOOL) application: (UIApplication*) application
didFinishLaunchingWithOptions: (NSDictionary*) launchOptions
{
self.window.rootViewController = self.viewController;
[self.window makeKeyAndVisible];
// force view class to load so it may be referenced directly from NIB
[ZBarReaderView class];
return(YES);
}
- (void) dealloc
{
[_window release];
[_viewController release];
[super dealloc];
}
@end
//
// EmbedReaderViewController.h
// EmbedReader
//
// Created by spadix on 5/2/11.
//
#import <UIKit/UIKit.h>
@interface EmbedReaderViewController
: UIViewController
< ZBarReaderViewDelegate >
{
ZBarReaderView *readerView;
UITextView *resultText;
ZBarCameraSimulator *cameraSim;
}
@property (nonatomic, retain) IBOutlet ZBarReaderView *readerView;
@property (nonatomic, retain) IBOutlet UITextView *resultText;
@end
//
// EmbedReaderViewController.m
// EmbedReader
//
// Created by spadix on 5/2/11.
//
#import "EmbedReaderViewController.h"
@implementation EmbedReaderViewController
@synthesize readerView, resultText;
- (void) cleanup
{
[cameraSim release];
cameraSim = nil;
readerView.readerDelegate = nil;
[readerView release];
readerView = nil;
[resultText release];
resultText = nil;
}
- (void) dealloc
{
[self cleanup];
[super dealloc];
}
- (void) viewDidLoad
{
[super viewDidLoad];
// the delegate receives decode results
readerView.readerDelegate = self;
// you can use this to support the simulator
if(TARGET_IPHONE_SIMULATOR) {
cameraSim = [[ZBarCameraSimulator alloc]
initWithViewController: self];
cameraSim.readerView = readerView;
}
}
- (void) viewDidUnload
{
[self cleanup];
[super viewDidUnload];
}
- (BOOL) shouldAutorotateToInterfaceOrientation: (UIInterfaceOrientation) orient
{
// auto-rotation is supported
return(YES);
}
- (void) willRotateToInterfaceOrientation: (UIInterfaceOrientation) orient
duration: (NSTimeInterval) duration
{
// compensate for view rotation so camera preview is not rotated
[readerView willRotateToInterfaceOrientation: orient
duration: duration];
}
- (void) viewDidAppear: (BOOL) animated
{
// run the reader when the view is visible
[readerView start];
}
- (void) viewWillDisappear: (BOOL) animated
{
[readerView stop];
}
- (void) readerView: (ZBarReaderView*) view
didReadSymbols: (ZBarSymbolSet*) syms
fromImage: (UIImage*) img
{
// do something useful with results
for(ZBarSymbol *sym in syms) {
resultText.text = sym.data;
break;
}
}
@end
//
// main.m
// EmbedReader
//
// Created by spadix on 5/2/11.
//
#import <UIKit/UIKit.h>
int main(int argc, char *argv[])
{
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
int retVal = UIApplicationMain(argc, argv, nil, nil);
[pool release];
return retVal;
}
platform :ios
dependency 'ZBarSDK'
PODS:
- ZBarSDK (1.2.2)
DEPENDENCIES:
- ZBarSDK
PODS:
- ASIHTTPRequest (1.8.1)
- ASIHTTPRequest (1.8.1)
- CocoaLumberjack (1.3.2)
- SBJson (3.0.4)
- SBJson (3.0.4)
DEPENDENCIES:
- ASIHTTPRequest
......
......@@ -37,14 +37,7 @@ module Pod
end
def project_podfile
unless @project_podfile
@project_podfile = project_root + 'Podfile'
# TODO this has to go, we don't support this anymore!
unless @project_podfile.exist?
@project_podfile = project_root.glob('*.podspec').first
end
end
@project_podfile
@project_podfile ||= project_root + 'Podfile'
end
def headers_symlink_root
......@@ -53,24 +46,21 @@ module Pod
# Returns the spec at the pat returned from `project_podfile`.
def rootspec
unless @rootspec
if project_podfile
if project_podfile.basename.to_s == 'Podfile'
@rootspec = Podfile.from_file(project_podfile)
else
@rootspec = Specification.from_file(project_podfile)
end
end
end
@rootspec
@rootspec ||= Podfile.from_file(project_podfile)
end
def ios?
rootspec.platform == :ios if rootspec
require 'colored'
caller.find { |line| line =~ /^(.+.podspec):\d*/ }
puts "[!] The use of `config.ios?` is deprecated and will be removed in version 0.7.#{" Called from: #{$1}" if $1}".red
rootspec.target_definitions[:default].platform == :ios if rootspec
end
def osx?
rootspec.platform == :osx if rootspec
require 'colored'
caller.find { |line| line =~ /^(.+.podspec):\d*/ }
puts "[!] The use of `config.ios?` is deprecated and will be removed in version 0.7.#{" Called from: #{$1}" if $1}".red
rootspec.target_definitions[:default].platform == :osx if rootspec
end
module Mixin
......
......@@ -60,7 +60,7 @@ module Pod
end
if (should_install && config.doc?) || config.force_doc?
puts "Installing Documentation for #{spec}".green if config.verbose?
puts "Installing Documentation for #{pod.specification}".green if config.verbose?
Generator::Documentation.new(pod).generate(config.doc_install?)
end
end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment