Monday, May 11, 2026
HomeiOS Developmentxcode - Find out how to embody Vuforia iOS framework into ionic...

xcode – Find out how to embody Vuforia iOS framework into ionic undertaking

[ad_1]

I wish to embody the pattern xcode undertaking performance supplied by Vuforia in an ionic undertaking. The pattern undertaking may be downloaded from right here: https://developer.vuforia.com/downloads/samples

The standalone undertaking works effective, I used to be capable of to tweak it to fulfill my expectations concerning the performance.

The issues began once I was attempting to combine it into my principal undertaking, which makes use of ionic framework.

Principally the undertaking works like this:

  • I’ve an utility in ionic’s webview
  • There is a button which results in the AR performance
  • I’ve applied a capacitor plugin to launch a local view which makes use of Vuforia

I used to be capable of end the Android model, so it is out of scope.

The pattern XCode undertaking provides a bunch of issues to the Construct phases with a view to embed the VuforiaEngine.framework and hyperlink, compile the C++ sources for the bridge between the Swift supply and the Framework

First downside: the ionic undertaking makes use of CocoaPods for the XCode undertaking, so even when I set all the things within the “App” undertaking (construct phases), it was ignored by the workspace settings. If I construct the App undertaking it can not import the Pods, if I construct the Pods undertaking it doesn’t have the required settings.

So subsequent, I attempted to create a customized Pod to incorporate the framework, add mandatory settings and import it.

First it was promising, however after some time I bumped into bizarre error messages and I do not know tips on how to make it work.

Listed here are some settings from the pattern undertaking

enter image description here

As you possibly can see there are a number of frameworks it should hyperlink, there’s an embedded framework which is supplied by Vuforia within the SDK and a bunch of c++ recordsdata and headers to incorporate.

Here is my .podspec try

Pod::Spec.new do |s|
  s.title="Vuforia"
  s.model          = '0.1.0'
  s.abstract          = 'Vuforia library.'

  s.homepage="https://github.com/7681268/vuforia"
  s.license          = { :kind => 'MIT', :file => 'LICENSE' }
  s.creator           = { '7681268' => '<OMITTED>@gmail.com' }
  s.supply           = { :git => '<OMITTED>/vuforia/ios/pod', :tag => '0.1.0' }

  s.swift_version = '5'

  s.ios.deployment_target="13.0"

  s.source_files="vuforia/Courses/**/*"

  s.library = 'c++'
  s.xcconfig = {
      #  'CLANG_CXX_LANGUAGE_STANDARD' => 'c++11',
      #  'CLANG_CXX_LIBRARY' => 'libc++',
       'HEADER_SEARCH_PATHS' => '$(inherited) "vuforia/CrossPlatform"',
       'CLANG_ENABLE_MODULES' => 'YES',
       'ENABLE_BITCODE' => 'NO'
  }

  s.resource_bundles = {
    'vuforia' => ['vuforia/Assets/*']
  }

  s.vendored_frameworks="VuforiaEngine.framework"
  s.frameworks="Basis", 'QuartzCore', 'CoreMedia', 'MediaPlayer', 'VuforiaEngine', 'UIKit', 'AudioToolbox', 'SystemConfiguration', 'CoreMotion', 'CoreGraphics',  'CoreFoundation', 'Safety', 'AVFoundation','Metallic'
  s.public_header_files="vuforia/Courses/**/*.h"
finish

Information:

<POD ROOT>
  +_pods.xcodeproj
  +Instance
  -vuforia
    +Belongings (accommodates the fashions, textures, vuforia database)
    +Courses (some swift code for the UI, and a C++ wrapper)
    +CrossPlatform (Comprises the crossplatform c++ bridge between the pattern and the framework)
  +VuforiaEngine.framework (Framework supplied by Vuforia)
  Vuforia.podspec

After linting the undertaking I’ve error messages originated from the Fundation framework .

- ERROR | xcodebuild:  /Functions/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator15.2.sdk/System/Library/Frameworks/Basis.framework/Headers/NSObjCRuntime.h:523:1: error: anticipated unqualified-id
- ERROR | xcodebuild:  /Functions/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator15.2.sdk/System/Library/Frameworks/Basis.framework/Headers/NSObjCRuntime.h:525:9: error: unknown kind title 'NSString'
- ERROR | xcodebuild:  /Functions/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator15.2.sdk/System/Library/Frameworks/Basis.framework/Headers/NSObjCRuntime.h:526:9: error: unknown kind title 'NSString'
- ERROR | xcodebuild:  /Functions/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator15.2.sdk/System/Library/Frameworks/Basis.framework/Headers/NSObjCRuntime.h:528:19: error: unknown kind title 'NSString'
- ERROR | xcodebuild:  /Functions/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator15.2.sdk/System/Library/Frameworks/Basis.framework/Headers/NSObjCRuntime.h:529:44: error: unknown kind title 'NSString'
- ERROR | xcodebuild:  /Functions/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator15.2.sdk/System/Library/Frameworks/Basis.framework/Headers/NSObjCRuntime.h:531:19: error: unknown kind title 'NSString'
- ERROR | xcodebuild:  /Functions/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator15.2.sdk/System/Library/Frameworks/Basis.framework/Headers/NSObjCRuntime.h:532:53: error: unknown kind title 'NSString'
- ERROR | xcodebuild:  /Functions/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator15.2.sdk/System/Library/Frameworks/Basis.framework/Headers/NSObjCRuntime.h:534:19: error: unknown kind title 'NSString'
- ERROR | xcodebuild:  /Functions/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator15.2.sdk/System/Library/Frameworks/Basis.framework/Headers/NSObjCRuntime.h:534:50: error: unknown kind title 'Protocol'
- ERROR | xcodebuild:  /Functions/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator15.2.sdk/System/Library/Frameworks/Basis.framework/Headers/NSObjCRuntime.h:535:19: error: unknown kind title 'Protocol'
- ERROR | xcodebuild:  /Functions/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator15.2.sdk/System/Library/Frameworks/Basis.framework/Headers/NSObjCRuntime.h:535:61: error: unknown kind title 'NSString'
- ERROR | xcodebuild:  /Functions/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator15.2.sdk/System/Library/Frameworks/Basis.framework/Headers/NSObjCRuntime.h:539:30: error: unknown kind title 'NSString'
- ERROR | xcodebuild:  /Functions/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator15.2.sdk/System/Library/Frameworks/Basis.framework/Headers/NSObjCRuntime.h:539:53: error: format argument not an NSString
- ERROR | xcodebuild:  /Functions/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator15.2.sdk/System/Library/Frameworks/Basis.framework/Headers/NSObjCRuntime.h:540:31: error: unknown kind title 'NSString'
- ERROR | xcodebuild:  /Functions/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator15.2.sdk/System/Library/Frameworks/Basis.framework/Headers/NSObjCRuntime.h:540:63: error: format argument not an NSString
- ERROR | xcodebuild:  /Functions/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator15.2.sdk/System/Library/Frameworks/Basis.framework/Headers/NSZone.h:9:1: error: anticipated unqualified-id
- ERROR | xcodebuild:  /Functions/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator15.2.sdk/System/Library/Frameworks/Basis.framework/Headers/NSZone.h:19:63: error: unknown kind title 'NSString'
- ERROR | xcodebuild:  /Functions/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator15.2.sdk/System/Library/Frameworks/Basis.framework/Headers/NSZone.h:20:19: error: unknown kind title 'NSString'
- ERROR | xcodebuild:  /Functions/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator15.2.sdk/System/Library/Frameworks/Basis.framework/Headers/NSObject.h:10:1: error: anticipated unqualified-id
- NOTE  | xcodebuild:  deadly error: too many errors emitted, stopping now [-ferror-limit=]

The error originates from the VuforiaWrapper.h file which accommodates this line:

#import <Basis/Basis.h>

Questions

Is there any answer to incorporate these settings within the CocoaPods workspace manually (like I’ve carried out with a brand new undertaking promenade scratch with out CocoaPods)?

If not, tips on how to correctly configure the podspec to realize the identical?

Is there some other / higher strategy?

Notice: I am on the lookout for the best answer however be at liberty to counsel extra sturdy strategies for the longer term. Additionally, I am not planning to publish this pod, I simply wish to make it work one way or the other with my undertaking

Xcode model: 13.2.1

OS: macOS Massive Sur 11.6.3

[ad_2]

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments