NativeScript / ios-jsc

NativeScript for iOS using JavaScriptCore
http://docs.nativescript.org/runtimes/ios
Apache License 2.0
298 stars 59 forks source link

Icons from inner resource bundle named as its framework are missing #1252

Closed jibon57 closed 4 years ago

jibon57 commented 4 years ago

Environment ✔ Component nativescript has 6.4.0-2020-01-30-145311-14104 version and is up to date. ✔ Component tns-core-modules has 6.3.2 version and is up to date. ✔ Component tns-android has 6.3.1 version and is up to date. ✔ Component tns-ios has 6.3.0 version and is up to date.

Describe the bug I am trying to implement DKImagePickerController library in one of my project. I have added in my app's Podfile like this: pod 'DKImagePickerController' It's working as expected but camera icon is missing. But if you run demo project from that library then that icon will show. Please check the attached screenshorts

let picker = DKImagePickerController.new();
picker.assetType = DKImagePickerControllerAssetType.AllPhotos;
picker.singleSelect = true;
picker.showsCancelButton = true;

picker.didSelectAssets = ((res) => {
})
From NativeScript: Demo project from repo:
Simulator Screen Shot - iPhone 11 - 2020-02-11 at 19 36 20 Simulator Screen Shot - iPhone 11 - 2020-02-11 at 19 36 42]

What may be the reason? Please give me advice.

Thanks

jibon57 commented 4 years ago

I have noticed one interesting thing.. I tried with beta v8 runtime by tns platform add ios@beta-v8 Now that icon is showing | Simulator Screen Shot - iPhone 11 - 2020-02-11 at 19 52 13

mbektchiev commented 4 years ago

Hi @jibon57 I tested and cannot reproduce this issue. You haven't shown how you present the image picker. But in my project it works fine with this snippet:

const rootVC = application.ios.nativeApp.keyWindow.rootViewController;
const visibleVC = rootVC.visibleViewController;
visibleVC.presentViewControllerAnimatedCompletion(picker, true, null );
jibon57 commented 4 years ago

@mbektchiev thanks. I just tried in my project again using 6.4.1 but still having same issue. To present picker I was using:

let viewController = UIApplication.sharedApplication.keyWindow.rootViewController;
viewController.presentViewControllerAnimatedCompletion(picker, true, null);

If you want then I can send you my project by email.

jibon57 commented 4 years ago

Please check attached project that I have created from blank template

Archive.zip

mbektchiev commented 4 years ago

I managed to reproduce it. It seems that as soon as you modify any property of picker it starts happening.

mbektchiev commented 4 years ago

I'll continue to investigate

mbektchiev commented 4 years ago

I tried it from Swift to make sure that this bug isn't related to the DKImagePicker framework itself and it didn't happen, so definitely related to NativeScript in some way

mbektchiev commented 4 years ago

@jibon57 The fix should be live with tns-ios@next in about an hour. You can test that it works in your project after it's been published.

jibon57 commented 4 years ago

@mbektchiev thank you! It's working now :)