[forwardport] fix(ios): make sure we can build an iOS release (#598) (#599)

This diff forward ports f47b0c6c16e0cd417e3591358eb85b45962f307d to master.

Original commit message:

- - -

1. we now need to name the framework `.xcframework` otherwise
gomobile refuses to build a new framework for us ¯\_(ツ)_/¯

2. remove duplicate errno definition for iOS (iOS and darwin
are considered the same, therefore we don't need iOS defs)

Reference issue for this PR: https://github.com/ooni/probe/issues/1876

This diff WILL need to be forwardported to master.
This commit is contained in:
Simone Basso
2021-11-15 14:24:20 +01:00
committed by GitHub
parent c527ca1f61
commit 50576daec8
17 changed files with 28 additions and 329 deletions
+10 -10
View File
@@ -119,7 +119,7 @@ OONI_ANDROID_HOME = $(HOME)/.ooniprobe-build/sdk/android
#help:
#help: * XCODE_VERSION : the version of Xcode we expect.
XCODE_VERSION = 12.5
XCODE_VERSION = 13.1
#quickhelp:
#quickhelp: The `./mk show-config` command shows the current value of the
@@ -474,20 +474,20 @@ __android_build_with_ooni_go: search/for/go
#help: You can also build the following subtargets:
.PHONY: ./MOBILE/ios
./MOBILE/ios: \
./MOBILE/ios/oonimkall.framework.zip \
./MOBILE/ios/oonimkall.xcframework.zip \
./MOBILE/ios/oonimkall.podspec
#help:
#help: * `./mk ./MOBILE/ios/oonimkall.framework.zip`: zip the framework
.PHONY: ./MOBILE/ios/oonimkall.framework.zip
./MOBILE/ios/oonimkall.framework.zip: search/for/zip ./MOBILE/ios/oonimkall.framework
cd ./MOBILE/ios && rm -rf oonimkall.framework.zip
cd ./MOBILE/ios && zip -yr oonimkall.framework.zip oonimkall.framework
#help: * `./mk ./MOBILE/ios/oonimkall.xcframework.zip`: zip the xcframework
.PHONY: ./MOBILE/ios/oonimkall.xcframework.zip
./MOBILE/ios/oonimkall.xcframework.zip: search/for/zip ./MOBILE/ios/oonimkall.xcframework
cd ./MOBILE/ios && rm -rf oonimkall.xcframework.zip
cd ./MOBILE/ios && zip -yr oonimkall.xcframework.zip oonimkall.xcframework
#help:
#help: * `./mk ./MOBILE/ios/framework`: the framework
.PHONY: ./MOBILE/ios/oonimkall.framework
./MOBILE/ios/oonimkall.framework: search/for/go search/for/xcode maybe/copypsiphon
#help: * `./mk ./MOBILE/ios/xcframework`: the xcframework
.PHONY: ./MOBILE/ios/oonimkall.xcframework
./MOBILE/ios/oonimkall.xcframework: search/for/go search/for/xcode maybe/copypsiphon
go get -u golang.org/x/mobile/cmd/gomobile
$(GOMOBILE) init
PATH=$(shell go env GOPATH)/bin:$$PATH $(GOMOBILE) bind -target ios -o $@ -tags="$(OONI_PSIPHON_TAGS)" -ldflags '-s -w' $(GOLANG_EXTRA_FLAGS) ./pkg/oonimkall