私は本当に私を夢中にさせている問題でいくつかの助けが必要です...
それはデバイス上でアプリを実行することであり(問題はシミュレーターに表示されないため)、このWebサイトに沿ってすべての解決策を読んで試しても、解決方法がわかりません。
アプリを実行すると、起動中にフリーズし、次のメッセージがデバッグ領域に表示されます。
dyld: Library not loaded: @rpath/GoogleUtilities.framework/GoogleUtilities
Referenced from: /private/var/containers/Bundle/Application/2C9EB539-D6BA-4291-A62C-4C3A438483CF/SmiliPRO.app/SmiliPRO
Reason: no suitable image found. Did find:
/private/var/containers/Bundle/Application/2C9EB539-D6BA-4291-A62C-4C3A438483CF/SmiliPRO.app/Frameworks/GoogleUtilities.framework/GoogleUtilities: code signature invalid for '/private/var/containers/Bundle/Application/2C9EB539-D6BA-4291-A62C-4C3A438483CF/SmiliPRO.app/Frameworks/GoogleUtilities.framework/GoogleUtilities'
/private/var/containers/Bundle/Application/2C9EB539-D6BA-4291-A62C-4C3A438483CF/SmiliPRO.app/Frameworks/GoogleUtilities.framework/GoogleUtilities: stat() failed with errno=25
/private/var/containers/Bundle/Application/2C9EB539-D6BA-4291-A62C-4C3A438483CF/SmiliPRO.app/Frameworks/GoogleUtilities.framework/GoogleUtilities: code signature invalid for '/private/var/containers/Bundle/Application/2C9EB539-D6BA-4291-A62C-4C3A438483CF/SmiliPRO.app/Frameworks/GoogleUtilities.framework/GoogleUtilities'
/private/var/containers/Bundle/Application/2C9EB539-D6BA-4291-A62C-4C3A438483CF/SmiliPRO.app/Frameworks/GoogleUtilities.framework/GoogleUtilities: stat() failed with errno=1
/private/var/containers/Bundle/Application/2C9EB539-D6BA-4291-A62C-4C3A438483CF/SmiliPRO.app/Frameworks/GoogleUtilities.framework/GoogleUtilities: code signature invalid for '/private/var/containers/Bundle/Application/2C9EB539-D6BA-4291-A62C-4C3A438483CF/SmiliPRO.app/Frameworks/GoogleUtilities.framework/GoogleUtilities'
/private/var/containers/Bundle/Application/2C9EB539-D6BA-4291-A62C-4C3A438483CF/SmiliPRO.app/Frameworks/GoogleUtilities.framework/GoogleUtilities: stat() failed with errno=1
(lldb)
次に、メイン画面に次のように表示されます。
この:
Xcode11.3.1を使用しています
フレームワークの追加方法については、Cocoapods1.8.4を使用していました。これがGoogleに関する私のPodfileです:
target 'SmiliPRO' do
# Comment the next line if you don't want to use dynamic frameworks
use_frameworks!
pod 'Google-Mobile-Ads-SDK'
次に、Google forAdsの使用方法は次のとおりです。
import UIKit
import GoogleMobileAds
class ViewController: UIViewController,
GADBannerViewDelegate {
@IBOutlet weak var bannerView: GADBannerView!
override func viewDidLoad() {
super.viewDidLoad()
//AdMob del Banner
bannerView.adUnitID = "ca-app-pub-3940256099942544/2934735716"
bannerView.delegate = self
bannerView.rootViewController = self
bannerView.load(GADRequest())
}
Concerning the Embedded Binaries, I only have this option where it should be:
If I add here GoogleUtilities.framework, the next error appears during building...
Multiple commands produce '/Users/nachoimac/Library/Developer/Xcode/DerivedData/SmiliPRO-dscwzgjxgxtpzsbkzznkjquojuhz/Build/Products/Debug-iphoneos/SmiliPRO.app/Frameworks/GoogleUtilities.framework':
1) Target 'SmiliPRO' has copy command from '/Users/nachoimac/Library/Developer/Xcode/DerivedData/SmiliPRO-dscwzgjxgxtpzsbkzznkjquojuhz/Build/Products/Debug-iphoneos/GoogleUtilities.framework' to '/Users/nachoimac/Library/Developer/Xcode/DerivedData/SmiliPRO-dscwzgjxgxtpzsbkzznkjquojuhz/Build/Products/Debug-iphoneos/SmiliPRO.app/Frameworks/GoogleUtilities.framework'
2) That command depends on command in Target 'SmiliPRO': script phase “[CP] Embed Pods Frameworks”
I've also tried to comment out use_frameworks into Podfile, a new error appears:
/Users/nachoimac/Library/Developer/Xcode/DerivedData/SmiliPRO-dscwzgjxgxtpzsbkzznkjquojuhz/Build/Products/Debug-iphoneos/Pods_SmiliPRO.framework: No such file or directory
I don't know if the key is that in the original error message appear something like "code signature invalid for", could this be?
Thank you in advance!
I had this problem when running on the simulator, but not on my device. The problem is that CylanceProtect antivirus software on my MacBook was blocking the GoogleUtilities file:
I contacted my company's security expert and he added a waiver to the policy so that this file is no longer quarantined. Now the app runs fine on the simulator.
デバイスでCylanceProtectまたはその他のウイルス対策ソフトウェアが実行されているかどうかを確認できます。この問題の原因を見つけるのに3日かかりました。
この記事はインターネットから収集されたものであり、転載の際にはソースを示してください。
侵害の場合は、連絡してください[email protected]
コメントを追加