AppLovin / AppLovin-MAX-Cordova

MIT License
10 stars 12 forks source link

Failed to install plugin on iOS #41

Open Carlosps opened 9 months ago

Carlosps commented 9 months ago

MAX Plugin Version

1.1.2

Cordova Version

12.0.0

Device/Platform Info

iOS ("cordova-ios": "^6.2.0")

Current Behavior

After updating XCode to 14.3.1 I am unable to install plugin on iOS.

I keep getting a lot of Found multiple specifications for `AppLovinSDK and at the end An error occurred while running subprocess cordova.

Here are some logs:

Discovered plugin "cordova-plugin-applovin-max". Adding it to the project

Installing "cordova-plugin-applovin-max" for ios

Running command: pod install --verbose

Failed to install 'cordova-plugin-applovin-max': Error: pod: Command failed with exit code 1 Error output:

pod: Command failed with exit code 1 Error output:

[!] Found multiple specifications for `AppLovinSDK (4.3.0)`:
- /Users/user/.cocoapods/repos/trunk/Specs/9/c/c/AppLovinSDK/4.3.0/AppLovinSDK.podspec.json
- /Users/user/.cocoapods/repos/cocoapods/Specs/9/c/c/AppLovinSDK/4.3.0/AppLovinSDK.podspec.json
    at ChildProcess.whenDone (/Users/user/Desktop/node_modules/cordova-common/src/superspawn.js:136:25)
    at ChildProcess.emit (node:events:390:28)
    at maybeClose (node:internal/child_process:1064:16)
    at Socket.<anonymous> (node:internal/child_process:450:11)
    at Socket.emit (node:events:390:28)
    at Pipe.<anonymous> (node:net:687:12)
- /Users/user/.cocoapods/repos/cocoapods/Specs/9/c/c/AppLovinSDK/6.9.5/AppLovinSDK.podspec.json

.cocoapods/repos/trunk/Specs/9/c/c/AppLovinSDK/6.14.4/AppLovinSDK.podspec.json

- /Users/user/.cocoapods/repos/trunk/Specs/9/c/c/AppLovinSDK/6.14.4/AppLovinSDK.podspec.json

Here is how mu Podfile look:

# DO NOT MODIFY -- auto-generated by Apache Cordova
source 'https://cdn.cocoapods.org/'
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '11.0'
use_frameworks!
target 'Project' do
    project 'Project.xcodeproj'
    pod 'OneSignalXCFramework', '3.12.4'
    pod 'PurchasesHybridCommon', '5.3.0'
    pod 'Firebase/Analytics', '~> 8.8.0'
    pod 'Firebase/Crashlytics', '~> 8.8.0'
    pod 'Google-Mobile-Ads-SDK', '~> 10.1.0'
    pod 'GoogleUserMessagingPlatform', '~> 2.0.0'
    pod 'AppLovinSDK'
end

Expected Behavior

No response

How to Reproduce

Have a cordova project and add "cordova-plugin-applovin-max": "^1.1.2",

Additional Info

No response

thomasmso commented 9 months ago

Can you update the pod 'AppLovinSDK' line in the Podfile to pod 'AppLovinSDK', '11.11.2', then run pod install --repo-update where the Podfile is to see if the pods install correctly?

Carlosps commented 9 months ago

I did as you asked, this is the result I got.



Installing "cordova-plugin-applovin-max" for ios

Running command: pod install --verbose

[!] Found multiple specifications for `AppLovinSDK (11.11.2)`:
- /Users/user/.cocoapods/repos/trunk/Specs/9/c/c/AppLovinSDK/11.11.2/AppLovinSDK.podspec.json
- /Users/user/.cocoapods/repos/cocoapods/Specs/9/c/c/AppLovinSDK/11.11.2/AppLovinSDK.podspec.json

Failed to install 'cordova-plugin-applovin-max': Error: pod: Command failed with exit code 1 Error output:
[!] Found multiple specifications for `AppLovinSDK (11.11.2)`:
- /Users/user/.cocoapods/repos/trunk/Specs/9/c/c/AppLovinSDK/11.11.2/AppLovinSDK.podspec.json
- /Users/user/.cocoapods/repos/cocoapods/Specs/9/c/c/AppLovinSDK/11.11.2/AppLovinSDK.podspec.json
    at ChildProcess.whenDone (/Users/user/Desktop/node_modules/cordova-common/src/superspawn.js:136:25)
    at ChildProcess.emit (node:events:390:28)
    at maybeClose (node:internal/child_process:1064:16)
    at Socket.<anonymous> (node:internal/child_process:450:11)
    at Socket.emit (node:events:390:28)
    at Pipe.<anonymous> (node:net:687:12)

pod: Command failed with exit code 1 Error output:
[!] Found multiple specifications for `AppLovinSDK (11.11.2)`:
- /Users/user/.cocoapods/repos/trunk/Specs/9/c/c/AppLovinSDK/11.11.2/AppLovinSDK.podspec.json
- /Users/user/.cocoapods/repos/cocoapods/Specs/9/c/c/AppLovinSDK/11.11.2/AppLovinSDK.podspec.json

[ERROR] An error occurred while running subprocess cordova.

        cordova build ios --release exited with exit code 1.

        Re-running this command with the --verbose flag may provide more information.```
thomasmso commented 9 months ago

ok, in the Podfile, you have two sources. You need to keep source 'https://cdn.cocoapods.org/' then remove source 'https://github.com/CocoaPods/Specs.git'.

Then clear your CocoaPods cache via pod cache clean --all.

Then run pod install --repo-update again.

Carlosps commented 8 months ago

I am still not able to generate the build on iOS.

I have notice there is another plugin cordova-plugin-purchases which also has the https://github.com/CocoaPods/Specs.git. But for then I don't have any issues for building the app on iOS, it seems this plugin is the only causing this issue mentioned above.

Have you tried to generate an iOS build using the "cordova-ios": "^6.2.0" and XCode 14.3.1? As I mentioned, the issue started after updating the XCode version to 14.3.1.

thomasmso commented 8 months ago

@Carlosps - That's very unfortunate. Howabout this. Could you create a branch of our demo app here, and try to reproduce the issue? It would be more efficient this way.

Carlosps commented 8 months ago

I have created a new cordova project and added this plugin and were not able to replicate the issue I mentioned.

It seems it is something relatedI to my project.