Coder Social home page Coder Social logo

Comments (5)

stevecarlton avatar stevecarlton commented on May 27, 2024

+1 for breaking our iOS builds.

@scottholdren do you mind clarifying where you added this? I tried adding at the bottom of /ios/App/Podfile by got an error when running ionic cap sync:

[!] CocoaPods could not find compatible versions for pod "Branch":
  In Podfile:
    Branch (= 1.38.0)

Edit: I did the following below and unfortunately still got the build error ld: framework not found AdServices

  1. Added pod 'Branch', '1.38.0' in the target 'App' do section of /ios/App/Podfile
  2. Went to /ios/App in terminal and ran pod install --repo-update

from capacitor-branch-deep-links.

scottholdren avatar scottholdren commented on May 27, 2024

I am appending it to /ios/App/Podfile, followed by some stuff to fix bitcode errors.

I am running

pod repo update
ionic capacitor add ios
cat build_resources/Podfile.extras >> ios/App/Podfile

in that order every time.

build_resources/Podfile.extras

pod 'Branch', '1.38.0'

def disable_bitcode_for_target(target)
    target.build_configurations.each do |config|
      config.build_settings['ENABLE_BITCODE'] = 'NO'

      remove_cflags_matching(config.build_settings, ['-fembed-bitcode', '-fembed-bitcode-marker'])
    end
end

def remove_cflags_matching(build_settings, cflags)
  existing_cflags = build_settings['OTHER_CFLAGS']

  removed_cflags = []
  if !existing_cflags.nil?
    cflags.each do |cflag|
      existing_cflags.delete_if { |existing_cflag| existing_cflag == cflag && removed_cflags << cflag }
    end
  end

  if removed_cflags.length > 0
    build_settings['OTHER_CFLAGS'] = existing_cflags
  end
end

post_install do |installer|
  project_name = Dir.glob("*.xcodeproj").first
  project = Xcodeproj::Project.open(project_name)
  project.targets.each do |target|
    disable_bitcode_for_target(target)
  end
  project.save

  installer.pods_project.targets.each do |target|
    disable_bitcode_for_target(target)
  end

  installer.pods_project.save
end

from capacitor-branch-deep-links.

stevecarlton avatar stevecarlton commented on May 27, 2024

I am appending it to /ios/App/Podfile, followed by some stuff to fix bitcode errors.

I am running

pod repo update
ionic capacitor add ios
cat build_resources/Podfile.extras >> ios/App/Podfile

in that order every time.

build_resources/Podfile.extras

pod 'Branch', '1.38.0'

def disable_bitcode_for_target(target)
    target.build_configurations.each do |config|
      config.build_settings['ENABLE_BITCODE'] = 'NO'

      remove_cflags_matching(config.build_settings, ['-fembed-bitcode', '-fembed-bitcode-marker'])
    end
end

def remove_cflags_matching(build_settings, cflags)
  existing_cflags = build_settings['OTHER_CFLAGS']

  removed_cflags = []
  if !existing_cflags.nil?
    cflags.each do |cflag|
      existing_cflags.delete_if { |existing_cflag| existing_cflag == cflag && removed_cflags << cflag }
    end
  end

  if removed_cflags.length > 0
    build_settings['OTHER_CFLAGS'] = existing_cflags
  end
end

post_install do |installer|
  project_name = Dir.glob("*.xcodeproj").first
  project = Xcodeproj::Project.open(project_name)
  project.targets.each do |target|
    disable_bitcode_for_target(target)
  end
  project.save

  installer.pods_project.targets.each do |target|
    disable_bitcode_for_target(target)
  end

  installer.pods_project.save
end

Thank you, I'll give this a shot!

from capacitor-branch-deep-links.

nbiles avatar nbiles commented on May 27, 2024

Having the same issue still.

from capacitor-branch-deep-links.

KirstenStake avatar KirstenStake commented on May 27, 2024

same issue. has anyone got this working with pod 'Branch', '1.39.4' ?

from capacitor-branch-deep-links.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.