Getting Issue while run pod-install


#1

I am getting error while install pod-install in ejected app

[!] An error occurred while processing the post-install hook of the Podfile.

undefined method `native_target’ for <Pod::PodTarget name=Amplitude-iOS >:Pod::PodTarget

/Users/mac/Desktop/hisablyios/ios/Podfile:137:in `block (4 levels) in from_ruby’

/Users/mac/Desktop/hisablyios/ios/Podfile:121:in `each’

/Users/mac/Desktop/hisablyios/ios/Podfile:121:in `block (3 levels) in from_ruby’

/Library/Ruby/Gems/2.3.0/gems/cocoapods-core-1.6.0/lib/cocoapods-core/podfile.rb:179:in `post_install!’

/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.6.0/lib/cocoapods/installer.rb:701:in `run_podfile_post_install_hook’

/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.6.0/lib/cocoapods/installer.rb:689:in `block in run_podfile_post_install_hooks’

/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.6.0/lib/cocoapods/user_interface.rb:145:in `message’

/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.6.0/lib/cocoapods/installer.rb:688:in `run_podfile_post_install_hooks’

/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.6.0/lib/cocoapods/installer.rb:211:in `block in generate_pods_project’

/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.6.0/lib/cocoapods/user_interface.rb:64:in `section’

/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.6.0/lib/cocoapods/installer.rb:208:in `generate_pods_project’

/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.6.0/lib/cocoapods/installer.rb:139:in `install!’

/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.6.0/lib/cocoapods/command/install.rb:48:in `run’

/Library/Ruby/Gems/2.3.0/gems/claide-1.0.2/lib/claide/command.rb:334:in `run’

/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.6.0/lib/cocoapods/command.rb:52:in `run’

/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.6.0/bin/pod:55:in `<top (required)>’

/usr/local/bin/pod:22:in `load’

/usr/local/bin/pod:22:in `<main>’


#2

Hey @ashishtaskme,

What version of the SDK and expokit are you running that you get this error? Also, could you try running pod repo-update as well and see if that helps?

Cheers,
Adam


#3

Hello @adamjnav I have same problem, I tried pod repo update

Installing yoga (0.57.1.React)

Generating Pods project

[!] An error occurred while processing the post-install hook of the Podfile.

undefined method `native_target' for &lt;Pod::PodTarget name=Amplitude-iOS &gt;:Pod::PodTarget

/Users/nikolamarjanovic/Project/typescript/mobileApp/ios/Podfile:137:in `block (4 levels) in from_ruby'

/Users/nikolamarjanovic/Project/typescript/mobileApp/ios/Podfile:121:in `each'

/Users/nikolamarjanovic/Project/typescript/mobileApp/ios/Podfile:121:in `block (3 levels) in from_ruby'

/Library/Ruby/Gems/2.3.0/gems/cocoapods-core-1.6.0/lib/cocoapods-core/podfile.rb:179:in `post_install!'

/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.6.0/lib/cocoapods/installer.rb:701:in `run_podfile_post_install_hook'

/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.6.0/lib/cocoapods/installer.rb:689:in `block in run_podfile_post_install_hooks'

/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.6.0/lib/cocoapods/user_interface.rb:145:in `message'

/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.6.0/lib/cocoapods/installer.rb:688:in `run_podfile_post_install_hooks'

/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.6.0/lib/cocoapods/installer.rb:211:in `block in generate_pods_project'

/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.6.0/lib/cocoapods/user_interface.rb:64:in `section'

/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.6.0/lib/cocoapods/installer.rb:208:in `generate_pods_project'

/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.6.0/lib/cocoapods/installer.rb:139:in `install!'

/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.6.0/lib/cocoapods/command/update.rb:97:in `run'

/Library/Ruby/Gems/2.3.0/gems/claide-1.0.2/lib/claide/command.rb:334:in `run'

/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.6.0/lib/cocoapods/command.rb:52:in `run'

/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.6.0/bin/pod:55:in `&lt;top (required)&gt;'

/usr/local/bin/pod:22:in `load'

/usr/local/bin/pod:22:in `&lt;main&gt;'

#4

Downgrading CocoaPods to 1.53 worked for me :slight_smile:


#5

Thanks for sharing that @inploi! @ashishtaskme can you see if doing so fixes it for you as well?


#6

I also had the same problem and just fixed it by downgrading Cocoapods to 1.5.3


#7

I have the same problem and fixed it with Cocoapods 1.6.0, by changing
any string after target.pod_name from PascalCase to lowercase example.

From

target.pod_name == 'ExpoKit'

to

target.pod_name == 'expokit'

AND

change the array of PascalCase strings to

["amplitude-ios", "analytics", "appauth", "branch", "cocoalumberjack", "fbsdkcorekit", "fbsdkloginkit", "fbsdksharekit", "gpuimage", "jkbiginteger2"].include? target.pod_name