OneSignal / OneSignal-Cordova-SDK

OneSignal is a free push notification service for mobile apps. This plugin makes it easy to integrate your Ionic, PhoneGap CLI, PhoneGap Build, Cordova, or Sencha Touch app with OneSignal. Supports Android, iOS, and Amazon's Fire OS platforms. https://onesignal.com
Other
251 stars 197 forks source link

[Bug]: cant install on ios due to podspec #906

Closed Slavrix closed 11 months ago

Slavrix commented 1 year ago

What happened?

couldn't install due to podspec .

Steps to reproduce?

add platform for android and ios

followed instructions on https://documentation.onesignal.com/docs/ionic-sdk-setup
used install cmd
ionic cordova plugin add onesignal-cordova-plugin@^5.0.0-beta-02

i followed instructions on previous closed tickets for updating cocopods etc, but that didnt make any difference.

What did you expect to happen?

able to install on ios

OneSignal Cordova SDK version

5.0.0-beta-02

Which platform(s) are affected?

Relevant log output

Ionic:

   Ionic CLI                     : 7.1.1 (/usr/local/lib/node_modules/@ionic/cli)
   Ionic Framework               : @ionic/angular 6.0.1
   @angular-devkit/build-angular : 12.2.11
   @angular-devkit/schematics    : 12.2.11
   @angular/cli                  : 12.2.11
   @ionic/angular-toolkit        : 5.0.3

Cordova:

   Cordova CLI       : 12.0.0 (cordova-lib@12.0.1)
   Cordova Platforms : android 12.0.1, ios 7.0.0
   Cordova Plugins   : cordova-plugin-ionic-keyboard 2.2.0, cordova-plugin-ionic-webview 4.1.3, (and 19 other plugins)

Utility:

   cordova-res                          : 0.15.4
   native-run (update available: 1.7.2) : 1.6.0

System:

   ios-deploy : 1.11.4
   ios-sim    : 8.0.2
   NodeJS     : v16.20.0 (/usr/local/bin/node)
   npm        : 8.19.3
   OS         : macOS Unknown
   Xcode      : Xcode 14.3.1 Build version 14E300c

ionic cordova plugin add onesignal-cordova-plugin@^5.0.0-beta-02
> cordova plugin add onesignal-cordova-plugin@^5.0.0-beta-02
Plugin "onesignal-cordova-plugin" already installed on android.
Installing "onesignal-cordova-plugin" for ios
apple-xcode version check failed (/Users/slavrix/Desktop/namadgi/clubezy-meteor/apps/clubezy-members/platforms/ios/cordova/apple_xcode_version), continuing anyways.
apple-ios version check failed (/Users/slavrix/Desktop/namadgi/clubezy-meteor/apps/clubezy-members/platforms/ios/cordova/apple_ios_version), continuing anyways.
Error during processing of action! Attempting to revert...
Failed to install 'onesignal-cordova-plugin': Error [ERR_UNHANDLED_ERROR]: Uh oh!
Unhandled error. ('"framework" tag with type "podspec" is no longer supported. Please use the "podspec" tag.')
    at new NodeError (node:internal/errors:387:5)
    at CordovaEventEmitter.emit (node:events:502:17)
    at CordovaEventEmitter.emit (/usr/local/lib/node_modules/cordova/node_modules/cordova-common/src/events.js:69:22)
    at install (/Users/slavrix/Desktop/namadgi/clubezy-meteor/apps/clubezy-members/node_modules/cordova-ios/lib/plugman/pluginHandlers.js:100:32)
    at ActionStack.process (/Users/slavrix/Desktop/namadgi/clubezy-meteor/apps/clubezy-members/node_modules/cordova-common/src/ActionStack.js:55:25)
    at PluginManager.doOperation (/Users/slavrix/Desktop/namadgi/clubezy-meteor/apps/clubezy-members/node_modules/cordova-common/src/PluginManager.js:111:24)
    at PluginManager.addPlugin (/Users/slavrix/Desktop/namadgi/clubezy-meteor/apps/clubezy-members/node_modules/cordova-common/src/PluginManager.js:141:21)
    at Api.addPlugin (/Users/slavrix/Desktop/namadgi/clubezy-meteor/apps/clubezy-members/node_modules/cordova-ios/lib/Api.js:258:14)
    at handleInstall (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/install.js:561:10)
    at /usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/install.js:344:28
Uh oh!
Unhandled error. ('"framework" tag with type "podspec" is no longer supported. Please use the "podspec" tag.')

Code of Conduct

boxbox-technologies commented 1 year ago

@Slavrix fix is in the migrations.md file

iOS

Notification Service Extension Changes

In your Project Root > ios > Podfile, update the notification service extension:

    // 3.x.x
    target 'OneSignalNotificationServiceExtension' do
      pod 'OneSignalXCFramework', '>= 3.0', '< 4.0'
    end

    // 5.x.x
    target 'OneSignalNotificationServiceExtension' do
      pod 'OneSignalXCFramework', '>= 5.0', '< 6.0'
    end

Close Xcode. While still in the ios directory, run pod install --repo-update.