1
1

More than 5 years have passed since last update.

PhoneGapで実機にビルドすると " "_OBJC_CLASS_$_CDVWebViewDelegate" のエラーが出る。

Posted at

問題

Cordova(PhoneGap)で作ったアプリを実機でビルドしようとすると、動かなかった。シミュレータでは起動していたのに…。

ログを見ると、


...

 "_OBJC_CLASS_$_CDVWebViewDelegate", referenced from:
      objc-class-ref in CDVInAppBrowser.o
  "_OBJC_METACLASS_$_CDVViewController", referenced from:
      _OBJC_METACLASS_$_MainViewController in MainViewController.o
  "_OBJC_CLASS_$_CDVPlugin", referenced from:
      _OBJC_CLASS_$_CDVDevice in CDVDevice.o
      _OBJC_CLASS_$_CDVConnection in CDVConnection.o
      _OBJC_CLASS_$_LowLatencyAudio in LowLatencyAudio.o
      _OBJC_CLASS_$_CDVLogger in CDVLogger.o
      _OBJC_CLASS_$_CDVInAppBrowser in CDVInAppBrowser.o
      _OBJC_CLASS_$_InAppPurchase in InAppPurchase.o
  "_OBJC_METACLASS_$_CDVPlugin", referenced from:
      _OBJC_METACLASS_$_CDVDevice in CDVDev

...

みたいなのがズラーッと出た。

解決

http://stackoverflow.com/a/22497592 この回答の通りに行った。

  1. 対象のプロジェクトのTargetsの中にあるBuild Settingsに移動

  2. Valid Architecturesの中身を確認。

  3. armv64の記述を削除

  4. armv7armv7sの2つが残っているのを確認。

  5. その後ビルドし直すと解決する。

どうもXcodeのアップデートで、arm64というアーキテクチャがアップデートされていないのが問題らしい。

参考

ios - xcode 5 and phonegap: linker errors on building for device but not for simulator - Stack Overflow

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1