Comments (13)
The main issue is that it now targets SDK v11 on iOS, so this should be changed in plugin too. Besides that it works great!
One small suggestion though: is it possible to make this plugin to not write absolute paths to the Podfile
somehow? This file should be versioned, and developers obviously have different directory structure on their machines. Capacitor
prefixes its plugins' paths with ../..
instead, but could something like this be done here?
from generic-oauth2.
@leshik I have searched for absolute paths but not found anything.
Are you sure you mean the plugins Podfile? Can you point me to that file?
I have that in my capacitor project ios/App/Podfile
when I run npx cap sync
the Capacitor cli writes an absolute path to the plugin.
from generic-oauth2.
@moberwasserlechner Here are exact steps you can do to reproduce the issue:
npx @capacitor/cli create cap-test-app
cd cap-test-app
npm i @byteowls/capacitor-oauth2
npx cap add ios
Then execute cat ios/App/Podfile
, it will look like:
platform :ios, '11.0'
use_frameworks!
target 'App' do
# Add your Pods here
# Automatic Capacitor Pod dependencies, do not delete
pod 'Capacitor', :path => '../../node_modules/@capacitor/ios'
pod 'CapacitorCordova', :path => '../../node_modules/@capacitor/ios'
pod 'ByteowlsCapacitorOauth2', :path => '/Users/leshik/projects/cap-test-app/node_modules/@byteowls/capacitor-oauth2'
# Do not delete
end
Note that, while Capacitor
and CapacitorCordova
use relative paths, ByteowlsCapacitorOauth2
uses the absolute one.
PS: my resulting package.json
is:
{
"name": "capacitor-app",
"version": "1.0.0",
"description": "An Amazing Capacitor App",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [
"capacitor",
"mobile"
],
"author": "",
"license": "ISC",
"dependencies": {
"@byteowls/capacitor-oauth2": "^1.0.0-alpha.24",
"@capacitor/cli": "^1.0.0-beta.11",
"@capacitor/core": "^1.0.0-beta.11",
"@capacitor/ios": "^1.0.0-beta.11"
}
}
from generic-oauth2.
That's what I meant.
Capacitor CLI writes the dependency in there and also resolves the path to it. I guess this happens for all custom plugins. This is most likely a bug in the CLI or I miss sth.
# Automatic Capacitor Pod dependencies, do not delete
pod
# Do not delete
from generic-oauth2.
I'll create a task in the Capacitor repo.
from generic-oauth2.
I guess this happens for all custom plugins. This is most likely a bug in the CLI
That's what I suspected too. If you know how to fix it, maybe better to open PR there. They are quick to merge bug fixes.
from generic-oauth2.
I know where it must happen but not how to fix it. I will point them to it.
from generic-oauth2.
from generic-oauth2.
Upgrade done for Web and Android with 1.0.0-alpha.25
I tested it on Win10 and ran into ionic-team/capacitor#992 when npx cap sync android
had to manually fix it.
Up next IOS with next couple of npm versions ;)
from generic-oauth2.
Docs for the next upgrade of Capacitor:
Use concrete version of Capacitor in
- https://github.com/moberwasserlechner/capacitor-oauth2/blob/master/ByteowlsCapacitorOauth2.podspec#L14
- https://github.com/moberwasserlechner/capacitor-oauth2/blob/master/ios/ByteowlsCapacitorOauth2/Podfile#L10
I will not use wildcard versions because I get unintentional updates in the libs.
After changing the dependencies do
- Clean the cocoapod cache
pod cache clean --all
- Update the cocoapod
sudo gem install cocoapods
- Update the local cocoapod repository with the changes fromt he master
pod update
- If that does not work remove the
Podfile.lock
and runpod install
from generic-oauth2.
I have problems getting the right version of the Capacitor in the ios part, which also works when I try to test it in my project. 1.0.0-beta.26
is currently breaking ngx cap sync ios
.
I asks the following in Slack
hi,
i'm trying to upgrade my custom plugin to beta.11 and I have problems.To get the new beta.11 I had to use the concrete version in my podspec
s.dependency 'Capacitor', '~> 1.0.0-beta.11'
andpod 'Capacitor', '~> 1.0.0-beta.11'
in my Podfile.If I now publish the plugin and try it in my project and run
npx cap sync ios
I get✔ Copying native bridge in 25.87ms ✔ Copying capacitor.config.json in 1.77ms ✔ copy in 301.00ms ✔ Updating iOS plugins in 8.11ms Found 1 Capacitor plugin for ios: ByteowlsCapacitorOauth2 (1.0.0-alpha.26) ✖ Updating iOS native dependencies: ✖ update ios: [error] Error running update: Analyzing dependencies Fetching podspec for `ByteowlsCapacitorOauth2` from `/Users/moberwasserlechner/development/tc/team-conductor-go/node_modules/@byteowls/capacitor-oauth2` Fetching podspec for `Capacitor` from `../../node_modules/@capacitor/ios` Fetching podspec for `CapacitorCordova` from `../../node_modules/@capacitor/ios` [!] CocoaPods could not find compatible versions for pod "Capacitor": In Podfile: ByteowlsCapacitorOauth2 (from `/Users/moberwasserlechner/development/tc/team-conductor-go/node_modules/@byteowls/capacitor-oauth2`) was resolved to 1.0.0-alpha.26, which depends on Capacitor (~> 1.0.0-beta.11) Capacitor (from `../../node_modules/@capacitor/ios`) Sync finished in 3.291s``` I then reverted the `podspec` and `Podfile` not using concrete versions. Now I don't get the new Capacitor version but an old one `0.0.113` with the GCDWebServer still present. See my console logs after running `pod update Capacitor` once I changed the dependency back. ```Analyzing dependencies Downloading dependencies Installing Capacitor 0.0.113 (was 1.0.0-beta.11 and source changed to `https://github.com/CocoaPods/Specs.git` from `https://github.com/cocoapods/specs.git`) Installing CapacitorCordova 0.0.113 (was 1.0.0-beta.11 and source changed to `https://github.com/CocoaPods/Specs.git` from `https://github.com/cocoapods/specs.git`) Installing GCDWebServer (3.4.2) Using OAuthSwift (1.2.2) Generating Pods project Integrating client project Sending stats Pod installation complete! There are 2 dependencies from the Podfile and 4 total pods installed.``` Any ideas?
from generic-oauth2.
Due to a problem in the Capacitor release script I needed to use beta.10
in the plugin's podspec
and Podfile
. So as soon as the plugin is used in an App the Capacitor versions match.
Thanks to @jcesarmobile for helping.
The App still uses beta.11.
from generic-oauth2.
I tested alpha.27
on iOS and it works.
from generic-oauth2.
Related Issues (20)
- Feat: Integration with trapeze to improve configuration
- Auth0 HOT 1
- Bug: Intent filter not working for redirection after login HOT 2
- Feat: Support Android 13 HOT 2
- Support for Capacitor 5 HOT 10
- Is there a way to get a login prompt? HOT 1
- Azure B2C ui_locales is directly supported via the auth request builder exception HOT 2
- I am not able to hide URL bar HOT 2
- accessTokenEndpoint quirk with django backend HOT 1
- Google with android says "Custom scheme URIs are not allowed for 'WEB' client type" HOT 3
- App Store Connect Issue
- Hide navigation bar and footer on iOS HOT 5
- Evidence of the use of safari
- Question: What kind of browser is used for login? HOT 1
- Feat: support universal links on iOS HOT 3
- Azure SSO; Response comes from azure, but does not come to authenticate
- capacitor-oauth2 - Azure SSO is not working in android and ios.Bug:
- Feat: Electron
- IOS 17 keyclock login not working
- Bug: Jest not working when using the plugin
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from generic-oauth2.