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

Build-Errors using Swift Pods #39

Closed henrik-d closed 8 years ago

henrik-d commented 8 years ago

I have problems using SparkSetup with CocoaPods in Swift.

These were my steps: 1) Create a new Swift-Project in Xcode 2) Create a Podfile and install

platform :ios, '8.0'
use_frameworks!

target 'ParticleTest' do
    pod 'SparkSetup'
end

3) import SparkSetup in ViewController.swift

I get these errors: bildschirmfoto 2016-01-20 um 10 06 31

idokleinman commented 8 years ago

Seems like you did not create bridging headers.

See here: http://swiftalicio.us/2014/11/using-cocoapods-from-swift/ http://www.learnswiftonline.com/getting-started/adding-swift-bridging-header/

henrik-d commented 8 years ago

Thanks for the quick reply.

I can't use bridging headers, since I use use_frameworks! in my Podfile (which I have to, because I also want to use swift-only-libraries)

idokleinman commented 8 years ago

I think you can, read here: http://stackoverflow.com/questions/29905271/unable-to-use-both-swift-and-obj-c-libs-with-cocoapods

henrik-d commented 8 years ago

Thanks, thats working for me. Didn't know that having both is possible!

ghost commented 8 years ago

Hi there, I was running into the same issue, and I followed the link to use both swift and obj-c using search paths. The file not found error went away, but the file not found with <angled> error is still occurring. This only happens when I try to build the project with a device. It works fine in the simulator.

idokleinman commented 8 years ago

Is your project in swift? Do you have (other) swift dependencies in your project? Do you use use_frameworks! in Podfile?

asanchezdelc commented 8 years ago

@idokleinman yes to all.

In the mean time, I got it working by just modifying the SparkSetup.h includes to use quotes.

idokleinman commented 8 years ago

I am glad to hear. Which includes you had to change? You are welcome to submit a PR btw.

asanchezdelc commented 8 years ago

On SparkSetup.h I changed the imports to

#import "SparkSetupCustomization.h"
#import "SparkSetupMainController.h"
henrik-d commented 8 years ago

These changes where necessary for me as well.

idokleinman commented 8 years ago

I'll fix it in the next update of the device setup lib. Thanks!