OneSignal / OneSignal-iOS-SDK

OneSignal is a free push notification service for mobile apps. This plugin makes it easy to integrate your native iOS app with OneSignal. https://onesignal.com
Other
494 stars 262 forks source link

Ver 3.11.0+ seems not to be SemVer compliant #1088

Closed tomacco closed 2 years ago

tomacco commented 2 years ago

Description:

Our iOS project references the iOS OneSignal SDK through Swift Package Manager. The configuration was any version from 3.0.0 and below 4.0.0, meaning that project will have always the latest version and we do not need to revisit the integration. Our pipelines started failing today. We found that Xcode was pulling the latest version (3.11.1) which should be compatible with the current integration, however the integration had changed and we had to make some changes in order to make it work. It can be argued whether or no integration changes = API changes. From our point of view and from the Swift Package Manager configuration point of view, if the integration changes and it is not compatible with the previous version, the SDK SemVer MAJOR should reflect that integration change by being increased to 4.

Environment

Swift Package Manager with default config

Screenshot 2022-05-18 at 15 38 59

Steps to Reproduce Issue:

  1. Integrate OneSignal with Swift Package Manager, following the instructions in the docs when the latest version is not 3.11.X, and the default SPM config as shown in the image above.
  2. Wait until version 3.11.0 is released and let Xcode to update dependencies

Anything else:

(crash stacktraces, as well as any other information here)

xcrun "altool" "--upload-app" "-f" "/Users/vagrant/deploy/REDACTED.ipa" "--type" "ios" "--apiKey" "REDACTED" "--apiIssuer" "REDACTED"
*** Error: Error uploading '/Users/vagrant/deploy/REDACTED.ipa'.
*** Error: CFBundleIdentifier Collision. There is more than one bundle with the CFBundleIdentifier value 'com.onesignal.OneSignalCore' under the iOS application 'REDACTED.app'. With error code STATE_ERROR.VALIDATION_ERROR.90685 for id REDACTED Asset validation failed (-19208)
 {
    NSLocalizedDescription = "CFBundleIdentifier Collision. There is more than one bundle with the CFBundleIdentifier value 'com.onesignal.OneSignalCore' under the iOS application 'REDACTED'. With error code STATE_ERROR.VALIDATION_ERROR.90685 for id REDACTED";
    NSLocalizedFailureReason = "Asset validation failed";
}
tomacco commented 2 years ago

Please note, we are not asking for support or help, we fixed the version in SPM to 3.10.3 as we cannot longer trust future versions will be retro compatible with our integration.

emawby commented 2 years ago

@tomacco Thank you for reaching out. Could you please elaborate on what issue you received when implementing 3.11.1. In our testing this was never a breaking change for Swift Package Manager when following these instructions Also could you please share which libraries you are adding to each target?