Skip to content

Commit

Permalink
remove Example app Podfile from gitignore, remove API key
Browse files Browse the repository at this point in the history
  • Loading branch information
x401om committed Dec 18, 2024
1 parent 3dabebb commit ceffe69
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 2 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ flutter_export_environment.sh

examples/all_plugins/pubspec.yaml

Podfile
Podfile.lock
Pods/
.symlinks/
Expand Down
50 changes: 50 additions & 0 deletions example/ios/Podfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# Uncomment this line to define a global platform for your project
platform :ios, '13.0'

# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'

project 'Runner', {
'Debug' => :debug,
'Profile' => :release,
'Release' => :release,
}

def flutter_root
generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__)
unless File.exist?(generated_xcode_build_settings_path)
raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first"
end

File.foreach(generated_xcode_build_settings_path) do |line|
matches = line.match(/FLUTTER_ROOT\=(.*)/)
return matches[1].strip if matches
end
raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get"
end

require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)

flutter_ios_podfile_setup

target 'Runner' do
use_frameworks!
use_modular_headers!

flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))

# pod 'Adapty', :git => 'https://github.com/adaptyteam/AdaptySDK-iOS.git', :branch => 'dev'
# pod 'AdaptyUI', :git => 'https://github.com/adaptyteam/AdaptySDK-iOS.git', :branch => 'dev'
# pod 'AdaptyPlugin', :git => 'https://github.com/adaptyteam/AdaptySDK-iOS.git', :branch => 'dev'
end

post_install do |installer|
installer.pods_project.targets.each do |target|
flutter_additional_ios_build_settings(target)

target.build_configurations.each do |config|
config.build_settings['SWIFT_VERSION'] = '5.9'
config.build_settings['OTHER_SWIFT_FLAGS'] = '$(inherited) -DDISABLE_TRUEDEPTH_API'
end
end
end
2 changes: 1 addition & 1 deletion example/lib/purchase_observer.dart
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class PurchasesObserver implements AdaptyUIObserver {

if (!isActivated) {
await Adapty().activate(
configuration: AdaptyConfiguration(apiKey: 'public_live_iNuUlSsN.83zcTTR8D5Y8FI9cGUI6')
configuration: AdaptyConfiguration(apiKey: 'YOUR_API_KEY')
..withLogLevel(AdaptyLogLevel.debug)
..withObserverMode(false)
..withCustomerUserId(null)
Expand Down

0 comments on commit ceffe69

Please sign in to comment.