Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

can't get AnyCodable to work #225

Open
johndpope opened this issue Sep 3, 2022 · 0 comments
Open

can't get AnyCodable to work #225

johndpope opened this issue Sep 3, 2022 · 0 comments

Comments

@johndpope
Copy link
Contributor

johndpope commented Sep 3, 2022

I try this
https://github.com/wweevv-johndpope/MinimalBazelFrameworkDemo

Podfile

pod install

project 'MinimalBazelFrameworkDemo.xcodeproj'
target 'MinimalBazelFrameworkDemo' do
pod "AnyCodable"
end

Pods.WORKSPACE

new_pod_repository(
  name = "AnyCodable",
  podspec_url = "https://github.com/Flight-School/AnyCodable/blob/master/AnyCodable-FlightSchool.podspec",
  url = "https://github.com/Flight-School/AnyCodable/archive/refs/tags/0.6.5.zip",
  is_dynamic_framework = True,  # AmazonIVSPlayer is dynamic XCFramework
  is_xcframework = True
)

fails

this isn't json extension - how do I get it to transform?


new_pod_repository(
  name = "AnyCodable",
  podspec_url = "Vendor/AnyCodable/AnyCodable-0.6.5/AnyCodable-FlightSchool.podspec",
  url = "https://github.com/Flight-School/AnyCodable/archive/refs/tags/0.6.5.zip",
  is_dynamic_framework = True,  # AmazonIVSPlayer is dynamic XCFramework
  is_xcframework = True
)

I attempt to extract podspec to json and feed it in
shell pod ipc spec /Users/johndpope/Documents/gitWorkspace/MinimalBazelFrameworkDemo/Vendor/AnyCodable/AnyCodable-0.6.5/AnyCodable-FlightSchool.podspec > test.json

no joy

test.json

{
  "name": "AnyCodable-FlightSchool",
  "module_name": "AnyCodable",
  "version": "0.6.5",
  "summary": "Type-erased wrappers for Encodable, Decodable, and Codable values.",
  "description": "This functionality is discussed in Chapter 3 of Flight School Guide to Swift Codable.",
  "homepage": "https://flight.school/books/codable/",
  "license": {
    "type": "MIT",
    "file": "LICENSE.md"
  },
  "authors": {
    "Mattt": "[email protected]"
  },
  "social_media_url": "https://twitter.com/mattt",
  "frameworks": "Foundation",
  "platforms": {
    "ios": "9.0",
    "osx": "10.10",
    "watchos": "2.0",
    "tvos": "9.0"
  },
  "source": {
    "git": "https://github.com/Flight-School/AnyCodable.git",
    "tag": "0.6.5"
  },
  "source_files": "Sources/**/*.swift",
  "swift_versions": "5.1",
  "swift_version": "5.1"
}
new_pod_repository(
  name = "AnyCodable",
  podspec_url = "/test.json",
  url = "https://github.com/Flight-School/AnyCodable/archive/refs/tags/0.6.5.zip",
  is_dynamic_framework = True,  
  is_xcframework = True
)

Screen Shot 2022-09-03 at 11 07 55 pm

I fork repo - rename the podspec file
create a release
-publish
then specify this repo

new_pod_repository(
  name = "AnyCodable",
  url = "https://github.com/johndpope/AnyCodable/archive/refs/tags/1.0.1.zip",
  is_dynamic_framework = True,  # AmazonIVSPlayer is dynamic XCFramework
  is_xcframework = True
)

I can see the files correctly checkout
Screen Shot 2022-09-03 at 11 18 48 pm

why????
Screen Shot 2022-09-03 at 11 19 23 pm

I put the podspec in the root of repo - doesn't help - same error.

Screen Shot 2022-09-03 at 11 22 09 pm

I also altered the podspec contents to make sure the source is pointing to new repo - still not working...
https://github.com/johndpope/AnyCodable/blob/master/AnyCodable.podspec#L26

fyi

http_archive(
    name = "rules_pods",
    urls = ["https://github.com/pinterest/PodToBUILD/releases/download/4.1.0-412495/PodToBUILD.zip"],
)
# Load the new_pod_repository macro - needed for `WORKSPACE` usage
load("@rules_pods//BazelExtensions:workspace.bzl", "new_pod_repository")
@johndpope johndpope reopened this Sep 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant