Commit f375b48f authored by Marius Rackwitz's avatar Marius Rackwitz

Merge pull request #5049 from CocoaPods/mr-fix-resource-bundles

[WIP][PodTargetInstaller] Fix build dir for resource bundles
parents 76c358a6 384f05ac
......@@ -29,6 +29,10 @@ To install release candidates run `[sudo] gem install cocoapods --pre`
file system as result on case insensitive file system.
[Soutaro Matsumoto](https://github.com/soutaro)
* Fix build path for resource bundles.
[Marius Rackwitz](https://github.com/mrackwitz)
[#5034](https://github.com/CocoaPods/CocoaPods/issues/5034)
## 1.0.0.beta.7
......
......@@ -6,12 +6,12 @@ workspace 'Examples.xcworkspace'
target "AFNetworking Example" do
platform :osx, '10.8'
xcodeproj "AFNetworking Mac Example.xcodeproj"
project "AFNetworking Mac Example.xcodeproj"
pod "AFNetworking", "1.3.3"
end
target "AFNetworking iOS Example" do
platform :ios, '8.0'
xcodeproj "AFNetworking iOS Example.xcodeproj"
project "AFNetworking iOS Example.xcodeproj"
pod "AFNetworking", "1.3.3"
end
{
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
{
"images" : [
{
"idiom" : "universal",
"filename" : "cat1.jpg",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
{
"images" : [
{
"idiom" : "universal",
"filename" : "cat2.jpg",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
{
"images" : [
{
"idiom" : "universal",
"filename" : "cat3.jpg",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
Pod::Spec.new do |s|
s.name = "ResourceAssetsExample"
s.version = "0.0.1"
s.summary = "Resource in a spec test pod."
s.description = "This spec specifies an asset catalog as a resource."
s.ios.deployment_target = '8.0'
s.osx.deployment_target = '10.9'
s.homepage = "https://cocoapods.org"
s.license = { :type => "MIT", :file => "../../../LICENSE" }
s.author = { "Ben Asher" => "benasher44@gmail.com" }
s.source = { :path => "." }
s.source_files = "Example.swift"
s.resource = "Images.xcassets"
end
Pod::Spec.new do |s|
s.name = "ResourceExample"
s.version = "0.0.1"
s.summary = "Resource in a spec test pod."
s.description = "This spec specifies a bundle as a resource."
s.ios.deployment_target = '8.0'
s.osx.deployment_target = '10.9'
s.homepage = "https://cocoapods.org"
s.license = { :type => "MIT", :file => "../../../LICENSE" }
s.author = { "Ben Asher" => "benasher44@gmail.com" }
s.source = { :path => "." }
s.source_files = "Example.swift"
s.resource = "Resources.bundle"
end
This diff is collapsed.
This diff is collapsed.
Pod::Spec.new do |s|
s.name = "ResourcesBundleExample"
s.version = "0.0.1"
s.summary = "Resources in a spec test pod."
s.description = "This spec specifies images as resources."
s.ios.deployment_target = '8.0'
s.osx.deployment_target = '10.9'
s.homepage = "https://cocoapods.org"
s.license = { :type => "MIT", :file => "../../../LICENSE" }
s.author = { "Ben Asher" => "benasher44@gmail.com" }
s.source = { :path => "." }
s.source_files = "Example.swift"
s.resource_bundles = {"ResourcesBundleExample" => ["Resources/*.jpg"] }
end
Pod::Spec.new do |s|
s.name = "ResourcesExample"
s.version = "0.0.1"
s.summary = "Resources in a spec test pod."
s.description = "This spec specifies images as resources."
s.ios.deployment_target = '8.0'
s.osx.deployment_target = '10.9'
s.homepage = "https://cocoapods.org"
s.license = { :type => "MIT", :file => "../../../LICENSE" }
s.author = { "Ben Asher" => "benasher44@gmail.com" }
s.source = { :path => "." }
s.source_files = "Example.swift"
s.resources = "Resources/*.jpg"
end
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "group:Resource Bundle Example.xcodeproj">
</FileRef>
<FileRef
location = "group:Pods/Pods.xcodeproj">
</FileRef>
</Workspace>
platform :ios, '8.0'
use_frameworks!
workspace 'Examples.xcworkspace'
project 'Resource Bundle Example.xcodeproj'
target 'Resource Bundle Example' do
pod 'ResourceExample', :path => 'Example Pods'
pod 'ResourcesExample', :path => 'Example Pods'
pod 'ResourceAssetsExample', :path => 'Example Pods'
pod 'ResourcesBundleExample', :path => 'Example Pods'
end
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0720"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "A8C77C4E1C9DA931000AFF69"
BuildableName = "Resource Bundle Example.app"
BlueprintName = "Resource Bundle Example"
ReferencedContainer = "container:Resource Bundle Example.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "A8C77C4E1C9DA931000AFF69"
BuildableName = "Resource Bundle Example.app"
BlueprintName = "Resource Bundle Example"
ReferencedContainer = "container:Resource Bundle Example.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "A8C77C4E1C9DA931000AFF69"
BuildableName = "Resource Bundle Example.app"
BlueprintName = "Resource Bundle Example"
ReferencedContainer = "container:Resource Bundle Example.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "A8C77C4E1C9DA931000AFF69"
BuildableName = "Resource Bundle Example.app"
BlueprintName = "Resource Bundle Example"
ReferencedContainer = "container:Resource Bundle Example.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
//
// AppDelegate.h
// Resource Bundle Example
//
// Created by Ben Asher on 3/19/16.
// Copyright © 2016 Example. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface AppDelegate : UIResponder <UIApplicationDelegate>
@property (strong, nonatomic) UIWindow *window;
@end
//
// AppDelegate.m
// Resource Bundle Example
//
// Created by Ben Asher on 3/19/16.
// Copyright © 2016 Example. All rights reserved.
//
#import "AppDelegate.h"
@interface AppDelegate ()
@end
@implementation AppDelegate
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
// Override point for customization after application launch.
return YES;
}
- (void)applicationWillResignActive:(UIApplication *)application {
// Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
// Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
}
- (void)applicationDidEnterBackground:(UIApplication *)application {
// Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
// If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
}
- (void)applicationWillEnterForeground:(UIApplication *)application {
// Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.
}
- (void)applicationDidBecomeActive:(UIApplication *)application {
// Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
}
- (void)applicationWillTerminate:(UIApplication *)application {
// Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
}
@end
{
"images" : [
{
"idiom" : "iphone",
"size" : "29x29",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "29x29",
"scale" : "3x"
},
{
"idiom" : "iphone",
"size" : "40x40",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "40x40",
"scale" : "3x"
},
{
"idiom" : "iphone",
"size" : "60x60",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "60x60",
"scale" : "3x"
},
{
"idiom" : "ipad",
"size" : "29x29",
"scale" : "1x"
},
{
"idiom" : "ipad",
"size" : "29x29",
"scale" : "2x"
},
{
"idiom" : "ipad",
"size" : "40x40",
"scale" : "1x"
},
{
"idiom" : "ipad",
"size" : "40x40",
"scale" : "2x"
},
{
"idiom" : "ipad",
"size" : "76x76",
"scale" : "1x"
},
{
"idiom" : "ipad",
"size" : "76x76",
"scale" : "2x"
},
{
"idiom" : "ipad",
"size" : "83.5x83.5",
"scale" : "2x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="8150" systemVersion="15A204g" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" initialViewController="01J-lp-oVM">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="8122"/>
</dependencies>
<scenes>
<!--View Controller-->
<scene sceneID="EHf-IW-A2E">
<objects>
<viewController id="01J-lp-oVM" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="Llm-lL-Icb"/>
<viewControllerLayoutGuide type="bottom" id="xb3-aO-Qok"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<animations/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="53" y="375"/>
</scene>
</scenes>
</document>
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="6211" systemVersion="14A298i" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="BYZ-38-t0r">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="6204"/>
</dependencies>
<scenes>
<!--View Controller-->
<scene sceneID="tne-QT-ifu">
<objects>
<viewController id="BYZ-38-t0r" customClass="ViewController" customModuleProvider="" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="y3c-jy-aDJ"/>
<viewControllerLayoutGuide type="bottom" id="wfy-db-euE"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC">
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
</objects>
</scene>
</scenes>
</document>
<?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>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</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</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIMainStoryboardFile</key>
<string>Main</string>
<key>UIRequiredDeviceCapabilities</key>
<array>
<string>armv7</string>
</array>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
</dict>
</plist>
//
// ViewController.h
// Resource Bundle Example
//
// Created by Ben Asher on 3/19/16.
// Copyright © 2016 Example. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface ViewController : UIViewController
@end
//
// ViewController.m
// Resource Bundle Example
//
// Created by Ben Asher on 3/19/16.
// Copyright © 2016 Example. All rights reserved.
//
#import "ViewController.h"
@interface ViewController ()
@end
@implementation ViewController
- (void)viewDidLoad {
[super viewDidLoad];
// Do any additional setup after loading the view, typically from a nib.
}
- (void)didReceiveMemoryWarning {
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
}
@end
//
// main.m
// Resource Bundle Example
//
// Created by Ben Asher on 3/19/16.
// Copyright © 2016 Example. All rights reserved.
//
#import <UIKit/UIKit.h>
#import "AppDelegate.h"
int main(int argc, char * argv[]) {
@autoreleasepool {
return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
}
}
......@@ -177,7 +177,7 @@ module Pod
c.build_settings['PRODUCT_NAME'] = bundle_name
relative_info_plist_path = info_plist_path.relative_path_from(sandbox.root)
c.build_settings['INFOPLIST_FILE'] = relative_info_plist_path.to_s
c.build_settings['CONFIGURATION_BUILD_DIR'] = target.configuration_build_dir
c.build_settings['CONFIGURATION_BUILD_DIR'] = target.configuration_build_dir('$(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)')
# Set the correct device family for this bundle, based on the platform
device_family_by_platform = {
......
Subproject commit d8a969fbd7d5117cf9c0682a2a5ef40abd8f29d0
Subproject commit 5ab50939447c8c69fe3ab4cbfceaab3c90dd7f33
......@@ -190,7 +190,7 @@ module Pod
it 'sets the correct build dir' do
@bundle_target.build_configurations.each do |bc|
bc.build_settings['CONFIGURATION_BUILD_DIR'].should == '$CONFIGURATION_BUILD_DIR/BananaLib-Pods-SampleProject'
bc.build_settings['CONFIGURATION_BUILD_DIR'].should == '$(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/BananaLib-Pods-SampleProject'
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