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

Problem building with 0.7.0 and Carthage #57

Open rickkas7 opened 7 years ago

rickkas7 commented 7 years ago

My Carthage build fails when I use the spark-setup-ios version 0.7.0.

I have this in my Cartfile:

github "spark/spark-setup-ios" ~> 0.7.0

When I carthage update I get this:

*** Fetching spark-setup-ios
*** Fetching AFNetworking
*** Fetching onepassword-extension
*** Fetching spark-sdk-ios
*** Downloading AFNetworking.framework binary at "3.1.0"
*** Checking out AFNetworking at "3.1.0"
*** Checking out onepassword-extension at "d99f5d7a4c7328f8e3a8d1e7aff455d1072e0c19"
*** Checking out spark-sdk-ios at "0.6.1"
*** Checking out spark-setup-ios at "0.7.0"

The error is:

Controller.m:246:42: error: no visible @interface for 'SparkCloud' declares the selector 'createCustomer:password:productId:accountInfo:completion:'
            [[SparkCloud sharedInstance] createCustomer:email password:self.passwordTextField.text productId:[SparkSetupCustomization sharedInstance].productId accountInfo:nil completion:^(NSError *error) {
             ~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/rickk/Documents/tempmon/11ios_objc_carthage/TempMon11/Carthage/Checkouts/spark-setup-ios/Classes/UI/SparkUserSignupViewController.m:286:42: error: no visible @interface for 'SparkCloud' declares the selector 'createUser:password:accountInfo:completion:'
            [[SparkCloud sharedInstance] createUser:email password:self.passwordTextField.text accountInfo:accountInfo completion:^(NSError *error) {
             ~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2 errors generated.

I'm guessing that this is happening because it's pulling in spark-setup-ios 0.6.1, not the 0.7.0 version that has productID support.

The spark-setup-ios 0.7.0 works fine with CocoaPods.

idokleinman commented 7 years ago

You mean it's pulling sdk 0.6.1... I'll look into that. might be a simple fix thanks for reporting

idokleinman commented 7 years ago

Well, 0.6.X SDK does have the support for product endpoints (product id).. Can you try setting your to contain: github "spark/spark-sdk-ios" == 0.6.0

I suspect something with 0.6.1 (I was about to deprecate the SDK to switch to the renamed one particle-sdk-ios but have run into issues with the rename in the setup lib so I'll have to wait on that)

rickkas7 commented 7 years ago

I changed the Cartfile to be:

github "spark/spark-sdk-ios" == 0.6.0
github "spark/spark-setup-ios" ~> 0.7.0

and removed Cartfile.resolved and Carthage and the change appeared to be picked up:

*** Fetching spark-setup-ios
*** Fetching spark-sdk-ios
*** Fetching AFNetworking
*** Fetching onepassword-extension
*** Downloading AFNetworking.framework binary at "3.1.0"
*** Checking out AFNetworking at "3.1.0"
*** Checking out onepassword-extension at "d99f5d7a4c7328f8e3a8d1e7aff455d1072e0c19"
*** Checking out spark-sdk-ios at "0.6.0"
*** Checking out spark-setup-ios at "0.7.0"

However I'm still getting the same error:

/Users/rickk/Documents/11ios_objc_carthage/TempMon11/Carthage/Checkouts/spark-setup-ios/Classes/UI/SparkUserSignupViewController.m:246:42: error: no visible @interface for 'SparkCloud' declares the selector 'createCustomer:password:productId:accountInfo:completion:'
            [[SparkCloud sharedInstance] createCustomer:email password:self.passwordTextField.text productId:[SparkSetupCustomization sharedInstance].productId accountInfo:nil completion:^(NSError *error) {
             ~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/rickk/Documents/11ios_objc_carthage/TempMon11/Carthage/Checkouts/spark-setup-ios/Classes/UI/SparkUserSignupViewController.m:286:42: error: no visible @interface for 'SparkCloud' declares the selector 'createUser:password:accountInfo:completion:'
            [[SparkCloud sharedInstance] createUser:email password:self.passwordTextField.text accountInfo:accountInfo completion:^(NSError *error) {
             ~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2 errors generated.

I am able to build spark-setup-ios 0.6.0 with the Cartfile:

github "spark/spark-setup-ios" == 0.6.0
gitjoost commented 7 years ago

With cart file:

github "AFNetworking/AFNetworking" ~> 3.0.0
github "spark/spark-sdk-ios" == 0.6.0
github "spark/spark-setup-ios" ~> 0.7.0
github "AgileBits/onepassword-extension" "add-framework-support"

The build fails all together for me:

*** Fetching onepassword-extension
*** Fetching spark-setup-ios
*** Fetching spark-sdk-ios
*** Fetching AFNetworking
*** Downloading AFNetworking.framework binary at "3.1.0"
*** Checking out AFNetworking at "3.1.0"
*** Checking out onepassword-extension at "d99f5d7a4c7328f8e3a8d1e7aff455d1072e0c19"
*** Checking out spark-sdk-ios at "0.6.0"
*** Checking out spark-setup-ios at "0.7.0"
*** xcodebuild output can be found in /var/folders/9b/3s6sgnkj5hg3lcz3824_qlh00000gn/T/carthage-xcodebuild.lQUNYQ.log
*** Building scheme "AFNetworking iOS" in AFNetworking.xcworkspace
*** Building scheme "OnePasswordExtension" in 1Password Extension Demos.xcworkspace
*** Building scheme "ParticleSDK" in spark-sdk.xcworkspace
*** Building scheme "ParticleDeviceSetupLibrary" in SparkSetup.xcworkspace
Build Failed
    Task failed with exit code 65:
    /usr/bin/xcrun xcodebuild -workspace /Users/joost/Library/Mobile\ Documents/com~apple~CloudDocs/projects/XCode/particleAUTHtest\ copy/Carthage/Checkouts/spark-setup-ios/SparkSetup.xcworkspace -scheme ParticleDeviceSetupLibrary -configuration Release -derivedDataPath /Users/joost/Library/Caches/org.carthage.CarthageKit/DerivedData/spark-setup-ios/0.7.0 -sdk iphoneos ONLY_ACTIVE_ARCH=NO BITCODE_GENERATION_MODE=bitcode CODE_SIGNING_REQUIRED=NO CODE_SIGN_IDENTITY= CARTHAGE=YES clean build

This usually indicates that project itself failed to compile. Please check the xcodebuild log for more details: /var/folders/9b/3s6sgnkj5hg3lcz3824_qlh00000gn/T/carthage-xcodebuild.lQUNYQ.log

Setting github "spark/spark-setup-ios" == 0.6.0 builds the project but .productMode and .productId are unknown to SparkSetupCustomization.sharedInstance()

peternoyes commented 7 years ago

We are running into this as well. Is there any way to work around it?

KemperVreden commented 7 years ago

+1 Running into this as well ... Workarounds? Fixes?

idokleinman commented 6 years ago

Trying to tackle this right now, TBH not sure what's wrong there as the dependency of SDK 0.6.1 DOES in fact contain the aforementioned product-mode functions... no real idea why it does not compile. if you guys have any ideas do let me know

davidgs commented 6 years ago

Having the same issue with the build.

[[SparkCloud sharedInstance] requestPasswordResetForCustomer:self.emailTextField.text productId:[SparkSetupCustomization sharedInstance].productId completion:passwordResetCallback];

Cartfile: github "AFNetworking/AFNetworking" ~> 3.0.0 github "spark/spark-sdk-ios" == 0.6.0 github "spark/spark-setup-ios" ~> 0.7.0 github "AgileBits/onepassword-extension" "add-framework-support"