Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.4k views
in Technique[技术] by (71.8m points)

xcode - MyClass is unavailable: cannot find Swift declaration for this class - Release Build Only

I am getting the following error:

MyClass is unavailable: cannot find Swift declaration for this class

but I only get it when doing a release build in Xcode...Debug works fine.

Anyone know what's up? I'm running 6.3

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

If MyClass is inside a dynamic framework (Cocoa Touch Framework), It is likely that you're using a build with wrong architecture. To check, browse your MyClass.framework in finder, and check Modules/AirServiceKit.swiftmodule. There should be something like x86_64.swiftmodule or arm64.swiftmodule, if you're using simulator there should be x86, or arm if you're building for device.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...