Skip to content
This repository has been archived by the owner on Aug 11, 2020. It is now read-only.

.podspec #149

Open
ttahmouch opened this issue Oct 31, 2016 · 9 comments
Open

.podspec #149

ttahmouch opened this issue Oct 31, 2016 · 9 comments
Assignees

Comments

@ttahmouch
Copy link

We have a native iOS application that contains CDVViewControllers. It was not generated using the cordova create CLI.

We would like to be able to depend on phonegap/phonegap-plugin-contentsync using Cocoapods much like the Embedding the Webview example demonstrates for apache/cordova-plugin-* plugins here.

Any intention of releasing a .podspec for phonegap-plugin-contentsync analogous to that of cordova-plugin-camera found here?

@purplecabbage
Copy link
Member

Yeah, this is in the works. No specific timeline yet.

@ttahmouch
Copy link
Author

I just created pull request #152 as an example of changes that may be necessary to support Cocoapods with this plugin.

Let me know your thoughts.

@macdonst
Copy link
Member

macdonst commented Nov 7, 2016

@ttahmouch thanks for the PR and issue. @hollyschinsky and I were just talking about this last week.

@macdonst
Copy link
Member

macdonst commented Nov 7, 2016

@ttahmouch @hollyschinsky can you take a look at this PR on CocoaPods/Specs to make sure I've got it right: CocoaPods/Specs#14215

@ttahmouch
Copy link
Author

I cloned your fork, i.e., macdonst/Specs, and checked out branch contentsync.

I looked at the difference between 1.2.5.cocoapods and 1.3.0 .podspecs as shown below. It appears the only changes are the version of the .podspec, and the version of the tagged release. I believe that is everything I expected would change if pull request #152 was merged.

It appears CocoaPods/Specs#14215 was closed as they do not accept pull requests to that repository. I uploaded my .podspec with pod trunk push phonegap-plugin-contentsync.podspec as documented here.

If you run into problems publishing the .podspec because of ownership claims, you should be able to resolve the claim here.

Looks good. Good work, @macdonst . 👍

$ git diff \
master:Specs/phonegap-plugin-contentsync/1.2.5.cocoapods/phonegap-plugin-contentsync.podspec.json \
contentsync:Specs/phonegap-plugin-contentsync/1.3.0/phonegap-plugin-contentsync.podspec.json 
...
@@ -1,6 +1,6 @@
 {
...
-  "version": "1.2.5.cocoapods",
+  "version": "1.3.0",
...
@@ -10,8 +10,8 @@
...
   "source": {
-    "git": "https://github.com/ttahmouch/phonegap-plugin-contentsync.git",
-    "tag": "1.2.5.cocoapods"
+    "git": "https://github.com/phonegap/phonegap-plugin-contentsync.git",
+    "tag": "v1.3.0"
   },
...

@ttahmouch
Copy link
Author

I just noticed a small problem with the way I had originally written the .podspec. I didn't know at the time what iOS Deployment Target to specify so I just didn't specify a target.

However, now when you pod install phonegap-plugin-contentsync, it defaults the iOS Deployment Target to 4.3. This causes a problem when compiling ContentSync.m with usages of __weak. This should be easily addressable with the following.

phonegap-plugin-contentsync.podspec.json

"platforms": { "ios": "8.0" }

phonegap-plugin-contentsync.podspec

spec.platform = :ios, '8.0'

Here is the Ruby formatted .podspec I published with pod trunk push phonegap-plugin-contentsync.podspec. It got transcoded to phonegap-plugin-contentsync.podspec.json during the push.

Here is the .podspec syntax reference for the platform field.

@macdonst
Copy link
Member

@ttahmouch awesome, I dealt with some Ruby craziness this morning and will hopefully be able to publish a pod today or tomorrow.

@macdonst macdonst self-assigned this Nov 10, 2016
@ttahmouch
Copy link
Author

Did you have any issues attempting to publish the 1.3.0 .podspec, @macdonst ?

@macdonst
Copy link
Member

@ttahmouch only lack of time because of other work but I've got this on my radar this week.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Development

No branches or pull requests

4 participants