File tree Expand file tree Collapse file tree 1 file changed +15
-2
lines changed Expand file tree Collapse file tree 1 file changed +15
-2
lines changed Original file line number Diff line number Diff line change 4242  device_name=" iPhone 16" 
4343fi 
4444
45+ #  Define project and scheme names
46+ PROJECT_NAME=" ${SAMPLE} Example.xcodeproj" 
47+ SCHEME_NAME=" ${SAMPLE} Example${SWIFT_SUFFIX} " 
48+ 
49+ #  Check if the scheme exists before attempting to build.
50+ #  The `awk` command prints all lines from "Schemes:" to the end of the output.
51+ if  !  xcodebuild -list -project " ${PROJECT_NAME} " |  awk ' /Schemes:/,0' |  grep -q " ^\s*${SCHEME_NAME} " ;  then 
52+     echo  " Error: Scheme '${SCHEME_NAME} ' not found in project '${PROJECT_NAME} '." 
53+     echo  " Available schemes from '${PROJECT_NAME} ':" 
54+     xcodebuild -list -project " ${PROJECT_NAME} " 
55+     exit  65
56+ fi 
57+ 
4558(
4659xcodebuild \
47- -project ${SAMPLE}  Example.xcodeproj  \
48- -scheme  ${SAMPLE}  Example ${SWIFT_SUFFIX }
60+ -project ${PROJECT_NAME}   \
61+ -scheme  ${SCHEME_NAME }  \
4962-destination " platform=iOS Simulator,name=$device_name " " SWIFT_VERSION=5.3" " OTHER_LDFLAGS=\$ (OTHER_LDFLAGS) -ObjC" " FRAMEWORK_SEARCH_PATHS= \$ (PROJECT_DIR)/Firebase/" ' $(PROJECT_DIR)/Firebase' 
5063build \
5164) ||  EXIT_STATUS=$? 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments