Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[@triniwiz/nativescript-image-cache-it][IOS] bug in iOS, ImageCacheIt tag crash release version #192

Open
pap5508 opened this issue Mar 5, 2024 · 2 comments

Comments

@pap5508
Copy link

pap5508 commented Mar 5, 2024

In the context of the issue, the functionality in the HTML file associated with ImageCacheIt is not functioning as expected, whereas the Image tag is operating correctly.

Currently, I am encountering challenges with the implementation of ImageCacheIt on iOS. Despite having attached a StackBlitz project for reference, there are persisting issues:

The tab functionality within the HTML file associated with ImageCacheIt is non-functional, whereas the standard tag operates correctly.

Upon attempting to launch the release version of the iOS application ns build ios --bundle --env.uglify --env.aot --release --forDevice , the application crashes

https://stackblitz.com/edit/nativescript-stackblitz-templates-wcgdeq?file=src%2Fapp%2Fitem%2Fitems.component.html

NPM version 10.4.0
Nativescript version : 8.6.5
Node.js v20.11.0
Tried on Xcode version 15.1 & 15.2
Package.json :

{
  "name": "UploadTest",
  "main": "./src/main.ts",
  "version": "1.0.0",
  "private": true,
  "dependencies": {
    "@angular/animations": "~16.2.0",
    "@angular/common": "~16.2.0",
    "@angular/compiler": "~16.2.0",
    "@angular/core": "~16.2.0",
    "@angular/forms": "~16.2.0",
    "@angular/platform-browser": "~16.2.0",
    "@angular/platform-browser-dynamic": "~16.2.0",
    "@angular/router": "~16.2.0",
    "@nativescript-community/ui-document-picker": "^1.1.17",
    "@nativescript/angular": "^16.0.0",
    "@nativescript/core": "~8.6.0",
    "@nativescript/theme": "~3.0.2",
    "@triniwiz/nativescript-image-cache-it": "^7.5.0",
    "rxjs": "~7.8.0",
    "zone.js": "~0.13.0"
  },
  "devDependencies": {
    "@angular-devkit/build-angular": "~16.2.0",
    "@angular/compiler-cli": "~16.2.0",
    "@nativescript/android": "8.6.2",
    "@nativescript/ios": "8.6.3",
    "@nativescript/types": "~8.6.0",
    "@nativescript/webpack": "~5.0.18",
    "@ngtools/webpack": "~16.2.0",
    "typescript": "~5.1.6"
  }
}

I'm also attaching Sample project to reproduce error : src.zip

possible error could be :

Xcode build...
/Users/pap/Documents/Temp Project /UploadTest/platforms/ios/Pods/SDWebImage/SDWebImage/Core/SDWebImageDefine.m:16:65: warning: 
      a function declaration without a prototype is deprecated in all versions of C [-Wstrict-prototypes]
static inline NSArray<NSNumber *> * _Nonnull SDImageScaleFactors() {
                                                                ^
                                                                 void
1 warning generated.
/Users/pap/Documents/Temp Project /UploadTest/platforms/ios/Pods/SDWebImage/SDWebImage/Private/SDImageAssetManager.m:12:40: warning: 
      a function declaration without a prototype is deprecated in all versions of C [-Wstrict-prototypes]
static NSArray *SDBundlePreferredScales() {
                                       ^
                                        void
1 warning generated.
/Users/pap/Documents/Temp Project /UploadTest/node_modules/@triniwiz/nativescript-image-cache-it/platforms/ios/src/NSURLExt.swift:8:51: warning: forming 'UnsafeRawPointer' to a variable of type 'Optional<String>'; this is likely incorrect because 'Optional<String>' may contain an object reference.
            return objc_getAssociatedObject(self, &NSURLProps.uuid) as? String
                                                  ^
/Users/pap/Documents/Temp Project /UploadTest/node_modules/@triniwiz/nativescript-image-cache-it/platforms/ios/src/NSURLExt.swift:12:48: warning: forming 'UnsafeRawPointer' to a variable of type 'Optional<String>'; this is likely incorrect because 'Optional<String>' may contain an object reference.
                objc_setAssociatedObject(self, &NSURLProps.uuid, unwrappedValue as NSString?, .OBJC_ASSOCIATION_RETAIN_NONATOMIC)

any workaround to fix this error ASAP

@tusgino
Copy link

tusgino commented Jun 5, 2024

Same issue

@pap5508
Copy link
Author

pap5508 commented Jun 5, 2024

Same issue

I just changed the plugin to "@nativescript-community/ui-image": "^4.3.34" and it works perfectly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants