↑クリックして拡大
↑クリックして拡大
↑クリックして拡大
↑クリックして拡大

頭痛が減ったので共有です!

rebuild.fmを応援しています!

HOME > Unmanaged

Unmanaged周りの不具合発生。Swift3へアップグレード中。

Member 'passRetained' in 'Unmanaged?' produces result of type 'Unmanaged', but context expects 'Unmanaged?' というエラーがSwift3へのバージョンアップで発生。

サンプル画像

参考:Migrating to Swift 2.3 or Swift 3 from Swift 2.2
参考:Change Unmanaged to use UnsafePointer

やってみた

この箇所はUnmanageを単純にUnsafePointerに変えることで改善できるようです。


var text = [.passRetained(ruby) as Unmanaged?, .none, .none, .none]


var text = [.passRetained(ruby) as UnsafePointer?, .none, .none, .none]

上記の様に修正します。

↓こんな記事もありますよ!

2021-05-14 14:21:41

The pitfalls of Filetransfer in watchconnectivity on WatchOS. And how to avoid.

AppleWatch it succeeds with the actual machine, but if it is a simulator, it will fail、、、 When I...
2021-05-06 14:04:37

Line's animation stamp production pitfalls 、、、 failure story

I tried to make a LINE sticker during Golden Week. I made it and applied, but it was different f...
2021-04-22 14:54:53

Cool carousel carefully selected 3 points! Astringent image slider using WebGL.

I was on a trip to find a cool slider yesterday. It's simple, easy to use, and has a good de...
このエントリーをはてなブックマークに追加
右側のFacebookのLikeをクリック頂けると記事更新の際に通知されますので宜しければご利用下さい!