Customer satic lib Swift

37 views
Skip to first unread message

amine...@gmail.com

unread,
Dec 4, 2020, 8:52:21 AM12/4/20
to CodenameOne Discussions
Hi , 
I have this problem with a build project . 
with i importing the static lib in native Interface :


ld: warning: Could not find or use auto-linked library 'swiftCoreMedia'
ld: warning: Could not find or use auto-linked library 'swiftCoreImage'
ld: warning: Could not find or use auto-linked library 'swiftCompatibilityDynamicReplacements'
ld: warning: Could not find or use auto-linked library 'swiftsimd'
ld: warning: Could not find or use auto-linked library 'swiftCompatibility51'
ld: warning: Could not find or use auto-linked library 'swiftFoundation'
ld: warning: Could not find or use auto-linked library 'swiftCoreAudio'
ld: warning: Could not find or use auto-linked library 'swiftCoreFoundation'
ld: warning: Could not find or use auto-linked library 'swiftCompatibility50'
ld: warning: Could not find or use auto-linked library 'swiftUniformTypeIdentifiers'
ld: warning: Could not find or use auto-linked library 'swiftCoreMIDI'
ld: warning: Could not find or use auto-linked framework 'UniformTypeIdentifiers'
Undefined symbols for architecture arm64:
  "type metadata accessor for Swift.FloatingPointRoundingRule", referenced from:
      (extension in SkyIdSDK):__C.UIImage.rotate(radians: Swift.Float) -> __C.UIImage? in libSkyIdSDK.a(UIImageUtil.o)
  "enum case for Swift.FloatingPointRoundingRule.toNearestOrEven(Swift.FloatingPointRoundingRule.Type) -> Swift.FloatingPointRoundingRule", referenced from:
      (extension in SkyIdSDK):__C.UIImage.rotate(radians: Swift.Float) -> __C.UIImage? in libSkyIdSDK.a(UIImageUtil.o)
  "enum case for Swift.FloatingPointRoundingRule.towardZero(Swift.FloatingPointRoundingRule.Type) -> Swift.FloatingPointRoundingRule", referenced from:
      (extension in SkyIdSDK):__C.UIImage.rotate(radians: Swift.Float) -> __C.UIImage? in libSkyIdSDK.a(UIImageUtil.o)
  "Swift.FloatingPointSign.rawValue.getter : Swift.Int", referenced from:
      (extension in SkyIdSDK):__C.UIImage.rotate(radians: Swift.Float) -> __C.UIImage? in libSkyIdSDK.a(UIImageUtil.o)
  "Swift.Double.init(Swift.Float) -> Swift.Double", referenced from:
      (extension in SkyIdSDK):__C.UIImage.rotate(radians: Swift.Float) -> __C.UIImage? in libSkyIdSDK.a(UIImageUtil.o)
  "protocol conformance descriptor for Swift.String.UnicodeScalarView : Swift.Collection in Swift", referenced from:
      lazy protocol witness table accessor for type Swift.String.UnicodeScalarView and conformance Swift.String.UnicodeScalarView : Swift.Collection in Swift in libSkyIdSDK.a(MRZField.o)
  "Swift.Character.unicodeScalars.getter : Swift.String.UnicodeScalarView", referenced from:
      static SkyIdSDK.MRZField.isValueValid(_: Swift.String, checkDigit: Swift.String) -> Swift.Bool in libSkyIdSDK.a(MRZField.o)

Shai Almog

unread,
Dec 5, 2020, 2:10:31 AM12/5/20
to CodenameOne Discussions
I suggest adding the swift framework library with the ios.add_libs build hint.

Amine ABIABA

unread,
Dec 5, 2020, 4:01:12 AM12/5/20
to codenameone...@googlegroups.com
I used a static library (swift) it's not a dynamic framework  ! 

--
You received this message because you are subscribed to the Google Groups "CodenameOne Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to codenameone-discu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/codenameone-discussions/cb119b97-02d1-4cb9-a47a-0755b3330e09n%40googlegroups.com.

Amine ABIABA

unread,
Dec 5, 2020, 5:26:21 AM12/5/20
to codenameone...@googlegroups.com
how i can generate Bridging Header file ?.
this is the solution to solve this problem.
1607162761833.png

Shai Almog

unread,
Dec 5, 2020, 10:07:43 PM12/5/20
to CodenameOne Discussions
Try ios.add_libs=Feature.framework;Base.framework

Amine ABIABA

unread,
Dec 6, 2020, 6:43:13 AM12/6/20
to codenameone...@googlegroups.com
I tested your solution but it does not work for me because of the frameworks Feature.framework,Base.framework  do not exist.

ld: framework not found Feature
clang: error: linker command failed with exit code 1 (use -v to see invocation)


 Is it possible to generate the file Bridging Header automatically? where is there a method to generate it?

Steve Hannah

unread,
Dec 6, 2020, 8:12:29 AM12/6/20
to codenameone...@googlegroups.com
Have you tried to generate a bridging header in Xcode, then copy that header into your native/ios directory?
I also suggest looking at this comment in the issue tracker where I provide some hints for Swift support.



--
Steve Hannah
Software Developer
Codename One

Amine ABIABA

unread,
Dec 7, 2020, 7:35:25 PM12/7/20
to codenameone...@googlegroups.com
I tried the solution you gave me but it didn't work for me. Is it possible to add in the hinds  the possibility of generating a bridging header file? Because it was the possibility that fixed the file problem for me. I have tried all the experiments you gave me, but without results !  

Reply all
Reply to author
Forward
0 new messages