Skip to content

Commit

Permalink
Use golang/mobile@e2f45249 for XCode 15
Browse files Browse the repository at this point in the history
  • Loading branch information
rod-hynes committed Apr 25, 2024
1 parent d62d9ad commit f82d116
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions MobileLibrary/go-mobile/cmd/gomobile/bind_iosapp.go
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,14 @@ func goAppleBind(gobind string, pkgs []*packages.Package, targets []targetInfo)
xcframeworkArgs := []string{"-create-xcframework"}

for _, dir := range frameworkDirs {
// On macOS, a temporary directory starts with /var, which is a symbolic link to /private/var.
// And in gomobile, a temporary directory is usually used as a working directly.
// Unfortunately, xcodebuild in Xcode 15 seems to have a bug and might not be able to understand fullpaths with symbolic links.
// As a workaround, resolve the path with symbolic links by filepath.EvalSymlinks.
dir, err := filepath.EvalSymlinks(dir)
if err != nil {
return err
}
xcframeworkArgs = append(xcframeworkArgs, "-framework", dir)
}

Expand Down

0 comments on commit f82d116

Please sign in to comment.