os: WriteFile failures with operation not permitted
on iOS
#57161
Labels
FrozenDueToAge
mobile
Android, iOS, and x/mobile
OS-Darwin
WaitingForInfo
Issue is not actionable because of missing required information, which needs to be provided.
Milestone
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
I haven't used the latest release
What operating system and processor architecture are you using (
go env
)?GO111MODULE="on"
GOARCH="arm64"
GOEXE=""
GOFLAGS="-mod=mod"
GOHOSTARCH="arm64"
GOHOSTOS="darwin"
GOINSECURE=""
GOOS="darwin"
GOPROXY="https://goproxy.cn,direct"
GOROOT="/usr/local/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/darwin_arm64"
GOVCS=""
GOVERSION="go1.16.15"
GCCGO="gccgo"
AR="ar"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -arch arm64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/9k/dt625z5x4sj2pcf0n5twxrc00000gn/T/go-build1768545817=/tmp/go-build -gno-record-gcc-switches -fno-common"
What did you do?
I have a Go project that then compiles into an iOS library to use in an iOS project.
Code snippets
ioutil.WriteFile(path, data, os.ModePerm)
Write some data to a file using
ioutil.WriteFile
What did you expect to see?
return error is nil
What did you see instead?
The error of
operation not permitted
occasionally appears on some iphone phones:open /xxx/xxx.json: operation not permitted
The text was updated successfully, but these errors were encountered: