Skip to content

Conversation

@Clancey
Copy link

@Clancey Clancey commented Nov 18, 2025

Updated the iOS build process to generate dynamic libraries (.dylib) instead of static libraries (.a), and package them as xcframeworks for both release and debug builds. Modified SConstruct to build shared libraries with appropriate linker flags and framework dependencies. Updated AdmobPlugin.gdip config to reference xcframeworks and embed them. Refactored build.sh to support dynamic library creation, xcframework packaging, and updated artifact copying accordingly. Added .DS_Store to .gitignore.

Updated the iOS build process to generate dynamic libraries (.dylib) instead of static libraries (.a), and package them as xcframeworks for both release and debug builds. Modified SConstruct to build shared libraries with appropriate linker flags and framework dependencies. Updated AdmobPlugin.gdip config to reference xcframeworks and embed them. Refactored build.sh to support dynamic library creation, xcframework packaging, and updated artifact copying accordingly. Added .DS_Store to .gitignore.
Copy link
Collaborator

@cengiz-pz cengiz-pz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After adding the quotes to fix the .gdip file, I have tried to export the demo app + updated plugin and ran into the “Multiple commands produce …/AdmobPlugin.framework” error because both AdmobPlugin.debug.xcframework and AdmobPlugin.release.xcframework are being embedded and copied to the exact same destination path in the app bundle. This causes duplicate CodeSign tasks and fails the archive:

error: Unexpected duplicate tasks
    note: Target 'Admob Demo' (project 'Admob Demo'): CodeSign .../Admob Demo.app/Frameworks/AdmobPlugin.framework
    note: Target 'Admob Demo' (project 'Admob Demo'): CodeSign .../Admob Demo.app/Frameworks/AdmobPlugin.framework

error: Multiple commands produce '.../Admob Demo.app/Frameworks/AdmobPlugin.framework/AdmobPlugin'
    note: Target 'Admob Demo' has copy command from '.../dylibs/ios/plugins/AdmobPlugin.debug.xcframework/ios-arm64/AdmobPlugin.framework' to '.../Admob Demo.app/Frameworks/AdmobPlugin.framework'
    note: Target 'Admob Demo' has copy command from '.../dylibs/ios/plugins/AdmobPlugin.release.xcframework/ios-arm64/AdmobPlugin.framework' to '.../Admob Demo.app/Frameworks/AdmobPlugin.framework'

error: Multiple commands produce '.../Admob Demo.app/Frameworks/AdmobPlugin.framework'
    (same two copy commands as above)

warning: duplicate output file '.../Debug-iphoneos/AdmobPlugin.framework' on task: ProcessXCFramework .../AdmobPlugin.release.xcframework ...
(warnings repeat similarly for Info.plist and the binary itself)

** ARCHIVE FAILED **

Additionally, we already had a plan to transition to fully use xcodebuild and drop SConstruct, but I like your switch to dynamic libs. We'll need to merge the two changes in the near future.

[dependencies]
linked=[]
embedded=[]
embedded=[@[email protected], @[email protected]]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure if these are needed here as usually third-party framework dependencies are listed here. Even if needed, each should be put inside double quotes.

# © 2024-present https://github.com/cengiz-pz
#

.DS_Store
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be great if we could add this under a new "# macOS" section in the file



function generate_static_library()
function generate_dynamic_library()
Copy link
Collaborator

@cengiz-pz cengiz-pz Nov 20, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like the switch to dynamic libraries. It was on our TODO list further down the road.

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants