urbanairship / ios-library

Urban Airship iOS SDK
http://urbanairship.com
Apache License 2.0
478 stars 265 forks source link

Adding Airship with Carthage using JSON binary is broken #381

Closed hassan-ioki closed 10 months ago

hassan-ioki commented 10 months ago

Preliminary Info

What Airship dependencies are you using?

Airship Core Version 17.3.1.

What are the versions of any relevant development tools you are using?

Xcode version 15.0

Report

What unexpected behavior are you seeing?

The JSON binary has some issues. It results in an error when I use it with Carthage.

What are the steps to reproduce the unexpected behavior?

Simply use carthage and add this to the Cartfile: binary "https://github.com/urbanairship/ios-library-prebuilt/blob/main/Carthage/Airship.json" It sadly results in an error.

Do you have logging for the issue?

The error is

Unable to parse binary-only framework JSON at https://github.com/urbanairship/ios-library-prebuilt/blob/main/Carthage/Airship.json due to error: invalid JSON: typeMismatch(Swift.String, Swift.DecodingError.Context(codingPath: [_JSONKey(stringValue: "payload", intValue: nil)], debugDescription: "Expected to decode String but found a dictionary instead.", underlyingError: nil))

I think the JSON is not setup correctly, can you please have a look? I also created a ticket on the repo where this file exists. If this is redundant, I can delete the issue there.

rlepinski commented 10 months ago

You need to use the rawfile version - https://raw.githubusercontent.com/urbanairship/ios-library-prebuilt/main/Carthage/Airship.json

Since you are using Xcode 15 you probably want this one - https://raw.githubusercontent.com/urbanairship/ios-library-prebuilt/xcode-15/Carthage/Airship.json

rlepinski commented 10 months ago

We need to have docs on this, ill get a ticket on our backlog for that.

hassan-ioki commented 10 months ago

Thank you for this and yes as we constantly keep an eye on this repo, it will really be helpful. Nothing more to do, I will close the ticket 👍