admob-plus / admob-plus

Trustable AdMob Plugin for Cordova, Capacitor, Ionic, React Native
https://admob-plus.github.io
MIT License
365 stars 150 forks source link

Can't build iOS app #107

Closed svzi closed 5 years ago

svzi commented 5 years ago

Is this a bug report?

Yes.

Environment


  AdMob Plus Environment Info:
    System:
      OS: macOS 10.14.5
      CPU: (4) x64 Intel(R) Core(TM) i5-4288U CPU @ 2.60GHz
      Memory: 2.72 GB / 16.00 GB
      Shell: 3.2.57 - /bin/bash
    Binaries:
      Node: 8.11.3 - /usr/local/bin/node
      Yarn: 1.17.0 - /usr/local/bin/yarn
      npm: 5.6.0 - /usr/local/bin/npm
    SDKs:
      iOS SDK:
        Platforms: iOS 12.2, macOS 10.14, tvOS 12.2, watchOS 5.2
      Android SDK:
        API Levels: 26, 27, 28
        Build Tools: 26.0.2, 27.0.3, 28.0.3, 29.0.0
    IDEs:
      Android Studio: 3.1 AI-173.4720617
      Xcode: 10.2.1/10E1001 - /usr/bin/xcodebuild
    Languages:
      Java: 1.8.0_172 - /usr/bin/javac
    npmPackages:
      cordova-admob-plus: ^0.30.0 => 0.30.0 
      cordova-android: 8.0.0 => 8.0.0 
      cordova-clipboard: ^1.2.1 => 1.2.1 
      cordova-ios: 5.0.1 => 5.0.1 
      cordova-ios-plugin-no-export-compliance: 0.0.5 => 0.0.5 
      cordova-plugin-androidx: ^1.0.2 => 1.0.2 
      cordova-plugin-androidx-adapter: ^1.1.0 => 1.1.0 
      cordova-plugin-app-version: ^0.1.9 => 0.1.9 
      cordova-plugin-appavailability: ^0.4.2 => 0.4.2 
      cordova-plugin-apprate: ^1.4.0 => 1.4.0 
      cordova-plugin-browsertab: ^0.2.0 => 0.2.0 
      cordova-plugin-device: ^2.0.2 => 2.0.2 
      cordova-plugin-dialogs: ^2.0.1 => 2.0.1 
      cordova-plugin-email-composer: ^0.9.2 => 0.9.2 
      cordova-plugin-file: ^6.0.1 => 6.0.1 
      cordova-plugin-firebasex: ^3.0.1 => 3.0.1 
      cordova-plugin-globalization: ^1.11.0 => 1.11.0 
      cordova-plugin-ionic: ^5.3.0 => 5.3.0 
      cordova-plugin-ionic-keyboard: ^2.1.3 => 2.1.3 
      cordova-plugin-ionic-webview: ^4.1.0 => 4.1.0 
      cordova-plugin-network-information: ^2.0.1 => 2.0.1 
      cordova-plugin-purchase: ^8.1.1 => 8.1.1 
      cordova-plugin-splashscreen: ^5.0.2 => 5.0.2 
      cordova-plugin-statusbar: ^2.4.2 => 2.4.2 
      cordova-plugin-whitelist: ^1.3.3 => 1.3.3 
      cordova-plugin-x-socialsharing: ^5.4.6 => 5.4.6 
      cordova-plugin-x-toast: ^2.7.2 => 2.7.2 
    npmGlobalPackages:
      cordova: 8.1.2
      ionic: 5.0.2

Steps to Reproduce

cordova build ios --device --verbose

Expected Behavior

The app should build.

Actual Behavior

/Users/svzi/development/_own/DummyProject/app/platforms/ios/DummyProject/Bridging-Header.h:29:9: note: in file included from /Users/svzi/development/_own/DummyProject/app/platforms/ios/DummyProject/Bridging-Header.h:29:
#import "AMSPlugin-Bridging-Header.h"
        ^
/Users/svzi/development/_own/DummyProject/app/platforms/ios/DummyProject/Plugins/cordova-admob-plus/AMSPlugin-Bridging-Header.h:2:9: error: 'GoogleMobileAds/GoogleMobileAds.h' file not found
#import <GoogleMobileAds/GoogleMobileAds.h>
        ^
1 error generated.
<unknown>:0: error: failed to emit precompiled header '/Users/svzi/development/_own/DummyProject/app/platforms/ios/build/sharedpch/Bridging-Header-swift_1VCLJ47CZTDIE-clang_2U5TIMTCFSNOY.pch' for bridging header '/Users/svzi/development/_own/DummyProject/app/platforms/ios/DummyProject/Bridging-Header.h'

<unknown>:0: error: generate-pch command failed with exit code 1 (use -v to see invocation)
** ARCHIVE FAILED **

The following build commands failed:
    PrecompileSwiftBridgingHeader normal arm64
    CompileSwiftSources normal arm64 com.apple.xcode.tools.swift.compiler
(2 failures)
Command finished with error code 65: xcodebuild -workspace,DummyProject.xcworkspace,-scheme,DummyProject,-configuration,Debug,-destination,generic/platform=iOS,-archivePath,DummyProject.xcarchive,archive,CONFIGURATION_BUILD_DIR=/Users/svzi/development/_own/DummyProject/app/platforms/ios/build/device,SHARED_PRECOMPS_DIR=/Users/svzi/development/_own/DummyProject/app/platforms/ios/build/sharedpch
xcodebuild: Command failed with exit code 65
Error: xcodebuild: Command failed with exit code 65
    at ChildProcess.whenDone (/Users/svzi/development/_own/DummyProject/app/node_modules/cordova-common/src/superspawn.js:135:23)
    at emitTwo (events.js:126:13)
    at ChildProcess.emit (events.js:214:7)
    at maybeClose (internal/child_process.js:925:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
[ERROR] An error occurred while running subprocess cordova.

        cordova build ios --device --verbose exited with exit code 65.

Since upgrading cordova-admob-plus from version 0.22.1 to 0.30.0 and replacing ionic-admob(version 0.18.1) with @admob-plus/ionic(version 0.19.5), I can't build anymore for IOS.

Any help would be really much appreciated!

Best, Sven

svzi commented 5 years ago

Nevermind, my fault!

sksk008 commented 4 years ago

i have same issue can you help me for solving this?? what is the actual problem @svzi

svzi commented 4 years ago

@krunalsk007 Sorry, too much time has passed since then. I don't remember. All I can say is that I switched back to the old plugin from the same author. That worked like expected.

sksk008 commented 4 years ago

ok thanks @svzi for reply i solve this by following step sudo gem install cocoapods pod setup cordova platform remove ios cordova platform add ios pod install