Giphy / giphy-ios-sdk

Home of the GIPHY SDK iOS example app, along with iOS SDK documentation, issue tracking, & release notes.
https://developers.giphy.com/
Mozilla Public License 2.0
116 stars 52 forks source link

Not working in Xcode 15 #235

Closed josmdddeveloper closed 1 year ago

josmdddeveloper commented 1 year ago

Giphy iOS SDK is not working with Xcode 15, it gives a fatal error when compilating. The problem persists in Xcode 15 beta 4.

cgmaier commented 1 year ago

hey @josmdddeveloper I just tested in Xcode 15 Beta 4 and was able to successfully run projects with this library added as a dependency, both through CocoaPods and SPM. Can you please share additional information including the actual compilation error so we can do our best to help resolve?

josmdddeveloper commented 1 year ago

Hello guys, thank you for your quick answer. When I uninstall Giphy the app runs, but when I install it gives me this error when building (I tried clean etc):

Cycle inside Xtudr; building could produce unreliable results.
Cycle details:
→ Target 'Xtudr': ExtractAppIntentsMetadata
○ Target 'Xtudr': CodeSign /Users/josedominguez/Library/Developer/Xcode/DerivedData/Xtudr-czgovalwsvxfdvderjaaxpswmypq/Build/Products/Debug-iphoneos/Xtudr.app/Frameworks/GiphyUISDK.framework
○ Target 'Xtudr' has copy command from '/Users/josedominguez/Library/Developer/Xcode/DerivedData/Xtudr-czgovalwsvxfdvderjaaxpswmypq/SourcePackages/checkouts/giphy-ios-sdk/GiphyUISDK.xcframework/ios-arm64/GiphyUISDK.framework' to '/Users/josedominguez/Library/Developer/Xcode/DerivedData/Xtudr-czgovalwsvxfdvderjaaxpswmypq/Build/Products/Debug-iphoneos/Xtudr.app/Frameworks/GiphyUISDK.framework'
○ That command depends on command in Target 'Xtudr': script phase “Run Script”
○ Target 'Xtudr' has a command with output '/Users/josedominguez/Library/Developer/Xcode/DerivedData/Xtudr-czgovalwsvxfdvderjaaxpswmypq/Build/Products/Debug-iphoneos/Xtudr.app.dSYM'
○ Target 'Xtudr' has process command with output '/Users/josedominguez/Library/Developer/Xcode/DerivedData/Xtudr-czgovalwsvxfdvderjaaxpswmypq/Build/Products/Debug-iphoneos/Xtudr.app/Info.plist'
○ Target 'Xtudr' has copy command from '/Users/josedominguez/Library/Developer/Xcode/DerivedData/Xtudr-czgovalwsvxfdvderjaaxpswmypq/SourcePackages/checkouts/giphy-ios-sdk/GiphyUISDK.xcframework/ios-arm64/GiphyUISDK.framework' to '/Users/josedominguez/Library/Developer/Xcode/DerivedData/Xtudr-czgovalwsvxfdvderjaaxpswmypq/Build/Products/Debug-iphoneos/Xtudr.app/Frameworks/GiphyUISDK.framework'

Raw dependency cycle trace:

target:  ->

node: <all> ->

command: <all> ->

node: /Users/josedominguez/Library/Developer/Xcode/DerivedData/Xtudr-czgovalwsvxfdvderjaaxpswmypq/Build/Intermediates.noindex/Xtudr.build/Debug-iphoneos/Xtudr.build/Objects-normal/arm64/ExtractedAppShortcutsMetadata.stringsdata ->

command: P0:target-Xtudr-9417866d813214f338ee5e9f0fdb791f5508b3eea6c3a8e42878d948db438fdb-:Debug:ExtractAppIntentsMetadata ->

node: <target-Xtudr-9417866d813214f338ee5e9f0fdb791f5508b3eea6c3a8e42878d948db438fdb--package-copy-files-phase> ->

command: P0:::Gate target-Xtudr-9417866d813214f338ee5e9f0fdb791f5508b3eea6c3a8e42878d948db438fdb--package-copy-files-phase ->

node: <CodeSign /Users/josedominguez/Library/Developer/Xcode/DerivedData/Xtudr-czgovalwsvxfdvderjaaxpswmypq/Build/Products/Debug-iphoneos/Xtudr.app/Frameworks/GiphyUISDK.framework> ->

command: P0:target-Xtudr-9417866d813214f338ee5e9f0fdb791f5508b3eea6c3a8e42878d948db438fdb-:Debug:CodeSign /Users/josedominguez/Library/Developer/Xcode/DerivedData/Xtudr-czgovalwsvxfdvderjaaxpswmypq/Build/Products/Debug-iphoneos/Xtudr.app/Frameworks/GiphyUISDK.framework ->

node: <Copy /Users/josedominguez/Library/Developer/Xcode/DerivedData/Xtudr-czgovalwsvxfdvderjaaxpswmypq/Build/Products/Debug-iphoneos/Xtudr.app/Frameworks/GiphyUISDK.framework> ->

CYCLE POINT ->

command: P0:target-Xtudr-9417866d813214f338ee5e9f0fdb791f5508b3eea6c3a8e42878d948db438fdb-:Debug:Copy /Users/josedominguez/Library/Developer/Xcode/DerivedData/Xtudr-czgovalwsvxfdvderjaaxpswmypq/Build/Products/Debug-iphoneos/Xtudr.app/Frameworks/GiphyUISDK.framework /Users/josedominguez/Library/Developer/Xcode/DerivedData/Xtudr-czgovalwsvxfdvderjaaxpswmypq/SourcePackages/checkouts/giphy-ios-sdk/GiphyUISDK.xcframework/ios-arm64/GiphyUISDK.framework ->

node: <target-Xtudr-9417866d813214f338ee5e9f0fdb791f5508b3eea6c3a8e42878d948db438fdb--fused-phase3-run-script> ->

command: P0:::Gate target-Xtudr-9417866d813214f338ee5e9f0fdb791f5508b3eea6c3a8e42878d948db438fdb--fused-phase3-run-script ->

node: <execute-shell-script-9417866d813214f338ee5e9f0fdb791f20096f5b9f3946b0b81a35c3caa5d671-target-Xtudr-9417866d813214f338ee5e9f0fdb791f5508b3eea6c3a8e42878d948db438fdb-> ->

command: P2:target-Xtudr-9417866d813214f338ee5e9f0fdb791f5508b3eea6c3a8e42878d948db438fdb-:Debug:PhaseScriptExecution Run Script /Users/josedominguez/Library/Developer/Xcode/DerivedData/Xtudr-czgovalwsvxfdvderjaaxpswmypq/Build/Intermediates.noindex/Xtudr.build/Debug-iphoneos/Xtudr.build/Script-E3974DCB28BAA57800EA1D44.sh ->

node: /Users/josedominguez/Library/Developer/Xcode/DerivedData/Xtudr-czgovalwsvxfdvderjaaxpswmypq/Build/Products/Debug-iphoneos/Xtudr.app.dSYM/Contents/Resources/DWARF/Xtudr ->

command: P0:target-Xtudr-9417866d813214f338ee5e9f0fdb791f5508b3eea6c3a8e42878d948db438fdb-:Debug:GenerateDSYMFile /Users/josedominguez/Library/Developer/Xcode/DerivedData/Xtudr-czgovalwsvxfdvderjaaxpswmypq/Build/Products/Debug-iphoneos/Xtudr.app.dSYM /Users/josedominguez/Library/Developer/Xcode/DerivedData/Xtudr-czgovalwsvxfdvderjaaxpswmypq/Build/Products/Debug-iphoneos/Xtudr.app/Xtudr ->

node: /Users/josedominguez/Library/Developer/Xcode/DerivedData/Xtudr-czgovalwsvxfdvderjaaxpswmypq/Build/Products/Debug-iphoneos/Xtudr.app/Info.plist ->

command: P0:target-Xtudr-9417866d813214f338ee5e9f0fdb791f5508b3eea6c3a8e42878d948db438fdb-:Debug:ProcessInfoPlistFile /Users/josedominguez/Library/Developer/Xcode/DerivedData/Xtudr-czgovalwsvxfdvderjaaxpswmypq/Build/Products/Debug-iphoneos/Xtudr.app/Info.plist /Users/josedominguez/Developer/Apps/iOS/Xtudr 5/Xtudr/Info.plist ->

node: /Users/josedominguez/Library/Developer/Xcode/DerivedData/Xtudr-czgovalwsvxfdvderjaaxpswmypq/Build/Products/Debug-iphoneos/Xtudr.app/Frameworks/GiphyUISDK.framework ->

command: P0:target-Xtudr-9417866d813214f338ee5e9f0fdb791f5508b3eea6c3a8e42878d948db438fdb-:Debug:Copy /Users/josedominguez/Library/Developer/Xcode/DerivedData/Xtudr-czgovalwsvxfdvderjaaxpswmypq/Build/Products/Debug-iphoneos/Xtudr.app/Frameworks/GiphyUISDK.framework /Users/josedominguez/Library/Developer/Xcode/DerivedData/Xtudr-czgovalwsvxfdvderjaaxpswmypq/SourcePackages/checkouts/giphy-ios-sdk/GiphyUISDK.xcframework/ios-arm64/GiphyUISDK.framework
cgmaier commented 1 year ago

hey @josmdddeveloper while the GIPHY sdk is present in these messages, it's possibly not the root cause. Have you tried clean + remove derived data? One way to check if the GIPHY SDK is the source of the problem is to check with the example app in this repo.

josmdddeveloper commented 1 year ago

Thank you @cgmaier

The example app installs fine.

I will try some configurations. In my main app the problem dissapears when I remove the Giphy from the package manager. But maybe could be a problem with other libraries, or the Xcode beta.

I will let you know as soon as I find a workaround just in case someone else faces this error.

josmdddeveloper commented 1 year ago

UPDATE: I found the source of the problem, it's because of Firebase.

Changing build options from "Dwarf with dsym" to "Dwarf" makes it work.

Here is more info about this behaviour https://forums.swift.org/t/xcode-15-beta-cycle-inside-target-building-could-produce-unreliable-results/65906