I'm using simple Ti.API.log() calls in several apps, and they worked fine - until I did the most recent XCode update. Since then, the Titanium console messages end with "focusing app simlatur" when I start an iOS App in the simulator, otherwise, no messages from my Ti.API.log() calls are displayed.
Run configuration -> log level is set to "info". Does anyone else have such problem or a solution?
It was a bug with the new version of the iOS simulator. See the issue tracker thread:
https://jira.appcelerator.org/browse/TIMOB-15569
Scrolling down in that thread will show the current workaround reproduced below. This will download and install the newest bleeding edge version of the sdk that contains the fix. They estimate that it will be merged into an official release by mid december. If you are working in titanium studio, you might have to update to the newest version of that as well. I had this issue last week and fixed it by performing the below command and updating titanium studio. (titanium studio can be updated through help->install software and then adding the site for the beta release [see - http://preview.appcelerator.com/studio/ ])
My new working setup is:
Studio version: 3.1.5.201311130103
CLI version 3.2.0
Titanium SDK version 3.2.0.v20131114123518
sudo npm install -g git://github.com/appcelerator/titanium.git
ti sdk install -b master -d
To get back to stable:
sudo npm install -g titanium#3.1.2
ti sdk select 3.1.3.GA
This is a known issue at the moment with 3.1.2.GA CLI. It has been fixed in the upcoming 3.2 CLI. Just hang in there while the AppC team works on this.
For the time being, you can uninstall the current cli via npm like so
npm remove titanium
Then install the "latest and greatest" version from github like so
npm install -g [sudo] npm install -g git://github.com/appcelerator/titanium.git
You can refer to the setup options here: https://github.com/appcelerator/titanium
Related
When I run the command "yarn start", the expo web starts automatically, and even if I open the expo client app on my iPhone the link on my app takes me to Safari and opens up a webpage. How can I open the app on expo CLI and not on my phone's browser (Safari)?
I have also tried the command "expo start --ios" and when I run it I get the error
"Simulator not installed. Please visit
https://developer.apple.com/xcode/download/ to download Xcode and the
iOS simulator. If you already have the latest version of Xcode
installed, you may have to run the command sudo xcode-select -s /Applications/Xcode.app".
I don't want to run the app on a simulator or phone's browser instead on my phone using expo client
I was dealing with this issue also hoping someone would find a solution. However, I have found the solution that worked for me at least. What I did is installed the react-native cli (reinstall if already installed) and then ran npm install in my project and it went back to normal and stopped going on my phones browser. Search documentation regarding this to install those things. I installed them in the order stated and it worked.
try update your expo-cli version and see if it helps. npm install -g expo-cli
Below is my situation,
By default Expo uses yarn. I installed any new dependencies using npm, then by default expo is built with web.
Solution:
use yarn always to install new dependencies or
use npm install once to install and now expo will build project with android or ios
On Linux try with sudo:
sudo npm install -g expo-cli
Then install packages and run:
yarn
Then run the following to clear cache and start expo:
expo start -c
This issue usually happens when you install a new npm package. You can either uninstall/reinstall the package or run the above three steps and solve your problem.
I'm trying to install react-native-camera. I'm on Ubuntu 18, Webstorm for IDE. Targeting Android.
For the Android SDK, I don't have a full Android Studio install. I've instead install only android-sdk and I'm using the sdkmanager. That works fine with my stub app, it compile and runs on Android with
react-native run-android
I've installed react-native-camera as a module with npm as per the indications:
npm install react-native-camera --save
react-native link react-native-camera
So far so good. It links. If I try to launch the app however (even before trying to actually use the camera), I get some warnings:
> Configure project :react-native-camera
Checking the license for package Android SDK Platform-Tools in /usr/lib/android-sdk/licenses
License for package Android SDK Platform-Tools accepted.
Preparing "Install Android SDK Platform-Tools (revision: 28.0.1)".
Warning: Failed to read or create install properties file.
WARNING: platform-tools package is not installed, and automatic installation failed.
So I've tried to install the platforms tools using the sdk manager & instructions provided here:
sdkmanager "platform-tools" "platforms;android-28"
Which yields:
Warning: Failed to read or create install properties file.
So I am guessing it really has to do with the sdkmanager...
Do I absolutely need 28.0.1 for react-native-camera? If so, how can I get around this issue with the SDK manager? I've tried various similar syntax for the install of the platform and it didn't work. I checked with sdkmanager --list that it's the proper name (seems to be). And if I go under android-sdk/platforms-tools all I see there is the adb file (or perhaps the install is supposed to just update that file?)
Silly me.
I needed to run the SDK manager as sudo. To do that:
sudo bash sdkmanager [installations args as per post above].
I will leave the post - I lost a ridiculous amount of time for that, hopefully it can help others....
And yes - if the platform-tools install has worked then under /platform-tools you should see a bunch of files, not just the adb one.
I am working on react native app, started the app using CRNA command to create the project then exp detach to detach. The problem I am having is this: when I started the app I was on windows, so it only created android folder while detaching, now that I want the app to build for iOS I kinda need to generate the iOS folder, to do this I am running react-native-git-upgrade so that it would generate iOS folder, but it throws an error as follow:
An error occurred during upgrade: git-upgrade ERR! Error:
react-native version in "package.json"
(https://github.com/expo/react-native/archive/sdk-26.0.0.tar.gz)
doesn't match the installed version in "node_modules" (0.54.2).
Is there any way that I can generate iOS folder without having to upgrade the app? I am so confused in this case and it seems that its quite benefit starting an app from an Mac OS system in this case, so u have both android and iOS folders generated.
Also tried to delete node_modules folder and tried npm install and it seems it added some packages but then again I get same problem when running react-native-git-upgrade
Note: I have node v10.0 installed on Mac
Anyone have any idea on this?
I successfully upgrade RN project using react-native upgrade instead of react-native-git-upgrade, here's the step:
You will be need to input project name in package.json on project root, just add this value "name": "<YOUR-APP-NAME>".
then run react-native upgrade, if you are prompted to downgrade RN package, to downgrade usenpm install react-native#x.x.x, for example: npm install react-native#0.43.4. check installed version using react-native -V.
Now run react-native upgrade, you will be asked to replace some files, input y to confirm.
After the upgrade done, revert to latest version of RN package using npm install react-native#x.x.x.
Appium 1.4.16 or any 1.4.x version works fine. We used Appium Version Manager (avm) to upgrade to new versions, but with 1.5.x onwards does not seem to be working.
I am currently on Appium 1.4.16 and would want to upgrade to Appium 1.6.3 (current latest). Can we do that?
Note - the reason we need avm is to switch between appium versions, which i feel is good to have. Helps us specially when we are in the process of upgrading our suite to cater the changes in 1.6.x, so that until we finish, we can still use an older (stable) version
Phew... after some searching, testing and playing around, found a way.
When Appium releases a newer version or a beta, I feel its an advantage to keep an older (stable) version and switch between Appium versions. Because in my experience, a newer Appium version could break some existing automation tests, so until we fix them separately, having an older version helps in executing those tests without errors.
Plus switching versions without every time needing to install / uninstall is advantageous while testing out a beta.
AVM was (rather is) a great utility that allows this switching between versions, but somehow it had stopped working after Appium1.5.0.
So here are the steps to use AVM to install Appium after version 1.5.0 and keep switching between as many instances of Appium.
At the moment, Appium1.6.4 is the official release, so I'll highlight the steps with that version.
(Also, I use a Mac but think installing it on Windows should be similar).
Steps to Install Appium with AVM:
Part A) Install AVM --> (first time only to get AVM)
Pre requisite --> install 'brew' and 'node'.
Launch terminal
npm install -g appium-version-manager
brew update
note: if step 2 did not execute, then perform steps 3 and 4.
(optional) sudo chown -R $(whoami):admin /usr/local
(optional) cd $(brew --prefix) && git fetch origin && git reset --hard origin/master
avm --help
If it shows list of commands, then congrats, avm is installed !!!
Now since AVM is not maintained since Appium1.5.0, we need to install a version < 1.5.0. Let us do with 1.4.16
Part B) Install Appium 1.4.16 (or any old version) --> (one time only)
avm 1.4.16
In Finder --> Go to Folder /usr/local/bin/ --> Open filename ‘avm’ in an editor
Search for method 'activate ()' and comment this line
ln -s $dir/node_modules/appium/bin/appium.js $AVM_PREFIX/bin/appium
replace with
ln -s $dir/node_modules/appium/build/lib/main.js $AVM_PREFIX/bin/appium
sample screenshot to edit 'activate ()' method
Similarly, Search for method 'execute_with_version ()' and comment this line
local bin=$VERSIONS_DIR/$version/node_modules/appium/bin/appium.js
replace with
local bin=$VERSIONS_DIR/$version/node_modules/appium/build/lib/main.js
note - i'll post a reference link that mentioned about this change being made to 'avm' file.
brew unlink node
brew install node6-lts (node version - v6.9.4)
and this is our final act !!! :)
Part C) Install Appium version 1.6.x (or any version above 1.5.0)
avm 1.6.x (x = minor version of appium. To install Appium version 1.6.4, in terminal type --> avm 1.6.4)
cd /usr/local/avm/versions/1.6.x/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent
npm install -g ios-deploy
if step 3 does not install ios-deply try step 4.
(optional) sudo npm install --global --unsafe-perm=true ios-deploy
brew install carthage
./Scripts/bootstrap.sh
./Scripts/build.sh -d
Launch Xcode. For Appium1.6.4, I used Xcode8.3.1
In Finder, navigate to path in step 2. Open WebDriverAgent Project in Xcode.
Sign profiles. I select the WebDriverAgent project and click on the 'Automatically manage signing'. Then select the team profiles for WebDriverAgentLib and WebDriverAgentRunner.
Build the WebDriverAgent Project and Run. If it Succeeds, then welcome aboard Appium1.6.x via AVM.
More information on singing profiles for WDA in a nice detail manner here --> https://github.com/appium/appium-xcuitest-driver/blob/master/docs/real-device-config.md
note - while executing tests on real devices, if you get an Error 65, means the WebDriverAgent has not been signed properly.
Once installed, for any Future versions of Appium, only Part C is required, no need of Part A and Part B if you've got avm
credit to the creator of Appium-Version-Manager - abhinavsingh. ( couldn't post the link as I do not have a reputation > 10 yet)
Below is the command to install and upgrade specific version of appium.
Installation :
SYNTAX : npm install -g appium#versionNumber
e.g. : npm install -g appium#1.4.16
Upgrade :
SYNTAX : npm update -g appium#versionNumber
e.g. : npm update -g appium#1.4.16
Apache Cordova Dependency Checker fails in VS Community 2015. It was previously working on this computer until I ran several VS and 3rd party tools updates. Here's what I've done to try to resolve the issue:
Installed VS / Apache Cordova (no error messages displayed) following article https://taco.visualstudio.com/en-us/docs/install-vs-tools-apache-cordova/
Run Apache Cordova Dependency Checker but VS freezes with the error message - VS 2015 has stopped working, windows will try to restart the program.
I restarted VS and cleared Cordova cache, checked environment variables (all good), then tried Apache Cordova Dependency Checker with the same freeze result.
I tried to update Apache Cordova with the fix option (no error messages) but received the same freeze results.
I completely uninstalled Apache Cordova, 3rd party tools (following article https://support.microsoft.com/en-us/kb/3016536), and VS community and then reinstalled them (no error messages) but received the same freeze results.
I installed Apache Cordova on another computer and the dependency checker phonegap app... worked. Unfortunately that's not a computer that I have access to.
What else can I do to resolve the Apache Cordova installation issue?
Thanks for any help,
Mike
Since my original post, I've had to resolve Visual Studio, Ionic, Cordova, Phonegap, plugin... environment issue several times. I've found the below works best:
Ensure platform matches plugin requirements, see platform in config.xml e.g. 6.1.1
Uninstall, reinstall latest jdk (adobe)
Clear MEF Cache - download the tool and follow instructions
Download/install latest node.js
Run the following from the command line:
Clear cache: Npm cache clean
Install latest npm: npm install -g npm
Uninstall cordova: Npm uninstall -g cordova
Reinstall cordova: Npm install –g cordova (note, this took 5+ tries to complete without errors. No other changes were made between runs. Not sure
why. Found others complaining about the same issue.)
Remove Android platform: Cordova platform remove android
Install Cordova platform add android#6.X.X (Note, as of 4/20/17 cordova and android compatibility issue. Build error - unable to find installed version of gradle. resolved by running (npm install -g cordova#6.4.0) and (cordova platform add android#6.1.2). Addt'l build errors, resolved by updating components in Android SDK Manager)
Uninstall/Reinstall plugins from the command line. For example:
cordova plugin remove phonegap-plugin-push
cordova plugin add phonegap-plugin-push variable SENDER_ID="YourID#"
npm install bower -g
Restart Visual Studio - Verify plugins were installed via config.xml
Install Ionic:
npm uninstall -g ionic
npm install -g ionic (note: to install specific version, npm install -g ionic#2.2.3)
$ ionic platform add ios
$ ionic platform add android (note: redundant, already added above)
I recommend putting as much of this as possible in a batch file with a pause between commands. Verify each command was successful, if not press ctrl+break at the pause to term the batch file early. The batch file is an easy way to restore your environment when everything breaks again. Stuff happens!
I also started using a VM (oracle virtualbox) for my development environment. That way I can backup my environment before making changes and easily restore. Don't forget to upload to GIT on a daily basis. GIT and VMs are my lifesavers.
Cool NPM commands:
npm list (lists all installed packages)
npm prune (removes packages not depended on by your project according to your package.json)
npm outdated (tells you which installed packages are outdated with respect to what is current in the npm registry but allowable by the version definition in your package.json. Make sure all up-to-date)
Please feel free to add/make suggestions to the above list.
-Mike