Skip to content

Commit

Permalink
cmd/gomobile: use Apple Development over iPhone Developer
Browse files Browse the repository at this point in the history
Apple Development Program was introduced in WWDC2015. It is 2021 today,
and there should have no possibility to use iPhone Developer certificate
for code signing.

This CL replaces "iPhone Developer" by "Apple Development" so that
cmd/gomobile can use the correct certificate to sign the building
application. Otherwise, gomobile throws an error gomobile: failed to
pull the signing certificate to determine your team ID: exit status 44

Updates golang/go#47238

Change-Id: Ia48c03ff7cda39a95159e0f77e7ba7042776f9ef
Reviewed-on: https://go-review.googlesource.com/c/mobile/+/346151
Reviewed-by: Hajime Hoshi <hajimehoshi@gmail.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Run-TryBot: Hajime Hoshi <hajimehoshi@gmail.com>
TryBot-Result: Go Bot <gobot@golang.org>
Trust: Hajime Hoshi <hajimehoshi@gmail.com>
Trust: Dmitri Shuralyov <dmitshur@golang.org>
  • Loading branch information
changkun authored and hajimehoshi committed Aug 31, 2021
1 parent 34ab130 commit 18b1a0c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions bind/objc/seq_test.go
Expand Up @@ -604,7 +604,7 @@ const pbxproj = `// !$*UTF8*$!
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
CODE_SIGN_IDENTITY = "iPhone Developer";
CODE_SIGN_IDENTITY = "Apple Development";
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = dwarf;
ENABLE_STRICT_OBJC_MSGSEND = YES;
Expand Down Expand Up @@ -662,7 +662,7 @@ const pbxproj = `// !$*UTF8*$!
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
CODE_SIGN_IDENTITY = "iPhone Developer";
CODE_SIGN_IDENTITY = "Apple Development";
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_NS_ASSERTIONS = NO;
Expand Down
8 changes: 4 additions & 4 deletions cmd/gomobile/build_iosapp.go
Expand Up @@ -152,11 +152,11 @@ func goIOSBuild(pkg *packages.Package, bundleID string, archs []string) (map[str
}

func detectTeamID() (string, error) {
// Grabs the first certificate for "iPhone Developer"; will not work if there
// Grabs the certificate for "Apple Development"; will not work if there
// are multiple certificates and the first is not desired.
cmd := exec.Command(
"security", "find-certificate",
"-c", "iPhone Developer", "-p",
"-c", "Apple Development", "-p",
)
pemString, err := cmd.Output()
if err != nil {
Expand Down Expand Up @@ -422,7 +422,7 @@ var projPbxprojTmpl = template.Must(template.New("projPbxproj").Parse(`// !$*UTF
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "Apple Development";
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_NS_ASSERTIONS = NO;
Expand All @@ -435,7 +435,7 @@ var projPbxprojTmpl = template.Must(template.New("projPbxproj").Parse(`// !$*UTF
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 8.3;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2";
Expand Down

0 comments on commit 18b1a0c

Please sign in to comment.