Red-Folder / bgs-core

Core code for the Cordova Background Service
Other
236 stars 105 forks source link

Updated plugin to fit with new Cordova/Ionic plugin specs (NPM) #78

Closed Squix closed 6 years ago

Squix commented 6 years ago

I added package.json and tweaked plugin.xml to allow usage of this plugin with the new Cordova/Ionic CLI using NPM. Without these ajustements, "cordova plugin add https://github.com/Red-Folder/bgs-core.git" command doesn't work. Tested on my project, it works fine.

Red-Folder commented 6 years ago

@Squix I've not had a viable dev environment for a while. I do now have a reasonable machine available so I'll have another go at setting it up again.

What versions are you using of Cordova, Android SDK, etc?

Thanks

Squix commented 6 years ago

Good news then ! Sure, here are my dev environment specs :

(Tested on device, Samsung Galaxy S4Mini, API 19, Android 4.4.2)

Red-Folder commented 6 years ago

I believe this is the same issue https://github.com/Red-Folder/bgs-core/issues/79

Red-Folder commented 6 years ago

Thanks @Squix - all seems good. I'll double check against my tests when I get a chance

shamun commented 6 years ago

Steps are Downloadable from: V1 https://we.tl/mYMqCE5P0N. V2 https://we.tl/wEF7UPOhrh.

Step 1:

$ cordova create hello com.tpttest.hello hello

Step 2:

manually download the https://github.com/Red-Folder/bgs-core and modify as per @Squix image

Step 3:

copy the bgs-core-master directory and pasted as below:

image image

Step 4:

modify the fetch.json and config.xml

image

image

Step 5: Failed

macbook:hello sun$ cordova plugin add https://github.com/Red-Folder/bgs-core.git
Error: Failed to fetch plugin https://github.com/Red-Folder/bgs-core.git via registry.
Probably this is either a connection problem, or plugin spec is incorrect.
Check your connection and plugin name/version/URL.
Failed to get absolute path to installed module

What is that i am doing wrong? Is Step 5 even required?

Squix commented 6 years ago

@shamun you downloaded bgs-core locally so no I don't think you need to fetch it again from repository, however this is a strange error, I don't know fetch.json, what system are you using ?

shamun commented 6 years ago

@Squix : image

i think the downloadable V2 link is working. I did mistake in the Step 4 before my last edit. After the last edit i get now following:

image

Is it OK like this?

Red-Folder commented 6 years ago

Sorry, I've lost what we are now talking about.

Squix commented 6 years ago

Yes @shamun the CLI said that the plugin has been installed, but in the future please open a ticket for those problems :D Don't worry @Red-Folder, just helping a struggling user here ;)