Hi @mcotora, here you have a summary of the code:
Vuforia::TargetFinder* targetFinder;
std::string lastTargetId;
bool Example::init() {
Vuforia::TrackerManager& trackerManager = Vuforia::TrackerManager::getInstance();
Vuforia::ObjectTracker* imageTracker = static_cast<Vuforia::ObjectTracker*>(trackerManager.getTracker(Vuforia::ObjectTracker::getClassType()));
targetFinder = imageTracker->getTargetFinder(Vuforia::ObjectTracker::TargetFinderType::CLOUD_RECO);
if ( targetFinder->startInit( user.c_str(), secret.c_str() ) ) {
targetFinder->waitUntilInitFinished();
}
int resultCode = targetFinder->getInitState();
// resultCode is always Vuforia::TargetFinder::INIT_SUCCESS, so nothing wrong here
targetFinder->startRecognition();
}
void Example::Vuforia_onUpdate(Vuforia::State& state) {
auto queryResult = targetFinder->updateQueryResults();
if (queryResult.status == Vuforia::TargetFinder::UPDATE_RESULTS_AVAILABLE && queryResult.results.size() > 0) {
auto result = queryResult.results.at(0);
if (!result->isOfType(Vuforia::CloudRecoSearchResult::getClassType())) {
return;
}
const Vuforia::CloudRecoSearchResult* cloudRecoResult = static_cast<const Vuforia::CloudRecoSearchResult*>(result);
if (cloudRecoResult->getTrackingRating() > 0) {
auto newTrackable = targetFinder->enableTracking(*cloudRecoResult);
targetFinder->stop();
if (newTrackable != nullptr) {
lastTargetId = result->getUniqueTargetId();
}
}
}
}
We've tried with Vuforia's SDK 9.8.5, and this is still happening. A couple of additional notes:
- Exact same code (C++) is working fine in Android
- We haven't changed this flow within our app during the past year
- You have removed cloud reco from the iOS samples, in order to understand how you make it work (code is only available for Unity)
Hi @mcotora,
The email is
.
As I've mentioned before, the exact same codebase is working on Android but it's not working on iOS. Android has never stopped working, but iOS has stopped working on 9.x. (we're currently using 8.5.8).
It would be great if you could share an example of CloudReco for native iOS (the only available is for Unity at this time).
Thanks