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

Support Expo version ^50 #49

Open
githubjeka opened this issue Oct 14, 2024 · 2 comments
Open

Support Expo version ^50 #49

githubjeka opened this issue Oct 14, 2024 · 2 comments

Comments

@githubjeka
Copy link

githubjeka commented Oct 14, 2024

Expo 50.0.21

Any command for eas cli (version eas-cli/12.5.2)

throws error

(0 , config_plugins_1.withPodfile) is not a function

in node_modules/@bacons/apple-targets/build/withPodTargetExtension.js:22

Content withPodTargetExtension.js

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.withPodTargetExtension = void 0;
const generateCode_1 = require("@expo/config-plugins/build/utils/generateCode");
const config_plugins_1 = require("expo/config-plugins");
// TODO: This won't always match the correct target name. Need to pull the same algo in.
const extension = `# Dynamic loading of target configurations
Dir.glob(File.join(__dir__, '..', 'targets', '**', 'pods.rb')).each do |target_file|
  target_name = File.basename(File.dirname(target_file))
  target target_name do
    # Create a new binding with access to necessary methods and variables
    target_binding = binding
    target_binding.local_variable_set(:podfile_properties, podfile_properties)
    target_binding.local_variable_set(:config, use_native_modules!)

    # Evaluate the target file content in the new binding
    eval(File.read(target_file), target_binding, target_file)
  end
end
`;
/** Inject a helper which matches `pods.rb` files in the target root directory and invokes it as a way to extend the Podfile. */
const withPodTargetExtension = (config) => (0, config_plugins_1.withPodfile)(config, (config) => {
    config.modResults.contents = (0, generateCode_1.mergeContents)({
        tag: "apple-targets-extension-loader",
        src: config.modResults.contents,
        newSrc: extension,
        // Add at the end of the file.
        anchor: /Pod::UI\.warn e/,
        offset: 4,
        comment: "#",
    }).contents;
    return config;
});
exports.withPodTargetExtension = withPodTargetExtension;

Can you fix it for Expo 50 ?

P.S.

On version 0.0.5 all works success.

@Kota-Ueshima
Copy link

Were you able to fix this? Running into the same issue.

@githubjeka
Copy link
Author

No

Fixed in package.json

"@bacons/apple-targets": "0.0.5"

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

2 participants