MCPcopy Create free account
hub / github.com/golang/mobile / frameworkLayoutForTarget

Function frameworkLayoutForTarget

cmd/gomobile/bind_iosapp.go:308–334  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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
308func 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
336type infoFrameworkPlistlData struct {
337 BundleID string

Callers 1

goAppleBindFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected