flomio / cordova-plugin-flomio

Flomio SDK plugin for Cordova.
10 stars 8 forks source link

Project with Flomio Plugin added will not build. #30

Closed Barryrowe closed 6 years ago

Barryrowe commented 6 years ago

I have just started a spike to test this plugin, and found that a project will not build after the plugin is added.

I recreated the issue with a blank cordova app:

  1. create a cordova app:
    cordova create flomio-test com.test.flomiotest "Flomio Test"
  2. Install plugin
    cd flomio-test
    cordova plugin add https://github.com/flomio/flomio_cordova_plugin
  3. Update config.xml to include the Flomio <feature> tag
  4. Add Platform
    cordova platform add ios
  5. Open the project in XCode and verify it builds
    open platforms/ios/Flomio\ Test.xcodeproj
  6. Build project CMD+B

You get this error:

screen shot 2017-09-15 at 10 58 55 am
scottire commented 6 years ago

Hey, Add it at the latest branch: cordova plugin remove flomio_cordova_plugin cordova plugin add https://github.com/flomio/flomio_cordova_plugin\#abae7d4 Also, you may need to add libz.tbd to your build settings.

screen shot 2017-09-15 at 17 24 03

Scott

Barryrowe commented 6 years ago

So that changes the error:

screen shot 2017-09-15 at 11 31 09 am

This happens with or without the tbz.tbd link added.

scottire commented 6 years ago

Try cordova platform remove ios and then repeat. You are using an older SDK... it should automatically add to your project, but otherwise, drag the contents from the iOS folder from here: https://www.dropbox.com/s/6u1fz3r3n38xkyp/FlomioSDKv2.3_beta.zip?dl=1

Barryrowe commented 6 years ago

Alright, I had tried that already but will do so again.

Barryrowe commented 6 years ago

Alright so, now it's missing CoreNFC

screen shot 2017-09-15 at 11 41 07 am

I have a few questions apart from that though.

A) how did you determine the proper hash for the "latest branch"? That's the 3rd commit down in the history for the 2.3 branch, so I never would have chosen that particular commit.

B) For setups that need to create the cordova platform from scratch every build, what is process for doing so with the Flomio plugin if you have to manually add links or worse drag in an SDK? The build can't be automated at that point.

scottire commented 6 years ago

We have added CoreNFC as it is very integral to our business and believe supporting it is very necessary in the plugin. Either delete any reference to it, or update your Xcode to the latest Xcode 9 GM, Xcode 9 will be released very soon for iOS 11 apps which will include CoreNFC.

You can use the latest branch and we use the plugin within a automated build. I have pushed a new commit (6a0a269) with the needed library. Thank you for pointing it out, it should automatically include that.

Barryrowe commented 6 years ago

Thanks. That makes sense.

I can successfully install and build with the v2.2 of the plugin from the latest commit, so we will use that for now.

We may have corporate restrictions from installing XCode 9 at this time, and could upgrade to 2.3 of the plugin once we can upgrade XCode.

Barryrowe commented 6 years ago

I will say this makes no sense though since that should be the same point that Master is at that was failing to begin with.

scottire commented 6 years ago

That does make no sense. v2.2@latest and master are the same, no? We will be merging v2.3 into master when Xcode 9 is released and stable.

Barryrowe commented 6 years ago

Right, which is where I was confused originally, expecting the 2.2 version (master) to just work. Yeah, this is bizarre. I just created a brand new project, followed the steps I originally listed and the thing builds fine.

It looks like iTunes had an update while I was out to lunch, but it seems odd that would have any effect. I know they have to update for iOS releases, but I dont' see how a new iTunes release would effect something released 6 months ago. 0_o