Skip to content

Commit

Permalink
[INJIMOB-2779] modify podfile to bypass biometric for automation (#1829)
Browse files Browse the repository at this point in the history
Signed-off-by: Abhishek Paul <[email protected]>
  • Loading branch information
abhip2565 authored Feb 27, 2025
1 parent 298e0da commit d5b7a3c
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/internal-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ jobs:
APP_FLAVOR: ${{ inputs.injiFlavor }}
SERVICE_LOCATION: '.'
IOS_SERVICE_LOCATION: 'ios'
SCRIPT_NAME: ${{ inputs.enable_auth == 'true' && 'fastlane beta' || 'fastlane ios_ui_automation_build' }}
SCRIPT_NAME: 'fastlane beta'
IOS_ARTIFACT_NAME: "ios-artifacts"
IOS_ARTIFACT_PATH: "ios/fastlane/Inji_artifacts/"
secrets:
Expand Down
2 changes: 2 additions & 0 deletions ios/Inji/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@
</array>
<key>CFBundleVersion</key>
<string>$(CURRENT_PROJECT_VERSION)</string>
<key>ENABLE_AUTH</key>
<string>true</string>
<key>ITSAppUsesNonExemptEncryption</key>
<false/>
<key>LSRequiresIPhoneOS</key>
Expand Down
33 changes: 32 additions & 1 deletion ios/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,15 @@ target 'Inji' do
)

post_install do |installer|
installer.pods_project.targets.each do |target|
if target.name == 'RNZipArchive'
target.source_build_phase.files.each do |file|
if file.settings && file.settings['COMPILER_FLAGS']
file.settings['COMPILER_FLAGS'] = ''
end
end
end
end
react_native_post_install(
installer,
config[:reactNativePath],
Expand All @@ -78,6 +87,28 @@ target 'Inji' do
end
end
end
plist_path = File.join(__dir__, 'Inji/Info.plist')

# Check if Info.plist exists
if File.exist?(plist_path)
require 'json'

# Read the Info.plist file
plist = JSON.parse(`plutil -convert json -o - "#{plist_path}"`)

# Add ENABLE_AUTH key
plist['ENABLE_AUTH'] = ENV['ENABLE_AUTH'] || 'true'

# Write back to Info.plist
File.open(plist_path, 'w') do |file|
file.write(JSON.pretty_generate(plist))
end

# Convert back to XML format
system("plutil -convert xml1 #{plist_path}")
else
Pod::UI.warn "Info.plist not found at #{plist_path}"
end
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] ||= ['$(inherited)', '_LIBCPP_ENABLE_CXX17_REMOVED_UNARY_BINARY_FUNCTION']
Expand Down Expand Up @@ -148,4 +179,4 @@ target 'Inji' do
pod 'Permission-Camera', :path => "#{permissions_path}/Camera"
pod 'Permission-LocationAccuracy', :path => "#{permissions_path}/LocationAccuracy"
pod 'Permission-LocationWhenInUse', :path => "#{permissions_path}/LocationWhenInUse"
end
end
2 changes: 1 addition & 1 deletion ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1025,6 +1025,6 @@ SPEC CHECKSUMS:
Yoga: 065f0b74dba4832d6e328238de46eb72c5de9556
ZXingObjC: fdbb269f25dd2032da343e06f10224d62f537bdb

PODFILE CHECKSUM: 44ee7985ac0203f16a6b823b6972530b17704618
PODFILE CHECKSUM: ec2e3bc4c2a50cfd2c107164c86b5c58cd5a4d0e

COCOAPODS: 1.16.2

0 comments on commit d5b7a3c

Please sign in to comment.