frameworkLayoutForTarget generates the filestructure for a framework for the given target platform (macos, ios, etc), according to Apple's spec https://developer.apple.com/documentation/bundleresources/placing_content_in_a_bundle
(t targetInfo, title string)
| 306 | // frameworkLayoutForTarget generates the filestructure for a framework for the given target platform (macos, ios, etc), |
| 307 | // according to Apple's spec https://developer.apple.com/documentation/bundleresources/placing_content_in_a_bundle |
| 308 | func frameworkLayoutForTarget(t targetInfo, title string) (*frameworkLayout, error) { |
| 309 | switch t.platform { |
| 310 | case "macos", "maccatalyst": |
| 311 | return &frameworkLayout{ |
| 312 | headerPath: "Versions/A/Headers", |
| 313 | binaryPath: "Versions/A", |
| 314 | modulePath: "Versions/A/Modules", |
| 315 | infoPlistPath: "Versions/A/Resources", |
| 316 | symlinks: map[string]string{ |
| 317 | "A": "Versions/Current", |
| 318 | "Versions/Current/Resources": "Resources", |
| 319 | "Versions/Current/Headers": "Headers", |
| 320 | "Versions/Current/Modules": "Modules", |
| 321 | filepath.Join("Versions/Current", title): title, |
| 322 | }, |
| 323 | }, nil |
| 324 | case "ios", "iossimulator": |
| 325 | return &frameworkLayout{ |
| 326 | headerPath: "Headers", |
| 327 | binaryPath: ".", |
| 328 | modulePath: "Modules", |
| 329 | infoPlistPath: ".", |
| 330 | }, nil |
| 331 | } |
| 332 | |
| 333 | return nil, fmt.Errorf("unsupported platform %q", t.platform) |
| 334 | } |
| 335 | |
| 336 | type infoFrameworkPlistlData struct { |
| 337 | BundleID string |