Nativescript SideDrawer not able to run in iOS emulator but working fine in android - nativescript

Hit the below when running in iOS emulator but working fine in andriod.
JS ERROR ReferenceError: Can't find variable: TKSideDrawerDelegate
Thanks for the help

Possible solution as originally posted here
I spent quite some time and finally get it work by using the following
steps (in my project folder):
tns platform remove ios
rm -rf node_modules lib platforms
tns plugin add nativescript-telerik-ui
Modify app.module.ts and add the nativescript-telerik-ui directives respectively
In iOS emulator, delete the existing app (I found this is critical)
tns run ios --emulator
I found the critical step seems to first delete the app manually on
iOS emulator after the plugin was added.

Related

Nativescript: Error Building for iOS Simulator

I have followed the complete install guide for nativescript on a Mac (Big Sur). Also when running tns doctor everything seems fine. However, when i'am running tns build ios or tns run ios i get the following error:
error: Building for iOS Simulator, but the linked and embedded framework 'TNSWidgets.framework' was built for iOS + iOS Simulator. (in target 'projectapp' from project 'projectapp').
Could someone please tell me how to fix this. I installed nativescript 7.0.11 and
x-code 12.3
Yesterday with the Xcode update (12.3) I've got the same error, after seeing a lot of posts about this error the solution from Niko Dovidija IS THE CORRECT ONE.
My environment:
Xcode 12.3
iOS platform 6.5.3
Nativescript 6.7.8
In order to build the application in CLI update build.xconfig in iOS platform and add this line:
VALIDATE_WORKSPACE = YES
Posts about "similar" errors and didn't work for me.
Building for iOS simulator
Building for iOS simulator 'AFNetworking.framework'
So I just updated Xcode to 12.3 today, using nativescript 7.0.11 in my project and I got a simular issue. What worked for me was:
Open the platforms/ios folder using Xcode
Select "yourprojectname.xcodeproj" from the list
Select yourprojectname from the Targets
Expand Build Options and find Validate Workspace
Change to Yes
Rebuild the project
After that, I got a successful build.
Please note that I also needed to run ns platform clean ios command in order to make the build work after updating my Xcode to 12.3

Flutter - Getting an error archiving with Xcode

I finished up my small flutter app, where I am using a webview (webview_flutter: ^0.3.5+3). All works great on simulator.
I have run flutter build iOS --release, selected runner from targets and set it to generic iOS device.
Now I want to archive it in Xcode but I keep getting this error about "Library not found for -lwebview_flutter"
I can't seem to find a solution and would really appreciate some help
If you're using Flutter plugins that installed Pods in the iOS build, make sure that you've opened the Xcode project with .xcworkspace
If that still didn't work, you can try regenerating the iOS build folder by deleting the /ios folder and run flutter create --platforms=ios to generate project files for the iOS build.

Cordova Build causing xcodeBuild to quit unexpectedly

I've got a basic react app running in Cordova, when I run a
cordova build ios
Things seem to work OK but then after a short delay I get the following:
If I run a
cordova run ios
I get the following
No target specified for emulator. Deploying to iPhone-X, 12.1
simulator
/Users/Liam/code/ProjectName/app-src/platforms/ios/build/emulator/ProjectName/Info.plist
file not found.
I've done the usual, clean, remove platform, re-add platform but same issues. Any ideas what causes this or how to debug further?
I can run the Cordova App from XCode

Nativescript: Socket connection timed out

I am on Mac and I want to run my app on a USB-C connected Android device.
My first step is always to remove node_modules, hooks and platforms folders, aswell as package.lock.json file.
After that I run tns build android.
Once the build is completed I either run tns run android or start the application via nativescript sidekick.
But it always ends like this now:
Project successfully built.
Installing on device 5B24000362...
Successfully installed on device with identifier '5B24000362'.
Unable to apply changes on device: 5B24000362. Error is: Socket connection timed out..
Since I had this error already 2 days ago and could not continue working on the App, I updated all nativescript and angular dependencies following this upgrade instructions.
After that update, the app worked again.
But now after a few hours I get the same error again (same app).
I even pushed the app to a git repository after it worked, and recloned it now, does not work.
If you have nativescript-plugin-firebase installed. Just update it with:
$ tns plugin update nativescript-plugin-firebase
I ran into this same issue. Interestingly, in my case, it was because the emulated device did not have enough storage to install the app. As soon as I deleted some other builds off of it, it worked.
Make sure you are using the latest NativeScript tooling, not only the dependencies. You can install the latest CLI by executing npm i -g nativescript.
If the application is not started at all, you can check this answer to a similar issue in NativeScript CLI GitHub repository.
I finally got this working by removing admob from node_modules\nativescript-plugin-firebase\platforms\android\include.gradle
Line to take out:

Missinig provisoning profile error when building an ios ionic app using xcode 10

I updated my version of xcode yesterday, and now when I build an ionic app that worked perfectly before I get the following error when validating the ipa:
Unable to process application at this time due to the following error: Missing Provisioning Profile - Apps must contain a provisioning profile in a file named embedded.mobileprovision..
How can I get the embedded.mobileprovision to be generated/ included?
Thanks,
Yuval
Currently the best workaround is to opt-out of the new build system:
If you're building on the command-line, you can specify --buildFlag="-UseModernBuildSystem=0":
Cordova CLI
cordova run ios --buildFlag='-UseModernBuildSystem=0'
cordova build ios --buildFlag='-UseModernBuildSystem=0'
Ionic CLI
ionic cordova run ios -- --buildFlag="-UseModernBuildSystem=0"
ionic cordova build ios -- --buildFlag="-UseModernBuildSystem=0"
If you're building with a build.json config file, you can add the following under the iOS release or debug config:
"buildFlag": [
"-UseModernBuildSystem=0"
]
If you are opening the project in the Xcode IDE, you need to change the build system in Workspace Settings to "Legacy Build System"
Solution from here
Worked For Me. Cheers.
https://github.com/apache/cordova-ios/issues/407 has an answer,
\just build with the --buildFlag="-UseModernBuildSystem=0" and adjust project settings to build using legacy mode.
It seems like this issue has been resolved with the release of cordova ios 5.0.0 ( https://cordova.apache.org/announcements/2019/02/09/cordova-ios-release-5.0.0.html ) - they added compatibility with the modern build system

Resources