Skip to content

Commit 6d6cc98

Browse files
iOSModularizationiOSModularization
iOSModularization
authored and
iOSModularization
committed
ok
1 parent 2912f0e commit 6d6cc98

34 files changed

+1582
-2
lines changed

BundleExtension.podspec

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@ Pod::Spec.new do |s|
2121
TODO: Add long description of the pod here.
2222
DESC
2323

24-
s.homepage = 'https://github.com/ivsall2012/BundleExtension'
24+
s.homepage = 'https://github.com/iOSModularization/BundleExtension'
2525
# s.screenshots = 'www.example.com/screenshots_1', 'www.example.com/screenshots_2'
2626
s.license = { :type => 'MIT', :file => 'LICENSE' }
2727
s.author = { 'ivsall2012' => 'ivsall2012@gmail.com' }
28-
s.source = { :git => 'https://github.com/ivsall2012/BundleExtension.git', :tag => s.version.to_s }
28+
s.source = { :git => 'https://github.com/iOSModularization/BundleExtension.git', :tag => s.version.to_s }
2929
# s.social_media_url = 'https://twitter.com/<TWITTER_USERNAME>'
3030

3131
s.ios.deployment_target = '8.0'
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
//
2+
// Bundle+Extension.swift
3+
// Pods
4+
//
5+
// Created by Andy Tong on 7/24/17.
6+
//
7+
//
8+
9+
import Foundation
10+
11+
12+
public extension Bundle {
13+
/// The current root bundle including the whole app/framework
14+
public static func currentBundle(_ user: AnyObject) -> Bundle {
15+
let podBundle = Bundle(for: type(of: user))
16+
return podBundle
17+
}
18+
19+
/// The resource bundle lives within a pod framework
20+
public static func resourceBundle(_ user: AnyObject) -> Bundle? {
21+
let podBundle = Bundle(for: type(of: user))
22+
23+
// resource bundle it's within podBundle, its name is yourFramework.bundle
24+
let path = podBundle.bundlePath
25+
let bundePath = (path as NSString).lastPathComponent
26+
let bundleName = bundePath.components(separatedBy: ".").first
27+
28+
guard let url = podBundle.url(forResource: bundleName, withExtension: "bundle") else {
29+
// fatalError("Can not find bundle:\(type(of: user)).bundle")
30+
return Bundle.main
31+
}
32+
return Bundle(url: url)
33+
}
34+
}

BundleExtension/Classes/ReplaceMe.swift

Whitespace-only changes.

Example/BundleExtension.xcworkspace/contents.xcworkspacedata

Lines changed: 10 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Example/Podfile.lock

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
PODS:
2+
- BundleExtension (0.1.0)
3+
4+
DEPENDENCIES:
5+
- BundleExtension (from `../`)
6+
7+
EXTERNAL SOURCES:
8+
BundleExtension:
9+
:path: ../
10+
11+
SPEC CHECKSUMS:
12+
BundleExtension: 272d364a1e9409058f73de093d45fe2f5817b94c
13+
14+
PODFILE CHECKSUM: 002038e3f7e25cf048b562a2fac630c833647841
15+
16+
COCOAPODS: 1.3.0.beta.2

Example/Pods/Local Podspecs/BundleExtension.podspec.json

Lines changed: 22 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Example/Pods/Manifest.lock

Lines changed: 16 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Example/Pods/Pods.xcodeproj/project.pbxproj

Lines changed: 734 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Example/Pods/Target Support Files/BundleExtension/BundleExtension-dummy.m

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Example/Pods/Target Support Files/BundleExtension/BundleExtension-prefix.pch

Lines changed: 12 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Example/Pods/Target Support Files/BundleExtension/BundleExtension-umbrella.h

Lines changed: 16 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Example/Pods/Target Support Files/BundleExtension/BundleExtension.modulemap

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Example/Pods/Target Support Files/BundleExtension/BundleExtension.xcconfig

Lines changed: 10 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Example/Pods/Target Support Files/BundleExtension/Info.plist

Lines changed: 26 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Example/Pods/Target Support Files/Pods-BundleExtension_Example/Info.plist

Lines changed: 26 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Example/Pods/Target Support Files/Pods-BundleExtension_Example/Pods-BundleExtension_Example-acknowledgements.markdown

Lines changed: 26 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Example/Pods/Target Support Files/Pods-BundleExtension_Example/Pods-BundleExtension_Example-acknowledgements.plist

Lines changed: 58 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Example/Pods/Target Support Files/Pods-BundleExtension_Example/Pods-BundleExtension_Example-dummy.m

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)