How do I build a Pebble.js project from the command line tools? - pebble-watch

I created a new Pebble.js project in the CloudPebble editor, and I can successfully build it and push it to my watch from there. The problem arises when I try and build/install it from the command line, with the pebble build command returning this:
[ERROR ] The Pebble project directory is using an outdated version of the SDK!
[ERROR ] Try running `pebble convert-project` to update the project
And the pebble convert-project command returning:
[ERROR ] Could not find usage of PBL_APP_INFO
Now I know for a fact that I have a working Pebble project here, and this is the exact code which the CloudPebble editor created; so how am I supposed to use the SDK then?

To compile a Pebble.js project with the Pebble SDK on your computer you need to follow these steps:
Fork the official Pebble.js repository from Github. This is a valid Pebble project
Replace the JS code in src/js/app.js with your code. If you have multiple files, you can add them in that folder too. You should not touch main.js or loader.js. Leave them here.
Compile the project just like you would compile any Pebble project (pebble build)
Hope this helps!

Related

How to fix header file not found when Archive build on Xcode?

Hello I develop this iOS app use Dart language.
recently, Develop completed.
To upload an iOS app to your AppStore, need to set it up on that site.
https://developer.apple.com/
https://appstoreconnect.apple.com/
and I try Build -> Archive click on Xcode
but fail message
ios/Runner/GeneratedPluginRegistrant.m:6:9:
'device_info/DeviceInfoPlugin.h' file not found
How to fix header file not found message on Xcode?
thanks
I just discovered that this class of error can also come about when you inadvertently open the project file Runner.xcodeproj instead of the workspace file Runner.xcworkspace.
Two options
1.Using the command line build your project using "flutter create -i swift appname".
2.If you've already created a project you'll have to add 'use_frameworks!' to your podfile.
Option 2 might not be the best option because there is a cocoapods issue that causes certain packages like OneSignal will cause the app build to fail.

Can't find React native project on iOS Simulator or Xcode project

I have deleted my project on Xcode may it be .xcworkspace or .xcodeproj.
Because of that, I had to delete IOS and android folders while downgrading, updating and re-upgrading my react version to re-install IOS and android folders.
Thanks to that the emulator is working but unfortunately the project isn't present in the emulator and is still absent with Xcode. One thing to point out is that the simulator only appears when ran in the integrated terminal and nor in general terminal after cd-ing in the project folder.
Can anyone please help re-integrating the project in the emulator and on Xcode, please.
Here is the error when the emulator is running in a general terminal:
Here is the error when the emulator is running in a general terminal:
error Command failed: xcrun instruments -s
xcrun: error: Failed to determine realpath of '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk' (errno=No such file or directory)
xcrun: error: unable to find utility "instruments", not a developer tool or in PATH
Here is the error for building the project within emulator when ran from VS code integrated terminal:
error Failed to build iOS project. We ran "xcodebuild" command but it exited with error code 65. To debug build logs further, consider building your app with Xcode.app, by opening project.xcodeproj
The process you need to follow is so similar to renaming a react native app. Basically you just need to run react-native upgrade in your root project directory. For further info you can check another question here. The instructions below explains how to create another react native project based on a copied one with a new name.
First copy the directory which your to-be-name-changed application exists. And go to your newly cloned directory.
Change the name at index.ios/android.js file which is given as a parameter to AppRegistry.
Change the name and version accordingly on package.json
Delete /ios and /android folders which are remaining from your older app.
Run $react-native upgrade to generate /ios and /android folders again.
Run $react-native link for any native dependency.
Finally run $react-native run-ios or anything you want.
Courtesy of
https://stackoverflow.com/questions/42506068/how-can-i-regenerate-ios-folder-in-react-native-project

Phonegap Build is failing due to dependency error

Im building the Phonegap App using Phonegap Build.
Phonegap Build cant create Android APK, build is failing with below error, Morning I was able to create the APK but now below error is thrown. Note that there is no config file changes between morning and now.
Please help
App Id: 2074580
https://build.phonegap.com/apps/2074580/builds
Could not resolve all dependencies for configuration ':_debugCompile'.
Could not find com.android.support:support-v4:23.4.0.
Searched in the following locations:
https://repo1.maven.org/maven2/com/android/support/support-v4/23.4.0/support-v4-23.4.0.pom
https://repo1.maven.org/maven2/com/android/support/support-v4/23.4.0/support-v4-23.4.0.jar
file:/android-sdk/extras/android/m2repository/com/android/support/support-v4/23.4.0/suppo rt-v4-23.4.0.pom
file:/android-sdk/extras/android/m2repository/com/android/support/support-v4/23.4.0/suppo rt-v4-23.4.0.jar
file:/android-sdk/extras/google/m2repository/com/android/support/support-v4/23.4.0/suppor t-v4-23.4.0.pom
file:/android-sdk/extras/google/m2repository/com/android/support/support-v4/23.4.0/suppor t-v4-23.4.0.jar
Required by:
:project:unspecified
I had a similar problem with this plugin. I needed to update some android libraries. This command solved it all for me:
android update sdk --no-ui --all --filter "extra-android-m2repository"
If you don't have the android command in your command line, you can navigate to the SDK directory.
Answered here; https://github.com/phonegap/phonegap-plugin-push/issues/928. You need to switch back to Cordova version 1.6.3 or 1.6.4. But I just checked and upgrading to the latest nightly build also seems to fix it. When working in Visual Studio, clear the cordova cache too (after setting the correct version):
Tools => Options => Tools for Apache Cordova => Clear Cordova Cache.

'hello/Hello.h' file not found - Trying to build/run iOS gomobile Hello app

I am building the gomobile Hello example app, but am running into the following problem: When trying to build and run the app after opening it in Xcode (7.1), I get the error 'hello/Hello.h' file not found'
From what I can tell, Hello.h is in fact in the hello folder of the native directory.
Following this discussion on Github, it seems like this is due to a recent change in the way Xcode 7 updates paths for the headers.
The proposed solution is to check Copy items if needed when importing the framework:
I can confirm that this fixes the issue. But note that you would then need to re-import the framework every time you make changes and build the go code.

TeamCity not building Cordova project when building PhoneGap project

I'm trying to build a PhoneGap application using TeamCity and am receiving an error stating that:
AppDelegate.h:30:9: fatal error: 'Cordova/CDVViewController.h' file not found
My xcodeproj actually has the Cordova.xcodeproj file inside the project rather than referencing it from anywhere else. I can tell it is in fact building the project as when I deliberately put in a syntax error into one of its files the build fails on that file, however it doesn't seem like the compiled output is being picked up by the main project.
I can build the project fine through xcode.
Thanks,
Matt

Resources