Files
2016-09-27 10:07:35 +03:00
..
2016-09-27 10:07:35 +03:00
2016-09-27 10:07:35 +03:00
2016-09-27 10:07:35 +03:00

PodAsset

CI Status Coverage Status Version License Platform

Usage

Why is it so painful to access the assets in CocoaPods? Pain No More!

Get the damn image:

NSData* data = [PodAsset dataForFilename:@"SomeDamnImage.jpg" pod:@"SomePod"];

Get the damn json:

NSString* jsonString = [PodAsset stringForFilename:@"SomeDamn.json" pod:@"SomePod"];

To run the example project, clone the repo, and run pod install from the Example directory first.

Requirements

The resource bundle name, by default, is the pod name. If not, please check the third party pod's podspec and find out the resource bundle name:

  s.resource_bundles = {
    'PodAsset' => ['Pod/Assets/*.png']
  }

In the above example, the bundle name is PodAsset.

Installation

PodAsset is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod "PodAsset"

How It works

Pod Asset will search all bundles and find the correct one.

Author

Hai Feng Kao, haifeng@cocoaspice.in

License

PodAsset is available under the MIT license. See the LICENSE file for more info.