blueshift-labs / Blueshift-iOS-SDK

Blueshift iOS SDK
Other
4 stars 10 forks source link

Blueshift SDK fails to compile when xcode 14.3 is used #255

Closed tomoakley closed 1 year ago

tomoakley commented 1 year ago

When building an iOS app, with the Blueshift SDK integrated, using Xcode 14.3 the app fails to build with this error:

▸ Compiling InAppNotificationEntity.m

❌  /Users/distiller/project/ios/Pods/BlueShift-iOS-SDK/BlueShift-iOS-SDK/InApps/InAppNotificationEntity.m:100:1: non-void function does not return a value [-Werror,-Wreturn-type]

}
                              ^

▸ Compiling HttpRequestOperationEntity.m

❌  /Users/distiller/project/ios/Pods/BlueShift-iOS-SDK/BlueShift-iOS-SDK/HttpRequestOperationEntity.m:137:1: non-void function does not return a value [-Werror,-Wreturn-type]

}
^

❌  /Users/distiller/project/ios/Pods/BlueShift-iOS-SDK/BlueShift-iOS-SDK/HttpRequestOperationEntity.m:192:1: non-void function does not return a value [-Werror,-Wreturn-type]

}
^

(output via Circle CI / fastlane job)

Info: Blueshift SDK: 2.3.0 CircleCI image: 14.3.0 RC, macOS intel machine. We have also experienced this issue while building on local dev M1 machines with Xcode 14.3.0.

filiptdz commented 1 year ago

Same issue here

filiptdz commented 1 year ago

As a temporary workaround (at least for local builds, but could probably make a build step to make it work on CI too), you can modify the pod files to include a return nil; as the last statement of the functions that are causing the crash. For example:

+ (void *)fetchBatchWiseRecordFromCoreDataWithCompletetionHandler:(void (^)(BOOL, NSArray *))handler {
  // function implementation...
  return nil;
}
ketanshikharebsft commented 1 year ago

Thanks for reaching out @filiptdz @tomoakley. We are already working on a hotfix for this issue, and it is planned to go out by end of this week. We will update here once the hotfix is out.

ketanshikharebsft commented 1 year ago

@filiptdz @tomoakley We have released hotfix v2.3.1 for this issue.

stormgain-dev commented 1 year ago

Hi, @ketanshikharebsft Could this patch also be ported to the Blueshift Cordova Plugin please?

ketanshikharebsft commented 1 year ago

Hi @stormgain-dev, the fix for the Cordova plugin is in progress. I will update here once it's out.

ketanshikharebsft commented 1 year ago

@stormgain-dev The Cordova plugin fix is out, you can update to plugin version v0.1.0.

Closing the ticket as this issue is resolved.