nordnet / cordova-universal-links-plugin

[DEPRECATED] - Cordova plugin to support Universal/Deep Links for iOS/Android.
https://github.com/nordnet/cordova-universal-links-plugin/issues/160
MIT License
349 stars 526 forks source link

Not working when build IPA file by command line [IOS] #115

Closed dangthanhnhat closed 5 years ago

dangthanhnhat commented 7 years ago

I'm using command line build IPA file "cordova build ios --device" and I can't open app by link in email. However if I using xcode and build directly on my Iphone it's working. Can anyone know how to make it work with command line build ?

haiquangtran commented 7 years ago

I have a similar problem too. I am using TACO remotebuild to do a build from my local Windows machine onto my Mac which then sends back an .ipa file. When I do this remotebuild the universal links do not work, however, when I build it directly from Xcode onto an iPhone this solves the problem.

I think the problem is within the associated domains and the generation of the .entitlements file that the plugin generates in the resource folder. I think the issue is the same as this one: https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/issues/299 and this looks similar: https://github.com/nordnet/cordova-universal-links-plugin/issues/8.

Mainly the line "When plugins modify the value of CODE_SIGN_ENTITLEMENTS for their own purposes and point to Resources/{appName}.entitlements, they dont merge with the capabilities or other config thats already set in Cordova's Entitlements-debug.plist or Entitlements-release.plist files. This messes up Cordovas automatic release/export through the CLI because now you're required to manually change capabilities before building/releasing. This is a problem for people who use the Cordova CLI as intended to where you shouldnt even need to open Xcode and can do Continuous integration builds."

Please help

haiquangtran commented 7 years ago

The problem is the entitlements file generated by this plugin.

"Cordova now uses build.xcconfig to set: CODE_SIGN_ENTITLEMENTS = $(PROJECT_DIR)/$(PROJECT_NAME)/Entitlements-$(CONFIGURATION).plist

This overrides the entitlements file set by this plugin, and associated domains are not appearing in the new Entitlements-Debug.plist / Entitlements-Release.plist" See Issue: https://github.com/nordnet/cordova-universal-links-plugin/issues/89.

@chancezeus has created a fork. I found that the changes in the fork fixed the deeplinking entitlements problem. See https://github.com/chancezeus/cordova-universal-links-plugin/commit/9e313aa63d13fbdc91c3a10d17f006f5367dcf90.

@nikDemyankov Can we please get the changes into this plugin?

mikew commented 7 years ago

After that patch working, it looks like things have broken again:

** BUILD FAILED **

The following build commands failed:
    CpResource MyApp/Resources/MyApp.entitlements build/emulator/MyApp.app/MyApp.entitlements
(1 failure)
Error: Error code 65 for command: xcodebuild with args: -xcconfig,/Users/mike/Work/sst/MyApp/platforms/ios/cordova/build-debug.xcconfig,-workspace,MyApp.xcworkspace,-scheme,MyApp,-configuration,Debug,-sdk,iphonesimulator,-destination,platform=iOS Simulator,name=iPhone SE,build,CONFIGURATION_BUILD_DIR=/Users/mike/Work/sst/MyApp/platforms/ios/build/emulator,SHARED_PRECOMPS_DIR=/Users/mike/Work/sst/MyApp/platforms/ios/build/sharedpch

Could we please get some updates to this repository? Or just some acknowledgement that it is abandoned.

alexstanbury commented 6 years ago

I'm having the same issue, just spent hours checking and rechecking everything to try and work out why it wasn't working on iOS, at least now I know I had it set up correctly and this was the problem!

nordnet-deprecation-bot commented 5 years ago

👋 Hi! Thank you for your interest in this repo.

đŸ˜ĸ We are not using nordnet/cordova-universal-links-plugin anymore, and we lack the manpower and the experience needed to maintain it. We are aware of the inconveniece that this may cause you. Feel free to use it as is, or create your own fork.

🔒 This will now be closed & locked.

ℹī¸ Please see #160 for more information.