project.yml 7.7 KB

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