Skip to content

Podfile generation broken on livesync #3549

Closed
@vcooley

Description

@vcooley

Which platform(s) does your issue occur on?

iOS

Please provide the following version numbers that your issue occurs with:

  • CLI: 4.0.0
  • Cross-platform modules: 4.0.0
  • Runtime(s): 4.0.1
  • Plugin(s):
    "nativescript-advanced-webview": "^1.1.3",
    "nativescript-angular": "~5.3.0",
    "nativescript-async": "^1.0.2",
    "nativescript-bottombar": "^3.0.8",
    "nativescript-directions": "^1.2.0",
    "nativescript-drop-down": "^3.2.4",
    "nativescript-floatingactionbutton": "^3.0.0",
    "nativescript-geolocation": "^3.0.0",
    "nativescript-google-maps-sdk": "^2.6.0",
    "nativescript-gradient": "^2.0.1",
    "nativescript-input-mask": "^1.0.0",
    "nativescript-iqkeyboardmanager": "~1.1.0",
    "nativescript-ng-shadow": "^2.0.0",
    "nativescript-plugin-firebase": "^5.3.0",
    "nativescript-pro-ui": "^3.3.0",
    "nativescript-snackbar": "^2.0.0",
    "nativescript-theme-core": "^1.0.4",
    "nativescript-unit-test-runner": "^0.3.4",

Please tell us how to recreate the issue in as much detail as possible.

Running tns run ios --clean with this configuration produces a working build, however any changes made to the code cause the Podfile to be rebuilt in a way that causes a recursion error.

Here is my Podfile (from platforms/ios) after the initial build:

use_frameworks!

target "myproject" do
# Begin Podfile - /Users/vincecooley/Projects/myproject/node_modules/nativescript-bottombar/platforms/ios/Podfile 
 use_frameworks!
pod 'MiniTabBar', :git => 'https://github.com/rhanb/MiniTabBar.git'
def post_install1 (installer)
    installer.pods_project.targets.each do |target|
        target.build_configurations.each do |config|
            config.build_settings['SWIFT_VERSION'] = '3.0'
        end
    end
end 
 # End Podfile 
# Begin Podfile - /Users/vincecooley/Projects/myproject/node_modules/nativescript-floatingactionbutton/platforms/ios/Podfile 
 pod 'MNFloatingActionButton', '~> 0.1.5' 
 # End Podfile 
# Begin Podfile - /Users/vincecooley/Projects/myproject/node_modules/nativescript-google-maps-sdk/platforms/ios/Podfile 
 source 'https://github.com/CocoaPods/Specs.git'

pod 'GoogleMaps' 
 # End Podfile 
# Begin Podfile - /Users/vincecooley/Projects/myproject/node_modules/nativescript-input-mask/platforms/ios/Podfile 
 pod 'InputMask', :path => '~/Projects/input-mask-ios'

def post_install2 (installer)
  installer.pods_project.targets.each do |target|
    target.build_configurations.each do |config|
      config.build_settings['SWIFT_VERSION'] = '3.0'
    end
  end
end 
 # End Podfile 
# Begin Podfile - /Users/vincecooley/Projects/myproject/node_modules/nativescript-iqkeyboardmanager/platforms/ios/Podfile 
 pod 'IQKeyboardManager', '~> 4.0.0'
 
 # End Podfile 
# Begin Podfile - /Users/vincecooley/Projects/myproject/node_modules/nativescript-plugin-firebase/platforms/ios/Podfile 
 pod 'Firebase', '~> 4.11.0' 
pod 'Firebase/Auth'

# Uncomment if you want to enable Realtime DB
pod 'Firebase/Database'

# Uncomment if you want to enable Cloud Firestore
pod 'Firebase/Firestore'

# Uncomment if you want to enable Remote Config
#pod 'Firebase/RemoteConfig'

# Uncomment if you want to enable Crash Reporting
#pod 'Firebase/Crash'

# Uncomment if you want to enable Crashlytics
pod 'Fabric'
pod 'Crashlytics'
# Crashlytics works best without bitcode
def post_install3 (installer)
    installer.pods_project.targets.each do |target|
        target.build_configurations.each do |config|
            config.build_settings['ENABLE_BITCODE'] = "NO"
        end
    end
end

# Uncomment if you want to enable FCM (Firebase Cloud Messaging)
#pod 'Firebase/Messaging'

# Uncomment if you want to enable Firebase Storage
#pod 'Firebase/Storage'

# Uncomment if you want to enable AdMob
#pod 'Firebase/AdMob'

# Uncomment if you want to enable Invites and/or Dynamic Links
#pod 'Firebase/Invites'

# Uncomment if you want to enable Facebook Authentication
#pod 'FBSDKCoreKit'
#pod 'FBSDKLoginKit'

# Uncomment if you want to enable Google Authentication
#pod 'GoogleSignIn' 
 # End Podfile 
# Begin Podfile - /Users/vincecooley/Projects/myproject/node_modules/nativescript-snackbar/platforms/ios/Podfile 
 pod 'SSSnackbar', :git => 'https://github.com/EddyVerbruggen/SSSnackbar.git', :tag => '0.1.2.4' 
 # End Podfile 

end
post_install do |installer|
  post_install1 installer
  post_install2 installer
  post_install3 installer
end

And here is my Podfile after making a change within my application's code. The problem occurs in the post_install1 method, which recursively calls itself, but the entire Podfile is mangled:

use_frameworks!

target "myproject" do
# Begin Podfile - /Users/vincecooley/Projects/myproject/node_modules/nativescript-bottombar/platforms/ios/Podfile 
 use_frameworks!
pod 'MiniTabBar', :git => 'https://github.com/rhanb/MiniTabBar.git'
def post_install1 (installer)
    installer.pods_project.targets.each do |target|
        target.build_configurations.each do |config|
            config.build_settings['SWIFT_VERSION'] = '3.0'
        end
    end
end 
 # End Podfile 
# Begin Podfile - /Users/vincecooley/Projects/myproject/node_modules/nativescript-floatingactionbutton/platforms/ios/Podfile 
 pod 'MNFloatingActionButton', '~> 0.1.5' 
 # End Podfile 
# Begin Podfile - /Users/vincecooley/Projects/myproject/node_modules/nativescript-google-maps-sdk/platforms/ios/Podfile 
 source 'https://github.com/CocoaPods/Specs.git'

pod 'GoogleMaps' 
 # End Podfile 
# Begin Podfile - /Users/vincecooley/Projects/myproject/node_modules/nativescript-input-mask/platforms/ios/Podfile 
 pod 'InputMask', :path => '~/Projects/input-mask-ios'

def post_install2 (installer)
  installer.pods_project.targets.each do |target|
    target.build_configurations.each do |config|
      config.build_settings['SWIFT_VERSION'] = '3.0'
    end
  end
end 
 # End Podfile 
# Begin Podfile - /Users/vincecooley/Projects/myproject/node_modules/nativescript-iqkeyboardmanager/platforms/ios/Podfile 
 pod 'IQKeyboardManager', '~> 4.0.0'
 
 # End Podfile 
# Begin Podfile - /Users/vincecooley/Projects/myproject/node_modules/nativescript-plugin-firebase/platforms/ios/Podfile 
 pod 'Firebase', '~> 4.11.0' 
pod 'Firebase/Auth'

# Uncomment if you want to enable Realtime DB
pod 'Firebase/Database'

# Uncomment if you want to enable Cloud Firestore
pod 'Firebase/Firestore'

# Uncomment if you want to enable Remote Config
#pod 'Firebase/RemoteConfig'

# Uncomment if you want to enable Crash Reporting
#pod 'Firebase/Crash'

# Uncomment if you want to enable Crashlytics
pod 'Fabric'
pod 'Crashlytics'
# Crashlytics works best without bitcode
def post_install3 (installer)
    installer.pods_project.targets.each do |target|
        target.build_configurations.each do |config|
            config.build_settings['ENABLE_BITCODE'] = "NO"
        end
    end
end

# Uncomment if you want to enable FCM (Firebase Cloud Messaging)
#pod 'Firebase/Messaging'

# Uncomment if you want to enable Firebase Storage
#pod 'Firebase/Storage'

# Uncomment if you want to enable AdMob
#pod 'Firebase/AdMob'

# Uncomment if you want to enable Invites and/or Dynamic Links
#pod 'Firebase/Invites'

# Uncomment if you want to enable Facebook Authentication
#pod 'FBSDKCoreKit'
#pod 'FBSDKLoginKit'

# Uncomment if you want to enable Google Authentication
#pod 'GoogleSignIn' 
 # End Podfile 
# Begin Podfile - /Users/vincecooley/Projects/myproject/node_modules/nativescript-snackbar/platforms/ios/Podfile 
 pod 'SSSnackbar', :git => 'https://github.com/EddyVerbruggen/SSSnackbar.git', :tag => '0.1.2.4' 
 # End Podfile 

end
def post_install1 (installer)
  post_install1 installer
  post_install2 installer
  post_install3 installer# Begin Podfile - /Users/vincecooley/Projects/myproject/node_modules/nativescript-bottombar/platforms/ios/Podfile 
 use_frameworks!
pod 'MiniTabBar', :git => 'https://github.com/rhanb/MiniTabBar.git'
def post_install2 (installer)
    installer.pods_project.targets.each do |target|
        target.build_configurations.each do |config|
            config.build_settings['SWIFT_VERSION'] = '3.0'
        end
    end
end 
 # End Podfile 
# Begin Podfile - /Users/vincecooley/Projects/myproject/node_modules/nativescript-input-mask/platforms/ios/Podfile 
 pod 'InputMask', :path => '~/Projects/input-mask-ios'

def post_install3 (installer)
  installer.pods_project.targets.each do |target|
    target.build_configurations.each do |config|
      config.build_settings['SWIFT_VERSION'] = '3.0'
    end
  end
end 
 # End Podfile 
# Begin Podfile - /Users/vincecooley/Projects/myproject/node_modules/nativescript-plugin-firebase/platforms/ios/Podfile 
 pod 'Firebase', '~> 4.11.0' 
pod 'Firebase/Auth'

# Uncomment if you want to enable Realtime DB
pod 'Firebase/Database'

# Uncomment if you want to enable Cloud Firestore
pod 'Firebase/Firestore'

# Uncomment if you want to enable Remote Config
#pod 'Firebase/RemoteConfig'

# Uncomment if you want to enable Crash Reporting
#pod 'Firebase/Crash'

# Uncomment if you want to enable Crashlytics
pod 'Fabric'
pod 'Crashlytics'
# Crashlytics works best without bitcode
def post_install4 (installer)
    installer.pods_project.targets.each do |target|
        target.build_configurations.each do |config|
            config.build_settings['ENABLE_BITCODE'] = "NO"
        end
    end
end

# Uncomment if you want to enable FCM (Firebase Cloud Messaging)
#pod 'Firebase/Messaging'

# Uncomment if you want to enable Firebase Storage
#pod 'Firebase/Storage'

# Uncomment if you want to enable AdMob
#pod 'Firebase/AdMob'

# Uncomment if you want to enable Invites and/or Dynamic Links
#pod 'Firebase/Invites'

# Uncomment if you want to enable Facebook Authentication
#pod 'FBSDKCoreKit'
#pod 'FBSDKLoginKit'

# Uncomment if you want to enable Google Authentication
#pod 'GoogleSignIn' 
 # End Podfile 

end
post_install do |installer|
  post_install1 installer
  post_install2 installer
  post_install3 installer
  post_install4 installer
end

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions