Skip to content

Commit 638fc76

Browse files
committed
ios: Align with type changes in API
1 parent 8b5882b commit 638fc76

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/ios/GS1 Encoders App/GS1Encoder.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -187,8 +187,8 @@ class GS1Encoder {
187187
* - gs1_encoder_getVersion()
188188
*
189189
*/
190-
func getSym() -> Int {
191-
return Int(gs1_encoder_getSym(ctx))
190+
func getSym() -> Symbology {
191+
return Symbology(rawValue: gs1_encoder_getSym(ctx).rawValue) ?? Symbology.NONE
192192
}
193193

194194
/**
@@ -199,8 +199,8 @@ class GS1Encoder {
199199
* - gs1_encoder_setVersion()
200200
*
201201
*/
202-
func setSym(_ value: Int) throws {
203-
if (!gs1_encoder_setSym(ctx, Int32(value))) {
202+
func setSym(_ value: Symbology) throws {
203+
if (!gs1_encoder_setSym(ctx, gs1_encoder_symbologies(value.rawValue))) {
204204
throw GS1EncoderError.parameterError(msg: self.getErrMsg())
205205
}
206206
}

0 commit comments

Comments
 (0)