particle-iot / spark-setup-ios

(DEPRECATED) Spark device setup library - Soft AP Cocoapod/Carthage lib for iOS
Apache License 2.0
19 stars 25 forks source link

Adjust Bundle Location to Support Swift Frameworks #33

Closed andrewmunsell closed 8 years ago

andrewmunsell commented 8 years ago

Fixes #32 by using [NSBundle bundleForClass:[self class]] as suggested by CocoaPods in their release notes for 0.36 (http://blog.cocoapods.org/CocoaPods-0.36/).

Tested with a Swift 2.1 iOS project in Xcode 7 with CocoaPods use_frameworks!. Before the changes, SparkSetupMainController() would return nil due to the exception as described in #32. After the changes the bundle is found, so the controller is returned correctly.

Note-- I have NOT tested this on a new Objective-C project yet.

idokleinman commented 8 years ago

Thanks for the PR, much appreciated