Wikitude / wikitude-cordova-plugin-samples

Includes augmented reality sample project for Phonegap (Android and iOS) using Wikitude's augmented reality Phonegap plugin
www.wikitude.com
76 stars 61 forks source link

sample is broken after "phonegap platform update ios" #8

Closed jcppman closed 10 years ago

jcppman commented 10 years ago

First, my envs:

  1. Latest phonegap v 3.3.0-0.19.6
  2. Latest wikitude phonegap plugin v 3.2.1
  3. Latest wikitude phonegap sample fetched from this repo on 08, Feb, 2014

And the following things happened:

  1. If I directly open /platforms/ios/PluginSamples.xcodeproj via Xcode and build it, run it on my ios device, IT WORKS!
  2. If I execute phonegap build in the root directory of this sample, it throws:
[phonegap] detecting iOS SDK environment...
[phonegap] using the local environment
[phonegap] compiling iOS...
[phonegap] Generating config.xml from defaults for platform "ios"
[phonegap] Compiling app on platform "ios" via command "/Users/Chriest/PhoneGapProject/wikitude-phonegap-samples/PluginSamples/platforms/ios/cordova/build"

events.js:72
        throw er; // Unhandled 'error' event
              ^
Error: spawn ENOENT
    at errnoException (child_process.js:988:11)
    at Process.ChildProcess._handle.onexit (child_process.js:779:34)

Then I execute: phonegap platform update ios, then phonegap platform build ios would be done without any error. But when I install this new build into my ios device, I cannot enter any ARWorld, when I click the link (e.g: 1.1 IMAGE ON TARGET), nothing happened!

I'm facing the deadline of a demo app, please help me! BTW: The same thing happened on android either.

AndreasSchacherbauer commented 10 years ago

As far as I know, the phonegap build command does create a new Xcode project every time. So all Plugins are removed and the WikitudePlugin.js file is not added correctly anymore.

My Workflow is as following:

jcppman commented 10 years ago

Well, alright... Since I have to test the app in android and ios, I have to build it very often or I have to apply my changes on both sides. Looks like a choice, reinstall plugins or repeat yourself!

jcppman commented 10 years ago

The problem is solved! The phonegap build will not remove wikitude plugin, so it is not the true reason. First I tried to clean the project in Xcode, but the problem is still there. Then I remove the platforms directory and rebuild it by phonegap build ios and phonegap build android, and everything is fine! Now I can do phonegap build as many times as I want and wikitude plugin still work!