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

How do source code and cache coexist? #123

Open
rgmyyw opened this issue Nov 23, 2023 · 1 comment
Open

How do source code and cache coexist? #123

rgmyyw opened this issue Nov 23, 2023 · 1 comment

Comments

@rgmyyw
Copy link

rgmyyw commented Nov 23, 2023

Issue Description

Command executed

bundle exec pod binary prebuild

Stack trace

$ bundle exec pod binary prebuild
❯❯❯ Step: Fetching cache
Fetching cache from [email protected]:ios/cache-repo.git (branch: master)
From 192.168.0.186:ios/cache-repo
 * branch            master     -> FETCH_HEAD
Switched to a new branch 'master'
Unzipping cache: /Users/user/.cocoapods-binary-cache/prebuilt-frameworks-debug-config -> _Prebuild
❯❯❯ Step: Installation
-----------------------------------------
🚀  Prebuild frameworks
-----------------------------------------

Detect implicit dependencies
Exclude pods with empty source files: []

Validate prebuilt cache
Cache validation: hit (1) ["MJExtension"]

Prebuilding...
Installing MJExtension (3.4.1)
Installing WKWebViewJavascriptBridge (1.2.2)
Prebuild frameworks (total 1): ["MJExtension"]
          $ xcodebuild -project /Users/user/Desktop/BinaryDemo/_Prebuild/Pods.xcodeproj -target MJExtension -configuration Debug -sdk iphonesimulator
          -destination "generic/platform=iOS Simulator" ARCHS=x86_64 ONLY_ACTIVE_ARCH=NO DEBUG_INFORMATION_FORMAT=dwarf BITCODE_GENERATION_MODE=bitcode build
          2>&1
          $ xcodebuild -project /Users/user/Desktop/BinaryDemo/_Prebuild/Pods.xcodeproj -target MJExtension -configuration Debug -sdk iphoneos -destination
          "generic/platform=iOS" ONLY_ACTIVE_ARCH=NO DEBUG_INFORMATION_FORMAT=dwarf BITCODE_GENERATION_MODE=bitcode build 2>&1
- Create xcframework: MJExtension
          $ xcodebuild -create-xcframework -allow-internal-distribution -framework
          /Users/user/Desktop/BinaryDemo/build/Debug-iphonesimulator/MJExtension/MJExtension.framework -framework
          /Users/user/Desktop/BinaryDemo/build/Debug-iphoneos/MJExtension/MJExtension.framework -output
          /Users/user/Desktop/BinaryDemo/_Prebuild/GeneratedFrameworks/MJExtension/MJExtension.xcframework
Pod installation complete! There are 2 dependencies from the Podfile and 2 total pods installed.
-----------------------------------------
🤖  Resume pod installation
-----------------------------------------
Installing MJExtension (3.4.1)

[!] Please close any current Xcode sessions and use `BinaryDemo.xcworkspace` for this project from now on.

Diagnosing cocoapods-binary-cache
Pod installation complete! There are 2 dependencies from the Podfile and 2 total pods installed.
❯❯❯ Step: Syncing cache
- Update cache: MJExtension

[!] Your project does not explicitly specify the CocoaPods master specs repo. Since CDN is now used as the default, you may safely remove it from your repos directory via `pod repo remove master`. To suppress this warning please add `warn_for_unused_master_specs_repo => false` to your Podfile.

[!] Your project does not explicitly specify the CocoaPods master specs repo. Since CDN is now used as the default, you may safely remove it from your repos directory via `pod repo remove master`. To suppress this warning please add `warn_for_unused_master_specs_repo => false` to your Podfile.

Plugin version

gem "cocoapods-binary-cache", :git => "https://github.com/grab/cocoapods-binary-cache.git", :ref => "f856309"
gem "cocoapods", "1.14.3"

Podfile

source 'https://cdn.cocoapods.org/'

platform :ios, '13.0'
plugin "cocoapods-binary-cache"

use_frameworks!
install! 'cocoapods', :disable_input_output_paths => true


config_cocoapods_binary_cache(
  prebuild_config: "Debug",
  dev_pods_enabled: false,
  disable_dsym: "true",
  xcframework: "true",
  prebuild_all_pods: true,
  bitcode_enabled: true,
  device_build_enabled: true,
  cache_repo: {
    "default" => {
      "remote" => "[email protected]:ios/cache-repo.git",
      "local" => "~/.cocoapods-binary-cache/prebuilt-frameworks-debug-config"
    }
  }
)

target 'BinaryDemo' do
  # Comment the next line if you don't want to use dynamic frameworks
  
  pod 'WKWebViewJavascriptBridge', '1.2.2', :binary => false
  pod 'MJExtension', :binary => true
	
  # Pods for BinaryDemo

end

post_install do |installer|
    installer.pods_project.targets.each do |target|
        target.build_configurations.each do |config|
            config.build_settings['GCC_WARN_INHIBIT_ALL_WARNINGS'] = "YES"
            config.build_settings['SWIFT_VERSION'] = '5.0'
        end
    end
end

截屏2023-11-23 上午11 33 27

@rgmyyw
Copy link
Author

rgmyyw commented Nov 27, 2023

No problem

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