@@ -377,24 +377,26 @@ def build_android(attributes={}, assert_success=True, tns_path=None):
377377 return output
378378
379379 @staticmethod
380- def build_ios (attributes = {}, assert_success = True , tns_path = None ):
380+ def build_ios (attributes = {}, assert_success = True , tns_path = None , log_trace = False ):
381381
382382 if "--provision" not in attributes .keys ():
383383 attr = {"--teamId" : DEVELOPMENT_TEAM }
384384 attributes .update (attr )
385385
386- output = Tns .run_tns_command ("build ios" , attributes = attributes , tns_path = tns_path )
386+ output = Tns .run_tns_command ("build ios" , attributes = attributes , tns_path = tns_path , log_trace = log_trace )
387387
388388 app_name = Tns .__get_app_name_from_attributes (attributes = attributes )
389389 app_name = app_name .replace ("\" " , "" ) # Handle projects with space
390390 app_id = Tns .__get_final_package_name (app_name , platform = Platform .IOS )
391391
392392 if assert_success :
393- assert "BUILD SUCCEEDED" in output
394393 assert "Project successfully built" in output
395394 assert "ERROR" not in output
396395 assert "malformed" not in output
397- assert "CodeSign" in output
396+
397+ if log_trace :
398+ assert "BUILD SUCCEEDED" in output
399+ assert "CodeSign" in output
398400
399401 # Verify release/debug builds
400402 if "--release" in attributes .keys ():
@@ -410,9 +412,10 @@ def build_ios(attributes={}, assert_success=True, tns_path=None):
410412 device_folder = app_name + "/platforms/ios/build/device/"
411413 emu_folder = app_name + "/platforms/ios/build/emulator/"
412414 if "--forDevice" in attributes .keys () or "--for-device" in attributes .keys ():
413- assert "build/device/" + app_id + ".app" in output
414- assert "ARCHIVE SUCCEEDED" in output
415- assert "EXPORT SUCCEEDED" in output
415+ if log_trace :
416+ assert "build/device/" + app_id + ".app" in output
417+ assert "ARCHIVE SUCCEEDED" in output
418+ assert "EXPORT SUCCEEDED" in output
416419 assert File .exists (device_folder + app_id + ".ipa" ), "IPA file not found!"
417420 bundle_content = File .read (device_folder + app_id + ".app/" + app_id )
418421 xcode_project = Tns .__get_xcode_project_file (app_name )
@@ -422,7 +425,8 @@ def build_ios(attributes={}, assert_success=True, tns_path=None):
422425 assert DEVELOPMENT_TEAM in xcode_project or DISTRIBUTION_PROVISIONING in xcode_project , \
423426 "TeamID not passed to Xcode!"
424427 else :
425- assert "build/emulator/" + app_id + ".app" in output
428+ if log_trace :
429+ assert "build/emulator/" + app_id + ".app" in output
426430 assert File .exists (app_name + "/platforms/ios/" + app_id + "/" + app_id + "-Prefix.pch" )
427431 assert File .exists (emu_folder + app_id + ".app" )
428432 bundle_content = File .read (emu_folder + app_id + ".app/" + app_id )
0 commit comments