project.yml 8.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172
  1. name: {{app.name}}
  2. options:
  3. bundleIdPrefix: {{app.identifier}}
  4. deploymentTarget:
  5. iOS: {{apple.ios-version}}
  6. fileGroups: [{{join file-groups}}]
  7. configs:
  8. debug: debug
  9. release: release
  10. settingGroups:
  11. app:
  12. base:
  13. PRODUCT_NAME: {{app.stylized-name}}
  14. PRODUCT_BUNDLE_IDENTIFIER: {{app.identifier}}
  15. {{#if apple.development-team}}
  16. DEVELOPMENT_TEAM: {{apple.development-team}}
  17. {{/if}}
  18. targetTemplates:
  19. app:
  20. type: application
  21. sources:
  22. - path: Sources
  23. scheme:
  24. environmentVariables:
  25. RUST_BACKTRACE: full
  26. RUST_LOG: info
  27. settings:
  28. groups: [app]
  29. targets:
  30. {{app.name}}_iOS:
  31. type: application
  32. platform: iOS
  33. sources:
  34. - path: Sources
  35. - path: Assets.xcassets
  36. - path: Externals
  37. - path: {{app.name}}_iOS
  38. - path: {{app.asset-dir}}
  39. buildPhase: resources
  40. type: folder
  41. {{~#each asset-catalogs}}
  42. - {{prefix-path this}}{{/each}}
  43. {{~#each ios-additional-targets}}
  44. - path: {{prefix-path this}}{{/each}}
  45. - path: LaunchScreen.storyboard
  46. info:
  47. path: {{app.name}}_iOS/Info.plist
  48. properties:
  49. LSRequiresIPhoneOS: true
  50. UILaunchStoryboardName: LaunchScreen
  51. UIRequiredDeviceCapabilities: [arm64, metal]
  52. UISupportedInterfaceOrientations:
  53. - UIInterfaceOrientationPortrait
  54. - UIInterfaceOrientationLandscapeLeft
  55. - UIInterfaceOrientationLandscapeRight
  56. UISupportedInterfaceOrientations~ipad:
  57. - UIInterfaceOrientationPortrait
  58. - UIInterfaceOrientationPortraitUpsideDown
  59. - UIInterfaceOrientationLandscapeLeft
  60. - UIInterfaceOrientationLandscapeRight
  61. CFBundleShortVersionString: {{apple.bundle-version-short}}
  62. CFBundleVersion: {{apple.bundle-version}}
  63. {{~#each apple.plist-pairs}}
  64. {{this.key}}: {{this.value}}{{/each}}
  65. entitlements:
  66. path: {{app.name}}_iOS/{{app.name}}_iOS.entitlements
  67. scheme:
  68. environmentVariables:
  69. RUST_BACKTRACE: full
  70. RUST_LOG: info
  71. {{~#if ios-command-line-arguments}}
  72. commandLineArguments:
  73. {{~#each ios-command-line-arguments}}
  74. "{{this}}": true
  75. {{/each}}{{~/if}}
  76. settings:
  77. base:
  78. ENABLE_BITCODE: false
  79. ARCHS: [{{join ios-valid-archs}}]
  80. VALID_ARCHS: {{~#each ios-valid-archs}} {{this}} {{/each}}
  81. LIBRARY_SEARCH_PATHS[arch=x86_64]: $(inherited) $(PROJECT_DIR)/Externals/x86_64/$(CONFIGURATION) $(SDKROOT)/usr/lib/swift $(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME) $(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME)
  82. LIBRARY_SEARCH_PATHS[arch=arm64]: $(inherited) $(PROJECT_DIR)/Externals/arm64/$(CONFIGURATION) $(SDKROOT)/usr/lib/swift $(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME) $(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME)
  83. LIBRARY_SEARCH_PATHS[arch=arm64-sim]: $(inherited) $(PROJECT_DIR)/Externals/arm64-sim/$(CONFIGURATION) $(SDKROOT)/usr/lib/swift $(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME) $(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME)
  84. ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES: true
  85. EXCLUDED_ARCHS[sdk=iphonesimulator*]: arm64
  86. EXCLUDED_ARCHS[sdk=iphoneos*]: arm64-sim x86_64
  87. groups: [app]
  88. dependencies:
  89. - framework: {{ lib-output-file-name }}
  90. embed: false
  91. {{~#each ios-libraries}}
  92. - framework: {{this}}
  93. embed: false{{/each}}{{#if ios-vendor-frameworks}}{{~#each ios-vendor-frameworks}}
  94. - framework: {{this}}{{/each}}{{/if}}{{#if ios-vendor-sdks}}{{~#each ios-vendor-sdks}}
  95. - sdk: {{prefix-path this}}{{/each}}{{/if}}
  96. - sdk: CoreGraphics.framework
  97. - sdk: Metal.framework
  98. - sdk: MetalKit.framework
  99. - sdk: QuartzCore.framework
  100. - sdk: Security.framework
  101. - sdk: UIKit.framework{{#if this.ios-frameworks}}{{~#each ios-frameworks}}
  102. - sdk: {{this}}.framework{{/each}}{{/if}}
  103. - sdk: WebKit.framework
  104. preBuildScripts:
  105. {{~#each ios-pre-build-scripts}}{{#if this.path}}
  106. - path {{this.path}}{{/if}}{{#if this.script}}
  107. - script: {{this.script}}{{/if}}{{#if this.name}}
  108. name: {{this.name}}{{/if}}{{#if this.input-files}}
  109. inputFiles: {{~#each this.input-files}}
  110. - {{this}}{{/each}}{{/if}}{{#if this.output-files}}
  111. outputFiles: {{~#each this.output-files}}
  112. - {{this}}{{/each}}{{/if}}{{#if this.input-file-lists}}
  113. inputFileLists: {{~#each this.output-files}}
  114. - {{this}}{{/each}}{{/if}}{{#if this.output-file-lists}}
  115. outputFileLists: {{~#each this.output-files}}
  116. - {{this}}{{/each}}{{/if}}{{#if this.shell}}
  117. shell: {{this.shell}}{{/if}}{{#if this.show-env-vars}}
  118. showEnvVars: {{this.show_env_vars}}{{/if}}{{#if this.run-only-when-installing}}
  119. runOnlyWhenInstalling: {{this.run-only-when-installing}}{{/if}}{{#if this.based-on-dependency-analysis}}
  120. basedOnDependencyAnalysis: {{this.based-on-dependency-analysis}}{{/if}}{{#if this.discovered-dependency-file}}
  121. discoveredDependencyFile: {{this.discovered-dependency-file}}{{/if}}
  122. {{~/each}}
  123. - script: {{ tauri-binary }} {{ tauri-binary-args-str }} -v --platform ${PLATFORM_DISPLAY_NAME:?} --sdk-root ${SDKROOT:?} --framework-search-paths "${FRAMEWORK_SEARCH_PATHS:?}" --header-search-paths "${HEADER_SEARCH_PATHS:?}" --gcc-preprocessor-definitions "${GCC_PREPROCESSOR_DEFINITIONS:-}" --configuration ${CONFIGURATION:?} ${FORCE_COLOR} ${ARCHS:?}
  124. name: Build Rust Code
  125. basedOnDependencyAnalysis: false
  126. outputFiles:
  127. - $(SRCROOT)/Externals/x86_64/${CONFIGURATION}/{{ lib-output-file-name }}
  128. - $(SRCROOT)/Externals/arm64/${CONFIGURATION}/{{ lib-output-file-name }}
  129. - $(SRCROOT)/Externals/arm64-sim/${CONFIGURATION}/{{ lib-output-file-name }}
  130. {{~#if ios-post-compile-scripts}}
  131. postCompileScripts:
  132. {{~#each ios-post-compile-scripts}}{{#if this.path}}
  133. - path {{this.path}}{{/if}}{{#if this.script}}
  134. - script: {{this.script}}{{/if}}{{#if this.name}}
  135. name: {{this.name}}{{/if}}{{#if this.input-files}}
  136. inputFiles: {{~#each this.input-files}}
  137. - {{this}}{{/each}}{{/if}}{{#if this.output-files}}
  138. outputFiles: {{~#each this.output-files}}
  139. - {{this}}{{/each}}{{/if}}{{#if this.input-file-lists}}
  140. inputFileLists: {{~#each this.output-files}}
  141. - {{this}}{{/each}}{{/if}}{{#if this.output-file-lists}}
  142. outputFileLists: {{~#each this.output-files}}
  143. - {{this}}{{/each}}{{/if}}{{#if this.shell}}
  144. shell: {{this.shell}}{{/if}}{{#if this.show-env-vars}}
  145. showEnvVars: {{this.show_env_vars}}{{/if}}{{#if this.run-only-when-installing}}
  146. runOnlyWhenInstalling: {{this.run-only-when-installing}}{{/if}}{{#if this.based-on-dependency-analysis}}
  147. basedOnDependencyAnalysis: {{this.based-on-dependency-analysis}}{{/if}}{{#if this.discovered-dependency-file}}
  148. discoveredDependencyFile: {{this.discovered-dependency-file}}{{/if}}
  149. {{~/each~}}
  150. {{~/if~}}
  151. {{~#if ios-post-build-scripts}}
  152. postBuildScripts:
  153. {{~#each ios-post-build-scripts}}{{#if this.path}}
  154. - path {{this.path}}{{/if}}{{#if this.script}}
  155. - script: {{this.script}}{{/if}}{{#if this.name}}
  156. name: {{this.name}}{{/if}}{{#if this.input-files}}
  157. inputFiles: {{~#each this.input-files}}
  158. - {{this}}{{/each}}{{/if}}{{#if this.output-files}}
  159. outputFiles: {{~#each this.output-files}}
  160. - {{this}}{{/each}}{{/if}}{{#if this.input-file-lists}}
  161. inputFileLists: {{~#each this.output-files}}
  162. - {{this}}{{/each}}{{/if}}{{#if this.output-file-lists}}
  163. outputFileLists: {{~#each this.output-files}}
  164. - {{this}}{{/each}}{{/if}}{{#if this.shell}}
  165. shell: {{this.shell}}{{/if}}{{#if this.show-env-vars}}
  166. showEnvVars: {{this.show_env_vars}}{{/if}}{{#if this.run-only-when-installing}}
  167. runOnlyWhenInstalling: {{this.run-only-when-installing}}{{/if}}{{#if this.based-on-dependency-analysis}}
  168. basedOnDependencyAnalysis: {{this.based-on-dependency-analysis}}{{/if}}{{#if this.discovered-dependency-file}}
  169. discoveredDependencyFile: {{this.discovered-dependency-file}}{{/if}}
  170. {{~/each~}}
  171. {{~/if}}